Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Debian as base? #414

Closed
felipecrs opened this issue Jun 9, 2022 · 9 comments
Closed

Switch to Debian as base? #414

felipecrs opened this issue Jun 9, 2022 · 9 comments
Labels
stale There has not been activity on this issue or PR for quite some time.

Comments

@felipecrs
Copy link
Contributor

felipecrs commented Jun 9, 2022

Problem/Motivation

I like to keep my Home Assistant instance as my development environment for things such as addons and frontend plugins, so that I can make modifications in such files, build them and do not need to copy them from my computer to my Hass, since they would be already there.

The SSH addon helps a lot with that, but there are some limitations which I found to be quite bad:

  1. The VS Code - Remote SSH cannot connect to it (because it does not support Alpine)
  2. Lots of things fail to compile or to execute on Alpine (e.g. Volta, node-gyp)

Expected behavior

If the base were Debian, none of these issues would be found (as in VS Code addon, everything works perfectly there -- except that SSH server isn't exposed there).

Actual behavior

Described above.

Steps to reproduce

N/A

Proposed changes

Switching to Debian would solve most of the issues caused using Alpine, at the expense of...

$ docker images | grep base
ghcr.io/hassio-addons/debian-base/amd64                           6.0.0               4caf8ef75a9a   5 hours ago      96.9MB
ghcr.io/hassio-addons/base/amd64                                  12.0.0              79b575e6dfda   2 days ago       23.3MB

Not much, and the difference can be even lesser, as the Debian comes with some packages that aren't preinstalled in Alpine but would get preinstalled in SSH addon anyway.

Nevertheless, Debian is a more common environment for users (especially due to apt-get), which has some importance since the main goal of the SSH extension is to provide a distro-like environment inside Home Assistant.

Also, would make the VS Code addon and SSH addon more coordinated (e.g: users must know that in "Terminal" they use "apk", and in VS Code they use "apt-get").

Alternative

Instead of switching to Debian, we could also ship a variant. But I would rather jump directly to Debian to minimize maintenance. If not by the size, there aren't any benefits of using Alpine here (right?).

PS: I can help.

@frenck
Copy link
Member

frenck commented Jun 9, 2022

I have considered (and played with it many times before), for the same reasons.

There are more expenses, in terms of speed and size (besides the base image). That all said; My main concern is the sizable breaking change it brings. Many people use this add-on with additional packages and have logic from external (e.g., flows from HA).

That latter is the main reason I've never taken this step.

Nevertheless, Debian is a more common environment for users (especially due to apt-get), which has some importance since the main goal of the SSH extension is to provide a distro-like environment inside Home Assistant.

True, however, it has proven to be pretty valuable actually. Most tutorials found online do not work because of the missing apt. This is good, as users are often not aware this is a containerized environment.

@felipecrs
Copy link
Contributor Author

True, however, it has proven to be pretty valuable actually. Most tutorials found online do not work because of the missing apt. This is good, as users are often not aware this is a containerized environment.

Interesting.

My main concern is the sizable breaking change it brings. Many people use this add-on with additional packages and have logic from external (e.g., flows from HA).

Additional packages: indeed, users would need to refactor it for sure, but they also can take as inspiration the additional packages they have set for the VS Code addon.

Logic from external: I think it would be a little rare to have a script from HA to call apk commands, but don't have data to prove this point.

Also, Alpine is used to provide stripped binaries (like simplified versions of GNU Coreutils with fewer options or without --long-names options), in which the Debian variant of the same supersedes the functionality without breaking the existing ones.


If we decide to switch to Debian, we need to bump the major version and point out the points of concern:

  • You need to rewrite additional_packages
  • You need to review init_commands to ensure they are compatible with the new base
  • You need to review any scripts/command that you may run as stdin services to ensure they are compatible with the new base

I do understand the breaking changes are sizeable, but if it's of common sense that Debian would be a better choice for the base image, then I believe we should face the situation.

@frenck
Copy link
Member

frenck commented Jun 9, 2022

I have a Debian variant around, I know the implications of the change. But didn't do it before because of the above concerns.

I need to (at least) sleep over it

@github-actions
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jul 10, 2022
@frenck
Copy link
Member

frenck commented Jul 16, 2022

The bot marked it as stale, but its still on my todo (responding to get the bot to go away).

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Jul 17, 2022
@github-actions
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Aug 17, 2022
@frenck
Copy link
Member

frenck commented Aug 17, 2022

not stale...

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Aug 18, 2022
@github-actions
Copy link

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Sep 17, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 24, 2022
@jgramling17
Copy link

Any updates on your thoughts?
Tried to fork the repo and build my own debian variant but I'm getting lost along the way.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

No branches or pull requests

3 participants