From aa2522129829a0f702beb25afd7c941f09c8e6fa Mon Sep 17 00:00:00 2001 From: James Denton Date: Thu, 7 Nov 2019 16:35:50 +0000 Subject: [PATCH] Update MNAIO to use python3 This patch updates the bootstrap script for the MNAIO to use python3 rather than python2.7. This only impacts the deploy node and not deployed VMs. Change-Id: I41b5d746a8f31018e15bd282b7a358d50610eabb --- multi-node-aio/bootstrap.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/multi-node-aio/bootstrap.sh b/multi-node-aio/bootstrap.sh index 1bfe3fd0..aabe325f 100755 --- a/multi-node-aio/bootstrap.sh +++ b/multi-node-aio/bootstrap.sh @@ -39,21 +39,21 @@ case "${ID,,}" in sudo yum install -y python-devel redhat-lsb-core ;; ubuntu|debian) - sudo apt-get update && sudo apt-get install -y python-dev lsb-release + sudo apt-get update && sudo apt-get install -y python3-dev lsb-release ;; *) echo "Unsupported distribution: ${ID,,}" exit 1 esac -# Install pip -if ! which pip &>/dev/null; then +# Install pip3 +if ! which pip3 &>/dev/null; then curl --silent --show-error --retry 5 \ - https://bootstrap.pypa.io/3.2/get-pip.py | sudo python2.7 + https://bootstrap.pypa.io/3.4/get-pip.py | sudo python3 fi # Install bindep and tox -sudo pip install 'bindep>=2.4.0' tox +sudo pip3 install 'bindep>=2.4.0' tox # CentOS 7 requires two additional packages: # redhat-lsb-core - for bindep profile support @@ -65,7 +65,7 @@ if [[ ${ID,,} == "centos" ]]; then sudo yum-config-manager --enable epel || true # openSUSE 42.1 does not have python-ndg-httpsclient elif [[ ${ID,,} == *suse* ]] && [[ ${VERSION} == "42.1" ]]; then - sudo pip install ndg-httpsclient + sudo pip3 install ndg-httpsclient fi # Get a list of packages to install with bindep. If packages need to be @@ -92,7 +92,7 @@ if [[ ${#BINDEP_PKGS} > 0 ]]; then fi # Install latest OSA supported Ansible version -sudo pip install -r https://opendev.org/openstack/openstack-ansible-tests/raw/branch/${OSA_DEPS_BRANCH}/test-ansible-deps.txt +sudo pip3 install -r https://opendev.org/openstack/openstack-ansible-tests/raw/branch/${OSA_DEPS_BRANCH}/test-ansible-deps.txt # Get the latest OSA plugins # This is used to allow access from the MNAIO host to