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

Add infra scripts/terraform for prow build cluster prototype #806

Merged
merged 10 commits into from
Apr 28, 2020

Conversation

spiffxp
Copy link
Member

@spiffxp spiffxp commented Apr 27, 2020

Add a kubernetes/prow-build-test cluster provisioned via terraform

  • uses n1-highmem-2 nodes; e2e jobs were evicted from n1-standard-1

Add two service accounts:

  • prow-build-test - given edit access to e2e projects, and write access to gs:// bucket for prow
  • boskos-janitor-test - given edit access to e2e projects

Add five gcp projects:

  • spiffxp-node-e2e-project - to pin node-e2e jobs to
  • spiffxp-gce-project - to pin e2e or other jobs to
  • spiffxp-boskos-project-0[1-3]: for boskos' gce-project pool
  • minimal set of changes from default project creation to get node-e2e and e2e jobs to pass

While I was here I needed to script creation of ip addresses so I refactored/added to lib.sh, if need be I can pull those commits into a separate PR

I hooked this build cluster up to my own prow instance so I could iterate on getting things working.

eg:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 27, 2020
@k8s-ci-robot k8s-ci-robot added wg/k8s-infra approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 27, 2020
@spiffxp spiffxp added area/infra Infrastructure management, infrastructure design, code in infra/ area/cluster-mgmt labels Apr 27, 2020
@spiffxp
Copy link
Member Author

spiffxp commented Apr 27, 2020

/uncc @mikedanese
/cc @dims @bartsmykla

@k8s-ci-robot k8s-ci-robot requested review from bartsmykla and dims and removed request for mikedanese April 27, 2020 17:39
@spiffxp
Copy link
Member Author

spiffxp commented Apr 27, 2020

I have already actuated the stuff in this PR, so I'm running audit now to open a separate PR catching these changes (and anything else that may have happened)

@spiffxp
Copy link
Member Author

spiffxp commented Apr 27, 2020

#807 is the audit

infra/gcp/ensure-e2e-projects.sh Show resolved Hide resolved
infra/gcp/ensure-e2e-projects.sh Show resolved Hide resolved
infra/gcp/ensure-e2e-projects.sh Show resolved Hide resolved
specifically:
- copied aaa and renamed
- followed IMPORTANT comments for test cluster EXCEPT
- used n1-highmem-2 because e2e jobs eat memory like candy
  and were getting evicted from n1-standard-1's
address terraform plan warnings, so:
- no needless interpolation
- got rid of ip_allocation_policy bloc

note: I fixed these before standing up the cluster, I split out into
their own commit for clarity. It was not clear to me how to do a
migration for aaa

ref: https://www.terraform.io/docs/providers/google/guides/version_3_upgrade.html#automatic-subnetwork-creation-for-vpc-native-clusters-removed
Seeing a lot of "Cloud Logging API has not been used in project 1234
before or it is disabled" on e2e runs
@thockin
Copy link
Member

thockin commented Apr 27, 2020 via email

@spiffxp
Copy link
Member Author

spiffxp commented Apr 27, 2020

FWIW I consider basically all of this ephemeral, I just wanted to be able to describe how/why I created this prototype. Will sketch out more in #752 as well as discuss during this week's wg-k8s-infra meeting

I'm not planning on pointing the actual prow.k8s.io at this until it's not a test cluster

set -- "${E2E_PROJECTS[@]}"
fi

for prj; do
Copy link
Member

Choose a reason for hiding this comment

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

The other ensure-* scripts all use color and indent to make the output more human-friendly. Any reason not to do that here?

Copy link
Member Author

@spiffxp spiffxp Apr 28, 2020

Choose a reason for hiding this comment

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

It was mostly laziness. Turns out indent didn't work with macOS' default version of sed, so now we look for gsed as a fallback. The color 6 thing doesn't actually color output on my terminal but I'm not going to troubleshoot that today.

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Thanks!

/lgtm
/approve
/hold

It wasn't clear if you wanted to commit these "ephemeral" changes or not, so hold - remove at will

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 28, 2020
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 28, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: spiffxp, thockin

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@spiffxp
Copy link
Member Author

spiffxp commented Apr 28, 2020

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 28, 2020
@k8s-ci-robot k8s-ci-robot merged commit 84e0ed5 into kubernetes:master Apr 28, 2020
@spiffxp spiffxp deleted the prow-build-test branch April 28, 2020 22:19
@spiffxp spiffxp mentioned this pull request May 7, 2020
@spiffxp spiffxp added the area/prow Setting up or working with prow in general, prow.k8s.io, prow build clusters label Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/infra Infrastructure management, infrastructure design, code in infra/ area/prow Setting up or working with prow in general, prow.k8s.io, prow build clusters cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants