Catalyst/Scaling
Appearance
< Catalyst
Project Catalyst will need to scale as it takes on more workloads. The original layout topology was 1 VM with 4 cores and 8 GB of memory. The general plan will be to add more kubernetes nodes (VMs) as needed but this creates some interesting considerations.
How to add more nodes
Adding additional nodes to k3s is straight forward, but please note the "Unknowns" below.
- request additional resources from CloudVPS (if needed) for the catalyst project
- be sure to request enought storage for the new nodes (80 GB per node is the current recommendation)
- create a new VM
- on horizon:
- create a new 80 GB volume
- create new instance with
- latest Debian image
- 4 cores and 8 GB of memory
- the http security group the the VM
- the 80 GB volume attached
- on the new VM
- setup k3s-data partition
- mkfs.ext4 /dev/vdb
- mkdir /k3s-data
- echo "/dev/vdb /k3s-data ext4 defaults,nofail 0 2" >> /etc/fstab
- mount -a
- install k3s
- rsync --rsync-path="sudo rsync" -L k3s.catalyst.eqiad1.wikimedia.cloud:/var/lib/rancher/k3s/server/node-token /tmp/node-token
- curl -sfL https://get.k3s.io | sh - --data-dir /k3s-data --token-file /tmp/node-token --server k3s.catalyst.eqiad1.wikimedia.cloud
- rm /tmp/node-token
- sudo kubectl get nodes
- setup k3s-data partition
- on horizon:
Unknowns
We use the Rancher's Local Path provisioner for persistent storage. Normally it is safe to add more nodes with the following caveats:
- data in the local-path provisioner will not be replicated to and cannot be shared with the new nodes
- we use have a "repository" pool for new environments to quickly get extensions, etc. by leveraging the multiple persistent volumes that point to the same location on the node's disk
- the pool is populated by patchdemo
- we have a story to have a separate service manage the pool phab:T376273, but we'll have to ensure that service is running on every node (or use an alternate method of populating the pool phab:T376273#10203342)