-
Notifications
You must be signed in to change notification settings - Fork 36
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
US: NGI software demo runtime environment for services #614
Comments
Instead of installing nix, couldn't we use a static version of Nix? If I'm not mistaken, this means users won't have to deal with the cleanup/uninstallation afterwards. |
The biggest complexity of installing Nix is having to create build users and the nix store, which is very system dependend and contains a lot of edgecases. I would've assumed that the current installscripts (determinate/official) already download a static binary? |
Yeah, it appears I was mistaken after all. I though nixStatic could run without setting up the build users. I just tried it in a Docker Alpine image and it kept complaining about that. It did creat the nix store in |
@erictapen and I reworked the user story to enable us to skip what were three rather involved steps installing Nix, enabling flakes, etc. which are well-known show stoppers for sysadmins that we can't do much about within our scope. We use implementation-agnostic wording, with the examples illustrating a particular implementation with OCI images, because that's something we can expect a certain fraction of sysadmins to work with habitually.
@erictapen, as for UX, to make the transition between 2. and 4. smoother we may want to invoke the image with all the port mappings and mounts already, and maybe even auto-rebuild on file change so there's no need to even interact with the container after launching it. |
@fricklerhandwerk , in case we choose application (OCI) containers as a runtime for our demos, how we want to run desktop apps or/and apps which require access to GPU or sound device (for example Blink) ? |
Also, note that NixOS system modules (as we have now) don't work for application containers. |
In case of application containers, what are we going to do if NGI program requires additional services to run (for example PostgreSQL, RabbitMQ, ...) ? Where are they going to run ? How we configure them ? |
We won't do it yet and thus don't care -- yet. The point of this demo is to have an e2e interaction at all. Mid-to-long-term we'd need to wean people into booting a proper NixOS on their hardware.
This probably needs a clarification in the user story: We don't necessarily need per-application containers, it would be just as good to have a proper environment that can reconfigure itself with the services we need, e.g. including the entire NGIpkgs checkout and Nix set up just the right way.
In the same container controlled by NixOS inside. |
@imincik and @eljamm , we where able to run NixOS system in container using My setup (@imincik )
Container is started, postgresql is running, but there are multiple errors such as
|
Even though our experiment has proved that IT IS possible to run "full" NixOS system with systemd as service manager in OCI container, I still suggest to use LXC which is technology properly designed for this use case. |
Using LXC for our service demosI investigated this a bit, and I ended up with a container, successfully starting the AtomicData service inside. But there seems to be quite the bit of boiler plate on the user side involved to get a container running. Find my code here: https://github.com/erictapen/ngipkgs/tree/lxc-demos, then build the demo images with Pros
Cons
It looks like an LXC image can't specify defaults for this by itself. |
Conclusion so far:
|
What about offering NGI software in multiple formats ?
|
There is already a static Nix build, but you'd also need to set up the builders to use it (see comment above). That said, this seems like an effort that the distros themselves need to take as it would just increase our maintenance burden.
Do you mean from the installer or the distros' package manager? In both cases, this approach might lacks a follow-up strategy by itself, as we discussed previously (see notes). As such, we'll still need a way to compose services, whether that's with VMs, OCI images or something else. |
I mean DEB, RPM package containing static Nix binary with all other configuration included (e.g. services, ...). |
Following the discussion with @erictapen and @imincik, each application's page on ngi.nixos.org would show something like this
Next steps could be pointing to documentation/guides for refactoring to more sophisticated setups, such as using npins or making configuration reusable across machines, etc. but this is for later user stories. |
We briefly talked about the problem of running software that is designed for server networks on somebodys local computer: We can't expect users to have public IP addresses, so ACME won't work and we can't expect them to setup domain name resolution. Out of that follows:
|
This is a subset of what #575 describes.
As a user of NGIpkgs running Ubuntu, I want to launch and experiment with an NGI application running as a service, in order to assess whether it is fit for purpose.
Target audience: small-business sysadmins
podman
or VMscurl | sh
and pollute their existing environmentOperating conditions:
Demo application:
Acceptance criteria
Given I have picked an NGI application to experiment with,
When I follow the instructions on the project page,
Then the software will run on my machine, I can try out different settings, and remove the software without traces afterwards.
Implementation notes
The project page should guide through roughly these steps:
configuration.nix
file into the container and runningnixos-rebuild
inside the containerOngoing design discussion: https://www.notion.so/nixos-foundation/1c059d49e1be804a9b68de6caab9c891?v=8b0d731ed6b04fd985c383fa878e8be5
The text was updated successfully, but these errors were encountered: