-
Notifications
You must be signed in to change notification settings - Fork 8
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
automate peerpods image upload & use that in Terraform configs #931
Conversation
82f69b5
to
105ffe0
Compare
We don't want to hard-code this.
105ffe0
to
d620796
Compare
I think the caching isn't correct the way it is currently implemented: If I upload |
Good catch, I'll integrate the store hash into the image reference to avoid this. |
Not sure that's easily possible. :( Azure's image infra is crap. Image versions are restricted to semver, but having a separate gallery for each image requires additional time for creation during upload. |
Turns out the limits on the version are pretty lax, so we can just use |
d620796
to
f2120a4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
In the future, we'll also want to upload images to that resource group and we want to do that before running Terraform because Terraform takes the image id as an input. Instead create the cluster manually.
This script: 1. Runs nix to build an image. 2. Uploads it to azure. 3. Writes the image id to a file that's automatically loaded by Terraform. Note that we skip uploading if we already have a cache image id.
Use a newer uplosi that has fixes for private galleries.
Uploading the image will populate the image_id variable that's used by Terraform to create the cluster.
We can derive the values for these variables from the values configured in justfile.env.
This resource group is only used for the non-peerpods AKS resource group. The peerpods cluster doesn't need to read from this resource group.
f2120a4
to
ba47f6d
Compare
@burgerdev @3u13r can one of you review this pr? |
I have two approvals, but Paul's last review requested changes, so I can't merge this. Given that Paul is on vacation until Wednesday, and has said that he's fine with merging this if there are approvals by other reviewers, I'll temporarily disable the merge requirement to merge this PR. |
This PR adds a script/just target for automating the image upload of peerpod VM images and adjusts our Terraform configs to use the image id of the uploaded image.