-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
nixos/azure: revamp, make it easy to do ongoing maintenance #62635
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
Conversation
Note for reviews, as of right now, there are a number of in-progress, development-y things in this PR that will certainly be removed before it's ready for a real review or merge consideration. |
e5c95e0
to
34f29b0
Compare
This is ready for review. |
nvim ./../../../modules/virtualisation/azure-images.nix | ||
export AZURE_SUBSCRIPTION_ID="<production NixOS subscription ID>" | ||
export AZURE_RESOURCE_GROUP="NIXOS_PRODUCTION" | ||
export AZURE_STORAGE_ACCOUNT="nixosofficial" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to update these when we get the subscription info.
The official account might be a legacy SA in a non-RG, in which case we can try to move it or maybe just make a new "official" storage account, especially since I didn't pull over the very old images anyway.
The structure change of nixos/modules/virtualisation/azure-images.nix might break nixops, assuming nixops isn't already broken. Wrt storage account, I am sure it is still a legacy storage account, since it was created a zillion years ago :-) |
Looks like you're right. I'll do something to prevent breaking nixops (further) at least: https://github.com/NixOS/nixops/blob/5cd194e3e91c6af789b449eb719191fe1310772b/nix/eval-machine-info.nix#L240 |
I patched this up to not touch I haven't tested any upgrade scenarios (though I don't think I really change anything substantive). Or NixOps. |
Dropping on by to say thank-you for doing this <3 |
Raised NixOS/nixos-homepage#282 which updates instructions on the homepage. |
re: The Azure images are old and there are issues with them: I can confirm this.
|
Note, if Azure uses grow partition, and if I recall my own work from 2 weeks ago, it does... then we should also push for this to be merged: #58471 BTW: This branch isn't in a good state to be merged. I think I did a bunch of fixes on a VM and then blew away the machine without pushing the changes up. I'll have to to do it again and there are a few other things on the list first. |
I've refactored this again locally. I've got it to where it can replicate images across all regions, etc, but I'm frankly losing any interest in supporting anything related to Azure. See this issue for an example of one of the many reasons: Azure/azure-cli#10041 (comment) |
Push your bits please :-) |
Even if there won't be an official NixOS image, we could maybe still profit from the improvements when creating our custom images. Please push your changes @colemickens |
Are there any images I can try? I wasn't able to follow what was going on from the above conversation. |
I get the same error with the current instructions. |
It turns out the shell on macOS is really old but I now get
|
@idontgetoutmuch My Hopefully as a follow up, we can remove all of the old images. I really don't think there's any point in keeping them around. |
@colemickens great :) - at the moment I am just trying to build an image. I am logging what happens as I go in #62635 (comment). |
|
I replace
|
|
|
This is basically superseded by : #78827 |
Motivation for this change
sudo
to be password-less #39523 (this PR does not address, I think that security change should be in a separate PR)Please see the new
nixos/maintainers/scripts/azure/README.md
for an explanation of what I've added and how to use it.These changes:
Remaining TODOs are listed in the README. I'd also like to figure out the Nix API that would be appropriate for allowing callers of
mkAzureImage
to be able to pass-in the other stuff make-disk-image takes, or extra nixos modules, etc.This is a WIP since I have some TODOs I'm finishing, but since I've started bugging people in IRC, I wanted to open this.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)