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
This commit is contained in:
parent
c5fdec1069
commit
aa25221298
@ -39,21 +39,21 @@ case "${ID,,}" in
|
|||||||
sudo yum install -y python-devel redhat-lsb-core
|
sudo yum install -y python-devel redhat-lsb-core
|
||||||
;;
|
;;
|
||||||
ubuntu|debian)
|
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,,}"
|
echo "Unsupported distribution: ${ID,,}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Install pip
|
# Install pip3
|
||||||
if ! which pip &>/dev/null; then
|
if ! which pip3 &>/dev/null; then
|
||||||
curl --silent --show-error --retry 5 \
|
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
|
fi
|
||||||
|
|
||||||
# Install bindep and tox
|
# 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:
|
# CentOS 7 requires two additional packages:
|
||||||
# redhat-lsb-core - for bindep profile support
|
# redhat-lsb-core - for bindep profile support
|
||||||
@ -65,7 +65,7 @@ if [[ ${ID,,} == "centos" ]]; then
|
|||||||
sudo yum-config-manager --enable epel || true
|
sudo yum-config-manager --enable epel || true
|
||||||
# openSUSE 42.1 does not have python-ndg-httpsclient
|
# openSUSE 42.1 does not have python-ndg-httpsclient
|
||||||
elif [[ ${ID,,} == *suse* ]] && [[ ${VERSION} == "42.1" ]]; then
|
elif [[ ${ID,,} == *suse* ]] && [[ ${VERSION} == "42.1" ]]; then
|
||||||
sudo pip install ndg-httpsclient
|
sudo pip3 install ndg-httpsclient
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get a list of packages to install with bindep. If packages need to be
|
# Get a list of packages to install with bindep. If packages need to be
|
||||||
@ -92,7 +92,7 @@ if [[ ${#BINDEP_PKGS} > 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install latest OSA supported Ansible version
|
# 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
|
# Get the latest OSA plugins
|
||||||
# This is used to allow access from the MNAIO host to
|
# This is used to allow access from the MNAIO host to
|
||||||
|
Loading…
Reference in New Issue
Block a user