Not sure what this is? There's a blogpost that might give some context. In sort, this repo contains all the stuff you should need to deploy buildbot on a kuberentes cluster.
Before getting started you may want to get aquainted with the [Buildbot Documentation][buildbot-docs] and specifically their Buildbot on Docker-compose tutorial.
- Get a kubernetes cluster up and running. For testing purposes, I suggest minikube.
- Setup your local volumes.
$ kubectl create -f simple/volumes.yaml
<output>
Warning: For a long-term maintainable cluster you should consider using NFS or some other backend for your storage.
- Setup the kubernetes database.
$ kubectl create -f simple/postgres.yaml
<output>
- Start the kubernetes master.
$ kubectl create -f simple/master.yaml
<output>
- Start the kubernetes worker.
$ kubectl create -f simple/worker.yaml
<output>
Note: This setup uses local volumes which are probably owned by the root
user on your cluster. You'll most likely need to change the permissions on the directories being used so the buildbot worker can use it to store data.
$ minikube ssh
$ sudo chown -R 1000:1000 /data/pv-1 /data/pv-2 /data/pv-3
NOTE This step may fail as /data/pv-1
, /data/pv-2
, or /data/pv-3
haven't been created yet.
You may need to repeat this step after testing your buildbot cluster out a bit after step 5 below.
If you decide to use something else like NFS or Glusterfs this step may not be necessary as you may be able to specify the permissions of the block device as in a kubernetes configuration file.
- Check out your cluster locally with:
$ kubectl get pods -l app=buildbot -l tier=master -o template --template="{{range.items}}{{.metadata.name}}{{end}}" | xargs -I{} kubectl port-forward {} 8080
-
Test out your cluster! Go to http://localhost:8080/#/builders/ and force a new build.
-
(Optional) Fork this repository and customize it to your needs. All of the necessary buildbot configuration file can be found and modified for your project's needs.
For something a bit more complicated take a look at the configurtion in the robust/
directory.
If feedback or a fix, that's great! Create an Issue or a Pull Request. If you choose the latter, this is a good workflow to follow:
- Fork the repository.
- Make whatever changes you want on your branch.
- Create a pull request from
your_remote:your_branch
toElijahCaine:master
.
I'll give feedback and once everything looks good we'll squash the commits and merge them in.
The Kubernetes setup outlined here is almost a 1:1 mapping with the configuration in docker-compose/simple/
.
If you're up for a challenge try implementing the setup in docker-compose/multimaster/
!
This repository is a fork a repo from the buildbot org (upstream) which wasn't licensed. The additions I've made are licensed under MIT, Elijah C. Voigt.
Happy hacking!