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

[INFRA-3100] Migrate updates.jenkins.io to another Cloud #2649

Open
Tracked by #3662
jenkins-infra-bot opened this issue Oct 15, 2021 · 82 comments
Open
Tracked by #3662

[INFRA-3100] Migrate updates.jenkins.io to another Cloud #2649

jenkins-infra-bot opened this issue Oct 15, 2021 · 82 comments

Comments

@jenkins-infra-bot
Copy link

jenkins-infra-bot commented Oct 15, 2021

Why

Read the EPIC (aws cost decrease: https://github.com//issues/2646)

What

  • updates.jenkins.io serves the JSON of the update center, but it is not behind a CDN (need to be updated regularly) causing a lot of outbound data transfer (2.4 Mb for a JSON download, esitmation around 300 Gb of data sent daily, estimation around 10 Tb per month which costs some $$$.
  • The VM pkg.origin.jenkins.io is managing multiple services and separting them could be a great help.

How

Different paths can be taken here: to be discussed in infra meeting + validated by the board as it's an important service.

  • Migrating the service to Oracle Cloud:
    • the first 10 Tb of outbound data is free, and if the worst case, 50 Tb of outbound would cost less than 3k $ per month - https://www.oracle.com/be/cloud/networking/networking-pricing.html
    • ARM machines: cheaper and better performance for a simple webserver + SSH + data
    • Block storage: close to archives.jenkins.io
    • Risk: Oracle sponsoring program is only 1 year, and is not easily secured for paiment as other account
  • Migrating to Azure
    • Easily in AKS: easier management
    • Safer paiment process
    • Risk: cost of outbound to be evaluated

Originally reported by dduportal, imported from: Migrate updates.ci.jenkins.io to another Cloud
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10

[note]

@dduportal
Copy link
Contributor

dduportal commented May 10, 2022

Requires setting up the Oracle Terraform project, like #2682

Todo list:

  • Specify a new infra (VM + data storage of the same size as the actual pkg.origin.jenkins.io machine + any other Oracle infra requirements). Implies checking the pricing to get an overall idea
  • Once VM is created, add it to puppet management: new node, with the role / profiles associated to "update.jenkins.io"
  • Rsync the data one time
  • Update the jenkins-infra/update-center2 's associated job in trusted.ci to update both "pkg.origin.jenkins.io" VM and the new one (⚠️ inline pipeline, don't search for a Jenkinsfile as code)
  • Validate the new instance (including checking with Daniel, Tim and other contributors)
  • Communicate about the upcoming change
  • As proposed by Stephane, use a round-robin DNS record value to split traffic between old/new during some time and check for error

@dduportal
Copy link
Contributor

Blocked by #2973

@smerle33
Copy link
Contributor

actual machine size is :
32Gb RAM
8cpu
1,2Tb data disk (372Gb free)

about half of the power is used currently (checked with the local SAR probe)

@smerle33
Copy link
Contributor

Infra to specify :

  • 1 VM (similar to archive.jenkins.io)
  • 1 network ("mirrors") + 1 subnet ("20210630-1531")
  • 1 volume 1,2Tb
  • 1 set of security groups to restrict network access
  • 1 ssh key pair

@smerle33
Copy link
Contributor

VM specifications :

  • 4vCPU/16Gb RAM : half of actual machine
  • proposal to use ARM like archive.jenkins.io --> 4ocpu (VM Type Standard A1 Flex)
  • Image Ubuntu 20.04 (FULL [non minimal]) --> upgrade from ubuntu 18.04 for actual machine
    • option for 22.04 but need testing for puppet agent (+ openssl v3)

@dduportal
Copy link
Contributor

Update:

@dduportal
Copy link
Contributor

dduportal commented May 2, 2024

Update:

Update:

  • Only a set of config (and secret) were required. The httpd service is now deployed and we can access it at azure.updates.jenkins.io
  • However there still are (minor- issues regarding the TLS termination). Incoming configuration fix!

@dduportal
Copy link
Contributor

* However there still are (minor- issues regarding the TLS termination). Incoming configuration fix!

Update:

  • TLS issues fixed: both azure.updates.jenkins.io and mirrors.updates.jenkins.io have a proper TLS termination managed by Let's Encrypt!
  • azure.updates.jenkins.io is now proudly serving ... nothing... but with Apache (httpd) ✅

@dduportal
Copy link
Contributor

dduportal commented May 2, 2024

Update:

The storage account for updates-jenkins-io started to cost a lot on our Azure main subscription:

Capture d’écran 2024-05-02 à 18 09 52

(Note: C1 Cache is the managed Redis service, but any LRS .* or .* Operations Meter is related to the storage account)

As you can see on the above screenshot, as soon as we enabled the update_center update of JSON index on the new UC (in parallel of current UC), the costs on the file share increased immediately.

=> We must switch to a Premium file storage like we did for get.jenkins.io. Expected new costs should be (source https://azure.microsoft.com/en-us/pricing/details/storage/files/):

  • Data storage should increase from $0.09 monthly to $0,50 $32 (2 FS at 100 Gb each at $0.16 per Gb).
  • Transactions should decrease from ~$380 monthly to $0 (yes, zero dollar)

=> Total should change from ~$391 monthly to $32 monthly (10x decrease).

Plan:

@hervelemeur I'm passing back to you for the www-* updates and sanity checks

dduportal added a commit to jenkins-infra/azure that referenced this issue May 2, 2024
… to decrease costs (BREAKING) (#682)

Related to
jenkins-infra/helpdesk#2649 (comment)

This PR switches to a `Premium` storage account kind for
updates.jenkins.io to remove costs related to file storage transactions.
The storage costs will increase from $0.09 to $0.50 which is ...
affordable... to say the least (compared to the expected decrease of
~$320 transaction cost).


Note:
- The update center job is not trying to update storage
- Services azure.updates.jenkins.io and mirrors.updates.jenkins.io have
been uninstalled

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/azure that referenced this issue May 2, 2024
Fixup of #682 which failed to deploy (HTTP/400 error) when creating the
file shares.

As per
https://learn.microsoft.com/en-us/azure/storage/files/understanding-billing#provisioning-method,
the minimum size for a file share is 100 Gb.

The cost evaluation in
jenkins-infra/helpdesk#2649 (comment)
need to be re-evaluated:

- Transactions cost from ~$380 to $0 monthly
- Storage cost from $0.09 monthly to $32 (2 x 100 x 0,16).

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to dduportal/kubernetes-management that referenced this issue May 2, 2024
dduportal added a commit to jenkins-infra/kubernetes-management that referenced this issue May 2, 2024
feat(publick8s/updates.jenkins.io) install with premium storage - jenkins-infra/helpdesk#2649

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to dduportal/azure-net that referenced this issue May 7, 2024
…er - ref. jenkins-infra/helpdesk#2649

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to dduportal/azure-net that referenced this issue May 7, 2024
…er - ref. jenkins-infra/helpdesk#2649

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/azure-net that referenced this issue May 7, 2024
…er - ref. jenkins-infra/helpdesk#2649 (#234)

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal added a commit to jenkins-infra/azure-net that referenced this issue May 7, 2024
* feat(vnets) add a new subnet for the ci.jenkins.io agents 1 AKS cluster - ref. jenkins-infra/helpdesk#2649

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

* feat(gateways) associate NAT gateway to subnet cijenkinsio_kubernetes to use it as outbound method

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

* feat(gateways) spread outbound requests through 2 public IPs instead of 1 for cijenkinsio agents (all)

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

---------

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
dduportal pushed a commit to jenkins-infra/azure that referenced this issue May 10, 2024
…r env files to access file shares (#690)

This PR adds an output with a command to generate a zip containing two
env files:
- .env-content for updates-jenkins-io File Share
- .env-redirections for updates-jenkins-io-httpd File Share

This zip file has to be uploaded as zip credentials on
trusted.ci.jenkins.io for the update-center2/site/publish.sh script to
work.

Ref:
- jenkins-infra/update-center2#777
- jenkins-infra/helpdesk#2649
lemeurherve added a commit to jenkins-infra/azure that referenced this issue May 10, 2024
…e share service principal writer (#692)

This PR sets a unique name for the service principal application
dedicated to the httpd file share with trusted.ci.jenkins.io and output
the application id instead of the service principal id.

Fixup of:
- #677

Ref:
- jenkins-infra/helpdesk#2649
@dduportal
Copy link
Contributor

dduportal commented May 13, 2024

Update:

Next steps:

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

9 participants