You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by ba...@apache.org on 2015/08/16 19:47:18 UTC

[01/23] couchdb-ci git commit: initial commit of (not customized) Ubuntu 14.04 template

Repository: couchdb-ci
Updated Branches:
  refs/heads/master [created] a7eb5c807


initial commit of (not customized) Ubuntu 14.04 template


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/d72bec8a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/d72bec8a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/d72bec8a

Branch: refs/heads/master
Commit: d72bec8a793086e79325bd66f23d2a690ca43aac
Parents: 
Author: Bastian Krol <ba...@web.de>
Authored: Thu Jul 2 12:22:31 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Thu Jul 2 12:22:31 2015 +0200

----------------------------------------------------------------------
 .../definitions/couchdb-ci-ubuntu-14.04/apt.sh  |  7 +++
 .../couchdb-ci-ubuntu-14.04/build_time.sh       |  1 +
 .../definitions/couchdb-ci-ubuntu-14.04/chef.sh |  3 +
 .../couchdb-ci-ubuntu-14.04/cleanup.sh          | 16 +++++
 .../couchdb-ci-ubuntu-14.04/definition.rb       | 46 +++++++++++++++
 .../couchdb-ci-ubuntu-14.04/parallels.sh        |  9 +++
 .../couchdb-ci-ubuntu-14.04/preseed.cfg         | 61 ++++++++++++++++++++
 .../couchdb-ci-ubuntu-14.04/puppet.sh           |  4 ++
 .../definitions/couchdb-ci-ubuntu-14.04/ruby.sh | 25 ++++++++
 .../definitions/couchdb-ci-ubuntu-14.04/sudo.sh |  5 ++
 .../couchdb-ci-ubuntu-14.04/vagrant.sh          |  6 ++
 .../definitions/couchdb-ci-ubuntu-14.04/vbox.sh | 22 +++++++
 baseboxes/readme.markdown                       | 40 +++++++++++++
 13 files changed, 245 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/apt.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/apt.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/apt.sh
