python312Packages.yoda: 2.0.1 -> 2.0.2
[NixPkgs.git] / nixos / maintainers / scripts / azure-new / README.md
blobe5b69dacec08c0025e5a931933f47690d35f128f
1 # azure
3 ## Demo
5 Here's a demo of this being used: https://asciinema.org/a/euXb9dIeUybE3VkstLWLbvhmp
7 ## Usage
9 This is meant to be an example image that you can copy into your own
10 project and modify to your own needs. Notice that the example image
11 includes a built-in test user account, which by default uses your
12 `~/.ssh/id_ed25519.pub` as an `authorized_key`.
14 Build and upload the image
15 ```shell
16 $ ./upload-image.sh ./examples/basic/image.nix
18 ...
19 + attr=azbasic
20 + nix-build ./examples/basic/image.nix --out-link azure
21 /nix/store/qdpzknpskzw30vba92mb24xzll1dqsmd-azure-image
22 ...
23 95.5 %, 0 Done, 0 Failed, 1 Pending, 0 Skipped, 1 Total, 2-sec Throughput (Mb/s): 932.9565
24 ...
25 /subscriptions/aff271ee-e9be-4441-b9bb-42f5af4cbaeb/resourceGroups/nixos-images/providers/Microsoft.Compute/images/azure-image-todo-makethisbetter
26 ```
28 Take the output, boot an Azure VM:
30 ```
31 img="/subscriptions/.../..." # use output from last command
32 ./boot-vm.sh "${img}"
33 ...
34 => booted
35 ```
37 ## Future Work
39 1. If the user specifies a hard-coded user, then the agent could be removed.
40    Probably has security benefits; definitely has closure-size benefits.
41    (It's likely the VM will need to be booted with a special flag. See:
42    https://github.com/Azure/azure-cli/issues/12775 for details.)