Page MenuHomePhabricator

toolforge: automate how we deploy custom k8s components
Closed, ResolvedPublic

Description

See: https://wikitech.wikimedia.org/wiki/Portal:Toolforge/Admin/Kubernetes/Custom_components

We have a growing list of components that deploy to Toolforge kubernetes using this pattern:

  • git repository with source code
  • checkout on a docker builder host
  • build the docker image, tag it, etc
  • upload to our internal docker registry
NOTE: there is now a spicerack cookbook to automate the steps above: cookbook wmcs.toolforge.k8s.component.build
NOTE: there is now a spicerack cookbook to automate the steps above: cookbook wmcs.toolforge.k8s.component.deploy

This is a very good candidate for automation using spicerack/cookbook or whatever.

Known cases:

Event Timeline

aborrero renamed this task from toolforge: automate how we deploy custom components to toolforge: automate how we deploy custom k8s components.Sep 28 2021, 10:49 AM
aborrero triaged this task as Low priority.
  • git repository with source code
  • checkout on a docker builder host
  • build the docker image, tag it, etc
  • upload to our internal docker registry

Could we modify the buildpack CD workflow here to auto build + push the images? At least for toolsbeta I'm also fine with also automatically deploying newer version

[optionally] manage auth things, like certificates etc

Automated cert renewal would be awesome if we can pull it off :-)

In T291915#7387460, @Majavah wrote:

[optionally] manage auth things, like certificates etc

Automated cert renewal would be awesome if we can pull it off :-)

see also: T292238: Figure out certificate generation for admission webhooks before we lose the certificates/v1beta1

Could we modify the buildpack CD workflow here to auto build + push the images? At least for toolsbeta I'm also fine with also automatically deploying newer version

Most probably yes, once we move to harbor (what the toolforge build service uses/will use), might require some custom buildpack though, but sounds like a good candidate to both dog-food our infra, and automate at least partially this flow.

Change 770971 had a related patch set uploaded (by Arturo Borrero Gonzalez; author: Arturo Borrero Gonzalez):

[operations/cookbooks@wmcs] wmcs: toolforge: k8s: add cookbook to automate deploying custom components

https://gerrit.wikimedia.org/r/770971

Change 770971 merged by Arturo Borrero Gonzalez:

[operations/cookbooks@wmcs] wmcs: toolforge: k8s: add cookbook to automate deploying custom components

https://gerrit.wikimedia.org/r/770971

Change 770986 had a related patch set uploaded (by Arturo Borrero Gonzalez; author: Arturo Borrero Gonzalez):

[operations/cookbooks@wmcs] wmcs: toolforge: k8s: add cookbook to automate deploying components

https://gerrit.wikimedia.org/r/770986

Change 770986 merged by jenkins-bot:

[operations/cookbooks@wmcs] wmcs: toolforge: k8s: add cookbook to automate deploying components

https://gerrit.wikimedia.org/r/770986