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/12/25 23:06:02 UTC

[1/6] couchdb-ci git commit: build Docker container that can build CouchDB

Repository: couchdb-ci
Updated Branches:
  refs/heads/master a7eb5c807 -> 9fb4f6199


build Docker container that can build CouchDB

- run Ansible inside Docker container
- change Ansible scripts so all required dependencies for building
  CouchDB are installed
- remove Jenkins master related scripts
- update readme to reflect new strategy with Docker


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

Branch: refs/heads/master
Commit: f1a84d8bb1fc3172a7c359b2cc2e283586005cc9
Parents: a7eb5c8
Author: Bastian Krol <ba...@web.de>
Authored: Mon Dec 21 11:51:39 2015 +0100
Committer: Bastian Krol <ba...@web.de>
Committed: Tue Dec 22 14:04:25 2015 +0100

----------------------------------------------------------------------
 .dockerignore                                   |   3 +
 ansible/docker-inventories/ubuntu-worker        |  11 ++
 ansible/generate-keypair.sh                     |  24 -----
 ansible/roles/common/tasks/main.yml             |  11 --
 .../jenkins/plugins/scm-sync-configuration.jpi  | Bin 7064483 -> 0 bytes
 .../roles/jenkins-master/files/keys/.gitignore  |   1 -
 ansible/roles/jenkins-master/handlers/main.yml  |  10 --
 ansible/roles/jenkins-master/tasks/jenkins.yml  | 106 -------------------
 ansible/roles/jenkins-master/tasks/main.yml     |   9 --
 ansible/roles/jenkins-master/tasks/nginx.yml    |  23 ----
 .../templates/jenkins/credentials.xml           |  20 ----
 .../jenkins/jobs/couchdb-build-1.6.x-ubuntu.xml |  31 ------
 .../jenkins/nodes/ubuntu1404/config.xml         |  19 ----
 .../jenkins-master/templates/nginx/jenkins      |  20 ----
 ansible/roles/jenkins-master/vars/main.yml      |   6 --
 .../roles/jenkins-worker/files/keys/.gitignore  |   2 -
 ansible/roles/jenkins-worker/tasks/main.yml     |  22 ----
 ansible/roles/jenkins-worker/vars/main.yml      |   7 --
 ansible/roles/ubuntu-worker/files/build-ci.sh   |   9 ++
 ansible/roles/ubuntu-worker/tasks/couchdb.yml   |  42 ++++++++
 .../roles/ubuntu-worker/tasks/dependencies.yml  |  59 +++++++++++
 ansible/roles/ubuntu-worker/tasks/main.yml      |  32 +-----
 ansible/roles/ubuntu-worker/tasks/rebar.yml     |  37 +++++++
 ansible/roles/ubuntu-worker/vars/main.yml       |   1 +
 ansible/run-ansible-local.sh                    |  33 ++++++
 ansible/site.yml                                |  22 +---
 build-container.sh                              |   2 +
 docker/ubuntu-worker/Dockerfile                 |  21 ++++
 enter-container.sh                              |   9 ++
 readme.markdown                                 |  88 ++++++++++-----
 30 files changed, 294 insertions(+), 386 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/.dockerignore
