Skip to content

Commit

Permalink
ftfy
Browse files Browse the repository at this point in the history
youre welcome
  • Loading branch information
prometheanfire committed Nov 11, 2015
1 parent e116213 commit 24cb0c5
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 21 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ docs/_build/

# PyBuilder
target/

# generated file
rpcd/playbooks/ansible.cfg
openstack-ansible
rpcd/playbooks/roles/ceph-common
rpcd/playbooks/roles/ceph-mon
rpcd/playbooks/roles/ceph-osd
12 changes: 0 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,12 +0,0 @@
[submodule "openstack-ansible"]
path = openstack-ansible
url = https://git.openstack.org/openstack/openstack-ansible
[submodule "rpcd/playbooks/roles/ceph-common"]
path = rpcd/playbooks/roles/ceph-common
url = https://github.com/ceph/ansible-ceph-common
[submodule "rpcd/playbooks/roles/ceph-mon"]
path = rpcd/playbooks/roles/ceph-mon
url = https://github.com/ceph/ansible-ceph-mon
[submodule "rpcd/playbooks/roles/ceph-osd"]
path = rpcd/playbooks/roles/ceph-osd
url = https://github.com/ceph/ansible-ceph-osd
12 changes: 12 additions & 0 deletions ansible-role-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: ceph-common
path: /opt/rpc-openstack/rpcd/playbooks/roles/ceph-common
src: https://github.com/ceph/ansible-ceph-common.git
version: 7d017ea47091b6b081cc672a987709fe6b8390a8
- name: ceph-mon
path: /opt/rpc-openstack/rpcd/playbooks/roles/ceph-mon
src: https://github.com/ceph/ansible-ceph-mon.git
version: fbb4e78f77a48fb3da787e05e35e1c727b5b44d3
- name: ceph-osd
path: /opt/rpc-openstack/rpcd/playbooks/roles/ceph-osd
src: https://github.com/ceph/ansible-ceph-osd.git
version: 1662cdfd1e6d2aaf2a40e5c8c68811760fbd1f22
1 change: 0 additions & 1 deletion openstack-ansible
Submodule openstack-ansible deleted from 770e02
1 change: 0 additions & 1 deletion rpcd/playbooks/roles/ceph-common
Submodule ceph-common deleted from 7d017e
1 change: 0 additions & 1 deletion rpcd/playbooks/roles/ceph-mon
Submodule ceph-mon deleted from fbb4e7
1 change: 0 additions & 1 deletion rpcd/playbooks/roles/ceph-osd
Submodule ceph-osd deleted from 1662cd
63 changes: 63 additions & 0 deletions rpcd/playbooks/set-us-up-the-bomb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
- name: it puts the stuff in the places
tasks:
- name: or else it gets the git again
git:
dest: {{ item.value.dest }}
repo: {{ item.value.repo }}
version: {{ item.value.version }}
with_dict: "{{repos}}"
- name: laying it on the line
copy:
dest: /opt/rpc-openstack/rpcd/playbooks/ansible.cfg
content: |
[defaults]
gathering = smart
host_key_checking = False
# Setting forks should be based on your system. The Ansible defaults to 5,
# the os-lxc-hosts assumes that you have a system that can support
# OpenStack, thus it has been conservatively been set to 15
forks = 15
# SSH timeout
timeout = 120
# Set the path to the folder in openstack-ansible which holds the dynamic
# inventory script - new config setting for ansible v1.9 and above
inventory = {{ repos.openstack-ansible.dest }}/playbooks/inventory/
# Set the path to the folder in openstack-ansible which holds the dynamic
# inventory script - uncomment if using ansible below v1.9
#hostfile = {{ repos.openstack-ansible.value.dest }}/playbooks/inventory/
# Set the path to the folder in openstack-ansible which holds the
# libraries required
library = {{ repos.openstack-ansible.dest }}/playbooks/library/
# Set the path to the folder in openstack-ansible which holds the roles
# that are depended on by the rpc-openstack roles
roles_path = {{ repos.openstack-ansible.dest }}/playbooks/roles/
# Set the path to the folder in openstack-ansible which holds the
# lookup plugins required
lookup_plugins = {{ repos.openstack-ansible.dest }}/playbooks/plugins/lookups/
# Set the path to the folder in openstack-ansible which holds the filter
# plugins required
filter_plugins = {{ repos.openstack-ansible.dest }}/playbooks/plugins/filters/
# Set the path to the folder in openstack-ansible which holds the action
# plugins required
action_plugins = {{ repos.openstack-ansible.dest }}/playbooks/plugins/actions/
[ssh_connection]
pipelining = True
vars:
repos:
openstack-ansible:
dest: /opt/rpc-openstack/openstack-ansible
repo: https://github.com/openstack/openstack-ansible.git
version: 770e02df1b4d9ca55b1e3bf45b0ee5177ffd0435
6 changes: 6 additions & 0 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ function run_ansible {
openstack-ansible ${ANSIBLE_PARAMETERS} --forks ${FORKS} $@
}

curl https://raw.githubusercontent.com/pypa/pip/7.1.2/contrib/get-pip.py -o /opt/get-pip.py
python2 /opt/get-pip.py || python /opt/get-pip.py
pip install --force-reinstall 'ansible===1.9.4'
ansible-playbook -i 'localhost,' /opt/rpc-openstack/rpcd/playbooks/set-us-up-the-bomb.yml
ansible-galaxy install --role-file=/opt/rpc-openstack/ansible-role-requirements.yml --ignore-errors --force

# begin the bootstrap process
cd ${OA_DIR}

Expand Down
4 changes: 0 additions & 4 deletions scripts/linting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ pushd rpcd/playbooks
echo "Running Syntax Check"
ansible-playbook -i <(echo $LOCAL_INVENTORY) --syntax-check *.yml --list-tasks || failed=1

# Remove the third-party Ceph roles because they fail ansible-lint
rm -r roles/ceph-common
rm -r roles/ceph-mon
rm -r roles/ceph-osd
# Perform a lint check on all playbooks and roles.
echo "Running Lint Check"
ansible-lint --version || failed=1
Expand Down
8 changes: 7 additions & 1 deletion scripts/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ BASE_DIR=$( cd "$( dirname ${0} )" && cd ../ && pwd )
OA_DIR="$BASE_DIR/openstack-ansible"
RPCD_DIR="$BASE_DIR/rpcd"

curl https://raw.githubusercontent.com/pypa/pip/7.1.2/contrib/get-pip.py -o /opt/get-pip.py
python2 /opt/get-pip.py || python /opt/get-pip.py
pip install --force-reinstall 'ansible===1.9.4'
ansible-playbook -i 'localhost,' /opt/rpc-openstack/rpcd/playbooks/set-us-up-the-bomb.yml
ansible-galaxy install --role-file=/opt/rpc-openstack/ansible-role-requirements.yml --ignore-errors --force

# Merge new overrides into existing user_variables before upgrade
# contents of existing user_variables take precedence over new overrides
cp ${RPCD_DIR}/etc/openstack_deploy/user_variables.yml /tmp/upgrade_user_variables.yml
Expand All @@ -32,7 +38,7 @@ ${OA_DIR}/scripts/bootstrap-ansible.sh

# Apply any patched files.
cd ${RPCD_DIR}/playbooks
openstack-ansible -i "localhost," patcher.yml
openstack-ansible -i 'localhost,' patcher.yml

# Do the upgrade for openstack-ansible components
cd ${OA_DIR}
Expand Down

0 comments on commit 24cb0c5

Please sign in to comment.