Buildbot Setup for VM host
This page documents the general setup process for a server that is acting as virtual machine host, like those documented in the Buildbot Setup for Virtual Machines section.
Provision hardware with most recent Ubuntu LTS release
Add host to DNS
Apply updates (replace
<host>with hostname)
ssh <host>.mariadb.net
sudo apt-get update
sudo apt-get dist-upgradeinstall some favorite packages (these aren't necessarily required, but I like them)
sudo apt-get install tree renameutils vim-noxa buildbot admin needs to add the new host to the allowed list of rsync clients on the VM master (whichever host is the official host of VM files) The VM master changes periodically, so check to make sure you have the correct one.
vi /etc/rsyncd.confmake a
/kvm/dir and rsync it with the VM master above. The dir often resides at/home/kvm/(or wherever the storage drive is) and is then linked to/kvm/. The VMs rely on the/kvm/vms/path, so the/kvm/location is required.
vm_master="hostname" # ask for this from a buildbot admin
mkdir /home/kvm
ln -sv /home/kvm /kvm
rsync --dry-run --delete --exclude=deprecated \\
--exclude=iso --exclude=lost+found -avPL ${vm_master}::kvm/ /home/kvm/
# assuming the dry-run looks good, start the "real" rsync in a screen session
screen
rsync --delete --exclude=deprecated --exclude=iso --exclude=lost+found -avPL ${vm_master}::kvm/ /home/kvm/detatch from screen session with
Ctrl+a dConfigure vim.basic as the default editor (optional)
install buildbot-slave, bzr, and kvm
add a default user, and then add the user to the appropriate groups
logout then back in as the default user and change the password
set up the
/.ssh/authorized_keysfile so you can login that waycreate other standard users and set up their ssh keys (optional)
turn off password login (WARNING: be sure to have your ssh key setup before doing this!) and disallow all root logins and password logins (it is safer to only allow logins using ssh keys with regular users):
checkout mariadb-tools
put runvm in the right place
add the buildbot user to the kvm and tty groups
A buildbot admin will need to add this builder to the
maria-master-private.cfgfile on the${buildmaster}and also add it to thec['slaves']array inmaria-master.cfgthen create the buildslave using the hostname and whatever${password}was agreed upon by you and the buildbot admin:
add the following to
/etc/default/buildslave(replace${hostname}with the name of the host)
edit the admin and host files and add contact information and details on the builder:
copy over the buildbot .ssh dir from terrier:
Edit /etc/passwd and change the buildbot user's shell from
/bin/falseto/bin/bashsu to the buildbot user and copy in the
/etc/skelfiles
change ownership of the
buildbot/slavesdir tobuildbot:buildbot
move the
/var/lib/buildbotdirectory to/home(or whatever location you want to use to store things) and then link it back
update
/etc/default/localeand change it to:LANG=en_US.UTF-8
monitor the rsync, wait for it to finish
once the rsync is finished, test the runvm script
Remove the "testtest" VMs we created above
Start the buildslave
ssh to
${buildmaster}and add this new host tokvm_slavesin themaria-master.cfgfile
still on
${buildmaster}, test and then reload buildbot
This page is licensed: CC BY-SA / Gnu FDL
Last updated
Was this helpful?