----------------------------------------------------------------------
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..a60b743
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,3 @@
+# ignore everything except the ansible directory
+*
+!ansible

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/docker-inventories/ubuntu-worker
----------------------------------------------------------------------
diff --git a/ansible/docker-inventories/ubuntu-worker b/ansible/docker-inventories/ubuntu-worker
new file mode 100644
index 0000000..f738686
--- /dev/null
+++ b/ansible/docker-inventories/ubuntu-worker
@@ -0,0 +1,11 @@
+# Alternative ansible hosts file (aka inventory) for running Ansible on
+# localhost. This is used when running Ansible inside Docker instead of
+# using it as a Vagrant provisioner. The purpose of this is to set the Ansible
+# role.
+
+# This makes Ansible run role ubuntu-worker on localhost.
+# Use ansible-playbook with options
+# --inventory-file=docker-inventories/ubuntu-worker and
+# additionally --connection=local to avoid using an ssh connection.
+[ubuntu-workers]
+localhost

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/generate-keypair.sh
----------------------------------------------------------------------
diff --git a/ansible/generate-keypair.sh b/ansible/generate-keypair.sh
deleted file mode 100755
index c212b3c..0000000
--- a/ansible/generate-keypair.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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/f1a84d8b/ansible/roles/common/tasks/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/common/tasks/main.yml b/ansible/roles/common/tasks/main.yml
deleted file mode 100644
index 08017ff..0000000
--- a/ansible/roles/common/tasks/main.yml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-# 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/f1a84d8b/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
deleted file mode 100644
index 6260427..0000000
Binary files a/ansible/roles/jenkins-master/files/jenkins/plugins/scm-sync-configuration.jpi and /dev/null differ

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/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
deleted file mode 100644
index 240db6a..0000000
--- a/ansible/roles/jenkins-master/files/keys/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-couchdb-ci-rsa

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/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
deleted file mode 100644
index a9a5dca..0000000
--- a/ansible/roles/jenkins-master/handlers/main.yml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: restart jenkins service
-  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/f1a84d8b/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
deleted file mode 100644
index 00fd5e3..0000000
--- a/ansible/roles/jenkins-master/tasks/jenkins.yml
+++ /dev/null
@@ -1,106 +0,0 @@
----
-- 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
-
-- name: copy private key to Jenkins master
-  copy:
-    src: keys/couchdb-ci-rsa
-    dest: /var/lib/jenkins/.ssh/id_rsa
-    owner: jenkins
-    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
-    owner: jenkins
-    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
-    dest: /var/lib/jenkins/jobs/couchdb-build-1.6.x-ubuntu/config.xml
-    owner: jenkins
-    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
-    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/f1a84d8b/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
deleted file mode 100644
index e1d5f05..0000000
--- a/ansible/roles/jenkins-master/tasks/main.yml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-# 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/f1a84d8b/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
deleted file mode 100644
index 98234ad..0000000
--- a/ansible/roles/jenkins-master/tasks/nginx.yml
+++ /dev/null
@@ -1,23 +0,0 @@
----
-- 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/f1a84d8b/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
deleted file mode 100644
index e91d403..0000000
--- a/ansible/roles/jenkins-master/templates/jenkins/credentials.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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/f1a84d8b/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
deleted file mode 100644
index c603054..0000000
--- a/ansible/roles/jenkins-master/templates/jenkins/jobs/couchdb-build-1.6.x-ubuntu.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/f1a84d8b/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
deleted file mode 100644
index 2c2d190..0000000
--- a/ansible/roles/jenkins-master/templates/jenkins/nodes/ubuntu1404/config.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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/f1a84d8b/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
deleted file mode 100644
index 9aa6667..0000000
--- a/ansible/roles/jenkins-master/templates/nginx/jenkins
+++ /dev/null
@@ -1,20 +0,0 @@
-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/f1a84d8b/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
deleted file mode 100644
index 69517fb..0000000
--- a/ansible/roles/jenkins-master/vars/main.yml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-
-################################################################################
-# nginx
-################################################################################
-server_name: ci.couchdb.org

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/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
deleted file mode 100644
index 14712b3..0000000
--- a/ansible/roles/jenkins-worker/files/keys/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-couchdb-ci-rsa.pub
-

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/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
deleted file mode 100644
index 9893ecd..0000000
--- a/ansible/roles/jenkins-worker/tasks/main.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: create jenkins group
-  group:
-    name: jenkins
-    gid: "{{ jenkins_group_id }}" # same gid as jenkins group on master
-    state: present
-    system: yes
-
-- name: create jenkins user
-  user:
-    name: jenkins
-    uid: "{{ jenkins_user_id }}" # 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/f1a84d8b/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
deleted file mode 100644
index 9236049..0000000
--- a/ansible/roles/jenkins-worker/vars/main.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-
-################################################################################
-# Jenkins
-################################################################################
-jenkins_group_id: 112
-jenkins_user_id: 106

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/roles/ubuntu-worker/files/build-ci.sh
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/files/build-ci.sh b/ansible/roles/ubuntu-worker/files/build-ci.sh
new file mode 100755
index 0000000..23743b5
--- /dev/null
+++ b/ansible/roles/ubuntu-worker/files/build-ci.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+set -e
+
+cd /usr/src/couchdb
+git reset --hard
+git pull
+./configure
+make

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/roles/ubuntu-worker/tasks/couchdb.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/couchdb.yml b/ansible/roles/ubuntu-worker/tasks/couchdb.yml
new file mode 100644
index 0000000..a6b0e88
--- /dev/null
+++ b/ansible/roles/ubuntu-worker/tasks/couchdb.yml
@@ -0,0 +1,42 @@
+- name: create couchdb group
+  group:
+    name: couchdb
+    state: present
+
+- name: create couchdb user
+  user:
+    name: couchdb
+    createhome: yes
+    group: couchdb
+    state: present
+
+- name: install grunt-cli
+  npm:
+    name: grunt-cli
+    global: yes
+    state: present
+
+- name: get CouchDB sources from git
+  git:
+    repo: git://git.apache.org/couchdb.git
+    dest: /usr/src/couchdb
+    accept_hostkey: yes
+    force: yes
+    # which branch/tag do we actually want to build? I'd say master.
+    # version: developer-preview-2.0
+
+- name: copy build script
+  copy:
+    src: build-ci.sh
+    dest: /home/couchdb/build-ci.sh
+    owner: couchdb
+    group: couchdb
+    mode: 0755
+
+- name: set permissions on couchdb build
+  file:
+    path: /usr/src/couchdb
+    state: directory
+    owner: couchdb
+    group: couchdb
+    recurse: yes

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/dependencies.yml b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
new file mode 100644
index 0000000..2fe9cef
--- /dev/null
+++ b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
@@ -0,0 +1,59 @@
+- name: import the Erlang Solutions key into apt
+  apt_key:
+    url: http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
+    state: present
+    # validate_certs: no
+
+- name: add Erlang Solutions deb repository
+  apt_repository:
+    repo: 'deb http://packages.erlang-solutions.com/ubuntu trusty contrib'
+    state: present
+
+# apt-get update
+- name: update apt cache
+  apt:
+    update_cache: yes
+
+- name: install auxiliary packages
+  apt: name={{item}} state=present
+  with_items:
+  - apt-transport-https
+  - curl
+  - git
+  - pkg-config
+  - python
+
+# required for make couch
+- name: install packages required to build CouchDB
+  apt: name={{item}} state=present install_recommends=no
+  with_items:
+  - build-essential
+  - ca-certificates
+  - erlang-dev=1:18.2
+  - erlang-nox=1:18.2
+  - erlang=1:18.2
+  - libcurl4-openssl-dev
+  - libicu-dev
+  - libmozjs185-dev
+
+# required for make docs
+- name: install packages required to build CouchDB
+  apt: name={{item}} state=present install_recommends=no
+  with_items:
+  - help2man
+  - python-sphinx
+  - texlive-latex-base
+  - texlive-latex-recommended
+  - texlive-latex-extra
+  - texlive-fonts-recommended
+  - texinfo
+
+# More packages found in klaemo's Dockerfile... not sure if required, apparently not?
+# - erlang-base-hipe
+# - erlang-dialyzer
+# - erlang-eunit
+# - erlang-manpages
+# - libnspr4
+# - libnspr4-0d
+# - libnspr4-dev
+# - openssl

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/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 3355657..ac8241e 100644
--- a/ansible/roles/ubuntu-worker/tasks/main.yml
+++ b/ansible/roles/ubuntu-worker/tasks/main.yml
@@ -1,29 +1,3 @@
----
-# 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
-    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
-  with_items:
-  - build-essential
-  - erlang-base-hipe
-  - erlang-dev
-  - erlang-manpages
-  - erlang-eunit
-  - erlang-nox
-  - libicu-dev
-  - libmozjs185-dev
-  - libcurl4-openssl-dev
+- include: dependencies.yml
+- include: rebar.yml
+- include: couchdb.yml

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/roles/ubuntu-worker/tasks/rebar.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/rebar.yml b/ansible/roles/ubuntu-worker/tasks/rebar.yml
new file mode 100644
index 0000000..99623f6
--- /dev/null
+++ b/ansible/roles/ubuntu-worker/tasks/rebar.yml
@@ -0,0 +1,37 @@
+- name: create rebar group
+  group:
+    name: rebar
+    state: present
+
+- name: create rebar user
+  user:
+    name: rebar
+    createhome: yes
+    group: rebar
+    state: present
+
+- name: download rebar
+  get_url:
+    url: https://github.com/rebar/rebar/archive/{{ rebar_version }}.tar.gz
+    dest: /home/rebar/
+
+- name: unpack rebar
+  unarchive:
+    dest: /home/rebar
+    creates: /home/rebar/rebar-{{ rebar_version }}/bootstrap
+    group: rebar
+    owner: rebar
+    src: /home/rebar/rebar-{{ rebar_version }}.tar.gz
+
+- name: bootstrap rebar
+  command: ./bootstrap
+  args:
+    chdir: /home/rebar/rebar-{{ rebar_version }}
+    creates: /home/rebar/rebar-{{ rebar_version }}/rebar
+
+- name: copy rebar executable
+  command: cp /home/rebar/rebar-{{ rebar_version }}/rebar /usr/local/bin/
+  args:
+    creates: /usr/local/bin/rebar
+
+

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/roles/ubuntu-worker/vars/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/vars/main.yml b/ansible/roles/ubuntu-worker/vars/main.yml
new file mode 100644
index 0000000..2703fb2
--- /dev/null
+++ b/ansible/roles/ubuntu-worker/vars/main.yml
@@ -0,0 +1 @@
+rebar_version: 2.6.1

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/run-ansible-local.sh
----------------------------------------------------------------------
diff --git a/ansible/run-ansible-local.sh b/ansible/run-ansible-local.sh
new file mode 100755
index 0000000..b18b071
--- /dev/null
+++ b/ansible/run-ansible-local.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+# CAUTION: This script runs the Ansible scripts directly on your machine
+# instead of inside a Docker container or Vagrant box. It might mess up your
+# system. Only use this if you know what you are doing.
+
+# Call this script with sudo (that is `sudo ./run-local.sh` to run the playbook
+# locally, without ssh. You can optionally provide a tag
+# (http://docs.ansible.com/playbooks_tags.html) as an additional argument.
+
+set -e
+
+if [ "$(id -u)" != "0" ]; then
+  echo "This script needs to run with root privileges."
+  echo "Please start it as root or with sudo."
+  exit 1
+fi
+
+pushd `dirname $0`
+
+if [[ -n "$1" ]]; then
+  TAG="-t $1"
+fi
+
+ANSIBLE_FORCE_COLOR=1 ANSIBLE_NOCOWS=1 \
+  ansible-playbook \
+  --connection=local \
+  --inventory-file=./docker-inventories/ubuntu-worker \
+  --sudo \
+  $TAG \
+  site.yml
+
+popd

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/ansible/site.yml
----------------------------------------------------------------------
diff --git a/ansible/site.yml b/ansible/site.yml
index ad11d8f..0940588 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -1,25 +1,7 @@
 ---