new file mode 100644
index 0000000..49774ee
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/apt.sh
@@ -0,0 +1,7 @@
+apt-get -y update
+apt-get -y upgrade
+apt-get -y install linux-headers-$(uname -r) build-essential
+apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
+apt-get -y install vim
+apt-get -y install dkms
+apt-get -y install nfs-common

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/build_time.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/build_time.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/build_time.sh
new file mode 100644
index 0000000..c9b2c6e
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/build_time.sh
@@ -0,0 +1 @@
+date > /etc/vagrant_box_build_time

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh
new file mode 100644
index 0000000..a0a9e3b
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh
@@ -0,0 +1,3 @@
+GEM=/opt/ruby/bin/gem
+
+$GEM install chef --no-ri --no-rdoc

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/cleanup.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/cleanup.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/cleanup.sh
new file mode 100644
index 0000000..dd5a300
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/cleanup.sh
@@ -0,0 +1,16 @@
+apt-get -y autoremove
+
+dd if=/dev/zero of=/EMPTY bs=1M
+rm -f /EMPTY
+
+echo "cleaning up dhcp leases"
+rm /var/lib/dhcp/*
+
+echo "cleaning up udev rules"
+rm -f /etc/udev/rules.d/70-persistent-net.rules
+mkdir /etc/udev/rules.d/70-persistent-net.rules
+rm -rf /dev/.udev/
+rm /lib/udev/rules.d/75-persistent-net-generator.rules
+
+echo "pre-up sleep 2" >> /etc/network/interfaces
+exit

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
new file mode 100644
index 0000000..b52b3c1
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
@@ -0,0 +1,46 @@
+Veewee::Session.declare({
+  :cpu_count => '1',
+  :memory_size => '512',
+  :disk_size => '65536',
+  :disk_format => 'VDI',
+  :hostiocache => 'off',
+  :os_type_id => 'Ubuntu_64',
+  :iso_file => "ubuntu-14.04-server-amd64.iso",
+  :iso_src => "http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso",
+  :iso_md5 => "01545fa976c8367b4f0d59169ac4866c",
+  :iso_download_timeout => "1000",
+  :boot_wait => "4",
+  :boot_cmd_sequence => [
+    '<Esc><Esc><Enter>',
+    '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ',
+    'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ',
+    'hostname=%NAME% ',
+    'fb=false debconf/frontend=noninteractive ',
+    'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=us keyboard-configuration/variant=us console-setup/ask_detect=false ',
+    'initrd=/install/initrd.gz -- <Enter>'
+],
+  :kickstart_port => "7122",
+  :kickstart_timeout => "300",
+  :kickstart_file => "preseed.cfg",
+  :ssh_login_timeout => "10000",
+  :ssh_user => "vagrant",
+  :ssh_password => "vagrant",
+  :ssh_key => "",
+  :ssh_host_port => "7222",
+  :ssh_guest_port => "22",
+  :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
+  :shutdown_cmd => "shutdown -P now",
+  :postinstall_files => [
+   "build_time.sh",
+   "apt.sh",
+   "sudo.sh",
+   "vagrant.sh",
+   "ruby.sh",
+   "chef.sh",
+   "puppet.sh",
+   "vbox.sh",
+   # "parallels.sh",
+   "cleanup.sh"
+  ],
+  :postinstall_timeout => "10000"
+})

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh
new file mode 100644
index 0000000..a9b4b93
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh
@@ -0,0 +1,9 @@
+# Install the Parallels Tools
+PARALLELS_TOOLS_ISO=prl-tools-lin.iso
+mount -o loop $PARALLELS_TOOLS_ISO /media/cdrom
+/media/cdrom/install --install-unattended-with-deps --progress
+umount /media/cdrom
+
+# Cleanup
+# rm $PARALLELS_TOOLS_ISO
+

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/preseed.cfg
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/preseed.cfg b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/preseed.cfg
new file mode 100644
index 0000000..2ab89c1
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/preseed.cfg
@@ -0,0 +1,61 @@
+## Options to set on the command line
+d-i debian-installer/locale string en_US.utf8
+d-i console-setup/ask_detect boolean false
+d-i console-setup/layout string us
+
+d-i netcfg/get_hostname string unassigned-hostname
+d-i netcfg/get_domain string unassigned-domain
+
+d-i time/zone string UTC
+d-i clock-setup/utc-auto boolean true
+d-i clock-setup/utc boolean true
+
+d-i kbd-chooser/method select American English
+
+d-i netcfg/wireless_wep string
+
+d-i base-installer/kernel/override-image string linux-server
+
+d-i debconf debconf/frontend select Noninteractive
+
+d-i pkgsel/install-language-support boolean false
+tasksel tasksel/first multiselect standard, ubuntu-server
+
+d-i partman-auto/method string lvm
+
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/device_remove_lvm boolean true
+d-i partman-auto/choose_recipe select atomic
+
+d-i partman/confirm_write_new_label boolean true
+d-i partman/confirm_nooverwrite boolean true
+d-i partman/choose_partition select finish
+d-i partman/confirm boolean true
+
+# Write the changes to disks and configure LVM?
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true
+d-i partman-auto-lvm/guided_size string max
+
+# Default user
+d-i passwd/user-fullname string vagrant
+d-i passwd/username string vagrant
+d-i passwd/user-password password vagrant
+d-i passwd/user-password-again password vagrant
+d-i user-setup/encrypt-home boolean false
+d-i user-setup/allow-password-weak boolean true
+
+# Minimum packages (see postinstall.sh)
+d-i pkgsel/include string openssh-server ntp
+
+# Upgrade packages after debootstrap? (none, safe-upgrade, full-upgrade)
+# (note: set to none for speed)
+d-i pkgsel/upgrade select none
+
+d-i grub-installer/only_debian boolean true
+d-i grub-installer/with_other_os boolean true
+d-i finish-install/reboot_in_progress note
+
+d-i pkgsel/update-policy select none
+
+choose-mirror-bin mirror/http/proxy string

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh
new file mode 100644
index 0000000..d9c6822
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh
@@ -0,0 +1,4 @@
+GEM=/opt/ruby/bin/gem
+
+adduser --system --group --home /var/lib/puppet puppet
+$GEM install puppet --no-ri --no-rdoc

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/ruby.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/ruby.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/ruby.sh
new file mode 100644
index 0000000..2782d7f
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/ruby.sh
@@ -0,0 +1,25 @@
+apt-get -y install libyaml-0-2
+RUBY_VERSION=2.0.0-p247
+
+cd /tmp
+
+wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-$RUBY_VERSION.tar.gz
+tar xvzf ruby-$RUBY_VERSION.tar.gz
+cd ruby-$RUBY_VERSION
+./configure --prefix=/opt/ruby
+make
+make install
+cd ..
+rm -rf ruby-$RUBY_VERSION
+rm ruby-$RUBY_VERSION.tar.gz
+
+RUBYGEMS_VERSION=2.1.10
+wget http://production.cf.rubygems.org/rubygems/rubygems-$RUBYGEMS_VERSION.tgz
+tar xzf rubygems-$RUBYGEMS_VERSION.tgz
+cd rubygems-$RUBYGEMS_VERSION
+/opt/ruby/bin/ruby setup.rb
+cd ..
+rm -rf rubygems-$RUBYGEMS_VERSION
+rm rubygems-$RUBYGEMS_VERSION.tgz
+
+echo 'PATH=$PATH:/opt/ruby/bin/' > /etc/profile.d/vagrantruby.sh

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/sudo.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/sudo.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/sudo.sh
new file mode 100644
index 0000000..65ccf16
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/sudo.sh
@@ -0,0 +1,5 @@
+groupadd -r admin
+usermod -a -G admin vagrant
+cp /etc/sudoers /etc/sudoers.orig
+sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
+sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
new file mode 100644
index 0000000..10efd34
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
@@ -0,0 +1,6 @@
+mkdir /home/vagrant/.ssh
+chmod 700 /home/vagrant/.ssh
+cd /home/vagrant/.ssh
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
+chmod 600 /home/vagrant/.ssh/authorized_keys
+chown -R vagrant /home/vagrant/.ssh

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vbox.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vbox.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vbox.sh
new file mode 100644
index 0000000..1270338
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vbox.sh
@@ -0,0 +1,22 @@
+# Without libdbus virtualbox would not start automatically after compile
+apt-get -y install --no-install-recommends libdbus-1-3
+
+# Remove existing VirtualBox guest additions
+/etc/init.d/virtualbox-ose-guest-utils stop
+rmmod vboxguest
+aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils
+aptitude -y install dkms
+
+# Install the VirtualBox guest additions
+VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
+VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso
+mount -o loop $VBOX_ISO /mnt
+yes|sh /mnt/VBoxLinuxAdditions.run
+umount /mnt
+
+# Temporary fix for VirtualBox Additions version 4.3.10
+# issue #12879, see https://www.virtualbox.org/ticket/12879
+[ -e /usr/lib/VBoxGuestAdditions ] || ln -s /opt/VBoxGuestAdditions-$VBOX_VERSION/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
+
+# Cleanup
+rm $VBOX_ISO

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d72bec8a/baseboxes/readme.markdown
----------------------------------------------------------------------
diff --git a/baseboxes/readme.markdown b/baseboxes/readme.markdown
new file mode 100644
index 0000000..cd1d22b
--- /dev/null
+++ b/baseboxes/readme.markdown
@@ -0,0 +1,40 @@
+Veewee configurations for CouchDB CI basebox
+============================================
+
+To test CouchDB CI setups locally as virtual boxes we use we use Vagrant. Vagrant setups always need a base box. To make the creation and maintenance of these base boxes easy and reproducible we use [veewee](https://github.com/jedi4ever/veewee).
+
+Each base box has its own sub folder in defintions and is based on a different template, usually a minimal install of the OS in question.
+
+For example, the veewee configuration for the base box for Ubuntu 14.04 LTS is based on the template 'ubuntu-14.04-server-amd64' (created via
+`veewee vbox define couchdb-ci-ubuntu-14.04 ubuntu-14.04-server-amd64`).
+
+See the readme in each sub folder in definitions for more info on the base boxes.
+
+Steps to re-build a basebox from scratch
+========================================
+
+## 0. Install Veewee
+
+* https://github.com/jedi4ever/veewee/blob/master/doc/requirements.md
+* https://github.com/jedi4ever/veewee/blob/master/doc/installation.md
+
+## 1. Build and export virtualbox image with veewee
+
+Execute the following commands in the `baseboxes` directory
+```bash
+veewee vbox build 'couchdb-ci-ubuntu-14.04'
+```
+
+If there is already a box named 'couchdb-ci-ubuntu-14.04', you can use the additional parameter `--force` to overwrite the existing box.
+
+## 2. Export the box
+```
+veewee vbox export 'couchdb-ci-ubuntu-14.04'
+```
+
+Now you have a 'couchdb-ci-ubuntu-14.04.box' file in your directory. This file can be imported in Vagrant.
+
+## 3. Import box in vagrant
+```
+vagrant box add 'couchdb-ci-ubuntu-14.04' './couchdb-ci-ubuntu-14.04.box'
+```


[08/23] couchdb-ci git commit: switch to Jenkins master-worker setup

Posted by ba...@apache.org.
switch to Jenkins master-worker setup

- create first Ubuntu 14.04 worker with latest Erlang
- also, replace master/slave with master/worker everywhere


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/6515f486
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/6515f486
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/6515f486

Branch: refs/heads/master
Commit: 6515f48652c64d0e030c27cf620c52e1eeb35c50
Parents: bc8a055
Author: Bastian Krol <ba...@web.de>
Authored: Mon Jul 6 09:19:03 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Mon Jul 6 10:15:53 2015 +0200

----------------------------------------------------------------------
 .../roles/jenkins-master/files/keys/.gitignore  |  1 +
 .../jenkins-master/files/keys/generate-key.sh   |  8 ++++
 ansible/roles/jenkins-master/tasks/main.yml     | 48 ++++++++++++++++++-
 .../templates/jenkins/credentials.xml           | 20 ++++++++
 .../templates/jenkins/jobs/build-couchdb.xml    | 31 +++++++++++++
 .../jenkins/nodes/ubuntu1404/config.xml         | 19 ++++++++
 .../templates/jobs/build-couchdb.xml            | 30 ------------
 .../files/keys/couchdb-ci-rsa.pub               |  1 +
 ansible/roles/jenkins-worker/tasks/main.yml     | 22 +++++++++
 ansible/roles/ubuntu/tasks/main.yml             | 12 ++++-
 ansible/site.yml                                | 20 +++++---
 readme.markdown                                 | 10 ++--
 vagrant/.gitignore                              |  1 +
 vagrant/Vagrantfile                             | 49 ++++++++++++++++++++
 vagrant/jenkins-master/.gitignore               |  1 -
 vagrant/jenkins-master/Vagrantfile              | 36 --------------
 vagrant/readme.markdown                         | 28 +++++++++--
 17 files changed, 254 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-master/files/keys/.gitignore
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/files/keys/.gitignore b/ansible/roles/jenkins-master/files/keys/.gitignore
new file mode 100644
index 0000000..240db6a
--- /dev/null
+++ b/ansible/roles/jenkins-master/files/keys/.gitignore
@@ -0,0 +1 @@
+couchdb-ci-rsa

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-master/files/keys/generate-key.sh
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/files/keys/generate-key.sh b/ansible/roles/jenkins-master/files/keys/generate-key.sh
new file mode 100755
index 0000000..f27c1d9
--- /dev/null
+++ b/ansible/roles/jenkins-master/files/keys/generate-key.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env sh
+
+# This script is not meant to be copied to the Jenkins master. It can be
+# executed locally on the provisioning machine to generate a new keypair for
+# Jenkins' master-worker communication. The public key is copied to the correct
+# location for provisioning the worker. Do not commit the private key go git.
+ssh-keygen -t rsa -N "" -b 4096 -q -f couchdb-ci-rsa
+mv couchdb-ci-rsa.pub ../../../jenkins-worker/files/keys

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/main.yml b/ansible/roles/jenkins-master/tasks/main.yml
index 8703d75..f9c32d0 100644
--- a/ansible/roles/jenkins-master/tasks/main.yml
+++ b/ansible/roles/jenkins-master/tasks/main.yml
@@ -16,6 +16,29 @@
       name: jenkins
       state: present
       update_cache: yes # run apt-get update before apt-get install jenkins
+    # jenkins also installs a JDK 7 as its dependency
+
+  - name: make private key dir
+    file:
+      path: /var/lib/jenkins/.ssh
+      state: directory
+      owner: jenkins
+      group: jenkins
+      mode: 0700
+
+  # If this step fails, you are probably missing the private key for
+  # master-worker communication. Please put the key into
+  # ansible/roles/jenkins-master/files/keys/couchdb-ci-rsa before proceeding.
+  # ---
+  # TODO This should be improved! See http://stackoverflow.com/a/29399036, maybe we can use ansible vault.
+  # ---
+  - name: copy private key
+    copy:
+      src: keys/couchdb-ci-rsa
+      dest: /var/lib/jenkins/.ssh/id_rsa
+      owner: jenkins
+      group: jenkins
+      mode: 0600
 
   - name: create build job folder
     file:
@@ -26,7 +49,7 @@
 
   - name: create build job config
     template:
-      src: jobs/build-couchdb.xml
+      src: jenkins/jobs/build-couchdb.xml
       dest: /var/lib/jenkins/jobs/build-couchdb/config.xml
       owner: jenkins
       group: jenkins
@@ -40,6 +63,29 @@
       owner: jenkins
       group: jenkins
 
+  - name: create credentials config for master-worker communication
+    template:
+      src: jenkins/credentials.xml
+      dest: /var/lib/jenkins/credentials.xml
+      owner: jenkins
+      group: jenkins
+    notify: restart jenkins service
+
+  - name: create Ubuntu 14.04 worker folder
+    file:
+      path: /var/lib/jenkins/nodes/ubuntu1404
+      owner: jenkins
+      group: jenkins
+      state: directory
+
+  - name: create Ubuntu 14.04 worker node config
+    template:
+      src: jenkins/nodes/ubuntu1404/config.xml
+      dest: /var/lib/jenkins/nodes/ubuntu1404/config.xml
+      owner: jenkins
+      group: jenkins
+    notify: restart jenkins service
+
   - name: start jenkins service
     service:
       name: jenkins

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-master/templates/jenkins/credentials.xml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/jenkins/credentials.xml b/ansible/roles/jenkins-master/templates/jenkins/credentials.xml
new file mode 100644
index 0000000..e91d403
--- /dev/null
+++ b/ansible/roles/jenkins-master/templates/jenkins/credentials.xml
@@ -0,0 +1,20 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<com.cloudbees.plugins.credentials.SystemCredentialsProvider plugin="credentials@1.18">
+  <domainCredentialsMap class="hudson.util.CopyOnWriteMap$Hash">
+    <entry>
+      <com.cloudbees.plugins.credentials.domains.Domain>
+        <specifications/>
+      </com.cloudbees.plugins.credentials.domains.Domain>
+      <java.util.concurrent.CopyOnWriteArrayList>
+        <com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey plugin="ssh-credentials@1.10">
+          <scope>GLOBAL</scope>
+          <id>f5ea452c-8774-4f21-9e81-f833212a81c2</id>
+          <description></description>
+          <username>jenkins</username>
+          <passphrase>+uILM8qV9UhKJu4ygwvhXQ==</passphrase>
+          <privateKeySource class="com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey$UsersPrivateKeySource"/>
+        </com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey>
+      </java.util.concurrent.CopyOnWriteArrayList>
+    </entry>
+  </domainCredentialsMap>
+</com.cloudbees.plugins.credentials.SystemCredentialsProvider>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml b/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml
new file mode 100644
index 0000000..c603054
--- /dev/null
+++ b/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description></description>
+  <keepDependencies>false</keepDependencies>
+  <properties/>
+  <scm class="hudson.scm.NullSCM"/>
+  <assignedNode>ubuntu1404</assignedNode>
+  <canRoam>false</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>set -x
+set -e
+
+# TODO: This should obviously pull the code from vcs
+wget http://apache.openmirror.de/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz
+tar xzf apache-couchdb-1.6.1.tar.gz
+cd apache-couchdb-1.6.1
+
+./configure
+make</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-master/templates/jenkins/nodes/ubuntu1404/config.xml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/jenkins/nodes/ubuntu1404/config.xml b/ansible/roles/jenkins-master/templates/jenkins/nodes/ubuntu1404/config.xml
new file mode 100644
index 0000000..2c2d190
--- /dev/null
+++ b/ansible/roles/jenkins-master/templates/jenkins/nodes/ubuntu1404/config.xml
@@ -0,0 +1,19 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<slave>
+  <name>ubuntu1404</name>
+  <description></description>
+  <remoteFS>/var/lib/jenkins</remoteFS>
+  <numExecutors>1</numExecutors>
+  <mode>NORMAL</mode>
+  <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
+  <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.9">
+    <host>couchdb-ubuntu-14.04-worker</host>
+    <port>22</port>
+    <credentialsId>f5ea452c-8774-4f21-9e81-f833212a81c2</credentialsId>
+    <maxNumRetries>0</maxNumRetries>
+    <retryWaitTime>0</retryWaitTime>
+  </launcher>
+  <label>ubuntu1404 erlang-latest</label>
+  <nodeProperties/>
+  <userId>anonymous</userId>
+</slave>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml b/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml
deleted file mode 100644
index 0892602..0000000
--- a/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<project>
-  <actions/>
-  <description></description>
-  <keepDependencies>false</keepDependencies>
-  <properties/>
-  <scm class="hudson.scm.NullSCM"/>
-  <canRoam>true</canRoam>
-  <disabled>false</disabled>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <triggers/>
-  <concurrentBuild>false</concurrentBuild>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>set -x
-set -e
-
-# TODO: This should obviously pull the code from vcs
-wget http://apache.openmirror.de/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz
-tar xzf apache-couchdb-1.6.1.tar.gz
-cd apache-couchdb-1.6.1
-
-./configure
-make</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers/>
-  <buildWrappers/>
-</project>

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub b/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub
new file mode 100644
index 0000000..09b8c16
--- /dev/null
+++ b/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub
@@ -0,0 +1 @@
+ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCZ+XvtXx6vPybYue8bm6q84B44yWE7Fb8bJ2eO7AQIqLXYw8CHCft03w59fBdra6KfuqO3ziZbSJgeOAYBD42zthPSBnvzlLdiGyWc7l3RDuipGYyE/I5WElHJlZWGxeaG8NfByAvc9wvMfUh3IABcxAKQ3SLC6h3WxL1badhyEdUDXB5i5bb1abfaEL0ezkM6w0NlOrvU70zGIccflG4u4eg3hECJVMIo6x0ozACY7fMLrGQ96WWpJuSAxBfi/1E/ipWUhwEsylrccEtiJgBJRBn5NEKrhOZ2GScpxhGf7y1x4xREdglLFao/BU9XkMyOqTtaKdpsl1BzbJ56XrLQiy0uSzgHVzxJOfbg33hAYk/YEVE9UQHoNhpRkQQNBEgak5lPZKxo5ux9/yFh6pM3xr3LpupqHPRAxEc3fzcBODGYcFXxuM396RRNwcAq9HGLgie7tYHKCo7RjsQwIDQrZgBj2kpTqdT4Dv74dobx6Sfe1hpAD0eXyWZojcJeDlPGvsiWjJrFyVorp1Wmkggwthgp/lL6l4J8VTLBZMLDSFu6g0sXy/z8cczcXgJXhnL8QqLTRaFHa6bzGFqFvF7Kawo2mbT/fscf3RUn78gTvZxLjkZ8RmGCHEBsZErir6F4NETGQmos42NWW5fRJFXZc0b0qanIXlaAVo1x5mdoYQ== bastian@krol

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/jenkins-worker/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-worker/tasks/main.yml b/ansible/roles/jenkins-worker/tasks/main.yml
new file mode 100644
index 0000000..c67e6f4
--- /dev/null
+++ b/ansible/roles/jenkins-worker/tasks/main.yml
@@ -0,0 +1,22 @@
+---
+ - name: create jenkins group
+   group:
+     name: jenkins
+     gid: 112 # same gid as jenkins group on master
+     state: present
+     system: yes
+
+ - name: create jenkins user
+   user:
+     name: jenkins
+     uid: 106 # same uid as jenkins user on master
+     state: present
+     system: yes
+     group: jenkins
+     home: "/var/lib/jenkins"
+
+ - name: add public key
+   authorized_key:
+     user: jenkins
+     key: "{{ lookup('file', 'keys/couchdb-ci-rsa.pub') }}"
+     manage_dir: yes

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/roles/ubuntu/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu/tasks/main.yml b/ansible/roles/ubuntu/tasks/main.yml
index fa87799..be62db0 100644
--- a/ansible/roles/ubuntu/tasks/main.yml
+++ b/ansible/roles/ubuntu/tasks/main.yml
@@ -1,7 +1,15 @@
 ---
-  # TODO These packages are required to build Couch. Maybe a ubuntu-build-slave
+  # even though we do not need Java to build CouchDB, a Jenkins worker still
+  # needs an installed JDK or the Jenkins master yells at you when attempting to
+  # connect
+  - name: install jdk
+    apt:
+      name: openjdk-7-jdk
+      state: present
+
+  # TODO These packages are required to build Couch. Maybe a ubuntu-build-worker
   # role would make more sense in the long run. Jenkins master does not need
-  # this packages once we use a master slave setup.
+  # this packages once we use a master-worker setup.
   - name: install packages required to build CouchDB
     apt: name={{item}} state=present
     with_items:

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/ansible/site.yml
----------------------------------------------------------------------
diff --git a/ansible/site.yml b/ansible/site.yml
index 43d7d92..fc757a4 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -5,14 +5,22 @@
   roles:
   - common
 
-# Apply common configuration for all Ubuntu systems
-- hosts: ubuntu
-  remote_user: root
-  roles:
-  - ubuntu
-
 # Configure and deploy Jenkins master
 - hosts: jenkins-master
   remote_user: root
   roles:
   - jenkins-master
+
+# Configure and deploy Jenkins workers
+- hosts: jenkins-workers
+  remote_user: root
+  roles:
+  - jenkins-worker
+
+# Apply common configuration for all Ubuntu systems
+# TODO Currently this only contains packages needed on the workers, so rename
+# this role to ubuntu-worker
+- hosts: ubuntu
+  remote_user: root
+  roles:
+  - ubuntu

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index 6a5a828..fc69795 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -12,10 +12,14 @@ Current state:
 - [x] install bare Jenkins master with Ansible
 - [x] install and configure nginx
 - [x] create CouchDB build job in Jenkins via Ansible
+- [x] switch to master-worker Jenkins setup
+- [ ] use Ansible vault for key management?
+- [ ] use ntp server for master and workers
 - [ ] actually fetch CouchDB from VCS
-- [ ] switch to master slave Jenkins setup
 - [ ] optional: switch to Jenkins Job DSL plug-in for defining jobs?
 - [ ] all apt-get commands should pin a specific version, in the base box definition as well as in Ansible. How?
-- [ ] create an additional Ubuntu slave with an older Erlang version
-- [ ] create another base box (different linux distro) for a third slave
+- [ ] create an additional Ubuntu worker with an older Erlang version
+- [ ] create another base box (different linux distro) for a third worker
 - [ ] talk to Infra people
+
+*Remark: Throughout this repository we use the terms "master"/"worker" for the Jenkins build machines, whereas the Jenkins documentation uses the terms "master"/"slave".*

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/vagrant/.gitignore
----------------------------------------------------------------------
diff --git a/vagrant/.gitignore b/vagrant/.gitignore
new file mode 100644
index 0000000..8000dd9
--- /dev/null
+++ b/vagrant/.gitignore
@@ -0,0 +1 @@
+.vagrant

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/vagrant/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
new file mode 100644
index 0000000..e42bd28
--- /dev/null
+++ b/vagrant/Vagrantfile
@@ -0,0 +1,49 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure
+# configures the configuration version (we support older styles for
+# backwards compatibility).
+Vagrant.configure(2) do |config|
+
+  # How much memory does the master need to test the setup? How much do the
+  # workers need? I have no clue.
+  config.vm.provider "virtualbox" do |vb|
+    vb.memory = "1024"
+    # vb.gui = true # enable this to start vbox with GUI to debug problems on startup
+  end
+
+  # The base boxes also have the Vagrant ssh key copied into root's
+  # authorized_keys so we can ssh into the box via root. This way, there is no
+  # mention of the user vagrant in the Ansible scripts.
+  config.ssh.username = "root"
+
+  config.vm.define "couchdb-jenkins-master" do |node|
+    node.vm.box = "couchdb-ci-ubuntu-14.04"
+    node.vm.hostname = "master"
+    node.vm.network "forwarded_port", guest:   80, host: 10080
+    node.vm.network "forwarded_port", guest: 8080, host: 18080
+    node.vm.network "private_network", ip: "10.20.1.2"
+    node.vm.provision :hosts
+  end
+
+  config.vm.define "couchdb-ubuntu-14.04-worker" do |node|
+    node.vm.box = "couchdb-ci-ubuntu-14.04"
+    node.vm.hostname = "ubuntu1404"
+    node.vm.network "private_network", ip: "10.20.1.3"
+    node.vm.provision :hosts
+  end
+
+
+  # Workaround for "stdin: is not a tty error" -- make Vagrants ssh shell a
+  # non-login one. See https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
+  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
+
+  config.vm.provision "ansible" do |ansible|
+    ansible.playbook = "../ansible/site.yml"
+    ansible.groups = {
+      "jenkins-master" => ["couchdb-jenkins-master"],
+      "jenkins-workers" => ["couchdb-ubuntu-14.04-worker"],
+      "ubuntu" => ["couchdb-ubuntu-14.04-worker"]
+    }
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/vagrant/jenkins-master/.gitignore
----------------------------------------------------------------------
diff --git a/vagrant/jenkins-master/.gitignore b/vagrant/jenkins-master/.gitignore
deleted file mode 100644
index 8000dd9..0000000
--- a/vagrant/jenkins-master/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.vagrant

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/vagrant/jenkins-master/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/jenkins-master/Vagrantfile b/vagrant/jenkins-master/Vagrantfile
deleted file mode 100644
index c24fdc6..0000000
--- a/vagrant/jenkins-master/Vagrantfile
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-# All Vagrant configuration is done below. The "2" in Vagrant.configure
-# configures the configuration version (we support older styles for
-# backwards compatibility).
-Vagrant.configure(2) do |config|
-  config.vm.box = "couchdb-ci-ubuntu-14.04"
-
-  # How much memory do we need to test the setup? I have no clue.
-  config.vm.provider "virtualbox" do |vb|
-    vb.memory = "1024"
-  end
-
-  # The base box also copies the Vagrant ssh key into root's authorized_keys
-  # so we can ssh into the box via root. This way, there is no mention of the
-  # user vagrant in the Ansible scripts.
-  config.ssh.username = 'root'
-
-  config.vm.define "couchdb-jenkins-master"
-
-  # Workaround for "stdin: is not a tty error" -- make Vagrants ssh shell a
-  # non-login one. See https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
-  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
-
-  config.vm.provision "ansible" do |ansible|
-    ansible.playbook = "../../ansible/site.yml"
-    ansible.groups = {
-      "jenkins-master" => ["couchdb-jenkins-master"],
-      "ubuntu" => ["couchdb-jenkins-master"],
-    }
-  end
-
-  config.vm.network "forwarded_port", guest:   80, host: 10080
-  config.vm.network "forwarded_port", guest: 8080, host: 18080
-end

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/6515f486/vagrant/readme.markdown
----------------------------------------------------------------------
diff --git a/vagrant/readme.markdown b/vagrant/readme.markdown
index 141127c..81a2992 100644
--- a/vagrant/readme.markdown
+++ b/vagrant/readme.markdown
@@ -1,15 +1,30 @@
 Vagrant Configuration for Testing the CouchDB CI Setup Locally
 ==============================================================
 
-Each sub folder in this directory contains the Vagrant configuration for one of the machines used in the CouchDB CI setup.
+This folder contains the multi machine Vagrant configuration for the machines used in the CouchDB CI setup.
 
 ## Prerequesites
 
 You need to have [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) installed.
 
+When Vagrant is installed you need to install an additional plug-in:
+```bash
+vagrant plugin install vagrant-hosts
+```
+
+Also, you might need to run
+```bash
+VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0
+```
+before doing
+```bash
+vagrant up
+```
+because of <https://github.com/mitchellh/vagrant/issues/3083>.
+
 ## Building and Registering the Base Box
 
-Each vagrant configuration requires its respective base box. For example, the configuration couchdb-jenkins-master requires the base box `couchdb-ci-ubuntu-14.04`. You can build the base boxes locally with veewee (see `../baseboxes/readme.markdown`). To make things easier we might upload the base boxes somewhere so people do not have to build them theirselves but can just download them but we are not there yet.
+Each vagrant configuration requires its respective base box. For example, the configuration jenkins-master requires the base box `couchdb-ci-ubuntu-14.04`. You can build the base boxes locally with veewee (see `../baseboxes/readme.markdown`). To make things easier we might upload the base boxes somewhere so people do not have to build them theirselves but can just download them but we are not there yet.
 
 Either way, you have to add the image to the vagrant base image registry with the following command:
 ```
@@ -20,6 +35,11 @@ When this has happened, `vagrant box list` should list the base box's name (`cou
 
 The base box built with veewee is just a fresh minimal install of the OS. All relevant packages and configurations are provisioned with Ansible. Vagrant is used to make creating, provisioning and destroying these virtual machines easier.
 
-## Launching and Provisioning the Box
+## Launching and Provisioning the Boxes
+
+Just execute `vagrant up`. This will start all the virtual machine and provision it using the scripts in `../ansible`. That's it :-)
 
-Just execute `vagrant up`. This will start the virtual machine and provision it using the scripts in `../ansible`. That's it :-)
+You can also selectively launch a single box, for example with
+```bash
+vagrant up couchdb-jenkins-master
+```


[02/23] couchdb-ci git commit: Customized Ubuntu 14.04 LTS base box

Posted by ba...@apache.org.
Customized Ubuntu 14.04 LTS base box


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/b916ea82
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/b916ea82
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/b916ea82

Branch: refs/heads/master
Commit: b916ea8205fa316e3bda5633122144324a075b86
Parents: d72bec8
Author: Bastian Krol <ba...@web.de>
Authored: Thu Jul 2 15:55:37 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Thu Jul 2 15:55:37 2015 +0200

----------------------------------------------------------------------
 baseboxes/.gitignore                            |  2 ++
 .../definitions/couchdb-ci-ubuntu-14.04/chef.sh |  3 --
 .../couchdb-ci-ubuntu-14.04/definition.rb       |  9 ++---
 .../couchdb-ci-ubuntu-14.04/parallels.sh        |  9 -----
 .../couchdb-ci-ubuntu-14.04/puppet.sh           |  4 ---
 .../couchdb-ci-ubuntu-14.04/readme.markdown     | 14 ++++++++
 baseboxes/readme.markdown                       | 38 +++++++++++---------
 7 files changed, 40 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b916ea82/baseboxes/.gitignore
----------------------------------------------------------------------
diff --git a/baseboxes/.gitignore b/baseboxes/.gitignore
new file mode 100644
index 0000000..64dd29c
--- /dev/null
+++ b/baseboxes/.gitignore
@@ -0,0 +1,2 @@
+iso/
+couchdb-ci-ubuntu-14.04.box

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b916ea82/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh
deleted file mode 100644
index a0a9e3b..0000000
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/chef.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-GEM=/opt/ruby/bin/gem
-
-$GEM install chef --no-ri --no-rdoc

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b916ea82/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
index b52b3c1..93a23c2 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
@@ -5,9 +5,9 @@ Veewee::Session.declare({
   :disk_format => 'VDI',
   :hostiocache => 'off',
   :os_type_id => 'Ubuntu_64',
-  :iso_file => "ubuntu-14.04-server-amd64.iso",
-  :iso_src => "http://releases.ubuntu.com/14.04/ubuntu-14.04-server-amd64.iso",
-  :iso_md5 => "01545fa976c8367b4f0d59169ac4866c",
+  :iso_file => "ubuntu-14.04.2-server-amd64.iso",
+  :iso_src => "http://releases.ubuntu.com/14.04/ubuntu-14.04.2-server-amd64.iso",
+  :iso_md5 => "83aabd8dcf1e8f469f3c72fff2375195",
   :iso_download_timeout => "1000",
   :boot_wait => "4",
   :boot_cmd_sequence => [
@@ -36,10 +36,7 @@ Veewee::Session.declare({
    "sudo.sh",
    "vagrant.sh",
    "ruby.sh",
-   "chef.sh",
-   "puppet.sh",
    "vbox.sh",
-   # "parallels.sh",
    "cleanup.sh"
   ],
   :postinstall_timeout => "10000"

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b916ea82/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh
deleted file mode 100644
index a9b4b93..0000000
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/parallels.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-# Install the Parallels Tools
-PARALLELS_TOOLS_ISO=prl-tools-lin.iso
-mount -o loop $PARALLELS_TOOLS_ISO /media/cdrom
-/media/cdrom/install --install-unattended-with-deps --progress
-umount /media/cdrom
-
-# Cleanup
-# rm $PARALLELS_TOOLS_ISO
-

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b916ea82/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh
deleted file mode 100644
index d9c6822..0000000
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/puppet.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-GEM=/opt/ruby/bin/gem
-
-adduser --system --group --home /var/lib/puppet puppet
-$GEM install puppet --no-ri --no-rdoc

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b916ea82/baseboxes/definitions/couchdb-ci-ubuntu-14.04/readme.markdown
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/readme.markdown b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/readme.markdown
new file mode 100644
index 0000000..09ef8aa
--- /dev/null
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/readme.markdown
@@ -0,0 +1,14 @@
+# Base Box couchdb-ci-ubuntu-14.04
+
+This box has been created with
+
+```bash
+veewee vbox define couchdb-ci-ubuntu-14.04 ubuntu-14.04-server-amd64
+```
+
+That is, it has been created from the template ubuntu-14.04-server-amd64
+
+## Modifications
+
+After instantiating the template, chef.sh, puppet.sh and parallels.sh have been
+removed (we don't need those).

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b916ea82/baseboxes/readme.markdown
----------------------------------------------------------------------
diff --git a/baseboxes/readme.markdown b/baseboxes/readme.markdown
index cd1d22b..b8858a9 100644
--- a/baseboxes/readme.markdown
+++ b/baseboxes/readme.markdown
@@ -1,40 +1,44 @@
-Veewee configurations for CouchDB CI basebox
-============================================
+Veewee Configurations for CouchDB CI Base Boxes
+===============================================
 
 To test CouchDB CI setups locally as virtual boxes we use we use Vagrant. Vagrant setups always need a base box. To make the creation and maintenance of these base boxes easy and reproducible we use [veewee](https://github.com/jedi4ever/veewee).
 
-Each base box has its own sub folder in defintions and is based on a different template, usually a minimal install of the OS in question.
+Each base box has its own sub folder in `definitions` and is based on a different template, usually a minimal install of the OS in question.
 
 For example, the veewee configuration for the base box for Ubuntu 14.04 LTS is based on the template 'ubuntu-14.04-server-amd64' (created via
 `veewee vbox define couchdb-ci-ubuntu-14.04 ubuntu-14.04-server-amd64`).
 
-See the readme in each sub folder in definitions for more info on the base boxes.
+See the readme in each sub folder in `definitions` for more info on the base boxes.
 
-Steps to re-build a basebox from scratch
+Steps to Re-Build a Base Box From Scratch
 ========================================
 
 ## 0. Install Veewee
 
-* https://github.com/jedi4ever/veewee/blob/master/doc/requirements.md
-* https://github.com/jedi4ever/veewee/blob/master/doc/installation.md
+* <https://github.com/jedi4ever/veewee/blob/master/doc/requirements.md>
+* <https://github.com/jedi4ever/veewee/blob/master/doc/installation.md>
 
-## 1. Build and export virtualbox image with veewee
+## 1. Build and Export VirtualBox Images with Veewee
 
 Execute the following commands in the `baseboxes` directory
 ```bash
-veewee vbox build 'couchdb-ci-ubuntu-14.04'
+veewee vbox build couchdb-ci-ubuntu-14.04
 ```
 
-If there is already a box named 'couchdb-ci-ubuntu-14.04', you can use the additional parameter `--force` to overwrite the existing box.
+If there is already a box named `couchdb-ci-ubuntu-14.04`, you can use the additional parameter `--force` to overwrite the existing box or destroy the old box with `veewee vbox destroy couchdb-ci-ubuntu-14.04`.
 
-## 2. Export the box
-```
-veewee vbox export 'couchdb-ci-ubuntu-14.04'
-```
+When the box has been build, you could log in to the box with `ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 7222 -l vagrant 127.0.0.1` but actually there is no need to that.
 
-Now you have a 'couchdb-ci-ubuntu-14.04.box' file in your directory. This file can be imported in Vagrant.
+## 2. Export the Box
 
-## 3. Import box in vagrant
+```bash
+veewee vbox export couchdb-ci-ubuntu-14.04
 ```
-vagrant box add 'couchdb-ci-ubuntu-14.04' './couchdb-ci-ubuntu-14.04.box'
+
+Now you have a `couchdb-ci-ubuntu-14.04.box` file in your directory. This file can be imported in Vagrant.
+
+## 3. Import the Box in Vagrant
+
+```bash
+vagrant box add couchdb-ci-ubuntu-14.04 ./couchdb-ci-ubuntu-14.04.box
 ```


[15/23] couchdb-ci git commit: rename build job

Posted by ba...@apache.org.
rename build job


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/b2d189ae
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/b2d189ae
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/b2d189ae

Branch: refs/heads/master
Commit: b2d189ae5385d2b96b363396ff0f117c58ffb1ba
Parents: eda9fab
Author: Bastian Krol <ba...@web.de>
Authored: Sun Jul 26 13:23:22 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sun Jul 26 13:23:22 2015 +0200

----------------------------------------------------------------------
 ansible/roles/jenkins-master/tasks/jenkins.yml  |  8 ++---
 .../templates/jenkins/jobs/build-couchdb.xml    | 31 --------------------
 .../jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml | 31 ++++++++++++++++++++
 3 files changed, 35 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b2d189ae/ansible/roles/jenkins-master/tasks/jenkins.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/jenkins.yml b/ansible/roles/jenkins-master/tasks/jenkins.yml
index e271eb8..d2721f6 100644
--- a/ansible/roles/jenkins-master/tasks/jenkins.yml
+++ b/ansible/roles/jenkins-master/tasks/jenkins.yml
@@ -36,22 +36,22 @@
 
 - name: create build job folder
   file:
-    path: /var/lib/jenkins/jobs/build-couchdb/builds
+    path: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/builds
     owner: jenkins
     group: jenkins
     state: directory
 
 - name: create build job config
   template:
-    src: jenkins/jobs/build-couchdb.xml
-    dest: /var/lib/jenkins/jobs/build-couchdb/config.xml
+    src: jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml
+    dest: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/config.xml
     owner: jenkins
     group: jenkins
   notify: restart jenkins service
 
 - name: create nextBuildNumber file
   copy:
-    dest: /var/lib/jenkins/jobs/build-couchdb/nextBuildNumber
+    dest: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/nextBuildNumber
     content: "1"
     force: no
     owner: jenkins

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b2d189ae/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml b/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml
deleted file mode 100644
index c603054..0000000
--- a/ansible/roles/jenkins-master/templates/jenkins/jobs/build-couchdb.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<project>
-  <actions/>
-  <description></description>
-  <keepDependencies>false</keepDependencies>
-  <properties/>
-  <scm class="hudson.scm.NullSCM"/>
-  <assignedNode>ubuntu1404</assignedNode>
-  <canRoam>false</canRoam>
-  <disabled>false</disabled>
-  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
-  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
-  <triggers/>
-  <concurrentBuild>false</concurrentBuild>
-  <builders>
-    <hudson.tasks.Shell>
-      <command>set -x
-set -e
-
-# TODO: This should obviously pull the code from vcs
-wget http://apache.openmirror.de/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz
-tar xzf apache-couchdb-1.6.1.tar.gz
-cd apache-couchdb-1.6.1
-
-./configure
-make</command>
-    </hudson.tasks.Shell>
-  </builders>
-  <publishers/>
-  <buildWrappers/>
-</project>

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b2d189ae/ansible/roles/jenkins-master/templates/jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml b/ansible/roles/jenkins-master/templates/jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml
new file mode 100644
index 0000000..c603054
--- /dev/null
+++ b/ansible/roles/jenkins-master/templates/jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml
@@ -0,0 +1,31 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description></description>
+  <keepDependencies>false</keepDependencies>
+  <properties/>
+  <scm class="hudson.scm.NullSCM"/>
+  <assignedNode>ubuntu1404</assignedNode>
+  <canRoam>false</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>set -x
+set -e
+
+# TODO: This should obviously pull the code from vcs
+wget http://apache.openmirror.de/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz
+tar xzf apache-couchdb-1.6.1.tar.gz
+cd apache-couchdb-1.6.1
+
+./configure
+make</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>


[09/23] couchdb-ci git commit: split jenkins-master tasks/main.yml

Posted by ba...@apache.org.
split jenkins-master tasks/main.yml

+ remove superfluous indent in all yaml files


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/d05361c7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/d05361c7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/d05361c7

Branch: refs/heads/master
Commit: d05361c76ad7e90ab0f7417e42fda162dd6a12a5
Parents: 6515f48
Author: Bastian Krol <ba...@web.de>
Authored: Mon Jul 6 11:00:06 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Mon Jul 6 11:00:06 2015 +0200

----------------------------------------------------------------------
 ansible/roles/jenkins-master/handlers/main.yml |  16 +--
 ansible/roles/jenkins-master/tasks/jenkins.yml |  92 ++++++++++++++++
 ansible/roles/jenkins-master/tasks/main.yml    | 116 +-------------------
 ansible/roles/jenkins-master/tasks/nginx.yml   |  23 ++++
 ansible/roles/jenkins-worker/tasks/main.yml    |  38 +++----
 ansible/roles/ubuntu/tasks/main.yml            |  44 ++++----
 6 files changed, 166 insertions(+), 163 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d05361c7/ansible/roles/jenkins-master/handlers/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/handlers/main.yml b/ansible/roles/jenkins-master/handlers/main.yml
index 36d74a1..a9a5dca 100644
--- a/ansible/roles/jenkins-master/handlers/main.yml
+++ b/ansible/roles/jenkins-master/handlers/main.yml
@@ -1,10 +1,10 @@
 ---
-  - name: restart jenkins service
-    service:
-      name: jenkins
-      state: restarted
+- name: restart jenkins service
+  service:
+    name: jenkins
+    state: restarted
 
-  - name: restart nginx service
-    service:
-      name: nginx
-      state: restarted
+- name: restart nginx service
+  service:
+    name: nginx
+    state: restarted

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d05361c7/ansible/roles/jenkins-master/tasks/jenkins.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/jenkins.yml b/ansible/roles/jenkins-master/tasks/jenkins.yml
new file mode 100644
index 0000000..5983f1f
--- /dev/null
+++ b/ansible/roles/jenkins-master/tasks/jenkins.yml
@@ -0,0 +1,92 @@
+---
+- name: add apt-key for jenkins apt repo
+  apt_key:
+    url: https://jenkins-ci.org/debian/jenkins-ci.org.key
+    state: present
+
+- name: add jenkins apt repo
+  lineinfile:
+    dest: /etc/apt/sources.list.d/jenkins.list
+    line: "deb http://pkg.jenkins-ci.org/debian binary/"
+    state: present
+    create: true
+
+- name: install jenkins
+  apt:
+    name: jenkins
+    state: present
+    update_cache: yes # run apt-get update before apt-get install jenkins
+  # jenkins also installs a JDK 7 as its dependency
+
+- name: make private key dir
+  file:
+    path: /var/lib/jenkins/.ssh
+    state: directory
+    owner: jenkins
+    group: jenkins
+    mode: 0700
+
+# If this step fails, you are probably missing the private key for
+# master-worker communication. Please put the key into
+# ansible/roles/jenkins-master/files/keys/couchdb-ci-rsa before proceeding.
+# ---
+# TODO This should be improved! See http://stackoverflow.com/a/29399036, maybe we can use ansible vault.
+# ---
+- name: copy private key
+  copy:
+    src: keys/couchdb-ci-rsa
+    dest: /var/lib/jenkins/.ssh/id_rsa
+    owner: jenkins
+    group: jenkins
+    mode: 0600
+
+- name: create build job folder
+  file:
+    path: /var/lib/jenkins/jobs/build-couchdb/builds
+    owner: jenkins
+    group: jenkins
+    state: directory
+
+- name: create build job config
+  template:
+    src: jenkins/jobs/build-couchdb.xml
+    dest: /var/lib/jenkins/jobs/build-couchdb/config.xml
+    owner: jenkins
+    group: jenkins
+  notify: restart jenkins service
+
+- name: create nextBuildNumber file
+  copy:
+    dest: /var/lib/jenkins/jobs/build-couchdb/nextBuildNumber
+    content: "1"
+    force: no
+    owner: jenkins
+    group: jenkins
+
+- name: create credentials config for master-worker communication
+  template:
+    src: jenkins/credentials.xml
+    dest: /var/lib/jenkins/credentials.xml
+    owner: jenkins
+    group: jenkins
+  notify: restart jenkins service
+
+- name: create Ubuntu 14.04 worker folder
+  file:
+    path: /var/lib/jenkins/nodes/ubuntu1404
+    owner: jenkins
+    group: jenkins
+    state: directory
+
+- name: create Ubuntu 14.04 worker node config
+  template:
+    src: jenkins/nodes/ubuntu1404/config.xml
+    dest: /var/lib/jenkins/nodes/ubuntu1404/config.xml
+    owner: jenkins
+    group: jenkins
+  notify: restart jenkins service
+
+- name: start jenkins service
+  service:
+    name: jenkins
+    state: started

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d05361c7/ansible/roles/jenkins-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/main.yml b/ansible/roles/jenkins-master/tasks/main.yml
index f9c32d0..b27ed50 100644
--- a/ansible/roles/jenkins-master/tasks/main.yml
+++ b/ansible/roles/jenkins-master/tasks/main.yml
@@ -1,115 +1,3 @@
 ---
-  - name: add apt-key for jenkins apt repo
-    apt_key:
-      url: https://jenkins-ci.org/debian/jenkins-ci.org.key
-      state: present
-
-  - name: add jenkins apt repo
-    lineinfile:
-      dest: /etc/apt/sources.list.d/jenkins.list
-      line: "deb http://pkg.jenkins-ci.org/debian binary/"
-      state: present
-      create: true
-
-  - name: install jenkins
-    apt:
-      name: jenkins
-      state: present
-      update_cache: yes # run apt-get update before apt-get install jenkins
-    # jenkins also installs a JDK 7 as its dependency
-
-  - name: make private key dir
-    file:
-      path: /var/lib/jenkins/.ssh
-      state: directory
-      owner: jenkins
-      group: jenkins
-      mode: 0700
-
-  # If this step fails, you are probably missing the private key for
-  # master-worker communication. Please put the key into
-  # ansible/roles/jenkins-master/files/keys/couchdb-ci-rsa before proceeding.
-  # ---
-  # TODO This should be improved! See http://stackoverflow.com/a/29399036, maybe we can use ansible vault.
-  # ---
-  - name: copy private key
-    copy:
-      src: keys/couchdb-ci-rsa
-      dest: /var/lib/jenkins/.ssh/id_rsa
-      owner: jenkins
-      group: jenkins
-      mode: 0600
-
-  - name: create build job folder
-    file:
-      path: /var/lib/jenkins/jobs/build-couchdb/builds
-      owner: jenkins
-      group: jenkins
-      state: directory
-
-  - name: create build job config
-    template:
-      src: jenkins/jobs/build-couchdb.xml
-      dest: /var/lib/jenkins/jobs/build-couchdb/config.xml
-      owner: jenkins
-      group: jenkins
-    notify: restart jenkins service
-
-  - name: create nextBuildNumber file
-    copy:
-      dest: /var/lib/jenkins/jobs/build-couchdb/nextBuildNumber
-      content: "1"
-      force: no
-      owner: jenkins
-      group: jenkins
-
-  - name: create credentials config for master-worker communication
-    template:
-      src: jenkins/credentials.xml
-      dest: /var/lib/jenkins/credentials.xml
-      owner: jenkins
-      group: jenkins
-    notify: restart jenkins service
-
-  - name: create Ubuntu 14.04 worker folder
-    file:
-      path: /var/lib/jenkins/nodes/ubuntu1404
-      owner: jenkins
-      group: jenkins
-      state: directory
-
-  - name: create Ubuntu 14.04 worker node config
-    template:
-      src: jenkins/nodes/ubuntu1404/config.xml
-      dest: /var/lib/jenkins/nodes/ubuntu1404/config.xml
-      owner: jenkins
-      group: jenkins
-    notify: restart jenkins service
-
-  - name: start jenkins service
-    service:
-      name: jenkins
-      state: started
-
-  - name: install nginx
-    apt:
-      name: nginx
-      state: present
-
-  - name: remove default nginx site
-    file: name={{ item }} state=absent
-    with_items:
-    - /etc/nginx/sites-available/default
-    - /etc/nginx/sites-enabled/default
-
-  - name: copy nginx config
-    template:
-      src: nginx/jenkins
-      dest: /etc/nginx/sites-available/jenkins
-    notify: restart nginx service
-
-  - name: enable jenkins site
-    file:
-      src: /etc/nginx/sites-available/jenkins
-      dest: /etc/nginx/sites-enabled/jenkins
-      state: link
+- include: jenkins.yml
+- include: nginx.yml

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d05361c7/ansible/roles/jenkins-master/tasks/nginx.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/nginx.yml b/ansible/roles/jenkins-master/tasks/nginx.yml
new file mode 100644
index 0000000..98234ad
--- /dev/null
+++ b/ansible/roles/jenkins-master/tasks/nginx.yml
@@ -0,0 +1,23 @@
+---
+- name: install nginx
+  apt:
+    name: nginx
+    state: present
+
+- name: remove default nginx site
+  file: name={{ item }} state=absent
+  with_items:
+  - /etc/nginx/sites-available/default
+  - /etc/nginx/sites-enabled/default
+
+- name: copy nginx config
+  template:
+    src: nginx/jenkins
+    dest: /etc/nginx/sites-available/jenkins
+  notify: restart nginx service
+
+- name: enable jenkins site
+  file:
+    src: /etc/nginx/sites-available/jenkins
+    dest: /etc/nginx/sites-enabled/jenkins
+    state: link

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d05361c7/ansible/roles/jenkins-worker/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-worker/tasks/main.yml b/ansible/roles/jenkins-worker/tasks/main.yml
index c67e6f4..aafe704 100644
--- a/ansible/roles/jenkins-worker/tasks/main.yml
+++ b/ansible/roles/jenkins-worker/tasks/main.yml
@@ -1,22 +1,22 @@
 ---
- - name: create jenkins group
-   group:
-     name: jenkins
-     gid: 112 # same gid as jenkins group on master
-     state: present
-     system: yes
+- name: create jenkins group
+  group:
+    name: jenkins
+    gid: 112 # same gid as jenkins group on master
+    state: present
+    system: yes
 
- - name: create jenkins user
-   user:
-     name: jenkins
-     uid: 106 # same uid as jenkins user on master
-     state: present
-     system: yes
-     group: jenkins
-     home: "/var/lib/jenkins"
+- name: create jenkins user
+  user:
+    name: jenkins
+    uid: 106 # same uid as jenkins user on master
+    state: present
+    system: yes
+    group: jenkins
+    home: "/var/lib/jenkins"
 
- - name: add public key
-   authorized_key:
-     user: jenkins
-     key: "{{ lookup('file', 'keys/couchdb-ci-rsa.pub') }}"
-     manage_dir: yes
+- name: add public key
+  authorized_key:
+    user: jenkins
+    key: "{{ lookup('file', 'keys/couchdb-ci-rsa.pub') }}"
+    manage_dir: yes

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/d05361c7/ansible/roles/ubuntu/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu/tasks/main.yml b/ansible/roles/ubuntu/tasks/main.yml
index be62db0..b14191b 100644
--- a/ansible/roles/ubuntu/tasks/main.yml
+++ b/ansible/roles/ubuntu/tasks/main.yml
@@ -1,24 +1,24 @@
 ---
-  # even though we do not need Java to build CouchDB, a Jenkins worker still
-  # needs an installed JDK or the Jenkins master yells at you when attempting to
-  # connect
-  - name: install jdk
-    apt:
-      name: openjdk-7-jdk
-      state: present
+# even though we do not need Java to build CouchDB, a Jenkins worker still
+# needs an installed JDK or the Jenkins master yells at you when attempting to
+# connect
+- name: install jdk
+  apt:
+    name: openjdk-7-jdk
+    state: present
 
-  # TODO These packages are required to build Couch. Maybe a ubuntu-build-worker
-  # role would make more sense in the long run. Jenkins master does not need
-  # this packages once we use a master-worker setup.
-  - name: install packages required to build CouchDB
-    apt: name={{item}} state=present
-    with_items:
-    - build-essential
-    - erlang-base-hipe
-    - erlang-dev
-    - erlang-manpages
-    - erlang-eunit
-    - erlang-nox
-    - libicu-dev
-    - libmozjs185-dev
-    - libcurl4-openssl-dev
+# TODO These packages are required to build Couch. Maybe a ubuntu-build-worker
+# role would make more sense in the long run. Jenkins master does not need
+# this packages once we use a master-worker setup.
+- name: install packages required to build CouchDB
+  apt: name={{item}} state=present
+  with_items:
+  - build-essential
+  - erlang-base-hipe
+  - erlang-dev
+  - erlang-manpages
+  - erlang-eunit
+  - erlang-nox
+  - libicu-dev
+  - libmozjs185-dev
+  - libcurl4-openssl-dev


[05/23] couchdb-ci git commit: add main readme

Posted by ba...@apache.org.
add main readme


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/4093b10f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/4093b10f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/4093b10f

Branch: refs/heads/master
Commit: 4093b10fdbfb6b92d555476f2957a6ace9c249ac
Parents: 7e8caf9
Author: Bastian Krol <ba...@web.de>
Authored: Sat Jul 4 00:16:49 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sat Jul 4 00:17:33 2015 +0200

----------------------------------------------------------------------
 readme.markdown | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/4093b10f/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
new file mode 100644
index 0000000..104178f
--- /dev/null
+++ b/readme.markdown
@@ -0,0 +1,8 @@
+CouchDB CI Setup
+================
+
+This is the repository for the automated creation of the CouchDB CI infrastructure. Well, at least it will be when it has grown up. This might take a while, though. Right now, it's just a bunch of Ansible scripts, a Vagrantfile and a Veewee definition.
+
+See the readme files in folder `baseboxes` (for docs on building the base boxes) and in folder `vagrant` (for docs on how to spin up the setup locally).
+
+Fair warning: This is very much work in progress.


[16/23] couchdb-ci git commit: apt-get update

Posted by ba...@apache.org.
apt-get update


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/b9f87cb0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/b9f87cb0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/b9f87cb0

Branch: refs/heads/master
Commit: b9f87cb097092aba07cbcb0b8aa57736eea2a887
Parents: b2d189a
Author: Bastian Krol <ba...@web.de>
Authored: Sun Jul 26 15:13:33 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sun Jul 26 15:13:33 2015 +0200

----------------------------------------------------------------------
 ansible/roles/ubuntu-worker/tasks/main.yml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/b9f87cb0/ansible/roles/ubuntu-worker/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/main.yml b/ansible/roles/ubuntu-worker/tasks/main.yml
index 3a8c78f..de00fd8 100644
--- a/ansible/roles/ubuntu-worker/tasks/main.yml
+++ b/ansible/roles/ubuntu-worker/tasks/main.yml
@@ -6,6 +6,7 @@
   apt:
     name: openjdk-7-jdk
     state: present
+    update_cache: yes
 
 # Install packages required to build CouchDB via apt-get
 - name: install packages required to build CouchDB


[12/23] couchdb-ci git commit: generate keys on the fly

Posted by ba...@apache.org.
generate keys on the fly


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/448ba2ca
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/448ba2ca
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/448ba2ca

Branch: refs/heads/master
Commit: 448ba2ca3d712b63d3b422a2c975e37f62e535a1
Parents: c27023e
Author: Bastian Krol <ba...@web.de>
Authored: Thu Jul 9 08:59:35 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Thu Jul 9 08:59:35 2015 +0200

----------------------------------------------------------------------
 ansible/generate-keypair.sh                     | 24 ++++++++++++++++++++
 ansible/roles/common/tasks/main.yml             | 11 ++++++++-
 .../jenkins-master/files/keys/generate-key.sh   |  8 -------
 ansible/roles/jenkins-master/tasks/jenkins.yml  |  8 +------
 .../roles/jenkins-worker/files/keys/.gitignore  |  2 ++
 .../files/keys/couchdb-ci-rsa.pub               |  1 -
 6 files changed, 37 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/448ba2ca/ansible/generate-keypair.sh
----------------------------------------------------------------------
diff --git a/ansible/generate-keypair.sh b/ansible/generate-keypair.sh
new file mode 100755
index 0000000..c212b3c
--- /dev/null
+++ b/ansible/generate-keypair.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+# This script is not meant to be copied to the Jenkins master. It can be
+# executed locally on the provisioning machine to generate a new keypair for
+# Jenkins' master-worker communication. The key files are moved to the correct
+# location for provisioning the master and the workers.
+#
+# Do not commit the keys to git!
+
+# go to ansible directory
+pushd `dirname $0` > /dev/null
+pwd
+
+if [[ -f roles/jenkins-master/files/keys/couchdb-ci-rsa ]] && [[ -f  roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub ]]; then
+  echo Keys found, not generating a new key pair.
+else
+  echo No keys found, generating new key pair.
+  rm -f couchdb-ci-rsa couchdb-ci-rsa.pub
+  ssh-keygen -t rsa -N "" -b 4096 -q -f couchdb-ci-rsa
+  mv couchdb-ci-rsa.pub roles/jenkins-worker/files/keys
+  mv couchdb-ci-rsa roles/jenkins-master/files/keys
+fi
+
+popd > /dev/null

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/448ba2ca/ansible/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml
index d7878ac..08017ff 100644
--- a/ansible/roles/common/tasks/main.yml
+++ b/ansible/roles/common/tasks/main.yml
@@ -1,2 +1,11 @@
 ---
-# currently there are no common tasks ¯\_(ツ)_/¯
+# generate a new key pair if none is present
+- name: generate new key pair for master-worker communication
+  shell: ./generate-keypair.sh
+  args:
+    creates: roles/jenkins-master/files/keys/couchdb-ci-rsa
+  run_once: true
+  delegate_to: localhost
+  register: keygen_out
+
+- debug: msg="{{ keygen_out.stdout }}"

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/448ba2ca/ansible/roles/jenkins-master/files/keys/generate-key.sh
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/files/keys/generate-key.sh b/ansible/roles/jenkins-master/files/keys/generate-key.sh
deleted file mode 100755
index f27c1d9..0000000
--- a/ansible/roles/jenkins-master/files/keys/generate-key.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env sh
-
-# This script is not meant to be copied to the Jenkins master. It can be
-# executed locally on the provisioning machine to generate a new keypair for
-# Jenkins' master-worker communication. The public key is copied to the correct
-# location for provisioning the worker. Do not commit the private key go git.
-ssh-keygen -t rsa -N "" -b 4096 -q -f couchdb-ci-rsa
-mv couchdb-ci-rsa.pub ../../../jenkins-worker/files/keys

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/448ba2ca/ansible/roles/jenkins-master/tasks/jenkins.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/jenkins.yml b/ansible/roles/jenkins-master/tasks/jenkins.yml
index 5983f1f..e271eb8 100644
--- a/ansible/roles/jenkins-master/tasks/jenkins.yml
+++ b/ansible/roles/jenkins-master/tasks/jenkins.yml
@@ -26,13 +26,7 @@
     group: jenkins
     mode: 0700
 
-# If this step fails, you are probably missing the private key for
-# master-worker communication. Please put the key into
-# ansible/roles/jenkins-master/files/keys/couchdb-ci-rsa before proceeding.
-# ---
-# TODO This should be improved! See http://stackoverflow.com/a/29399036, maybe we can use ansible vault.
-# ---
-- name: copy private key
+- name: copy private key to Jenkins master
   copy:
     src: keys/couchdb-ci-rsa
     dest: /var/lib/jenkins/.ssh/id_rsa

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/448ba2ca/ansible/roles/jenkins-worker/files/keys/.gitignore
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-worker/files/keys/.gitignore b/ansible/roles/jenkins-worker/files/keys/.gitignore
new file mode 100644
index 0000000..14712b3
--- /dev/null
+++ b/ansible/roles/jenkins-worker/files/keys/.gitignore
@@ -0,0 +1,2 @@
+couchdb-ci-rsa.pub
+

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/448ba2ca/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub b/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub
deleted file mode 100644
index 09b8c16..0000000
--- a/ansible/roles/jenkins-worker/files/keys/couchdb-ci-rsa.pub
+++ /dev/null
@@ -1 +0,0 @@
-ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCZ+XvtXx6vPybYue8bm6q84B44yWE7Fb8bJ2eO7AQIqLXYw8CHCft03w59fBdra6KfuqO3ziZbSJgeOAYBD42zthPSBnvzlLdiGyWc7l3RDuipGYyE/I5WElHJlZWGxeaG8NfByAvc9wvMfUh3IABcxAKQ3SLC6h3WxL1badhyEdUDXB5i5bb1abfaEL0ezkM6w0NlOrvU70zGIccflG4u4eg3hECJVMIo6x0ozACY7fMLrGQ96WWpJuSAxBfi/1E/ipWUhwEsylrccEtiJgBJRBn5NEKrhOZ2GScpxhGf7y1x4xREdglLFao/BU9XkMyOqTtaKdpsl1BzbJ56XrLQiy0uSzgHVzxJOfbg33hAYk/YEVE9UQHoNhpRkQQNBEgak5lPZKxo5ux9/yFh6pM3xr3LpupqHPRAxEc3fzcBODGYcFXxuM396RRNwcAq9HGLgie7tYHKCo7RjsQwIDQrZgBj2kpTqdT4Dv74dobx6Sfe1hpAD0eXyWZojcJeDlPGvsiWjJrFyVorp1Wmkggwthgp/lL6l4J8VTLBZMLDSFu6g0sXy/z8cczcXgJXhnL8QqLTRaFHa6bzGFqFvF7Kawo2mbT/fscf3RUn78gTvZxLjkZ8RmGCHEBsZErir6F4NETGQmos42NWW5fRJFXZc0b0qanIXlaAVo1x5mdoYQ== bastian@krol


[19/23] couchdb-ci git commit: add scripts to download job configs from old CI setup

Posted by ba...@apache.org.
add scripts to download job configs from old CI setup


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/e1b18542
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/e1b18542
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/e1b18542

Branch: refs/heads/master
Commit: e1b18542ad9ca3a2413e8083220c5cc1fd78aa5a
Parents: 8e5adcc
Author: Bastian Krol <ba...@web.de>
Authored: Fri Jul 31 15:03:24 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Fri Jul 31 15:13:51 2015 +0200

----------------------------------------------------------------------
 scraping-jenkins/.gitignore      |  3 +++
 scraping-jenkins/jobnames.txt    | 13 +++++++++++++
 scraping-jenkins/readme.markdown |  4 ++++
 scraping-jenkins/rename.sh       | 17 +++++++++++++++++
 scraping-jenkins/scrape.sh       | 35 +++++++++++++++++++++++++++++++++++
 5 files changed, 72 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/e1b18542/scraping-jenkins/.gitignore
----------------------------------------------------------------------
diff --git a/scraping-jenkins/.gitignore b/scraping-jenkins/.gitignore
new file mode 100644
index 0000000..3fd634f
--- /dev/null
+++ b/scraping-jenkins/.gitignore
@@ -0,0 +1,3 @@
+jenkins-api-token
+root.xml
+job/

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/e1b18542/scraping-jenkins/jobnames.txt
----------------------------------------------------------------------
diff --git a/scraping-jenkins/jobnames.txt b/scraping-jenkins/jobnames.txt
new file mode 100644
index 0000000..e8a174d
--- /dev/null
+++ b/scraping-jenkins/jobnames.txt
@@ -0,0 +1,13 @@
+2.0-developer-preview
+Apache-CouchDB-Matrix-Mac-OS-X-10-7-5-1.6.x
+Apache-CouchDB-Matrix-Mac-OS-X-10-7-5-master
+Apache-CouchDB-Matrix-Mac-OS-X-10-8-2-1.6.x
+Apache-CouchDB-Matrix-Mac-OS-X-10-8.2-master
+Apache-CouchDB-Matrix-Ubuntu-Server-64-1.6.x
+Apache-CouchDB-Windows
+Fauxton
+Rebuild%20Docs%201.3.x
+Rebuild%20Docs%201.4.x
+Rebuild%20Docs%201.5.x
+Rebuild%20Docs%201.6.x
+Rebuild%20Docs%20master

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/e1b18542/scraping-jenkins/readme.markdown
----------------------------------------------------------------------
diff --git a/scraping-jenkins/readme.markdown b/scraping-jenkins/readme.markdown
new file mode 100644
index 0000000..c44dc2e
--- /dev/null
+++ b/scraping-jenkins/readme.markdown
@@ -0,0 +1,4 @@
+Scraping the Old CouchDB CI Jobs
+================================
+
+Execute `./scrape.sh` to download all Jenkins jobs configurations from the old CI setup at ci.couchdb.org:8888.

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/e1b18542/scraping-jenkins/rename.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/rename.sh b/scraping-jenkins/rename.sh
new file mode 100755
index 0000000..640a568
--- /dev/null
+++ b/scraping-jenkins/rename.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+set -e
+
+pushd `dirname $0`/job &> /dev/null
+
+# convert to all-lower-case
+for i in *.config.xml; do
+  mv "$i" "${i,,}" 2> /dev/null || true
+done
+
+# replace %20% by hyphen
+for i in *.config.xml; do
+  mv "$i" "${i//%20/-}" 2> /dev/null || true
+done
+
+popd &> /dev/null
+

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/e1b18542/scraping-jenkins/scrape.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/scrape.sh b/scraping-jenkins/scrape.sh
new file mode 100755
index 0000000..62c20cc
--- /dev/null
+++ b/scraping-jenkins/scrape.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+set -e
+
+pushd `dirname $0` &> /dev/null
+
+if [[ ! -f jenkins-api-token ]]; then
+  echo Please create a file named jenkins-api-token and put your Jenkins API token in this file.
+  exit 1
+fi
+
+JENKINS_API_TOKEN=$(<jenkins-api-token)
+echo "using Jenkins API token: $JENKINS_API_TOKEN"
+
+###############################################################################
+# root Jenkins config
+###############################################################################
+curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/api/xml" > root.tmp.xml
+xmllint --format root.tmp.xml > root.xml || mv root.tmp.xml root.xml
+rm -f root.tmp.xml
+
+###############################################################################
+# Job configs
+###############################################################################
+mkdir -p job
+
+while IFS='' read -r jobname || [[ -n $jobname ]]; do
+  echo "scraping job: $jobname"
+  curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/job/$jobname/config.xml" > "job/$jobname.config.xml"
+done < jobnames.txt
+
+# rename jobs to a sane naming pattern
+./rename.sh
+
+pop &> /dev/null
+


[07/23] couchdb-ci git commit: remove redundant couchdb prefix

Posted by ba...@apache.org.
remove redundant couchdb prefix


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/bc8a0551
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/bc8a0551
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/bc8a0551

Branch: refs/heads/master
Commit: bc8a055193c6e86bb0d702cac67cd683cc76750e
Parents: 20498b4
Author: Bastian Krol <ba...@web.de>
Authored: Sat Jul 4 17:01:17 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sat Jul 4 17:01:17 2015 +0200

----------------------------------------------------------------------
 vagrant/couchdb-jenkins-master/.gitignore  |  1 -
 vagrant/couchdb-jenkins-master/Vagrantfile | 36 -------------------------
 vagrant/jenkins-master/.gitignore          |  1 +
 vagrant/jenkins-master/Vagrantfile         | 36 +++++++++++++++++++++++++
 4 files changed, 37 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/bc8a0551/vagrant/couchdb-jenkins-master/.gitignore
----------------------------------------------------------------------
diff --git a/vagrant/couchdb-jenkins-master/.gitignore b/vagrant/couchdb-jenkins-master/.gitignore
deleted file mode 100644
index 8000dd9..0000000
--- a/vagrant/couchdb-jenkins-master/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.vagrant

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/bc8a0551/vagrant/couchdb-jenkins-master/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/couchdb-jenkins-master/Vagrantfile b/vagrant/couchdb-jenkins-master/Vagrantfile
deleted file mode 100644
index c24fdc6..0000000
--- a/vagrant/couchdb-jenkins-master/Vagrantfile
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-# All Vagrant configuration is done below. The "2" in Vagrant.configure
-# configures the configuration version (we support older styles for
-# backwards compatibility).
-Vagrant.configure(2) do |config|
-  config.vm.box = "couchdb-ci-ubuntu-14.04"
-
-  # How much memory do we need to test the setup? I have no clue.
-  config.vm.provider "virtualbox" do |vb|
-    vb.memory = "1024"
-  end
-
-  # The base box also copies the Vagrant ssh key into root's authorized_keys
-  # so we can ssh into the box via root. This way, there is no mention of the
-  # user vagrant in the Ansible scripts.
-  config.ssh.username = 'root'
-
-  config.vm.define "couchdb-jenkins-master"
-
-  # Workaround for "stdin: is not a tty error" -- make Vagrants ssh shell a
-  # non-login one. See https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
-  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
-
-  config.vm.provision "ansible" do |ansible|
-    ansible.playbook = "../../ansible/site.yml"
-    ansible.groups = {
-      "jenkins-master" => ["couchdb-jenkins-master"],
-      "ubuntu" => ["couchdb-jenkins-master"],
-    }
-  end
-
-  config.vm.network "forwarded_port", guest:   80, host: 10080
-  config.vm.network "forwarded_port", guest: 8080, host: 18080
-end

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/bc8a0551/vagrant/jenkins-master/.gitignore
----------------------------------------------------------------------
diff --git a/vagrant/jenkins-master/.gitignore b/vagrant/jenkins-master/.gitignore
new file mode 100644
index 0000000..8000dd9
--- /dev/null
+++ b/vagrant/jenkins-master/.gitignore
@@ -0,0 +1 @@
+.vagrant

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/bc8a0551/vagrant/jenkins-master/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/jenkins-master/Vagrantfile b/vagrant/jenkins-master/Vagrantfile
new file mode 100644
index 0000000..c24fdc6
--- /dev/null
+++ b/vagrant/jenkins-master/Vagrantfile
@@ -0,0 +1,36 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# All Vagrant configuration is done below. The "2" in Vagrant.configure
+# configures the configuration version (we support older styles for
+# backwards compatibility).
+Vagrant.configure(2) do |config|
+  config.vm.box = "couchdb-ci-ubuntu-14.04"
+
+  # How much memory do we need to test the setup? I have no clue.
+  config.vm.provider "virtualbox" do |vb|
+    vb.memory = "1024"
+  end
+
+  # The base box also copies the Vagrant ssh key into root's authorized_keys
+  # so we can ssh into the box via root. This way, there is no mention of the
+  # user vagrant in the Ansible scripts.
+  config.ssh.username = 'root'
+
+  config.vm.define "couchdb-jenkins-master"
+
+  # Workaround for "stdin: is not a tty error" -- make Vagrants ssh shell a
+  # non-login one. See https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
+  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
+
+  config.vm.provision "ansible" do |ansible|
+    ansible.playbook = "../../ansible/site.yml"
+    ansible.groups = {
+      "jenkins-master" => ["couchdb-jenkins-master"],
+      "ubuntu" => ["couchdb-jenkins-master"],
+    }
+  end
+
+  config.vm.network "forwarded_port", guest:   80, host: 10080
+  config.vm.network "forwarded_port", guest: 8080, host: 18080
+end


[13/23] couchdb-ci git commit: update tasks

Posted by ba...@apache.org.
update tasks


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/52029ffb
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/52029ffb
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/52029ffb

Branch: refs/heads/master
Commit: 52029ffb1ff9179188dfb63077437e9df0cc1de1
Parents: 448ba2c
Author: Bastian Krol <ba...@web.de>
Authored: Thu Jul 9 09:08:39 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Thu Jul 9 09:08:39 2015 +0200

----------------------------------------------------------------------
 readme.markdown | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/52029ffb/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index fc69795..2a517a2 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -13,7 +13,6 @@ Current state:
 - [x] install and configure nginx
 - [x] create CouchDB build job in Jenkins via Ansible
 - [x] switch to master-worker Jenkins setup
-- [ ] use Ansible vault for key management?
 - [ ] use ntp server for master and workers
 - [ ] actually fetch CouchDB from VCS
 - [ ] optional: switch to Jenkins Job DSL plug-in for defining jobs?


[04/23] couchdb-ci git commit: install jenkins and nginx

Posted by ba...@apache.org.
install jenkins and nginx


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/7e8caf9b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/7e8caf9b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/7e8caf9b

Branch: refs/heads/master
Commit: 7e8caf9ba5e7b8fbe1f3f3279bbcf2aff286024a
Parents: cfa05d9
Author: Bastian Krol <ba...@web.de>
Authored: Sat Jul 4 00:02:22 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sat Jul 4 00:02:37 2015 +0200

----------------------------------------------------------------------
 ansible/roles/jenkins-master/handlers/main.yml  |  5 +++
 ansible/roles/jenkins-master/tasks/main.yml     | 46 +++++++++++++++++++-
 .../jenkins-master/templates/nginx/jenkins      | 20 +++++++++
 ansible/roles/jenkins-master/vars/main.yml      |  6 +++
 ansible/roles/ubuntu/tasks/main.yml             | 11 +----
 ansible/site.yml                                |  2 +-
 vagrant/couchdb-jenkins-master/Vagrantfile      |  5 ++-
 7 files changed, 81 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7e8caf9b/ansible/roles/jenkins-master/handlers/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/handlers/main.yml b/ansible/roles/jenkins-master/handlers/main.yml
new file mode 100644
index 0000000..bda076d
--- /dev/null
+++ b/ansible/roles/jenkins-master/handlers/main.yml
@@ -0,0 +1,5 @@
+---
+  - name: restart jenkins service
+    service:
+      name: jenkins
+      state: restarted

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7e8caf9b/ansible/roles/jenkins-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/main.yml b/ansible/roles/jenkins-master/tasks/main.yml
index d02a671..5772e80 100644
--- a/ansible/roles/jenkins-master/tasks/main.yml
+++ b/ansible/roles/jenkins-master/tasks/main.yml
@@ -1,2 +1,46 @@
 ---
-# currently there are no tasks for Jenkins master ¯\_(ツ)_/¯
+  - name: add apt-key for jenkins apt repo
+    apt_key:
+      url: https://jenkins-ci.org/debian/jenkins-ci.org.key
+      state: present
+
+  - name: add jenkins apt repo
+    lineinfile:
+      dest: /etc/apt/sources.list.d/jenkins.list
+      line: "deb http://pkg.jenkins-ci.org/debian binary/"
+      state: present
+      create: true
+
+  - name: install jenkins
+    apt:
+      name: jenkins
+      state: present
+      update_cache: yes # run apt-get update before apt-get install jenkins
+
+  - name: start jenkins service
+    service:
+      name: jenkins
+      state: started
+
+  - name: install nginx
+    apt:
+      name: nginx
+      state: present
+
+  - name: remove default nginx site
+    file: name={{ item }} state=absent
+    with_items:
+    - /etc/nginx/sites-available/default
+    - /etc/nginx/sites-enabled/default
+
+  - name: copy nginx config
+    template:
+      src: nginx/jenkins
+      dest: /etc/nginx/sites-available/jenkins
+    notify: restart jenkins service
+
+  - name: enable jenkins site
+    file:
+      src: /etc/nginx/sites-available/jenkins
+      dest: /etc/nginx/sites-enabled/jenkins
+      state: link

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7e8caf9b/ansible/roles/jenkins-master/templates/nginx/jenkins
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/nginx/jenkins b/ansible/roles/jenkins-master/templates/nginx/jenkins
new file mode 100644
index 0000000..9aa6667
--- /dev/null
+++ b/ansible/roles/jenkins-master/templates/nginx/jenkins
@@ -0,0 +1,20 @@
+upstream app_server {
+    server 127.0.0.1:8080 fail_timeout=0;
+}
+
+server {
+    listen 80;
+    listen [::]:80 default ipv6only=on;
+    server_name {{ server_name }};
+
+    location / {
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_set_header Host $http_host;
+        proxy_redirect off;
+
+        if (!-f $request_filename) {
+            proxy_pass http://app_server;
+            break;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7e8caf9b/ansible/roles/jenkins-master/vars/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/vars/main.yml b/ansible/roles/jenkins-master/vars/main.yml
new file mode 100644
index 0000000..69517fb
--- /dev/null
+++ b/ansible/roles/jenkins-master/vars/main.yml
@@ -0,0 +1,6 @@
+---
+
+################################################################################
+# nginx
+################################################################################
+server_name: ci.couchdb.org

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7e8caf9b/ansible/roles/ubuntu/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu/tasks/main.yml b/ansible/roles/ubuntu/tasks/main.yml
index b5e575b..a0d289b 100644
--- a/ansible/roles/ubuntu/tasks/main.yml
+++ b/ansible/roles/ubuntu/tasks/main.yml
@@ -1,11 +1,2 @@
 ---
-  - name: install some basic apt packages
-    apt: name={{item}} state=present
-    with_items:
-    - binutils
-    - bzip2
-    - curl
-    - sudo
-    - unzip
-    - vim # you'll want a decent editor on the box, don't you?
-    - wget
+# currently there are no common tasks for Ubuntu servers ¯\_(ツ)_/¯

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7e8caf9b/ansible/site.yml
----------------------------------------------------------------------
diff --git a/ansible/site.yml b/ansible/site.yml
index 74c8fd5..43d7d92 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -11,7 +11,7 @@
   roles:
   - ubuntu
 
-# Configure and deploy database servers.
+# Configure and deploy Jenkins master
 - hosts: jenkins-master
   remote_user: root
   roles:

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7e8caf9b/vagrant/couchdb-jenkins-master/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/couchdb-jenkins-master/Vagrantfile b/vagrant/couchdb-jenkins-master/Vagrantfile
index 63370e0..c24fdc6 100644
--- a/vagrant/couchdb-jenkins-master/Vagrantfile
+++ b/vagrant/couchdb-jenkins-master/Vagrantfile
@@ -26,10 +26,11 @@ Vagrant.configure(2) do |config|
   config.vm.provision "ansible" do |ansible|
     ansible.playbook = "../../ansible/site.yml"
     ansible.groups = {
-      "jenkins-master" => ["jenkins-master"],
-      "ubuntu" => ["ubuntu"]
+      "jenkins-master" => ["couchdb-jenkins-master"],
+      "ubuntu" => ["couchdb-jenkins-master"],
     }
   end
 
+  config.vm.network "forwarded_port", guest:   80, host: 10080
   config.vm.network "forwarded_port", guest: 8080, host: 18080
 end


[17/23] couchdb-ci git commit: mission statement

Posted by ba...@apache.org.
mission statement


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/2461955e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/2461955e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/2461955e

Branch: refs/heads/master
Commit: 2461955e02856d9de953d19a9f0d0d26bc3db271
Parents: b9f87cb
Author: Bastian Krol <ba...@web.de>
Authored: Fri Jul 31 14:16:42 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Fri Jul 31 14:16:42 2015 +0200

----------------------------------------------------------------------
 readme.markdown | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/2461955e/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index 5ae7925..c1cd545 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -1,6 +1,10 @@
 CouchDB CI Setup
 ================
 
+Mission statement: Create a new continuous integration infrastructure for the CouchDB project.
+
+For the background and goals, see this [thread](https://www.mail-archive.com/dev%40couchdb.apache.org/msg43591.html) on the couchdb-dev mailing list.
+
 This is the repository for the automated creation of the CouchDB CI infrastructure. Well, at least it will be when it has grown up. This might take a while, though. Right now, it's just a bunch of Ansible scripts, a Vagrantfile and a Veewee definition.
 
 See the readme files in folder `baseboxes` (for docs on building the base boxes) and in folder `vagrant` (for docs on how to spin up the setup locally).


[11/23] couchdb-ci git commit: extract jenkins' gid/uid to vars

Posted by ba...@apache.org.
extract jenkins' gid/uid to vars


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/c27023ee
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/c27023ee
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/c27023ee

Branch: refs/heads/master
Commit: c27023ee4d23f1ad03b702310b34684708d1f9ab
Parents: 3550348
Author: Bastian Krol <ba...@web.de>
Authored: Wed Jul 8 13:16:41 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Wed Jul 8 13:16:41 2015 +0200

----------------------------------------------------------------------
 ansible/roles/jenkins-worker/tasks/main.yml | 4 ++--
 ansible/roles/jenkins-worker/vars/main.yml  | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c27023ee/ansible/roles/jenkins-worker/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-worker/tasks/main.yml b/ansible/roles/jenkins-worker/tasks/main.yml
index aafe704..9893ecd 100644
--- a/ansible/roles/jenkins-worker/tasks/main.yml
+++ b/ansible/roles/jenkins-worker/tasks/main.yml
@@ -2,14 +2,14 @@
 - name: create jenkins group
   group:
     name: jenkins
-    gid: 112 # same gid as jenkins group on master
+    gid: "{{ jenkins_group_id }}" # same gid as jenkins group on master
     state: present
     system: yes
 
 - name: create jenkins user
   user:
     name: jenkins
-    uid: 106 # same uid as jenkins user on master
+    uid: "{{ jenkins_user_id }}" # same uid as jenkins user on master
     state: present
     system: yes
     group: jenkins

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c27023ee/ansible/roles/jenkins-worker/vars/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-worker/vars/main.yml b/ansible/roles/jenkins-worker/vars/main.yml
new file mode 100644
index 0000000..9236049
--- /dev/null
+++ b/ansible/roles/jenkins-worker/vars/main.yml
@@ -0,0 +1,7 @@
+---
+
+################################################################################
+# Jenkins
+################################################################################
+jenkins_group_id: 112
+jenkins_user_id: 106


[21/23] couchdb-ci git commit: job -> jobs

Posted by ba...@apache.org.
job -> jobs


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/7286b577
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/7286b577
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/7286b577

Branch: refs/heads/master
Commit: 7286b5773e7b8677febb5e198a76813dea80821d
Parents: c0131b7
Author: Bastian Krol <ba...@web.de>
Authored: Sun Aug 2 09:28:25 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sun Aug 2 09:28:25 2015 +0200

----------------------------------------------------------------------
 scraping-jenkins/.gitignore | 2 +-
 scraping-jenkins/rename.sh  | 4 ++--
 scraping-jenkins/scrape.sh  | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7286b577/scraping-jenkins/.gitignore
----------------------------------------------------------------------
diff --git a/scraping-jenkins/.gitignore b/scraping-jenkins/.gitignore
index 3fd634f..4f7c67f 100644
--- a/scraping-jenkins/.gitignore
+++ b/scraping-jenkins/.gitignore
@@ -1,3 +1,3 @@
 jenkins-api-token
 root.xml
-job/
+jobs/

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7286b577/scraping-jenkins/rename.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/rename.sh b/scraping-jenkins/rename.sh
index 640a568..30ae52c 100755
--- a/scraping-jenkins/rename.sh
+++ b/scraping-jenkins/rename.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 set -e
 
-pushd `dirname $0`/job &> /dev/null
+pushd `dirname $0`/jobs > /dev/null
 
 # convert to all-lower-case
 for i in *.config.xml; do
@@ -13,5 +13,5 @@ for i in *.config.xml; do
   mv "$i" "${i//%20/-}" 2> /dev/null || true
 done
 
-popd &> /dev/null
+popd > /dev/null
 

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/7286b577/scraping-jenkins/scrape.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/scrape.sh b/scraping-jenkins/scrape.sh
index 62c20cc..781f20d 100755
--- a/scraping-jenkins/scrape.sh
+++ b/scraping-jenkins/scrape.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 set -e
 
-pushd `dirname $0` &> /dev/null
+pushd `dirname $0` > /dev/null
 
 if [[ ! -f jenkins-api-token ]]; then
   echo Please create a file named jenkins-api-token and put your Jenkins API token in this file.
@@ -21,15 +21,15 @@ rm -f root.tmp.xml
 ###############################################################################
 # Job configs
 ###############################################################################
-mkdir -p job
+mkdir -p jobs
 
 while IFS='' read -r jobname || [[ -n $jobname ]]; do
   echo "scraping job: $jobname"
-  curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/job/$jobname/config.xml" > "job/$jobname.config.xml"
+  curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/jobs/$jobname/config.xml" > "jobs/$jobname.config.xml"
 done < jobnames.txt
 
 # rename jobs to a sane naming pattern
 ./rename.sh
 
-pop &> /dev/null
+pop > /dev/null
 


[18/23] couchdb-ci git commit: move vagrant into root dir

Posted by ba...@apache.org.
move vagrant into root dir


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/8e5adcc8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/8e5adcc8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/8e5adcc8

Branch: refs/heads/master
Commit: 8e5adcc8c7b538c626fb9c53d6c0fe33d483a839
Parents: 2461955
Author: Bastian Krol <ba...@web.de>
Authored: Fri Jul 31 14:31:01 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Fri Jul 31 14:31:01 2015 +0200

----------------------------------------------------------------------
 .gitignore              |  1 +
 Vagrantfile             | 48 +++++++++++++++++++++++++++++++++++++++
 readme.markdown         | 53 +++++++++++++++++++++++++++++++++++++++++++-
 vagrant/.gitignore      |  1 -
 vagrant/Vagrantfile     | 48 ---------------------------------------
 vagrant/readme.markdown | 50 -----------------------------------------
 6 files changed, 101 insertions(+), 100 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/8e5adcc8/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8000dd9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.vagrant

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/8e5adcc8/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
new file mode 100644
index 0000000..664e6fe
--- /dev/null
+++ b/Vagrantfile
@@ -0,0 +1,48 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+Vagrant.configure(2) do |config|
+
+  # How much memory does the master need to test the setup? How much do the
+  # workers need? I have no clue.
+  config.vm.provider "virtualbox" do |vb|
+    vb.memory = "1024"
+    # vb.gui = true # enable this to start vbox with GUI to debug problems on startup
+  end
+
+  # The base boxes also have the Vagrant ssh key copied into root's
+  # authorized_keys so we can ssh into the box via root. This way, there is no
+  # mention of the user vagrant in the Ansible scripts.
+  config.ssh.username = "root"
+
+  config.vm.define "couchdb-jenkins-master" do |node|
+    node.vm.box = "couchdb-ci-ubuntu-14.04"
+    node.vm.hostname = "master"
+    node.vm.network "forwarded_port", guest:   80, host: 10080
+    node.vm.network "forwarded_port", guest: 8080, host: 18080
+    node.vm.network "private_network", ip: "10.20.1.2"
+    node.vm.provision :hosts
+  end
+
+  config.vm.define "couchdb-ubuntu-14.04-worker" do |node|
+    node.vm.box = "couchdb-ci-ubuntu-14.04"
+    node.vm.hostname = "ubuntu1404"
+    node.vm.network "private_network", ip: "10.20.1.3"
+    node.vm.provision :hosts
+  end
+
+
+  # Workaround for "stdin: is not a tty error" -- make Vagrants ssh shell a
+  # non-login one. See https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
+  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
+
+  config.vm.provision "ansible" do |ansible|
+    ansible.playbook = "ansible/site.yml"
+    ansible.groups = {
+      "jenkins-master" => ["couchdb-jenkins-master"],
+      "jenkins-workers" => ["couchdb-ubuntu-14.04-worker"],
+      "ubuntu-workers" => ["couchdb-ubuntu-14.04-worker"]
+    }
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/8e5adcc8/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index c1cd545..ec2bf5e 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -7,7 +7,7 @@ For the background and goals, see this [thread](https://www.mail-archive.com/dev
 
 This is the repository for the automated creation of the CouchDB CI infrastructure. Well, at least it will be when it has grown up. This might take a while, though. Right now, it's just a bunch of Ansible scripts, a Vagrantfile and a Veewee definition.
 
-See the readme files in folder `baseboxes` (for docs on building the base boxes) and in folder `vagrant` (for docs on how to spin up the setup locally).
+See the readme files in folder `baseboxes` (for docs on building the base boxes) and the section about Vagrant below (for docs on how to spin up the setup locally).
 
 Fair warning: This is very much work in progress.
 
@@ -26,3 +26,54 @@ Current state:
 - [ ] talk to Infra people
 
 *Remark: Throughout this repository we use the terms "master"/"worker" for the Jenkins build machines, whereas the Jenkins documentation uses the terms "master"/"slave".*
+
+Vagrant Configuration for Testing the CouchDB CI Setup Locally
+--------------------------------------------------------------
+
+The project's root folder contains a Vagrantfile with a multi machine Vagrant configuration for the machines used in the CouchDB CI setup.
+
+### Prerequesites
+
+You need to have [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) installed.
+
+When Vagrant is installed you need to install an additional plug-in:
+```bash
+vagrant plugin install vagrant-hosts
+```
+
+plus an additional Ansible role
+```bash
+[sudo] ansible-galaxy install geerlingguy.ntp
+```
+
+Also, you might need to run
+```bash
+VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0
+```
+before doing
+```bash
+vagrant up
+```
+because of <https://github.com/mitchellh/vagrant/issues/3083>.
+
+### Building and Registering the Base Box
+
+Each vagrant configuration requires its respective base box. For example, the configuration jenkins-master requires the base box `couchdb-ci-ubuntu-14.04`. You can build the base boxes locally with veewee (see `baseboxes/readme.markdown`). To make things easier we might upload the base boxes somewhere so people do not have to build them theirselves but can just download them but we are not there yet.
+
+Either way, you have to add the image to the vagrant base image registry with the following command:
+```
+vagrant box add couchdb-ci-ubuntu-14.04 /path/to/your/base-box-file.box
+```
+
+When this has happened, `vagrant box list` should list the base box's name (`couchdb-ci-ubuntu-14.04` in our example).
+
+The base box built with veewee is just a fresh minimal install of the OS. All relevant packages and configurations are provisioned with Ansible. Vagrant is used to make creating, provisioning and destroying these virtual machines easier.
+
+### Launching and Provisioning the Boxes
+
+Just execute `vagrant up`. This will start all the virtual machine and provision it using the scripts in `ansible`. That's it :-)
+
+You can also selectively launch a single box, for example with
+```bash
+vagrant up couchdb-jenkins-master
+```

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/8e5adcc8/vagrant/.gitignore
----------------------------------------------------------------------
diff --git a/vagrant/.gitignore b/vagrant/.gitignore
deleted file mode 100644
index 8000dd9..0000000
--- a/vagrant/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.vagrant

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/8e5adcc8/vagrant/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
deleted file mode 100644
index c1f9a59..0000000
--- a/vagrant/Vagrantfile
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-Vagrant.configure(2) do |config|
-
-  # How much memory does the master need to test the setup? How much do the
-  # workers need? I have no clue.
-  config.vm.provider "virtualbox" do |vb|
-    vb.memory = "1024"
-    # vb.gui = true # enable this to start vbox with GUI to debug problems on startup
-  end
-
-  # The base boxes also have the Vagrant ssh key copied into root's
-  # authorized_keys so we can ssh into the box via root. This way, there is no
-  # mention of the user vagrant in the Ansible scripts.
-  config.ssh.username = "root"
-
-  config.vm.define "couchdb-jenkins-master" do |node|
-    node.vm.box = "couchdb-ci-ubuntu-14.04"
-    node.vm.hostname = "master"
-    node.vm.network "forwarded_port", guest:   80, host: 10080
-    node.vm.network "forwarded_port", guest: 8080, host: 18080
-    node.vm.network "private_network", ip: "10.20.1.2"
-    node.vm.provision :hosts
-  end
-
-  config.vm.define "couchdb-ubuntu-14.04-worker" do |node|
-    node.vm.box = "couchdb-ci-ubuntu-14.04"
-    node.vm.hostname = "ubuntu1404"
-    node.vm.network "private_network", ip: "10.20.1.3"
-    node.vm.provision :hosts
-  end
-
-
-  # Workaround for "stdin: is not a tty error" -- make Vagrants ssh shell a
-  # non-login one. See https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
-  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
-
-  config.vm.provision "ansible" do |ansible|
-    ansible.playbook = "../ansible/site.yml"
-    ansible.groups = {
-      "jenkins-master" => ["couchdb-jenkins-master"],
-      "jenkins-workers" => ["couchdb-ubuntu-14.04-worker"],
-      "ubuntu-workers" => ["couchdb-ubuntu-14.04-worker"]
-    }
-  end
-
-end

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/8e5adcc8/vagrant/readme.markdown
----------------------------------------------------------------------
diff --git a/vagrant/readme.markdown b/vagrant/readme.markdown
deleted file mode 100644
index 463e1a1..0000000
--- a/vagrant/readme.markdown
+++ /dev/null
@@ -1,50 +0,0 @@
-Vagrant Configuration for Testing the CouchDB CI Setup Locally
-==============================================================
-
-This folder contains the multi machine Vagrant configuration for the machines used in the CouchDB CI setup.
-
-## Prerequesites
-
-You need to have [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) installed.
-
-When Vagrant is installed you need to install an additional plug-in:
-```bash
-vagrant plugin install vagrant-hosts
-```
-
-plus an additional Ansible role
-```bash
-[sudo] ansible-galaxy install geerlingguy.ntp
-```
-
-Also, you might need to run
-```bash
-VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0
-```
-before doing
-```bash
-vagrant up
-```
-because of <https://github.com/mitchellh/vagrant/issues/3083>.
-
-## Building and Registering the Base Box
-
-Each vagrant configuration requires its respective base box. For example, the configuration jenkins-master requires the base box `couchdb-ci-ubuntu-14.04`. You can build the base boxes locally with veewee (see `../baseboxes/readme.markdown`). To make things easier we might upload the base boxes somewhere so people do not have to build them theirselves but can just download them but we are not there yet.
-
-Either way, you have to add the image to the vagrant base image registry with the following command:
-```
-vagrant box add couchdb-ci-ubuntu-14.04 /path/to/your/base-box-file.box
-```
-
-When this has happened, `vagrant box list` should list the base box's name (`couchdb-ci-ubuntu-14.04` in our example).
-
-The base box built with veewee is just a fresh minimal install of the OS. All relevant packages and configurations are provisioned with Ansible. Vagrant is used to make creating, provisioning and destroying these virtual machines easier.
-
-## Launching and Provisioning the Boxes
-
-Just execute `vagrant up`. This will start all the virtual machine and provision it using the scripts in `../ansible`. That's it :-)
-
-You can also selectively launch a single box, for example with
-```bash
-vagrant up couchdb-jenkins-master
-```


[14/23] couchdb-ci git commit: use ntp to synch clocks

Posted by ba...@apache.org.
use ntp to synch clocks


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/eda9fabc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/eda9fabc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/eda9fabc

Branch: refs/heads/master
Commit: eda9fabc9110d8fcad6a34330fd79e52fed1d81e
Parents: 52029ff
Author: Bastian Krol <ba...@web.de>
Authored: Thu Jul 9 09:28:16 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Thu Jul 9 09:28:16 2015 +0200

----------------------------------------------------------------------
 ansible/readme.markdown | 17 +++++++++++++++++
 ansible/site.yml        |  1 +
 readme.markdown         |  2 +-
 vagrant/readme.markdown |  5 +++++
 4 files changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/eda9fabc/ansible/readme.markdown
----------------------------------------------------------------------
diff --git a/ansible/readme.markdown b/ansible/readme.markdown
new file mode 100644
index 0000000..c0cd6fb
--- /dev/null
+++ b/ansible/readme.markdown
@@ -0,0 +1,17 @@
+Ansible Configuration for the CouchDB CI Setup
+==============================================
+
+This folder contains the Ansible scripts to provision the various servers used in the CouchDB CI setup.
+
+## Prerequesites
+
+You need to have [Ansible](http://www.ansible.com/home) installed.
+
+When Ansible is installed, you need to install an additional Ansible role:
+```bash
+[sudo] ansible-galaxy install geerlingguy.ntp
+```
+
+## Launching and Provisioning the Boxes
+
+TODO

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/eda9fabc/ansible/site.yml
----------------------------------------------------------------------
diff --git a/ansible/site.yml b/ansible/site.yml
index 7675974..ad11d8f 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -4,6 +4,7 @@
   remote_user: root
   roles:
   - common
+  - geerlingguy.ntp
 
 # Configure and deploy Jenkins master
 - hosts: jenkins-master

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/eda9fabc/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index 2a517a2..5ae7925 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -13,7 +13,7 @@ Current state:
 - [x] install and configure nginx
 - [x] create CouchDB build job in Jenkins via Ansible
 - [x] switch to master-worker Jenkins setup
-- [ ] use ntp server for master and workers
+- [x] use ntp server for master and workers
 - [ ] actually fetch CouchDB from VCS
 - [ ] optional: switch to Jenkins Job DSL plug-in for defining jobs?
 - [ ] all apt-get commands should pin a specific version, in the base box definition as well as in Ansible. How?

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/eda9fabc/vagrant/readme.markdown
----------------------------------------------------------------------
diff --git a/vagrant/readme.markdown b/vagrant/readme.markdown
index 81a2992..463e1a1 100644
--- a/vagrant/readme.markdown
+++ b/vagrant/readme.markdown
@@ -12,6 +12,11 @@ When Vagrant is installed you need to install an additional plug-in:
 vagrant plugin install vagrant-hosts
 ```
 
+plus an additional Ansible role
+```bash
+[sudo] ansible-galaxy install geerlingguy.ntp
+```
+
 Also, you might need to run
 ```bash
 VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0


[10/23] couchdb-ci git commit: rename ubuntu role to ubuntu worker

Posted by ba...@apache.org.
rename ubuntu role to ubuntu worker


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/3550348d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/3550348d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/3550348d

Branch: refs/heads/master
Commit: 3550348d5ec05d96d9f31162daa7997039241b80
Parents: d05361c
Author: Bastian Krol <ba...@web.de>
Authored: Mon Jul 6 11:07:25 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Mon Jul 6 11:07:25 2015 +0200

----------------------------------------------------------------------
 ansible/roles/ubuntu-worker/tasks/main.yml | 22 ++++++++++++++++++++++
 ansible/roles/ubuntu/tasks/main.yml        | 24 ------------------------
 ansible/site.yml                           |  8 +++-----
 vagrant/Vagrantfile                        |  7 +++----
 4 files changed, 28 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/3550348d/ansible/roles/ubuntu-worker/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/main.yml b/ansible/roles/ubuntu-worker/tasks/main.yml
new file mode 100644
index 0000000..3a8c78f
--- /dev/null
+++ b/ansible/roles/ubuntu-worker/tasks/main.yml
@@ -0,0 +1,22 @@
+---
+# even though we do not need Java to build CouchDB, a Jenkins worker still
+# needs an installed JDK or the Jenkins master yells at you when attempting to
+# connect
+- name: install jdk
+  apt:
+    name: openjdk-7-jdk
+    state: present
+
+# Install packages required to build CouchDB via apt-get
+- name: install packages required to build CouchDB
+  apt: name={{item}} state=present
+  with_items:
+  - build-essential
+  - erlang-base-hipe
+  - erlang-dev
+  - erlang-manpages
+  - erlang-eunit
+  - erlang-nox
+  - libicu-dev
+  - libmozjs185-dev
+  - libcurl4-openssl-dev

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/3550348d/ansible/roles/ubuntu/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu/tasks/main.yml b/ansible/roles/ubuntu/tasks/main.yml
deleted file mode 100644
index b14191b..0000000
--- a/ansible/roles/ubuntu/tasks/main.yml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-# even though we do not need Java to build CouchDB, a Jenkins worker still
-# needs an installed JDK or the Jenkins master yells at you when attempting to
-# connect
-- name: install jdk
-  apt:
-    name: openjdk-7-jdk
-    state: present
-
-# TODO These packages are required to build Couch. Maybe a ubuntu-build-worker
-# role would make more sense in the long run. Jenkins master does not need
-# this packages once we use a master-worker setup.
-- name: install packages required to build CouchDB
-  apt: name={{item}} state=present
-  with_items:
-  - build-essential
-  - erlang-base-hipe
-  - erlang-dev
-  - erlang-manpages
-  - erlang-eunit
-  - erlang-nox
-  - libicu-dev
-  - libmozjs185-dev
-  - libcurl4-openssl-dev

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/3550348d/ansible/site.yml
----------------------------------------------------------------------
diff --git a/ansible/site.yml b/ansible/site.yml
index fc757a4..7675974 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -17,10 +17,8 @@
   roles:
   - jenkins-worker
 
-# Apply common configuration for all Ubuntu systems
-# TODO Currently this only contains packages needed on the workers, so rename
-# this role to ubuntu-worker
-- hosts: ubuntu
+# Apply common configuration for all Ubuntu worker
+- hosts: ubuntu-workers
   remote_user: root
   roles:
-  - ubuntu
+  - ubuntu-worker

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/3550348d/vagrant/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index e42bd28..c1f9a59 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -1,7 +1,6 @@
 # -*- mode: ruby -*-
-# vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure
-# configures the configuration version (we support older styles for
-# backwards compatibility).
+# vi: set ft=ruby :
+
 Vagrant.configure(2) do |config|
 
   # How much memory does the master need to test the setup? How much do the
@@ -42,7 +41,7 @@ Vagrant.configure(2) do |config|
     ansible.groups = {
       "jenkins-master" => ["couchdb-jenkins-master"],
       "jenkins-workers" => ["couchdb-ubuntu-14.04-worker"],
-      "ubuntu" => ["couchdb-ubuntu-14.04-worker"]
+      "ubuntu-workers" => ["couchdb-ubuntu-14.04-worker"]
     }
   end
 


[06/23] couchdb-ci git commit: first successful CouchDB build

Posted by ba...@apache.org.
first successful CouchDB build


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/20498b41
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/20498b41
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/20498b41

Branch: refs/heads/master
Commit: 20498b41ebc887af566d3bc6db37d14c937360ed
Parents: 4093b10
Author: Bastian Krol <ba...@web.de>
Authored: Sat Jul 4 01:38:06 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sat Jul 4 01:38:06 2015 +0200

----------------------------------------------------------------------
 ansible/roles/jenkins-master/handlers/main.yml  |  5 ++++
 ansible/roles/jenkins-master/tasks/main.yml     | 25 +++++++++++++++-
 .../templates/jobs/build-couchdb.xml            | 30 ++++++++++++++++++++
 ansible/roles/ubuntu/tasks/main.yml             | 16 ++++++++++-
 readme.markdown                                 | 13 +++++++++
 5 files changed, 87 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/20498b41/ansible/roles/jenkins-master/handlers/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/handlers/main.yml b/ansible/roles/jenkins-master/handlers/main.yml
index bda076d..36d74a1 100644
--- a/ansible/roles/jenkins-master/handlers/main.yml
+++ b/ansible/roles/jenkins-master/handlers/main.yml
@@ -3,3 +3,8 @@
     service:
       name: jenkins
       state: restarted
+
+  - name: restart nginx service
+    service:
+      name: nginx
+      state: restarted

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/20498b41/ansible/roles/jenkins-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/main.yml b/ansible/roles/jenkins-master/tasks/main.yml
index 5772e80..8703d75 100644
--- a/ansible/roles/jenkins-master/tasks/main.yml
+++ b/ansible/roles/jenkins-master/tasks/main.yml
@@ -17,6 +17,29 @@
       state: present
       update_cache: yes # run apt-get update before apt-get install jenkins
 
+  - name: create build job folder
+    file:
+      path: /var/lib/jenkins/jobs/build-couchdb/builds
+      owner: jenkins
+      group: jenkins
+      state: directory
+
+  - name: create build job config
+    template:
+      src: jobs/build-couchdb.xml
+      dest: /var/lib/jenkins/jobs/build-couchdb/config.xml
+      owner: jenkins
+      group: jenkins
+    notify: restart jenkins service
+
+  - name: create nextBuildNumber file
+    copy:
+      dest: /var/lib/jenkins/jobs/build-couchdb/nextBuildNumber
+      content: "1"
+      force: no
+      owner: jenkins
+      group: jenkins
+
   - name: start jenkins service
     service:
       name: jenkins
@@ -37,7 +60,7 @@
     template:
       src: nginx/jenkins
       dest: /etc/nginx/sites-available/jenkins
-    notify: restart jenkins service
+    notify: restart nginx service
 
   - name: enable jenkins site
     file:

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/20498b41/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml b/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml
new file mode 100644
index 0000000..0892602
--- /dev/null
+++ b/ansible/roles/jenkins-master/templates/jobs/build-couchdb.xml
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project>
+  <actions/>
+  <description></description>
+  <keepDependencies>false</keepDependencies>
+  <properties/>
+  <scm class="hudson.scm.NullSCM"/>
+  <canRoam>true</canRoam>
+  <disabled>false</disabled>
+  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+  <triggers/>
+  <concurrentBuild>false</concurrentBuild>
+  <builders>
+    <hudson.tasks.Shell>
+      <command>set -x
+set -e
+
+# TODO: This should obviously pull the code from vcs
+wget http://apache.openmirror.de/couchdb/source/1.6.1/apache-couchdb-1.6.1.tar.gz
+tar xzf apache-couchdb-1.6.1.tar.gz
+cd apache-couchdb-1.6.1
+
+./configure
+make</command>
+    </hudson.tasks.Shell>
+  </builders>
+  <publishers/>
+  <buildWrappers/>
+</project>

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/20498b41/ansible/roles/ubuntu/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu/tasks/main.yml b/ansible/roles/ubuntu/tasks/main.yml
index a0d289b..fa87799 100644
--- a/ansible/roles/ubuntu/tasks/main.yml
+++ b/ansible/roles/ubuntu/tasks/main.yml
@@ -1,2 +1,16 @@
 ---
-# currently there are no common tasks for Ubuntu servers ¯\_(ツ)_/¯
+  # TODO These packages are required to build Couch. Maybe a ubuntu-build-slave
+  # role would make more sense in the long run. Jenkins master does not need
+  # this packages once we use a master slave setup.
+  - name: install packages required to build CouchDB
+    apt: name={{item}} state=present
+    with_items:
+    - build-essential
+    - erlang-base-hipe
+    - erlang-dev
+    - erlang-manpages
+    - erlang-eunit
+    - erlang-nox
+    - libicu-dev
+    - libmozjs185-dev
+    - libcurl4-openssl-dev

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/20498b41/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index 104178f..6a5a828 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -6,3 +6,16 @@ This is the repository for the automated creation of the CouchDB CI infrastructu
 See the readme files in folder `baseboxes` (for docs on building the base boxes) and in folder `vagrant` (for docs on how to spin up the setup locally).
 
 Fair warning: This is very much work in progress.
+
+Current state:
+
+- [x] install bare Jenkins master with Ansible
+- [x] install and configure nginx
+- [x] create CouchDB build job in Jenkins via Ansible
+- [ ] actually fetch CouchDB from VCS
+- [ ] switch to master slave Jenkins setup
+- [ ] optional: switch to Jenkins Job DSL plug-in for defining jobs?
+- [ ] all apt-get commands should pin a specific version, in the base box definition as well as in Ansible. How?
+- [ ] create an additional Ubuntu slave with an older Erlang version
+- [ ] create another base box (different linux distro) for a third slave
+- [ ] talk to Infra people


[23/23] couchdb-ci git commit: fix 404

Posted by ba...@apache.org.
fix 404


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/a7eb5c80
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/a7eb5c80
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/a7eb5c80

Branch: refs/heads/master
Commit: a7eb5c8073367c4f51706164860f023e51f0c573
Parents: 152dc1d
Author: Bastian Krol <ba...@web.de>
Authored: Sun Aug 2 10:15:34 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sun Aug 2 10:15:34 2015 +0200

----------------------------------------------------------------------
 scraping-jenkins/scrape.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/a7eb5c80/scraping-jenkins/scrape.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/scrape.sh b/scraping-jenkins/scrape.sh
index db801b8..a354b8f 100755
--- a/scraping-jenkins/scrape.sh
+++ b/scraping-jenkins/scrape.sh
@@ -26,7 +26,7 @@ mkdir -p jobs
 while IFS='' read -r jobname || [[ -n $jobname ]]; do
   echo "scraping job: $jobname"
   mkdir -p "jobs/$jobname"
-  curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/jobs/$jobname/config.xml" > "jobs/$jobname/config.xml"
+  curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/job/$jobname/config.xml" > "jobs/$jobname/config.xml"
 done < jobnames.txt
 
 # rename jobs to a sane naming pattern


[22/23] couchdb-ci git commit: download jobs to Jenkins-compatible structure

Posted by ba...@apache.org.
download jobs to Jenkins-compatible structure


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/152dc1d3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/152dc1d3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/152dc1d3

Branch: refs/heads/master
Commit: 152dc1d3165d264c8012f61c0faa251b1ebf445d
Parents: 7286b57
Author: Bastian Krol <ba...@web.de>
Authored: Sun Aug 2 10:03:34 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sun Aug 2 10:03:34 2015 +0200

----------------------------------------------------------------------
 scraping-jenkins/rename.sh | 10 ++++++----
 scraping-jenkins/scrape.sh |  5 +++--
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/152dc1d3/scraping-jenkins/rename.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/rename.sh b/scraping-jenkins/rename.sh
index 30ae52c..32314ba 100755
--- a/scraping-jenkins/rename.sh
+++ b/scraping-jenkins/rename.sh
@@ -3,14 +3,16 @@ set -e
 
 pushd `dirname $0`/jobs > /dev/null
 
+shopt -s nullglob   # empty directory will return empty list
+
 # convert to all-lower-case
-for i in *.config.xml; do
-  mv "$i" "${i,,}" 2> /dev/null || true
+for dir in ./*/;do
+  mv "$dir" "${dir,,}" 2> /dev/null || true
 done
 
 # replace %20% by hyphen
