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

Migrate ci.jenkins.io to the sponsored subscription #3913

Closed
21 tasks done
dduportal opened this issue Jan 18, 2024 · 11 comments
Closed
21 tasks done

Migrate ci.jenkins.io to the sponsored subscription #3913

dduportal opened this issue Jan 18, 2024 · 11 comments
Assignees

Comments

@dduportal
Copy link
Contributor

dduportal commented Jan 18, 2024

Service(s)

ci.jenkins.io

Summary

This issue tracks the migration of ci.jenkins.io's controller VM to the secondary sponsored Azure subscription.

Ref. #3908 (comment)

The goals are:

  • Move ~450$ of monthly billing out of the main subscription
  • Improve network performances by keeping all of ci.jenkins.io controller and VMs in the same vnet

Prerequisites are fulfilled:

Plan

  • Create a new (and distinct) ci.jenkins.io VM using our module in the new subscription
    • Terraform creation
    • Puppet setup
    • Allow the new VM in all required locations:
      • LDAP (for logging in)
      • AWS cloud (for agents)
      • DigitalOcean (for agents)
  • Initial copy of disk data from existing VM to the new VM
    • Snapshot
    • New disk from snapshot
    • Mount manually new disk
    • Rsync from new disk to VM disk
    • Cleanup
  • Effective migration to the new VM
    • Announce operation
    • Stop current ci.jenkins.io
    • Sync last changes
    • Move DNS records
    • Restart VM
    • Check everything works (starting, accessing with HTTP and SSH, run Infra acceptance test job to check for allocation of all kind of agents
    • Announce end of operation
@dduportal dduportal removed the triage Incoming issues that need review label Jan 18, 2024
dduportal added a commit to jenkins-infra/azure that referenced this issue Jan 18, 2024
…e azure VM controller module to support distinct AzureRM provider for DNS (#585)

Ref. jenkins-infra/helpdesk#3913

Blocked by jenkins-infra/shared-tools#135

This PR expects module to be updated as it sets up providers for the 3
existing controllers

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/azure that referenced this issue Jan 22, 2024
…roller to secondary sponsored subscription (#583)

Ref. jenkins-infra/helpdesk#3913

This PR adds a new ci.jenkins.io controller VM in the new subscription.

Blocked by:
- Subnet to add for the controller in the new subscription:
jenkins-infra/azure-net#195
- Update the terraform module for azure vm controllers to support
different AzureRM providers between resources and DNS records (Link to
be added)

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal modified the milestones: infra-team-sync-2024-01-23, infra-team-sync-2024-01-30 Jan 24, 2024
dduportal added a commit to jenkins-infra/azure that referenced this issue Jan 24, 2024
…601)

The goal of this PR is to recreate the new (sponsored) VM and ensure it
has a proper DNS (and hostname) so that Puppet can manage it properly.

Related to jenkins-infra/helpdesk#3913

---------

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

Update:

WiP:

  • Puppet setup (to finish tomorrow with proper data disk UUID)

@dduportal
Copy link
Contributor Author

Update:

  • Initial data copy done
    • snapshot -> disk -> attached to new VM
    • Format and mount the data disk in /var/lib/jenkins
    • Mount the temp disk
    • Ran rsync
    • After rsync finished: unmount all disks, VM reboot, delete temp disk and temp snapshot
  • WiP Puppet initialization
    • Declared the node and its settings in Puppet - add a new host: sponsorship.ci.jenkins.io jenkins-infra#3272 (note UUID of the datadisk was retrieved after the initial format and mount during the data initial copy)
    • Host requested a certificate on the puppet master: gotta validate it an run the initial puppet apply

@dduportal
Copy link
Contributor Author

Update:

  • Maintenance announced in https://groups.google.com/g/jenkinsci-dev/c/XPVvL3devzI and status.jenkins.io
  • Puppet ran with success.
  • Controller did not start though as the content /var/lib/jenkins had to be owned by the user jenkins instead of jenkins-infra-team (the latter was used for the rsync copy) => important to note and fix during the final "diff data sync"

@dduportal
Copy link
Contributor Author

dduportal added a commit to jenkins-infra/azure that referenced this issue Jan 25, 2024
Ref. jenkins-infra/helpdesk#3913

This PR has 2 goals:

- Removing all ci.jenkins.io resources on the non sponsored Azure
subscription
- Ensure that the new ci.jenkins.io (sponsored) controller has proper
permissions to spin up agents

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

Update:

  • We had to fix the default user UIDs as the container requires jenkins to have UID 1000
groupmod -g 998 jenkins-infra-team
groupmod -g jenkins 1000
groupmod -g 1000 jenkins
usermod -u 1000 jenkins

@dduportal
Copy link
Contributor Author

@dduportal
Copy link
Contributor Author

A word on costs:

  • ci.jenkins.io is no longer costing money on our "normal" Azure subscription:
Capture d’écran 2024-01-29 à 08 39 13
  • This cost did not disappeared: it is used by the (credits) sponsored subscription. The current consumption is currentl ~ 1700$ for January (non spot agents and ci.jenkins.io controller): we have to be carefull on these costs (but assuming 2000$ per month with current usage we can expect 18 month)
Capture d’écran 2024-01-29 à 08 41 20 Capture d’écran 2024-01-29 à 08 40 35 Capture d’écran 2024-01-29 à 08 34 24

@dduportal
Copy link
Contributor Author

dduportal commented Feb 8, 2024

Reopening as there are missing elements:

@dduportal
Copy link
Contributor Author

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

2 participants