-# Apply common configuration to all hosts
-- hosts: all
-  remote_user: root
-  roles:
-  - common
-  - geerlingguy.ntp
-
-# 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 worker
+# Apply common configuration for all Ubuntu workers
 - hosts: ubuntu-workers
   remote_user: root
   roles:
+  - nodesource.node
   - ubuntu-worker

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/build-container.sh
----------------------------------------------------------------------
diff --git a/build-container.sh b/build-container.sh
new file mode 100755
index 0000000..ff3f21f
--- /dev/null
+++ b/build-container.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+docker build -f docker/ubuntu-worker/Dockerfile -t couchdb-build-ubuntu-14.04-erlang-18.2 .

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/docker/ubuntu-worker/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/ubuntu-worker/Dockerfile b/docker/ubuntu-worker/Dockerfile
new file mode 100644
index 0000000..60b1bcf
--- /dev/null
+++ b/docker/ubuntu-worker/Dockerfile
@@ -0,0 +1,21 @@
+# NOTE: All docker files need to be run from ../../, that is
+# docker build -f /docker/ubuntu-worker/Dockerfile
+
+# Base Image: Plain Vanilla Ubuntu 14.04 with Ansible installed
+FROM williamyeh/ansible:ubuntu14.04
+
+# Add ansible directory and cd to it
+ADD ./ansible /ansible
+WORKDIR /ansible
+
+# Install Node.js role
+RUN ansible-galaxy install nodesource.node
+
+# Run Ansible to provision container
+RUN ansible-playbook site.yml \
+  --connection=local \
+  --inventory-file=./docker-inventories/ubuntu-worker
+
+USER couchdb
+
+CMD ["/home/couchdb/build-ci.sh"]

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/enter-container.sh
----------------------------------------------------------------------
diff --git a/enter-container.sh b/enter-container.sh
new file mode 100755
index 0000000..725b89f
--- /dev/null
+++ b/enter-container.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+CONTAINER=$1
+if [[ -z $CONTAINER ]]; then
+  CONTAINER="couchdb-build-ubuntu-14.04-erlang-18.2"
+  echo "No container ID provided, using default ID $CONTAINER"
+fi
+
+docker run -it $CONTAINER bash

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/f1a84d8b/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index 0d30947..21e07b6 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -3,44 +3,80 @@ 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.
+For the background and goals, see
 
