Skip to content

Commit

Permalink
Merge pull request #283 from antonym/use_rpc_vars
Browse files Browse the repository at this point in the history
Uses vars from rpc-openstack for upgrades
  • Loading branch information
antonym authored Nov 29, 2018
2 parents 59e0257 + df84bb2 commit 64a6008
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
21 changes: 21 additions & 0 deletions incremental/lib/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,26 @@ function checkout_openstack_ansible {
fi
}

function configure_rpc_openstack {
rsync -av --delete /opt/rpc-openstack/etc/openstack_deploy/group_vars /etc/openstack_deploy/
rm -rf /opt/rpc-ansible
virtualenv /opt/rpc-ansible
install_ansible_source
pushd /opt/rpc-openstack/playbooks
/opt/rpc-ansible/bin/ansible-playbook -i 'localhost,' site-release.yml
popd
}

function install_ansible_source {
DEBIAN_FRONTEND=noninteractive apt-get -y install \
gcc libssl-dev libffi-dev \
python-apt python3-apt \
python-dev python3-dev \
python-minimal python-virtualenv

/opt/rpc-ansible/bin/pip install --isolated "ansible==${RPC_ANSIBLE_VERSION}"
}

function set_keystone_flush_memcache {
if [[ ! -f /etc/openstack_deploy/user_rpco_upgrade.yml ]]; then
echo "---" > /etc/openstack_deploy/user_rpco_upgrade.yml
Expand Down Expand Up @@ -159,6 +179,7 @@ function run_upgrade {
export TERM=linux
export I_REALLY_KNOW_WHAT_I_AM_DOING=true
export SETUP_ARA=true
export ANSIBLE_CALLBACK_PLUGINS=/etc/ansible/roles/plugins/callback:/opt/ansible-runtime/local/lib/python2.7/site-packages/ara/plugins/callbacks
echo "YES" | bash scripts/run-upgrade.sh
popd
}
Expand Down
7 changes: 5 additions & 2 deletions incremental/ubuntu16-upgrade-to-pike.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ set -evu

source lib/functions.sh

export RPC_BRANCH=${RPC_BRANCH:-'r16.2.4'}
#export RPC_BRANCH=${RPC_BRANCH:-'r16.2.6'}
export RPC_BRANCH=${RPC_BRANCH:-'pike'}
export OSA_SHA="stable/pike"
export SKIP_INSTALL=${SKIP_INSTALL:-'no'}
export RPC_PRODUCT_RELEASE="pike"
export RPC_ANSIBLE_VERSION="2.3.2.0"

echo "Starting Ocata to Pike Upgrade..."

checkout_rpc_openstack
checkout_openstack_ansible
configure_rpc_openstack
disable_hardening
set_keystone_flush_memcache
prepare_pike
Expand Down
7 changes: 5 additions & 2 deletions incremental/ubuntu16-upgrade-to-queens.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,17 @@ set -evu

source lib/functions.sh

export RPC_BRANCH=${RPC_BRANCH:-'r17.1.1'}
#export RPC_BRANCH=${RPC_BRANCH:-'r17.1.2'}
export RPC_BRANCH=${RPC_BRANCH:-'queens'}
export OSA_SHA="stable/queens"
export SKIP_INSTALL=${SKIP_INSTALL:-'no'}
export RPC_PRODUCT_RELEASE="queens"
export RPC_ANSIBLE_VERSION="2.4.3.0"

echo "Starting Pike to Queens Upgrade..."

checkout_rpc_openstack
checkout_openstack_ansible
configure_rpc_openstack
set_secrets_file
disable_hardening
prepare_queens
Expand Down
4 changes: 3 additions & 1 deletion incremental/ubuntu16-upgrade-to-rocky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ source lib/functions.sh
export RPC_BRANCH=${RPC_BRANCH:-'rocky'}
export OSA_SHA="stable/rocky"
export SKIP_INSTALL=${SKIP_INSTALL:-'no'}
export RPC_PRODUCT_RELEASE="rocky"
export RPC_ANSIBLE_VERSION="2.5.5"

echo "Starting Queens to Rocky Upgrade..."

checkout_rpc_openstack
checkout_openstack_ansible
configure_rpc_openstack
set_secrets_file
disable_hardening
bootstrap_ansible
Expand Down

0 comments on commit 64a6008

Please sign in to comment.