Page MenuHomePhabricator

Create minikube deploy for quarry
Closed, ResolvedPublic

Description

Create a minikube deploy to prepare and test quarry for deployment to a magnum cluster.

Event Timeline

Change 761630 had a related patch set uploaded (by Michael DiPietro; author: Michael DiPietro):

[analytics/quarry/web@master] modification of quarry to allow for deployment to minikube. Additional changes will be needed when k8s is avaliable in production to allow for production to be deployed to k8s.

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

Change 761631 had a related patch set uploaded (by Michael DiPietro; author: Michael DiPietro):

[analytics/quarry/web@master] minikube helm chart

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

Change 761630 abandoned by Michael DiPietro:

[analytics/quarry/web@master] modification of quarry to allow for deployment to minikube. Additional changes will be needed when k8s is avaliable in production to allow for production to be deployed to k8s.

Reason:

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

I'm completely new to Kubernetes but have been reading through https://wikitech.wikimedia.org/wiki/Kubernetes/Kubernetes_Workshop. Does WM Cloud provide k8s clusters, or is it expected that we would provision our own cluster on individual cloud VPS instances?

I'm completely new to Kubernetes but have been reading through https://wikitech.wikimedia.org/wiki/Kubernetes/Kubernetes_Workshop. Does WM Cloud provide k8s clusters, or is it expected that we would provision our own cluster on individual cloud VPS instances?

We've started providing magnum as a k8saas solution. It works pretty well. There are some docs on it at https://wikitech.wikimedia.org/wiki/Portal:Cloud_VPS/Admin/Magnum and paws and some other projects are deploying it with terraform https://github.com/toolforge/paws/blob/main/terraform/123_7.tf is one such example.

Regardless I'm happy to assist in the deployment of a k8s for quarry. Mostly getting things working in minikube first would be the thing to do...Which I think is what was done in the above gerrit patches? Sorry it's been awhile since I worked on those I don't quite remember. The branch has been moved to github, but it has some conflicts that need resolved. I do have a memory of getting quarry running in minikube, but it would be better to recreate that in today rather than in my memory. If we get it running in minikube it should be straight forward to have quarry running in magnum as well. And having T316958 working so that we don't build container images independently, and then the dev env (minikube) is mostly the same as the production environment, woo!

Though there was one thing lost in that move from the docker compose dev environment to a minikube, which was that the minikube wasn't pulling the fresh code from the working directory, rather it was pulling from quay.io, so leaving the docker-compose env intact, or some research into getting minikube to do similar may be worth while to keep dev moving at a reasonable pace.

@SD0001 moving k8s discussion from T348184 to here to match ticket descriptions.

I've deployed quarry-bastion.quarry.eqiad1.wikimedia.cloud in T348642 and installed kubectl on it

KUBE_VERSION="v1.24.3"
curl -LO "https://dl.k8s.io/release/${KUBE_VERSION}/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/${KUBE_VERSION}/bin/linux/amd64/kubectl.sha256"
echo "$(cat kubectl.sha256)  kubectl" | sha256sum --check
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

The kube config file for quarry-123 is in /opt/quarry-123.config and is configured to use quarry-test as its default namespace. You can access it by either copying it to ~/.kube/config or by running export KUBECONFIG=/opt/quarry-123.config

A project specific bastion system is where I tend to do deploys to k8s things. And would recommend similar for quarry. In particular if terraform (or opentofu if that takes off, or probably pulumi if not) is used, as then the state file is in the same place. Though with multiple maintainers it is more worth figuring out how to get the state file stored in object storage which I hear rumors is now available.

I've updated the branch associated with this ticket. And it does seem to get quarry running in minikube. Suggesting that we are close to being able to go to k8s? Though we probably need T316958 before going to k8s would be useful.

rook renamed this task from investigate quarry on k8s to Create minikube deploy for quarry.Oct 16 2023, 8:06 PM
rook updated the task description. (Show Details)

Change #761631 abandoned by Majavah:

[analytics/quarry/web@master] minikube helm chart

Reason:

quarry has moved to github for now, abandoning old patches

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