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

[ci.jenkins.io] Migrate ci.jenkins.io EKS clusters out from CloudBees AWS account #3954

Closed
Tracked by #3662
dduportal opened this issue Feb 16, 2024 · 23 comments
Closed
Tracked by #3662

Comments

@dduportal
Copy link
Contributor

dduportal commented Feb 16, 2024

Service(s)

AWS, Azure, ci.jenkins.io, sponsors

Summary

Today, ci.jenkins.io utilizes 2 EKS clusters to spin up ephemeral agents (for plugin and BOM builds). These clusters are hosted in a CloudBees-sponsored account (historically used to host a lot of Jenkins services).

We want to move these clusters out of CloudBees AWS to ensure non CloudBees Jenkins contributors can manage it and to use credits from other sponsors as AWS, DigitalOcean and Azure gave us credits to be used.

Initial working path (destination: AWS sponsored account)

AWS is sponsoring the Jenkins project with $60.000 for 2024, which are applied to a fresh new AWS account.

We want to migrate the 2 clusters used by ci.jenkins.io into this new AWS account:

  • Moving out from CloudBees-owned AWS account allows non CloudBees employees to help managing these resources
  • Consuming these credits is key to ensure we can continue sponsor on long term

Updated working path

As discussed during the 2 previous infra SIG meetings, we have around 28k$ credits on the Azure sponsored account which expires end of August 2024 (was May 2024 but @MarkEWaite asked for extension of this deadline ❤️ ), while both DigitalOcean and AWS (non CloudBees) accounts have credits until January 2025.

=> As such, let's start by using a Kubernetes cluster in Azure (sponsored) AKS to use these credits until end of summer before moving to the new AWS account


Notes 📖

A few elements for planning these migrations:

Reproduction steps

No response

@dduportal
Copy link
Contributor Author

First things first: connected to the account with the jenkins-infra-team account (and its shared TOTP for 2FA) and was able to confirm we have the $60,000 credits:

Capture d’écran 2024-04-03 à 16 20 21

@dduportal
Copy link
Contributor Author

dduportal commented Apr 5, 2024

Update: proposal to boostrap the AWS account. To be discussed and validated during the next weekly team meeting.

  • Root account:

  • Each Jenkins Infra team member ("OPS") will have a nominative AWS account with mandatory password and MFA, no API access (only Web Console) and only the permission to assume a role based on their "trust" level.

  • The following roles are proposed:

    • infra-admin: allows management of usual resources (EC2, EKS, S3, etc.) but also access (read only) to billing
    • infra-user: allows management of usual resources (EC2, EKS, S3, etc.)
    • infra-read: allows access (read-only) of usual resources (EC2, EKS, S3, etc.)
  • The infrastructure as code (jenkins-infra/aws, Terraform project) will have 2 IAM users, and each one will only be able to assume a role.

  • The "Assume Role" means AWS STS will be used to generate 1 hour valid token (e.g. whether Web Console or API is used, the credential is only valid 1 hour). It will require additional commands for end users or Terraform but it will avoid keeping APi keys unchanged for months (years?).

  • We won't use the AWS IAM Identity Center as it is overkill (we only have one AWS account with just a few resources).

  • We won't deploy stuff outside of a base region (eventually 2), in a single AZ per region (no HA: it fails, then it fails).

  • The scope of resources must only be ephemeral workloads. Ideally for ci.jenkins.io: public services so the workloads are considered unsafe and untrusted by default (so no mix up with other controllers such as infra.ci.jenkins.io).

@dduportal dduportal changed the title [AWS] Migrate ci.jenkins.io EKS clusters from CloudBees AWS account to Jenkins AWS (sponsored) account [ci.jenkins.io] Migrate ci.jenkins.io EKS clusters out from CloudBees AWS account May 2, 2024
dduportal added a commit to dduportal/aws that referenced this issue May 21, 2024
…/helpdesk#3954

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to dduportal/digitalocean that referenced this issue May 21, 2024
dduportal added a commit to dduportal/aws that referenced this issue May 21, 2024
…/helpdesk#3954

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/digitalocean that referenced this issue May 21, 2024
* cleanup: empty doks and doks-public Kubernetes clusters as per jenkins-infra/helpdesk#3954

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>

* fixup

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>

* fixup

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>

---------

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to dduportal/digitalocean that referenced this issue May 21, 2024
dduportal added a commit to jenkins-infra/aws that referenced this issue May 21, 2024
…/helpdesk#3954 (#555)

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to dduportal/digitalocean that referenced this issue May 21, 2024
dduportal added a commit to jenkins-infra/digitalocean that referenced this issue May 21, 2024
dduportal added a commit to dduportal/datadog that referenced this issue May 21, 2024
…ic, doks and doks-public and their hosted services as per jenkins-infra/helpdesk#3954

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/datadog that referenced this issue May 21, 2024
…ic, doks and doks-public and their hosted services as per jenkins-infra/helpdesk#3954 (#250)

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/jenkins-infra that referenced this issue May 21, 2024
…nd doks-public as per jenkins-infra/helpdesk#3954 (#3442)

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal
Copy link
Contributor Author

Update:

Stop managing these clusters

jenkins-infra/kubernetes-management#5243

Remove ci.jenkins.io configurations for these clusters

jenkins-infra/jenkins-infra#3442

Delete these clusters from clouds (jenkins-infra/aws and jenkins-infra/digitalocean)

=> also, forgot to disable monitors, reminded by @smerle33 and done in jenkins-infra/datadog#250

dduportal added a commit to dduportal/aws that referenced this issue May 21, 2024
…nd doks-public as per jenkins-infra/helpdesk#3954

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/aws that referenced this issue May 21, 2024
…nd doks-public as per jenkins-infra/helpdesk#3954 (#554)

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/documentation that referenced this issue May 22, 2024
dduportal added a commit to jenkins-infra/azure that referenced this issue May 22, 2024
…s.jenkins.io` CNAME record (#707)

Related to jenkins-infra/helpdesk#3954

This PR removes the `digitalocean.updates.jenkins.io` CNAME DNS record
which has been used for [prototyping the new update
center](jenkins-infra/helpdesk#2649). As the
Digital Ocean clusters have been removed and as we don't need this
record, this PR deletes it
@dduportal
Copy link
Contributor Author

Update: this issue is closable:

Screenshot 2024-05-21 at 15 56 38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants