-
Notifications
You must be signed in to change notification settings - Fork 404
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
gce: add scripts for CI test and nightly builds #445
Conversation
Also, do we need to create any accounts? |
/hold for discussion and pending items |
Shouldn't we should be able to leverage existing accounts similar to what we are doing with CAPG :) |
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.
It might be good to dedupe boskos management approaches with https://github.com/kubernetes-sigs/image-builder/pull/423/files#diff-1c56e5a5df7b6f697f270ac094d292b4a3929e1ebafd0a1970f35c895d4a986e
fc17458
to
f281516
Compare
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.
A few suggestions around the exception handling, otherwise this is looking pretty good
788009b
to
d2e19aa
Compare
a4a5f5e
to
5b3fa6a
Compare
/lgtm |
Is there an associated test-infra PR to add the job as optional so we can use it to test the PR before merging? |
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.
I think everything I have is a nit, but it would be nice to see the typo fixed first.
|
||
# build image for 1.18 | ||
# using PACKER_FLAGS=-force to overwrite the previous image and keep the same name | ||
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=packer/gce/ci/nightly/overwrite-1-18.json PACKER_FLAGS=-force make deps-gce build-gce-all'" |
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.
deps-gce
is already a dependency of the gce-all
build target, so adding that explicitly ins't strictly necessary. But I have no problem with it being listed out.
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.
i will keep that just for visibility
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=packer/gce/ci/nightly/overwrite-1-20.json PACKER_FLAGS=-force make deps-gce build-gce-all'" | ||
|
||
echo "Displaying the generated image information" | ||
filter="name~cluster-api-ubuntu-1804-*" |
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.
I notice this filter includes 1804 only, but the ci-gce script does not (just has cluster-api-ubuntu-*
. Do we want to make this one the same so that it picks up 2004? I see that 20.04 Ubuntu builds are currently commented out in the Makefile (however, not completely because it still shows up in make help
), but if we change this filter I think it would mean that you wouldn't need to change anything when Ubuntu 20.04 does get reinstated?
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.
good catch! thanks!
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.
thanks for your review and feedback @codenrhoden
made the changes requested
/test pull-azure-vhds That windows Azure failure (I want to make some changes soon that are a little more sane about what tests run depending on what changed - there's no need for Azure tests in this case for example) doesn't quite look like a flake to me, but we'll see what happens. |
Have you all looked into https://cloud.google.com/build/docs/building/build-vm-images-with-packer at all? My glance of the CI scripts is that they boil down to packer calls https://cloud.google.com/build/docs/building/build-vm-images-with-packer#required_iam_permissions is something we would want scripted for the projects that need this https://cloud.google.com/build/docs/building/build-vm-images-with-packer#creating_a_packer_builder_image is something we might want to push to k8s-staging-test-infra or something |
@spiffxp to be honest this is the first time I'm seeing this, looks very nice. I tried the scripts using my personal GCP account and everything worked fine, and regarding the API I just enable the compute one. I think this looks interesting, can we do that in a follow up maybe? I think we need to change some things in the image builder to make this works |
/test pull-image-builder-gcp-all |
I think we can override the azure-vhds tests and investigate that in a follow you because that is not part of this PR WDYT @codenrhoden ? and to close this PR need some final reviews/approval: |
I am ok merging this to unblock and finding an alternate approach as followup |
I'll review more closely at keyboard tomorrow |
I'm checking what are the changes need to apply here to use cloudbuild together with packer to build the image |
open a 🧵 to discuss better the cloudbuild option to build CAPG GCE images: https://kubernetes.slack.com/archives/CCK68P2Q2/p1621237438253400 |
/lgtm Agreed that merging this now and exploring other options as follow-up makes sense. Will see what happens with the flaky Azure test. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: codenrhoden, cpanato The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The error in the failed pull-azure-vhds job above is:
@jsturtevant @perithompson have you seen this before? |
will override this failure |
/override pull-azure-vhds |
I cant :/ /test pull-azure-vhds |
No this is a new one on me, looks like the docker service didn't start on this node? |
The first part to add GCE image builder to run on CI
This PR adds the script that will be used in prow to build the images for CAPI/GCE
Also adds scripts to run nightly builds
Fixes: #437
Will open the test-infra PR to add the job
Please let me know if there is a better way to use boskos
/assign @detiber @vincepri