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

minimal installer: support cloud-init #39088

Closed
wants to merge 1 commit into from
Closed

Conversation

wmertens
Copy link
Contributor

Fixes #39076

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@@ -7,4 +7,7 @@
imports =
[ ./installation-cd-base.nix
];

# Enable cloud-init so the image can also be used for cloud providers
services.cloud-init.enable = true;
Copy link
Member

@Mic92 Mic92 Apr 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds python + libraries to the iso. How much does this increase the image size?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 2.7 is already in the minimal image, so I'm hoping not much. I hope I can find out via ofBorg :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch, running nix-shell -p cloud-init on the minimal ISO turns into a 60MB download and 500MB unpacked :-/

Not sure if that is the best way to test though.

@Mic92
Copy link
Member

Mic92 commented Apr 17, 2018

We have modules/virtualisation/nova-config.nix do we offer a cloud image somewhere?

@wmertens
Copy link
Contributor Author

Another approach would be to have a minimal script like the one @copumpkin wrote for AWS. Parse at least the ssh stuff and expect a nix expression for the rest. User data is free-form…

@wmertens
Copy link
Contributor Author

@GrahamcOfBorg build nixos.iso_minimal.x86_64-linux

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: nixos.iso_minimal.x86_64-linux

Partial log (click to expand)

Cannot nix-instantiate `nixos.iso_minimal.x86_64-linux' because:
error: attribute 'nixos' in selection path 'nixos.iso_minimal.x86_64-linux' not found

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: nixos.iso_minimal.x86_64-linux

Partial log (click to expand)

Cannot nix-instantiate `nixos.iso_minimal.x86_64-linux' because:
�[31;1merror:�[0m attribute 'nixos' in selection path 'nixos.iso_minimal.x86_64-linux' not found

@wmertens
Copy link
Contributor Author

@GrahamcOfBorg build iso_minimal.x86_64-linux

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: iso_minimal.x86_64-linux

Partial log (click to expand)

Cannot nix-instantiate `iso_minimal.x86_64-linux' because:
error: attribute 'iso_minimal' in selection path 'iso_minimal.x86_64-linux' not found

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: iso_minimal.x86_64-linux

Partial log (click to expand)

Cannot nix-instantiate `iso_minimal.x86_64-linux' because:
�[31;1merror:�[0m attribute 'iso_minimal' in selection path 'iso_minimal.x86_64-linux' not found

@dezgeg
Copy link
Contributor

dezgeg commented Apr 18, 2018

Doesn't cloud-init block bootup until it manages to reach the metadata server? I can't recall exactly where I encountered that but IIRC it does.

@wmertens
Copy link
Contributor Author

wmertens commented Apr 18, 2018 via email

@wmertens
Copy link
Contributor Author

I'm closing this, I'll continue the conversation in #39076 to come up with something better suited to NixOS.

@wmertens wmertens closed this Apr 18, 2018
@lheckemann lheckemann deleted the iso-cloud-init branch July 13, 2020 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants