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:35 UTC

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

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
-```