From 709cdf375470da5fbac29ff15b967e09e2d30fcd Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Tue, 24 Apr 2018 13:42:51 +0100 Subject: [PATCH] CEPHSTORA-222 Use Ansible 2.5.7.0 and ceph-ansible 3.1 This PR changes to use Ansible 2.5.7.0 (the latest Ansible 2.5 version) along with ceph-ansible 3.1 To get this working we clean up some unrequired references in ansible.cfg, adjust the bootstrap-ansible.sh file and adjust the plugins and ceph-ansible role versions. The master branch of OSA-plugins includes a connection module that will work with ansible 2.5+, whereas stable/queens does not. Additionally, the config_template module required for ceph-ansible has been updated in ceph-ansible stable-3.1 so we no longer need the plugins directory for prod and should move it to the testing roles to clone. The openstack_hosts role also has some changes that are required for Ansible 2.5 to run in our keystone_rgw scenario test. This is a testing only role so we can bump this to master safely. 8f7114732df71249a907fa738da3c6b40492b50d is required for openstack_hosts to work with Ansible 2.5+ Finally, this PR adjusts the update_dependency job so that v3.1 of ceph-ansible is used as the base, and skips the openstack-ansible-plugins repo. --- README.md | 4 ++-- ansible-role-requirements.yml | 6 +----- ansible.cfg | 9 +-------- gating/update_dependencies/run | 5 +++-- phobos/README.md | 4 ++-- scripts/bootstrap-ansible.sh | 2 +- tests/ansible-role-test-requirements.yml | 6 +++++- 7 files changed, 15 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index b248f36..604e2bb 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ versions of ``ceph-ansible`` used in RPC deployments. ## Current versions of ceph-ansible & Ansible -### **ceph-ansible version:** v3.0.39 +### **ceph-ansible version:** 3.1.0 -### **Ansible version:** 2.4.4.0 +### **Ansible version:** 2.5.7.0 ## What is rpc-ceph? diff --git a/ansible-role-requirements.yml b/ansible-role-requirements.yml index 139ed2b..8aea221 100644 --- a/ansible-role-requirements.yml +++ b/ansible-role-requirements.yml @@ -1,7 +1,7 @@ - name: ceph-ansible scm: git src: https://github.com/ceph/ceph-ansible - version: v3.0.39 + version: stable-3.1 - name: rsyslog_client scm: git src: https://git.openstack.org/openstack/openstack-ansible-rsyslog_client @@ -30,7 +30,3 @@ scm: git src: https://github.com/cloudalchemy/ansible-alertmanager version: 0.13.1 -- name: ../ceph_plugins - scm: git - src: https://git.openstack.org/openstack/openstack-ansible-plugins - version: 17.0.4 diff --git a/ansible.cfg b/ansible.cfg index 1b32d73..5c7a254 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -2,15 +2,8 @@ library = /etc/ansible/ceph_roles/ceph-ansible/library:./library:/etc/ansible/ceph_plugins/library # set plugin path directories here, separate with colons -action_plugins = /etc/ansible/ceph_plugins/action:/etc/ansible/ceph_roles/ceph-ansible/plugins/actions -cache_plugins = /etc/ansible/ceph_plugins/cache +action_plugins = /etc/ansible/ceph_roles/ceph-ansible/plugins/actions:/etc/ansible/ceph_plugins/action callback_plugins = /etc/ansible/ceph_roles/ceph-ansible/plugins/callback:/etc/ansible/ceph_plugins/callback connection_plugins = /etc/ansible/ceph_plugins/connection -lookup_plugins = /etc/ansible/ceph_plugins/lookup -inventory_plugins = /etc/ansible/ceph_plugins/inventory -vars_plugins = /etc/ansible/ceph_plguins/vars_plugins filter_plugins = /etc/ansible/ceph_plugins/filter -test_plugins = /etc/ansible/ceph_plugins/test -terminal_plugins = /etc/ansible/ceph_plugins/terminal -strategy_plugins = /etc/ansible/ceph_plugins/strategy roles_path = /etc/ansible/ceph_roles/ceph-ansible/roles:/etc/ansible/ceph_roles:/etc/ansible/roles diff --git a/gating/update_dependencies/run b/gating/update_dependencies/run index 586c989..1df8cb1 100755 --- a/gating/update_dependencies/run +++ b/gating/update_dependencies/run @@ -4,7 +4,7 @@ set -x ## For use when updating the versions of upstream projects inside rpc-ceph. ## NB This will NOT upgrade a deployed environment, and should not be used in ## production -CEPH_MAJOR_VERSION="v3\.0" +CEPH_MAJOR_VERSION="v3\.1" OSA_MAJOR_VERSION="17\." function update_ceph_ansible { @@ -37,7 +37,8 @@ function update_upstream_osa_roles { ## Update both the roles and test-roles for role_reqs_file in ansible-role-requirements.yml tests/ansible-role-test-requirements.yml; do ## For each of the openstack-ansible repos - exclude openstack-ansible-tests which has no branches - for repo in $(sed -n -e 's/^.*src: //p' ${role_reqs_file} | grep openstack-ansible | grep -v openstack-ansible-tests); do + ## Additionally exclude openstack-ansible-plugins and openstack-ansible-hosts due to no support for Ansible 2.5 on a stable branch (until Rocky) + for repo in $(sed -n -e 's/^.*src: //p' ${role_reqs_file} | grep openstack-ansible | grep -v openstack-ansible-tests | grep -v openstack-ansible-plugins | grep -v openstack_hosts); do ## Get the latest tag and save that LATEST_TAG=$(git ls-remote --tags $repo | grep "${OSA_MAJOR_VERSION}" | grep -v '{}' | cut -d/ -f 3 | sort --version-sort | tail -n 1) ## Update repos diff --git a/phobos/README.md b/phobos/README.md index ccaabe1..8e78576 100644 --- a/phobos/README.md +++ b/phobos/README.md @@ -125,8 +125,8 @@ From the root of the rpc-ceph repo clone: * Optionally set `rpc_ceph_version` to a specific version of rpc-ceph or a pull request ref you would like to test ```bash -$ pip install -r requirements.txt ansible==2.4.4.0 -$ ansible-playbook -e cluster_deploy_version=example-v01 \ +$ pip install -r requirements.txt ansible==2.5.7.0 +$ ansible-playbook -e cluster_deploy_version=perf-v01 \ -e ssh_keyname=mykey \ -e stor_count=3 \ -e client_count=1 \ diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index 8396a88..b636a49 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -1,6 +1,6 @@ set -e -u -x -export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible==2.4.4.0"} +export ANSIBLE_PACKAGE=${ANSIBLE_PACKAGE:-"ansible==2.5.7.0"} export SSH_DIR=${SSH_DIR:-"/root/.ssh"} export ANSIBLE_ROLE_FILE=${ANSIBLE_ROLE_FILE:-"ansible-role-requirements.yml"} # Set the role fetch mode to any option [git-clone] diff --git a/tests/ansible-role-test-requirements.yml b/tests/ansible-role-test-requirements.yml index b7a3942..3045c21 100644 --- a/tests/ansible-role-test-requirements.yml +++ b/tests/ansible-role-test-requirements.yml @@ -41,8 +41,12 @@ - name: openstack_hosts scm: git src: https://git.openstack.org/openstack/openstack-ansible-openstack_hosts - version: 17.0.4 + version: master - name: memcached_server scm: git src: https://git.openstack.org/openstack/openstack-ansible-memcached_server version: 17.0.4 +- name: ../ceph_plugins + scm: git + src: https://git.openstack.org/openstack/openstack-ansible-plugins + version: master