-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.
+* this [thread](https://www.mail-archive.com/dev%40couchdb.apache.org/msg43591.html) on the couchdb-dev mailing list and
+* this [ASF Infra ticket](https://issues.apache.org/jira/browse/INFRA-10126).
 
-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).
+*Remark: Throughout this repository we use the terms "master"/"worker" for the Jenkins build machines, whereas the Jenkins documentation uses the terms "master"/"slave".*
 
-Fair warning: This is very much work in progress.
+The main purpose of this repository is to provide a number of Docker containers that the ASF infrastructure team can use in their Jenkins setups and which are capable of building CouchDB. The idea is to provide containers for a number of different operating systems and Erlang versions to make sure CouchDB builds and runs on all supported setups.
 
-Current state:
+The current (rough) plan for the build matrix is this:
 
-- [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
-- [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
-- [ ] 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
-- [ ] talk to Infra people
+**OS/Erlang**       | **R14B04** | **R16B03-1** | **17.5** | **18.x**
+--------------------|------------|--------------|----------|---------
+**Ubuntu 14.04**    | ?          | -            | -        | WIP
+**Ubuntu latest ?** | ?          | -            | -        | -
+**Debian 7**        | ?          | -            | -        | -
+**Debian 8**        | ?          | -            | -        | -
+**OS X latest**     | ?          | -            | -        | -
+**Free BSD**        | ?          | -            | -        | -
+**Windows**         | ?          | -            | -        | -
 
-*Remark: Throughout this repository we use the terms "master"/"worker" for the Jenkins build machines, whereas the Jenkins documentation uses the terms "master"/"slave".*
+### Open questions
+
+* AFAIK Erlang 14 support will be dropped soon-ish, so I'm not sure if it is worth the effort to do anything for that.
+* Which 18.x Erlang version is to be used? I heard someone saying 18.0 once, but that was before 18.1 and 18.2 were available, so I guess it makes more sense to always use the latest 18.x to see if changes in Erlang 18 breaks CouchDB.
+* There is no CentOS/RHEL there, shouldn't it be added?
+* Do we run a CouchDB build on all combinations on each commit? This would probably be too much for the ASF Infra build systems. Do we build them once a day? We need to find a good balance between early feedback and resource consumption here.
+* Do we even want to build the master branch or some other branch/tag? I guess the master branch would be most interesting for now, but not entirely sure. Also, it might make sense to make the branch/tag parameterizable so we could also use this to create releases from a specific tag etc.
+* What exactly do we do in each Jenkins build? Just build CouchDB? Also build docs? Start CouchDB? Run some test suite?
+* The build is currently triggered as the CMD in the Dockerfile via the script build-ci.sh. Is that okay? If we need more steps (beyond simply building CouchDB) we would need to add it to build-ci.sh.
+
+### TODOs
+
+- [ ] Check with ASF infra how to integrate our Docker containers into their build infrastructure.
+- [ ] Set up first CouchDB build on <https://builds.apache.org/>.
+- [ ] All apt-get commands should pin a specific version in Ansible. We are doing this for Erlang, we should do it for the other deps too.
+- [ ] Create more containers - other Erlang versions, other OSes.
 
-## SCM Sync Plug-in/Jenkins Public SSH Key
+Docker
+------
 
-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.
+The docker containers are provisioned via Ansible. That is, the dockerfiles usually only kicks of the Ansible scripts and the actual setup is then done in Ansible. Part of the reason is that the initial idea was to just provision build workers to virtual machines instead of containers. I kept Ansible around to do the heavy lifting because the Ansible syntax is more expressive and flexible than plain vanilla Dockerfiles. The idea is that this will make things a bit easier once we create multiple containers for the build matrix. Also, you could still use the Ansible files to create a Vagrant VM instead of a Docker container.
 
-Vagrant Configuration for Testing the CouchDB CI Setup Locally
---------------------------------------------------------------
+### Building the Containers
+
+Right now, this repo can produce exactly one container, based on Ubuntu 14.04 LTS and Erlang 18.2. The plan is to provide more containers soon.
+
+The Docker containers need the root directory of this repository as their build context (because they need the Ansible files). The Dockerfiles are located in `docker/<name>/Dockerfile`. Thus, to build a container, you need to do something like this:
+
+```
+docker build -f docker/ubuntu-worker/Dockerfile -t couchdb-build-ubuntu-14.04-erlang-18.2 .
+```
 
-The project's root folder contains a Vagrantfile with a multi machine Vagrant configuration for the machines used in the CouchDB CI setup.
+There is also a script called `build-container.sh` for your convenience :)
+
+### Running the CouchDB build on a Container
+
+Just start the container with
+
+```
+docker run couchdb-build-ubuntu-14.04-erlang-18.2
+```
+
+This will start the container which will then immediately start the CouchDB build. (The build script is the container's CMD entrypoing.)
+
+Vagrant
+-------
+
+Note: This section on creating the build machines on Vagrant might outdated. Either we bring it up to date to have both possibilities (Docker & Vagrant) or we remove it completely and just go with Docker.
 
 ### Prerequesites
 
+See the readme files in folder `baseboxes` for docs on building the base boxes.
+
 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:
@@ -50,7 +86,7 @@ vagrant plugin install vagrant-hosts
 
 plus an additional Ansible role
 ```bash
-[sudo] ansible-galaxy install geerlingguy.ntp
+[sudo] ansible-galaxy install nodesource.node
 ```
 
 Also, you might need to run


[4/6] couchdb-ci git commit: Erlang 14 support has already been dropped

Posted by ba...@apache.org.
Erlang 14 support has already been dropped


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

Branch: refs/heads/master
Commit: 2eaf863ed92e93226b84af91976f1200a04c5173
Parents: 4b98eed
Author: Bastian Krol <ba...@web.de>
Authored: Tue Dec 22 18:08:43 2015 +0100
Committer: Bastian Krol <ba...@web.de>
Committed: Tue Dec 22 18:08:43 2015 +0100

----------------------------------------------------------------------
 readme.markdown | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/2eaf863e/readme.markdown
----------------------------------------------------------------------
diff --git a/readme.markdown b/readme.markdown
index 21e07b6..952f313 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -14,20 +14,18 @@ The main purpose of this repository is to provide a number of Docker containers
 
 The current (rough) plan for the build matrix is this:
 
-**OS/Erlang**       | **R14B04** | **R16B03-1** | **17.5** | **18.x**
---------------------|------------|--------------|----------|---------
-**Ubuntu 14.04**    | ?          | -            | -        | WIP
-**Ubuntu latest ?** | ?          | -            | -        | -
-**Debian 7**        | ?          | -            | -        | -
-**Debian 8**        | ?          | -            | -        | -
-**OS X latest**     | ?          | -            | -        | -
-**Free BSD**        | ?          | -            | -        | -
-**Windows**         | ?          | -            | -        | -
+**OS/Erlang**       | **R16B03-1** | **17.5** | **18.x**
+--------------------|--------------|----------|---------
+**Ubuntu 14.04**    | -            | -        | WIP
+**Ubuntu latest ?** | -            | -        | -
+**Debian 7**        | -            | -        | -
+**Debian 8**        | -            | -        | -
+**OS X latest**     | -            | -        | -
+**Free BSD**        | -            | -        | -
+**Windows**         | -            | -        | -
 
 ### Open questions
 
-* AFAIK Erlang 14 support will be dropped soon-ish, so I'm not sure if it is worth the effort to do anything for that.
-* Which 18.x Erlang version is to be used? I heard someone saying 18.0 once, but that was before 18.1 and 18.2 were available, so I guess it makes more sense to always use the latest 18.x to see if changes in Erlang 18 breaks CouchDB.
 * There is no CentOS/RHEL there, shouldn't it be added?
 * Do we run a CouchDB build on all combinations on each commit? This would probably be too much for the ASF Infra build systems. Do we build them once a day? We need to find a good balance between early feedback and resource consumption here.
 * Do we even want to build the master branch or some other branch/tag? I guess the master branch would be most interesting for now, but not entirely sure. Also, it might make sense to make the branch/tag parameterizable so we could also use this to create releases from a specific tag etc.


[2/6] couchdb-ci git commit: add license headers

Posted by ba...@apache.org.
add license headers


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

Branch: refs/heads/master
Commit: 9bdbc076b55536d9f0c5b362410fba664969d044
Parents: f1a84d8
Author: Bastian Krol <ba...@web.de>
Authored: Tue Dec 22 15:21:21 2015 +0100
Committer: Bastian Krol <ba...@web.de>
Committed: Tue Dec 22 15:21:21 2015 +0100

----------------------------------------------------------------------
 Vagrantfile                                     | 17 +++++++++++++++++
 ansible/docker-inventories/ubuntu-worker        | 20 +++++++++++++++++++-
 ansible/roles/ubuntu-worker/files/build-ci.sh   | 17 +++++++++++++++++
 ansible/roles/ubuntu-worker/tasks/couchdb.yml   | 17 +++++++++++++++++
 .../roles/ubuntu-worker/tasks/dependencies.yml  | 17 +++++++++++++++++
 ansible/roles/ubuntu-worker/tasks/main.yml      | 17 +++++++++++++++++
 ansible/roles/ubuntu-worker/tasks/rebar.yml     | 17 +++++++++++++++++
 ansible/roles/ubuntu-worker/vars/main.yml       | 17 +++++++++++++++++
 ansible/run-ansible-local.sh                    | 17 +++++++++++++++++
 ansible/site.yml                                | 18 +++++++++++++++++-
 .../definitions/couchdb-ci-ubuntu-14.04/apt.sh  | 17 +++++++++++++++++
 .../couchdb-ci-ubuntu-14.04/build_time.sh       | 17 +++++++++++++++++
 .../couchdb-ci-ubuntu-14.04/cleanup.sh          | 17 +++++++++++++++++
 .../couchdb-ci-ubuntu-14.04/definition.rb       | 17 +++++++++++++++++
 .../couchdb-ci-ubuntu-14.04/preseed.cfg         | 17 +++++++++++++++++
 .../definitions/couchdb-ci-ubuntu-14.04/ruby.sh | 17 +++++++++++++++++
 .../definitions/couchdb-ci-ubuntu-14.04/sudo.sh | 17 +++++++++++++++++
 .../couchdb-ci-ubuntu-14.04/vagrant.sh          | 17 +++++++++++++++++
 .../definitions/couchdb-ci-ubuntu-14.04/vbox.sh | 17 +++++++++++++++++
 build-container.sh                              | 18 ++++++++++++++++++
 docker/ubuntu-worker/Dockerfile                 | 16 ++++++++++++++++
 enter-container.sh                              | 17 +++++++++++++++++
 22 files changed, 376 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/Vagrantfile
----------------------------------------------------------------------
diff --git a/Vagrantfile b/Vagrantfile
index 664e6fe..0b542de 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -1,5 +1,22 @@
 # -*- mode: ruby -*-
 # vi: set ft=ruby :
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
 
 Vagrant.configure(2) do |config|
 

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/docker-inventories/ubuntu-worker
----------------------------------------------------------------------
diff --git a/ansible/docker-inventories/ubuntu-worker b/ansible/docker-inventories/ubuntu-worker
index f738686..5855984 100644
--- a/ansible/docker-inventories/ubuntu-worker
+++ b/ansible/docker-inventories/ubuntu-worker
@@ -1,11 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 # Alternative ansible hosts file (aka inventory) for running Ansible on
 # localhost. This is used when running Ansible inside Docker instead of
 # using it as a Vagrant provisioner. The purpose of this is to set the Ansible
 # role.
-
+#
 # This makes Ansible run role ubuntu-worker on localhost.
 # Use ansible-playbook with options
 # --inventory-file=docker-inventories/ubuntu-worker and
 # additionally --connection=local to avoid using an ssh connection.
+
 [ubuntu-workers]
 localhost

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/roles/ubuntu-worker/files/build-ci.sh
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/files/build-ci.sh b/ansible/roles/ubuntu-worker/files/build-ci.sh
index 23743b5..f216c25 100755
--- a/ansible/roles/ubuntu-worker/files/build-ci.sh
+++ b/ansible/roles/ubuntu-worker/files/build-ci.sh
@@ -1,5 +1,22 @@
 #!/usr/bin/env bash
 
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 set -e
 
 cd /usr/src/couchdb

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/roles/ubuntu-worker/tasks/couchdb.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/couchdb.yml b/ansible/roles/ubuntu-worker/tasks/couchdb.yml
index a6b0e88..047b5bc 100644
--- a/ansible/roles/ubuntu-worker/tasks/couchdb.yml
+++ b/ansible/roles/ubuntu-worker/tasks/couchdb.yml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 - name: create couchdb group
   group:
     name: couchdb

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/roles/ubuntu-worker/tasks/dependencies.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/dependencies.yml b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
index 2fe9cef..c513096 100644
--- a/ansible/roles/ubuntu-worker/tasks/dependencies.yml
+++ b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 - name: import the Erlang Solutions key into apt
   apt_key:
     url: http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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 ac8241e..beb153c 100644
--- a/ansible/roles/ubuntu-worker/tasks/main.yml
+++ b/ansible/roles/ubuntu-worker/tasks/main.yml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 - include: dependencies.yml
 - include: rebar.yml
 - include: couchdb.yml

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/roles/ubuntu-worker/tasks/rebar.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/rebar.yml b/ansible/roles/ubuntu-worker/tasks/rebar.yml
index 99623f6..b6108fb 100644
--- a/ansible/roles/ubuntu-worker/tasks/rebar.yml
+++ b/ansible/roles/ubuntu-worker/tasks/rebar.yml
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 - name: create rebar group
   group:
     name: rebar

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/roles/ubuntu-worker/vars/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/vars/main.yml b/ansible/roles/ubuntu-worker/vars/main.yml
index 2703fb2..7d60c00 100644
--- a/ansible/roles/ubuntu-worker/vars/main.yml
+++ b/ansible/roles/ubuntu-worker/vars/main.yml
@@ -1 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 rebar_version: 2.6.1

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/run-ansible-local.sh
----------------------------------------------------------------------
diff --git a/ansible/run-ansible-local.sh b/ansible/run-ansible-local.sh
index b18b071..17ba0c5 100755
--- a/ansible/run-ansible-local.sh
+++ b/ansible/run-ansible-local.sh
@@ -1,5 +1,22 @@
 #!/usr/bin/env bash
 
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 # CAUTION: This script runs the Ansible scripts directly on your machine
 # instead of inside a Docker container or Vagrant box. It might mess up your
 # system. Only use this if you know what you are doing.

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/ansible/site.yml
----------------------------------------------------------------------
diff --git a/ansible/site.yml b/ansible/site.yml
index 0940588..e5e65d6 100644
--- a/ansible/site.yml
+++ b/ansible/site.yml
@@ -1,4 +1,20 @@
----
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 # Apply common configuration for all Ubuntu workers
 - hosts: ubuntu-workers
   remote_user: root

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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
index 49774ee..478cd73 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/apt.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/apt.sh
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 apt-get -y update
 apt-get -y upgrade
 apt-get -y install linux-headers-$(uname -r) build-essential

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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
index c9b2c6e..c6f282b 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/build_time.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/build_time.sh
@@ -1 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 date > /etc/vagrant_box_build_time

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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
index dd5a300..8ec91c2 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/cleanup.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/cleanup.sh
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 apt-get -y autoremove
 
 dd if=/dev/zero of=/EMPTY bs=1M

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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 93a23c2..32cd19a 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/definition.rb
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 Veewee::Session.declare({
   :cpu_count => '1',
   :memory_size => '512',

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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
index 2ab89c1..a8f998e 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/preseed.cfg
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/preseed.cfg
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 ## Options to set on the command line
 d-i debian-installer/locale string en_US.utf8
 d-i console-setup/ask_detect boolean false

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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
index 2782d7f..b199cd9 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/ruby.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/ruby.sh
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 apt-get -y install libyaml-0-2
 RUBY_VERSION=2.0.0-p247
 

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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
index 65ccf16..d53bc88 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/sudo.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/sudo.sh
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 groupadd -r admin
 usermod -a -G admin vagrant
 cp /etc/sudoers /etc/sudoers.orig

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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 da0e2c1..b73298a 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vagrant.sh
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 mkdir /home/vagrant/.ssh
 chmod 700 /home/vagrant/.ssh
 cd /home/vagrant/.ssh

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/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
index 1270338..bb70b56 100644
--- a/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vbox.sh
+++ b/baseboxes/definitions/couchdb-ci-ubuntu-14.04/vbox.sh
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 # Without libdbus virtualbox would not start automatically after compile
 apt-get -y install --no-install-recommends libdbus-1-3
 

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/build-container.sh
----------------------------------------------------------------------
diff --git a/build-container.sh b/build-container.sh
index ff3f21f..8ac11d6 100755
--- a/build-container.sh
+++ b/build-container.sh
@@ -1,2 +1,20 @@
 #!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 docker build -f docker/ubuntu-worker/Dockerfile -t couchdb-build-ubuntu-14.04-erlang-18.2 .

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/docker/ubuntu-worker/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/ubuntu-worker/Dockerfile b/docker/ubuntu-worker/Dockerfile
index 60b1bcf..8051cd6 100644
--- a/docker/ubuntu-worker/Dockerfile
+++ b/docker/ubuntu-worker/Dockerfile
@@ -1,3 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+
 # NOTE: All docker files need to be run from ../../, that is
 # docker build -f /docker/ubuntu-worker/Dockerfile
 

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9bdbc076/enter-container.sh
----------------------------------------------------------------------
diff --git a/enter-container.sh b/enter-container.sh
index 725b89f..8818304 100755
--- a/enter-container.sh
+++ b/enter-container.sh
@@ -1,5 +1,22 @@
 #!/usr/bin/env bash
 
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
 CONTAINER=$1
 if [[ -z $CONTAINER ]]; then
   CONTAINER="couchdb-build-ubuntu-14.04-erlang-18.2"


[6/6] couchdb-ci git commit: remove rebar, CouchDB builds its own rebar as part of the build process

Posted by ba...@apache.org.
remove rebar, CouchDB builds its own rebar as part of the build process


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

Branch: refs/heads/master
Commit: 9fb4f61998e725cec630eee0c8dfc639086d1f8a
Parents: ca34871
Author: Bastian Krol <ba...@web.de>
Authored: Tue Dec 22 19:38:33 2015 +0100
Committer: Bastian Krol <ba...@web.de>
Committed: Tue Dec 22 19:38:33 2015 +0100

----------------------------------------------------------------------
 ansible/roles/ubuntu-worker/tasks/main.yml  |  1 -
 ansible/roles/ubuntu-worker/tasks/rebar.yml | 54 ------------------------
 ansible/roles/ubuntu-worker/vars/main.yml   | 18 --------
 3 files changed, 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9fb4f619/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 beb153c..8754985 100644
--- a/ansible/roles/ubuntu-worker/tasks/main.yml
+++ b/ansible/roles/ubuntu-worker/tasks/main.yml
@@ -16,5 +16,4 @@
 #   under the License.
 
 - include: dependencies.yml
-- include: rebar.yml
 - include: couchdb.yml

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9fb4f619/ansible/roles/ubuntu-worker/tasks/rebar.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/rebar.yml b/ansible/roles/ubuntu-worker/tasks/rebar.yml
deleted file mode 100644
index b6108fb..0000000
--- a/ansible/roles/ubuntu-worker/tasks/rebar.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing,
-#   software distributed under the License is distributed on an
-#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#   KIND, either express or implied.  See the License for the
-#   specific language governing permissions and limitations
-#   under the License.
-
-- name: create rebar group
-  group:
-    name: rebar
-    state: present
-
-- name: create rebar user
-  user:
-    name: rebar
-    createhome: yes
-    group: rebar
-    state: present
-
-- name: download rebar
-  get_url:
-    url: https://github.com/rebar/rebar/archive/{{ rebar_version }}.tar.gz
-    dest: /home/rebar/
-
-- name: unpack rebar
-  unarchive:
-    dest: /home/rebar
-    creates: /home/rebar/rebar-{{ rebar_version }}/bootstrap
-    group: rebar
-    owner: rebar
-    src: /home/rebar/rebar-{{ rebar_version }}.tar.gz
-
-- name: bootstrap rebar
-  command: ./bootstrap
-  args:
-    chdir: /home/rebar/rebar-{{ rebar_version }}
-    creates: /home/rebar/rebar-{{ rebar_version }}/rebar
-
-- name: copy rebar executable
-  command: cp /home/rebar/rebar-{{ rebar_version }}/rebar /usr/local/bin/
-  args:
-    creates: /usr/local/bin/rebar
-
-

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/9fb4f619/ansible/roles/ubuntu-worker/vars/main.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/vars/main.yml b/ansible/roles/ubuntu-worker/vars/main.yml
deleted file mode 100644
index 7d60c00..0000000
--- a/ansible/roles/ubuntu-worker/vars/main.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing,
-#   software distributed under the License is distributed on an
-#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#   KIND, either express or implied.  See the License for the
-#   specific language governing permissions and limitations
-#   under the License.
-
-rebar_version: 2.6.1


[5/6] couchdb-ci git commit: openssl is installed as a dep anyway

Posted by ba...@apache.org.
openssl is installed as a dep anyway


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

Branch: refs/heads/master
Commit: ca34871c326e401a887fc0275d7f320716e467e1
Parents: 2eaf863
Author: Bastian Krol <ba...@web.de>
Authored: Tue Dec 22 18:12:01 2015 +0100
Committer: Bastian Krol <ba...@web.de>
Committed: Tue Dec 22 18:12:01 2015 +0100

----------------------------------------------------------------------
 ansible/roles/ubuntu-worker/tasks/dependencies.yml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/ca34871c/ansible/roles/ubuntu-worker/tasks/dependencies.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/dependencies.yml b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
index fad6335..2de5faf 100644
--- a/ansible/roles/ubuntu-worker/tasks/dependencies.yml
+++ b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
@@ -78,4 +78,3 @@
 # - libnspr4
 # - libnspr4-0d
 # - libnspr4-dev
-# - openssl


[3/6] couchdb-ci git commit: make all check dist

Posted by ba...@apache.org.
make all check dist


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

Branch: refs/heads/master
Commit: 4b98eed7941cbd6f60a821a9ca90c4bee53f3424
Parents: 9bdbc07
Author: Bastian Krol <ba...@web.de>
Authored: Tue Dec 22 18:08:03 2015 +0100
Committer: Bastian Krol <ba...@web.de>
Committed: Tue Dec 22 18:08:15 2015 +0100

----------------------------------------------------------------------
 ansible/roles/ubuntu-worker/files/build-ci.sh   |  4 ++--
 .../roles/ubuntu-worker/tasks/dependencies.yml  | 11 ++++++++---
 run-build-in-container.sh                       | 20 ++++++++++++++++++++
 3 files changed, 30 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/4b98eed7/ansible/roles/ubuntu-worker/files/build-ci.sh
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/files/build-ci.sh b/ansible/roles/ubuntu-worker/files/build-ci.sh
index f216c25..f6fe18a 100755
--- a/ansible/roles/ubuntu-worker/files/build-ci.sh
+++ b/ansible/roles/ubuntu-worker/files/build-ci.sh
@@ -22,5 +22,5 @@ set -e
 cd /usr/src/couchdb
 git reset --hard
 git pull
-./configure
-make
+./configure --with-curl
+make all check dist

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/4b98eed7/ansible/roles/ubuntu-worker/tasks/dependencies.yml
----------------------------------------------------------------------
diff --git a/ansible/roles/ubuntu-worker/tasks/dependencies.yml b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
index c513096..fad6335 100644
--- a/ansible/roles/ubuntu-worker/tasks/dependencies.yml
+++ b/ansible/roles/ubuntu-worker/tasks/dependencies.yml
@@ -53,6 +53,14 @@
   - libicu-dev
   - libmozjs185-dev
 
+# required for make check and make dialyze
+- name: install packages required to build CouchDB
+  apt: name={{item}} state=present install_recommends=no
+  with_items:
+  - erlang-eunit
+  - erlang-dialyzer
+  - shunit2
+
 # required for make docs
 - name: install packages required to build CouchDB
   apt: name={{item}} state=present install_recommends=no
@@ -66,9 +74,6 @@
   - texinfo
 
 # More packages found in klaemo's Dockerfile... not sure if required, apparently not?
-# - erlang-base-hipe
-# - erlang-dialyzer
-# - erlang-eunit
 # - erlang-manpages
 # - libnspr4
 # - libnspr4-0d

http://git-wip-us.apache.org/repos/asf/couchdb-ci/blob/4b98eed7/run-build-in-container.sh
----------------------------------------------------------------------
diff --git a/run-build-in-container.sh b/run-build-in-container.sh
new file mode 100755
index 0000000..4c3bbc7
--- /dev/null
+++ b/run-build-in-container.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
+docker run couchdb-build-ubuntu-14.04-erlang-18.2