-for i in *.config.xml; do
-  mv "$i" "${i//%20/-}" 2> /dev/null || true
+for dir in ./*/;do
+  mv "$dir" "${dir//%20/-}" 2> /dev/null || true
 done
 
 popd > /dev/null

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/152dc1d3/scraping-jenkins/scrape.sh
----------------------------------------------------------------------
diff --git a/scraping-jenkins/scrape.sh b/scraping-jenkins/scrape.sh
index 781f20d..db801b8 100755
--- a/scraping-jenkins/scrape.sh
+++ b/scraping-jenkins/scrape.sh
@@ -25,11 +25,12 @@ mkdir -p jobs
 
 while IFS='' read -r jobname || [[ -n $jobname ]]; do
   echo "scraping job: $jobname"
-  curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/jobs/$jobname/config.xml" > "jobs/$jobname.config.xml"
+  mkdir -p "jobs/$jobname"
+  curl --show-error "http://basti1302:$JENKINS_API_TOKEN@ci.couchdb.org:8888/jobs/$jobname/config.xml" > "jobs/$jobname/config.xml"
 done < jobnames.txt
 
 # rename jobs to a sane naming pattern
 ./rename.sh
 
-pop > /dev/null
+popd > /dev/null
 


[03/23] couchdb-ci git commit: working Veewee - Vagrant - Ansible setup

Posted by ba...@apache.org.
working Veewee - Vagrant - Ansible setup

Ansible provisioning currently does nothing, though


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/cfa05d9d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/cfa05d9d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/cfa05d9d

Branch: refs/heads/master
Commit: cfa05d9da1e9a370570d1ece8ab230a016362fbf
Parents: b916ea8
Author: Bastian Krol <ba...@web.de>
Authored: Fri Jul 3 22:52:40 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Fri Jul 3 22:52:42 2015 +0200

----------------------------------------------------------------------
 ansible/roles/common/tasks/main.yml             |  2 ++
 ansible/roles/jenkins-master/tasks/main.yml     |  2 ++
 ansible/roles/ubuntu/tasks/main.yml             | 11 ++++++
 ansible/site.yml                                | 18 ++++++++++
 .../couchdb-ci-ubuntu-14.04/vagrant.sh          |  8 +++++
 vagrant/couchdb-jenkins-master/.gitignore       |  1 +
 vagrant/couchdb-jenkins-master/Vagrantfile      | 35 ++++++++++++++++++++
 vagrant/readme.markdown                         | 25 ++++++++++++++
 8 files changed, 102 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/ansible/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml
new file mode 100644
index 0000000..d7878ac
--- /dev/null
+++ b/ansible/roles/common/tasks/main.yml
@@ -0,0 +1,2 @@
+---
+# currently there are no common tasks ¯\_(ツ)_/¯

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/ansible/roles/jenkins-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/main.yml b/ansible/roles/jenkins-master/tasks/main.yml
new file mode 100644
index 0000000..d02a671
--- /dev/null
+++ b/ansible/roles/jenkins-master/tasks/main.yml
@@ -0,0 +1,2 @@
+---
+# currently there are no tasks for Jenkins master ¯\_(ツ)_/¯

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/ansible/roles/ubuntu/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu/tasks/main.yml b/ansible/roles/ubuntu/tasks/main.yml
new file mode 100644
index 0000000..b5e575b
--- /dev/null
+++ b/ansible/roles/ubuntu/tasks/main.yml
@@ -0,0 +1,11 @@
+---
+  - name: install some basic apt packages
+    apt: name={{item}} state=present
+    with_items:
+    - binutils
+    - bzip2
+    - curl
+    - sudo
+    - unzip
+    - vim # you'll want a decent editor on the box, don't you?
+    - wget

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/ansible/site.yml
----------------------------------------------------------------------
diff --git a/ansible/site.yml b/ansible/site.yml
new file mode 100644
index 0000000..74c8fd5
--- /dev/null
+++ b/ansible/site.yml
@@ -0,0 +1,18 @@
+---
+# Apply common configuration to all hosts
+- hosts: all
+  remote_user: root
+  roles:
+  - common
+
+# Apply common configuration for all Ubuntu systems
+- hosts: ubuntu
+  remote_user: root
+  roles:
+  - ubuntu
+
+# Configure and deploy database servers.
+- hosts: jenkins-master
+  remote_user: root
+  roles:
+  - jenkins-master

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
----------------------------------------------------------------------
diff --git a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
index 10efd34..da0e2c1 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
@@ -4,3 +4,11 @@ cd /home/vagrant/.ssh
 wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
 chmod 600 /home/vagrant/.ssh/authorized_keys
 chown -R vagrant /home/vagrant/.ssh
+
+# also add key for root user, so Ansible can do its thing via root instead of user vagrant
+mkdir /root/.ssh
+chmod 700 /root/.ssh
+cd /root/.ssh
+wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
+chmod 600 /root/.ssh/authorized_keys
+chown -R root /root/.ssh

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/vagrant/couchdb-jenkins-master/.gitignore
----------------------------------------------------------------------
diff --git a/vagrant/couchdb-jenkins-master/.gitignore b/vagrant/couchdb-jenkins-master/.gitignore
new file mode 100644
index 0000000..8000dd9
--- /dev/null
+++ b/vagrant/couchdb-jenkins-master/.gitignore
@@ -0,0 +1 @@
+.vagrant

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/vagrant/couchdb-jenkins-master/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/couchdb-jenkins-master/Vagrantfile b/vagrant/couchdb-jenkins-master/Vagrantfile
new file mode 100644
index 0000000..63370e0
--- /dev/null
+++ b/vagrant/couchdb-jenkins-master/Vagrantfile
@@ -0,0 +1,35 @@
+# -*- mode: ruby -*-
+# vi: set ft=ruby :
+
+# All Vagrant configuration is done below. The "2" in Vagrant.configure
+# configures the configuration version (we support older styles for
+# backwards compatibility).
+Vagrant.configure(2) do |config|
+  config.vm.box = "couchdb-ci-ubuntu-14.04"
+
+  # How much memory do we need to test the setup? I have no clue.
+  config.vm.provider "virtualbox" do |vb|
+    vb.memory = "1024"
+  end
+
+  # The base box also copies the Vagrant ssh key into root's authorized_keys
+  # so we can ssh into the box via root. This way, there is no mention of the
+  # user vagrant in the Ansible scripts.
+  config.ssh.username = 'root'
+
+  config.vm.define "couchdb-jenkins-master"
+
+  # Workaround for "stdin: is not a tty error" -- make Vagrants ssh shell a
+  # non-login one. See https://github.com/mitchellh/vagrant/issues/1673#issuecomment-28288042
+  config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
+
+  config.vm.provision "ansible" do |ansible|
+    ansible.playbook = "../../ansible/site.yml"
+    ansible.groups = {
+      "jenkins-master" => ["jenkins-master"],
+      "ubuntu" => ["ubuntu"]
+    }
+  end
+
+  config.vm.network "forwarded_port", guest: 8080, host: 18080
+end

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/cfa05d9d/vagrant/readme.markdown
----------------------------------------------------------------------
diff --git a/vagrant/readme.markdown b/vagrant/readme.markdown
new file mode 100644
index 0000000..141127c
--- /dev/null
+++ b/vagrant/readme.markdown
@@ -0,0 +1,25 @@
+Vagrant Configuration for Testing the CouchDB CI Setup Locally
+==============================================================
+
+Each sub folder in this directory contains the Vagrant configuration for one of the machines used in the CouchDB CI setup.
+
+## Prerequesites
+
+You need to have [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/) installed.
+
+## Building and Registering the Base Box
+
+Each vagrant configuration requires its respective base box. For example, the configuration couchdb-jenkins-master requires the base box `couchdb-ci-ubuntu-14.04`. You can build the base boxes locally with veewee (see `../baseboxes/readme.markdown`). To make things easier we might upload the base boxes somewhere so people do not have to build them theirselves but can just download them but we are not there yet.
+
+Either way, you have to add the image to the vagrant base image registry with the following command:
+```
+vagrant box add couchdb-ci-ubuntu-14.04 /path/to/your/base-box-file.box
+```
+
+When this has happened, `vagrant box list` should list the base box's name (`couchdb-ci-ubuntu-14.04` in our example).
+
+The base box built with veewee is just a fresh minimal install of the OS. All relevant packages and configurations are provisioned with Ansible. Vagrant is used to make creating, provisioning and destroying these virtual machines easier.
+
+## Launching and Provisioning the Box
+
+Just execute `vagrant up`. This will start the virtual machine and provision it using the scripts in `../ansible`. That's it :-)


[20/23] couchdb-ci git commit: use the SCM sync plug-in

Posted by ba...@apache.org.
use the SCM sync plug-in


Project: http://git-wip-us.apache.org/repos/asf/couchdb-ci/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-ci/commit/c0131b74
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-ci/tree/c0131b74
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-ci/diff/c0131b74

Branch: refs/heads/master
Commit: c0131b745550a7dd29c19f1ec0293f5a8e5fd944
Parents: e1b1854
Author: Bastian Krol <ba...@web.de>
Authored: Sat Aug 1 13:41:52 2015 +0200
Committer: Bastian Krol <ba...@web.de>
Committed: Sat Aug 1 13:41:52 2015 +0200

----------------------------------------------------------------------
 .../jenkins/plugins/scm-sync-configuration.jpi  | Bin 0 -> 7064483 bytes
 ansible/roles/jenkins-master/tasks/jenkins.yml  |  20 +++++++++++++++++++
 ansible/roles/jenkins-master/tasks/main.yml     |   6 ++++++
 ansible/roles/ubuntu-worker/tasks/main.yml      |   6 ++++++
 readme.markdown                                 |   9 ++++++++-
 5 files changed, 40 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi b/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi
new file mode 100644
index 0000000..6260427
Binary files /dev/null and b/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi differ

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/jenkins-master/tasks/jenkins.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/jenkins.yml b/ansible/roles/jenkins-master/tasks/jenkins.yml
index d2721f6..00fd5e3 100644
--- a/ansible/roles/jenkins-master/tasks/jenkins.yml
+++ b/ansible/roles/jenkins-master/tasks/jenkins.yml
@@ -34,6 +34,24 @@
     group: jenkins
     mode: 0600
 
+- name: create plugins folder
+  file:
+    path: /var/lib/jenkins/plugins
+    owner: jenkins
+    group: jenkins
+    state: directory
+
+- name: install plug-ins
+  copy:
+    src: jenkins/plugins/{{ item }}.jpi
+    dest: /var/lib/jenkins/plugins/{{ item }}.jpi
+    owner: jenkins
+    group: jenkins
+  with_items:
+  - scm-sync-configuration
+  notify: restart jenkins service
+
+  # TODO This can be removed, SCM sync plug-in will handle job configs
 - name: create build job folder
   file:
     path: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/builds
@@ -41,6 +59,7 @@
     group: jenkins
     state: directory
 
+  # TODO This can be removed, SCM sync plug-in will handle job configs
 - name: create build job config
   template:
     src: jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml
@@ -49,6 +68,7 @@
     group: jenkins
   notify: restart jenkins service
 
+  # TODO This can be removed, SCM sync plug-in will handle job configs
 - name: create nextBuildNumber file
   copy:
     dest: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/nextBuildNumber

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/jenkins-master/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/jenkins-master/tasks/main.yml b/ansible/roles/jenkins-master/tasks/main.yml
index b27ed50..e1d5f05 100644
--- a/ansible/roles/jenkins-master/tasks/main.yml
+++ b/ansible/roles/jenkins-master/tasks/main.yml
@@ -1,3 +1,9 @@
 ---
+# Install auxiliary packages
+- name: install auxiliary packages
+  apt: name={{item}} state=present
+  with_items:
+  - git
+
 - include: jenkins.yml
 - include: nginx.yml

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/ansible/roles/ubuntu-worker/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/main.yml b/ansible/roles/ubuntu-worker/tasks/main.yml
index de00fd8..3355657 100644
--- a/ansible/roles/ubuntu-worker/tasks/main.yml
+++ b/ansible/roles/ubuntu-worker/tasks/main.yml
@@ -8,6 +8,12 @@
     state: present
     update_cache: yes
 
+# Install auxiliary packages (not required to build CouchDB)
+- name: install auxiliary packages
+  apt: name={{item}} state=present
+  with_items:
+  - git
+
 # Install packages required to build CouchDB via apt-get
 - name: install packages required to build CouchDB
   apt: name={{item}} state=present

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/c0131b74/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index ec2bf5e..0d30947 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -18,8 +18,11 @@ Current state:
 - [x] create CouchDB build job in Jenkins via Ansible
 - [x] switch to master-worker Jenkins setup
 - [x] use ntp server for master and workers
+- [ ] Use SCM sync plug-in to manage job configs
+    * http://stackoverflow.com/questions/27138043/jenkins-scm-sync-configuration-plugin-in-docker-wont-talk-to-github
+    * https://cburgmer.wordpress.com/2013/01/02/tracking-configuration-changes-in-jenkins/
+- [ ] enable auth for Jenkins
 - [ ] actually fetch CouchDB from VCS
-- [ ] optional: switch to Jenkins Job DSL plug-in for defining jobs?
 - [ ] all apt-get commands should pin a specific version, in the base box definition as well as in Ansible. How?
 - [ ] create an additional Ubuntu worker with an older Erlang version
 - [ ] create another base box (different linux distro) for a third worker
@@ -27,6 +30,10 @@ Current state:
 
 *Remark: Throughout this repository we use the terms "master"/"worker" for the Jenkins build machines, whereas the Jenkins documentation uses the terms "master"/"slave".*
 
+## SCM Sync Plug-in/Jenkins Public SSH Key
+
+The SCM Sync Jenkins plug-in is used to manage the Jenkins configuration and also the job configurations. To be able to do this, the public key that Jenkins uses needs to be uploaded as a deploy key at the associated repository (currently https://github.com/basti1302/couchdb-ci-jenkins-config/settings/keys). Unfortunately, this key might change. More specifically: The Ansible scripts will regenerate a key pair at runtime automatically if they don't find an existing key pair from a previous run.
+
 Vagrant Configuration for Testing the CouchDB CI Setup Locally
 --------------------------------------------------------------