summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2016-02-17 15:44:55 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2016-02-17 17:21:26 +0000
commit41436a0ca32a592166a47a5ad4e483ae563b99a2 (patch)
tree3c7d0ee10552e0e558124e9fa53ae2347517e925
parentb881bd444a6c0042e75100f65c1f86d304b68819 (diff)
downloadinfrastructure-41436a0ca32a592166a47a5ad4e483ae563b99a2.tar.gz
baserock_frontend: Update deploy instructions for Fedora 23
Flavour is also changed because the previous flavour no longer exists. Smallest flavour should be fine for something that is just a proxy. Change-Id: I7d6f3befaa32f41d909eb5336e221b2514403f12
-rw-r--r--README.mdwn5
-rw-r--r--baserock_frontend/image-config.yml12
2 files changed, 11 insertions, 6 deletions
diff --git a/README.mdwn b/README.mdwn
index 8208d869..280f071a 100644
--- a/README.mdwn
+++ b/README.mdwn
@@ -101,7 +101,7 @@ as-is.
The `$fedora_image_id` should reference a Fedora Cloud image. You can import
these from <http://www.fedoraproject.org/>. At time of writing, these
-instructions were tested with Fedora Cloud 21 for x86_64.
+instructions were tested with Fedora Cloud 23 for x86_64.
Backups
-------
@@ -185,13 +185,14 @@ To deploy this system:
nova boot frontend-haproxy \
--key-name=$keyname \
- --flavor=dc1.1x1.1 \
+ --flavor=dc1.1x0 \
--image=$fedora_image_id \
--nic="net-id=$network_id" \
--security-groups default,gerrit,web-server \
--user-data ./baserock-ops-team.cloud-config
ansible-playbook -i hosts baserock_frontend/image-config.yml
ansible-playbook -i hosts baserock_frontend/instance-config.yml
+ ansible-playbook -i hosts baserock_frontend/instance-backup-config.yml
ansible -i hosts -m service -a 'name=haproxy enabled=true state=started' \
--sudo frontend-haproxy
diff --git a/baserock_frontend/image-config.yml b/baserock_frontend/image-config.yml
index 5c3f0148..08a9b64a 100644
--- a/baserock_frontend/image-config.yml
+++ b/baserock_frontend/image-config.yml
@@ -4,24 +4,28 @@
gather_facts: false
sudo: yes
tasks:
+ # See: https://fedoramagazine.org/getting-ansible-working-fedora-23/
+ - name: install Python2 and required deps for Ansible modules
+ raw: dnf install -y python2 python2-dnf
+
- name: enable persistant journal
shell: mkdir /var/log/journal
args:
creates: /var/log/journal
- name: ensure system up to date
- yum: name=* state=latest
+ dnf: name=* state=latest
- name: HAProxy installed
- yum: name=haproxy state=latest
+ dnf: name=haproxy state=latest
- name: netcat installed
- yum: name=nc state=latest
+ dnf: name=nc state=latest
# Yes, SELinux prevents HAProxy from working. In this case I think it's
# because we ask it to listen on port 29418 for Gerrit's SSH connections.
- name: install libselinux-python, so Ansible can control selinux
- yum: name=libselinux-python state=latest
+ dnf: name=libselinux-python state=latest
- name: disable SELinux on subsequent boots
selinux: state=disabled