Merge branch 'hotfix/readme'
diff --git a/README.md b/README.md
index 65c5e9f..701416d 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# openstack-cluster-setup
-This repository contains [Ansible](http://docs.ansible.com) playbooks for installing and configuring an OpenStack Kilo cluster
-for use in [OpenCloud](http://guide.opencloud.us). All of the OpenStack controller services are installed in VMs on a
-single "head node" and connected by an isolated private network. [Juju](http://www.ubuntu.com/cloud/tools/juju) is used
+This repository contains [Ansible](http://docs.ansible.com) playbooks for installing and configuring an OpenStack Kilo cluster
+for use in [OpenCloud](http://guide.opencloud.us). All of the OpenStack controller services are installed in VMs on a
+single "head node" and connected by an isolated private network. [Juju](http://www.ubuntu.com/cloud/tools/juju) is used
to install and configure the OpenStack services.
## How to use it
@@ -10,10 +10,9 @@
Here are the basic steps for installing a new OpenCloud cluster named 'foo':
* Install Ubuntu 14.04 LTS on the head and compute nodes.
-* Create *foo-setup.yaml* and *foo-compute.yaml* files using *cloudlab-setup.yaml* and *cloudlab-compute.yaml* as templates.
- * Create a *foo-hosts* file with the DNS names of your nodes.
- * Change the *- hosts:* lines as appropriate for your own head and compute nodes.
- * Change *ctl.install.xos-pg0.clemson.cloudlab.us* in *foo-setup.yaml* to the DNS name of your head node.
+* Create *foo-setup.yml* and *foo-compute.yml* files using *cloudlab-setup.yml* and *cloudlab-compute.yml* as templates. Create a *foo-hosts* file with the DNS names of your nodes based on *cloudlab-hosts*.
+* If you are **not** installing on CloudLab, edit *group_vars/all*. Change *cloudlab: true* to *cloudlab: false*.
+* If you are installing a cluster for inclusion in the **public OpenCloud**, change *mgmt_net_prefix* in *foo-setup.yml* to be unique across all OpenCloud clusters.
* To set up Juju, use it to install the OpenStack services on the head node, and prep the compute nodes, run on the head node:
```
$ ansible-playbook -i foo-hosts foo-setup.yaml
@@ -32,4 +31,3 @@
* The installation configures port forwarding so that the OpenStack services can be accessed from outside the private network. Some OpenCloud-specific firewalling is also introduced, which will likely require modification for other setups. See: [files/etc/libvirt/hooks/qemu](https://github.com/andybavier/opencloud-cluster-setup/blob/master/files/etc/libvirt/hooks/qemu).
* By default the compute nodes are controlled and updated automatically using *ansible-pull* from [this repo](https://github.com/andybavier/opencloud-nova-compute-ansible). You may want to change this.
* All of the service interfaces are configured to use SSL because that's what OpenCloud uses in production. Again, may not be what you want. Look for the relevant Juju commands in *cloudlab-setup.yaml*.
-
diff --git a/cloudlab-setup.yml b/cloudlab-setup.yml
index c83ff64..65d5283 100644
--- a/cloudlab-setup.yml
+++ b/cloudlab-setup.yml
@@ -55,6 +55,7 @@
- name: (CloudLab) Set up extra disk space
shell: /usr/testbed/bin/mkextrafs /var/lib/uvtool/libvirt/images
creates=/var/lib/uvtool/libvirt/images/lost+found
+ when: cloudlab
- name: Add myself to libvirtd group
user: name={{ ansible_env['SUDO_USER'] }}
@@ -200,10 +201,12 @@
- name: (CloudLab) Make sure that /root/setup exists
file: path=/root/setup state=directory
sudo: yes
+ when: cloudlab
- name: (CloudLab) Copy credentials to /root/setup
shell: scp admin-openrc.sh /root/setup
sudo: yes
+ when: cloudlab
- name: Copy credentials to nova-cloud-controller
shell: "scp admin-openrc.sh ubuntu@nova-cloud-controller:"
@@ -246,6 +249,15 @@
template: src=templates/etc/rc.local.cloudlab
dest=/etc/rc.local
mode=0755
+ when: cloudlab
+ notify:
+ - run /etc/rc.local
+
+ - name: Add route via /etc/rc.local
+ template: src=templates/etc/rc.local
+ dest=/etc/rc.local
+ mode=0755
+ when: not cloudlab
notify:
- run /etc/rc.local
@@ -255,6 +267,7 @@
- name: (CloudLab) Set up extra disk space
shell: /usr/testbed/bin/mkextrafs /var/lib/nova
creates=/var/lib/nova/lost+found
+ when: cloudlab
handlers:
- name: run /etc/rc.local
diff --git a/group_vars/all b/group_vars/all
new file mode 100644
index 0000000..fcf8e9b
--- /dev/null
+++ b/group_vars/all
@@ -0,0 +1,3 @@
+---
+# global defaults
+cloudlab: yes
\ No newline at end of file