ciborg lets you easily create CI instances on Amazon ec2. It is truly amazing in the sense that it just works. Having recently been stubbed multiple times to death with knife by chef, I am very grateful that tools like ciborg do exist.
The only downside is that it is coupled to ec2 and ec2 only. Hopefully folks at pivotal labs will sort this out at some point, but as of this writing, that is the reality of it. So whether you want to explore other (cheaper) options such as digitalocean you are out of luck.
I’ve been looking into ciborg source code thinking I could cannibalise bits that are only specifically about provisioning and configuration, rather than creating/destroying instances. I got deep down that rabbit hole before I finally discovered that there is no need to do that at all. The ciborg commands responsible for this (
chef) already are operating on the basis that there is a server somewhere and that its address is explicitly set in the config. In my case, all I had to do was to create a droplet on digitalocean and put its ip in
There a few things however that ciborg assumes about an instance:
ubuntuuser account with sudo rights (NOPASSWD)
ubuntuuser can ssh without password (hint:
After making sure my newly created droplet satisfied those conditions, I ran
ciborg bootstrap followed by
ciborg chef and watched the magic going. For a long while. Once that had finished,
ciborg open popped up a browser with jenkins already running my first build!
In case of a small setup of only one ci instance I reckon losing the ability to automatically create/destroy instances is not a big deal. What is left, on the other hand, is:
Here is the
ciborg.yml (that has gotten smaller as a result of all the this):
--- ssh_port: 22 master: 126.96.36.199 recipes: - pivotal_ci::jenkins - pivotal_ci::limited_travis_ci_environment - pivotal_ci - mongodb::default # that is how easy to add recipe from travis-ci cookbooks! cookbook_paths: - ./chef/cookbooks/ - ./chef/travis-cookbooks/ci_environment - ./chef/project-cookbooks node_attributes: travis_build_environment: user: jenkins group: nogroup home: /var/lib/jenkins nginx: basic_auth_user: login basic_auth_password: password jenkins: builds: - name: master repository: firstname.lastname@example.org:shopa/shopa.git branch: master command: script/ci_build.sh
TL;DR; Use ciborg! Now anywhere!