Page MenuHomePhabricator

Add a function to webservice called "migrate" that will push a tool from the old cluster on Kubernetes to the new one
Closed, ResolvedPublic

Description

The rationale here is that the webservice tool is where the logic resides to start and stop Toolforge web tools in the most straightforward way. In order to complete the final phase of migration from the old cluster to the new one, a wrapper that can become each Toolforge tool and migrate those that are:

  • On the Kubernetes backend
  • On the default context

Can have all webservice pods shut down, the context switched and the webservice started with the same parameters that would have been in the manifest file if they had not shut down the webservice. This will hopefully be pushed out with T244289: Improve limit range management in webservice for Kubernetes

Event Timeline

Change 570702 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/software/tools-webservice@master] Add "migrate" action for 2020 Kubernetes migration

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

Change 570702 merged by jenkins-bot:
[operations/software/tools-webservice@master] Add "migrate" action for 2020 Kubernetes migration

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

Mentioned in SAL (#wikimedia-cloud) [2020-02-07T21:09:19Z] <bstorm_> upgraded toollabs-webservice package for stretch toolsbeta to 0.59 T244293 T244289 T234617 T156626

Looks like the latest package works (0.61).

toolsbeta.test@toolsbeta-sgebastion-04:~$ webservice migrate
/usr/lib/python2.7/dist-packages/urllib3/connection.py:337: SubjectAltNameWarning: Certificate for toolsbeta-k8s-master-01.toolsbeta.eqiad.wmflabs has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
Stopping webservice on legacy Kubernetes cluster
Switched to context "toolforge".
Starting webservice on 2020 Kubernetes cluster...............
toolsbeta.test@toolsbeta-sgebastion-04:~$ curl -L test.toolsbeta.wmflabs.org -H "Host:test.toolforge.org"
Hello World, from Toolsbeta!
toolsbeta.test@toolsbeta-sgebastion-04:~$ curl http://toolsbeta.wmflabs.org/test/
Hello World, from Toolsbeta!
toolsbeta.test@toolsbeta-sgebastion-04:~$ /usr/bin/kubectl get ingress
NAME             HOSTS                   ADDRESS   PORTS   AGE
test-legacy      toolsbeta.wmflabs.org             80      114s
test-subdomain   test.toolforge.org                80      114s
toolsbeta.test@toolsbeta-sgebastion-04:~$

I just have to push it to everything outside of toolsbeta.

Mentioned in SAL (#wikimedia-cloud) [2020-02-10T21:18:57Z] <bstorm_> upgraded toollabs-webservice package for stretch toolsbeta to 0.62 T244293 T244289 T234617 T156626

Mentioned in SAL (#wikimedia-cloud) [2020-02-10T21:25:10Z] <bstorm_> upgraded toollabs-webservice package for tools to 0.62 T244293 T244289 T234617 T156626