Continuous Integration Framework for linux using kvm build guests intended for private use.
Scenario: you have private self-hosted git repositories and want to run your own ci build farm.
The plan:
System layout:
repository hub management server vmhost worker vm
commit-hook -> amqp queue -> analyzer -> kvm control -> job control
- deploy rabbitmq server
Note: Vm hosts, Worker vms and Management server need amqp access to this host. Can run on git server
- setup hub frontend rvm/ruby/rails/passenger/postgres
- deploy vm host control software
Needs to be on the bare host system as it will start/shutdown/reset vm guests.
Requirements:
- python2.7
- pip
- simpleyaml
- simplejson
- pike
Add a user named myownci and add it to group libvirtd
Deploy upstart script - edit paths in there
- define qemu guests
- prepare vm images
- snapshot each image
Minimal Requirements:
- python2.7
- pip
- simpleyaml
- simplejson
- pike
Prerequisites:
sudo apt-get install python-pip
sudo pip install gitpython
sudo pip install pike
Install git/hooks/post-receive into your repository hooks, make it executable
Configure repository identification (on the git repository server which is pushed to)
git config --add myownci.repository-id the_unique_name_which_is_configured_in_management_server
git config --add myownci.hub-addr ip_or_fqdn_of_amqp_host
git config --add myownci.project-configfile .travis.yml_compatible_build_description
Example:
project-configfile = .travis.yml
hub-addr = 127.0.0.1
repository-id = myownci@git-home
Vm hosts are defined by auto-discovery
Worker vms are defined by auto-discovery