Change image to use python 3

This patch set updates the Dockerfile to use python3 and pip3 instead
for all ubuntu images.

Change-Id: I20a6f1a28b2adadd66d42907bbec977c28f5a044
Signed-off-by: Tin Lam <tlam@omegaprime.dev>
This commit is contained in:
Tin Lam 2019-10-22 11:20:14 -05:00
parent dea69e0529
commit 8d8c3e7158
6 changed files with 32 additions and 31 deletions

View File

@ -14,7 +14,7 @@ RUN set -ex ;\
export DEBIAN_FRONTEND=noninteractive ;\
apt-get update ;\
apt-get dist-upgrade -y ;\
apt-get install -y apt-transport-https ca-certificates ;\
apt-get install --no-install-recommends -y apt-transport-https ca-certificates ;\
apt-key add /etc/apt/ceph-${CEPH_RELEASE}.key ;\
rm -f /etc/apt/ceph-${CEPH_RELEASE}.key ;\
echo deb ${CEPH_REPO} ${DISTRO_CODENAME} main | tee /etc/apt/sources.list.d/ceph.list ;\
@ -26,11 +26,11 @@ RUN set -ex ;\
ceph \
curl \
gcc \
python \
python-dev \
python3 \
python3-dev \
jq ;\
curl -sSL https://bootstrap.pypa.io/get-pip.py | python ;\
pip --no-cache-dir install --upgrade \
curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 ;\
pip3 --no-cache-dir install --upgrade \
crush \
rgwadmin \
six \
@ -42,6 +42,6 @@ RUN set -ex ;\
chmod +x /usr/bin/kubectl ;\
rm -rf ${TMP_DIR} ;\
apt-get purge -y --auto-remove \
python-dev \
python3-dev \
gcc ;\
rm -rf /var/lib/apt/lists/*

View File

@ -47,13 +47,13 @@ RUN set -ex ;\
curl \
gcc \
gdb \
python \
python-dev \
python3 \
python3-dev \
uuid-runtime \
jq \
alien ;\
curl -sSL https://bootstrap.pypa.io/get-pip.py | python ;\
pip --no-cache-dir install --upgrade \
curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 ;\
pip3 --no-cache-dir install --upgrade \
six \
python-openstackclient \
python-swiftclient ;\
@ -73,7 +73,7 @@ RUN set -ex ;\
mkdir -p /etc/confd/templates ;\
rm -rf ${TMP_DIR} ;\
apt-get purge -y --auto-remove \
python-dev \
python3-dev \
gcc ;\
rm -rf /var/lib/apt/lists/* ;\
rm -rf /usr/share/doc/ ;\

View File

@ -5,11 +5,11 @@ RUN set -ex ;\
apt-get update ;\
apt-get upgrade -y ;\
apt-get install -y --no-install-recommends \
python-pip ;\
pip --no-cache-dir install --upgrade pip ;\
python3-pip ;\
pip3 --no-cache-dir install --upgrade pip ;\
hash -r ;\
pip --no-cache-dir install --upgrade setuptools ;\
pip --no-cache-dir install --upgrade \
pip3 --no-cache-dir install --upgrade setuptools ;\
pip3 --no-cache-dir install --upgrade \
configparser \
iso8601 \
kubernetes ;\

View File

@ -116,7 +116,7 @@ RUN set -ex;\
apt-get install -y openvswitch-switch-dpdk ;\
update-alternatives --set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk ;\
fi ;\
apt-get install -y iproute2 tcpdump conntrack ;\
apt-get install -y python python-dev python-pip ;\
pip install ovs netifaces ;\
apt-get install --no-install-recommends -y iproute2 tcpdump conntrack ;\
apt-get install --no-install-recommends -y python3 python3-dev python3-pip python3-setuptools ;\
pip3 --no-cache-dir install ovs netifaces ;\
rm -rf /var/lib/apt/lists/* ;\

View File

@ -13,8 +13,8 @@ RUN set -ex ;\
zypper --non-interactive refresh ;\
zypper --non-interactive up -y ;\
zypper --non-interactive install -y openstack-tempest \
python-cinder-tempest-plugin \
python-heat-tempest-plugin \
python-keystone-tempest-plugin \
python-neutron-tempest-plugin ;\
python3-cinder-tempest-plugin \
python3-heat-tempest-plugin \
python3-keystone-tempest-plugin \
python3-neutron-tempest-plugin ;\
zypper --non-interactive clean -a

View File

@ -6,19 +6,20 @@ RUN set -ex ;\
apt-get upgrade -y ;\
apt-get install netbase -y ;\
apt-get install --no-install-recommends -y \
python-dev \
python3-dev \
build-essential \
python-pip \
python3-pip \
libssl-dev \
git ;\
git clone https://git.openstack.org/openstack/tempest ;\
git clone https://git.openstack.org/openstack/cinder-tempest-plugin ;\
git clone https://git.openstack.org/openstack/heat-tempest-plugin ;\
git clone https://git.openstack.org/openstack/keystone-tempest-plugin ;\
git clone https://git.openstack.org/openstack/neutron-tempest-plugin ;\
pip install -U setuptools ;\
pip install wheel ;\
pip install -e tempest/ \
cinder-tempest-plugin/ \
heat-tempest-plugin/ \
keystone-tempest-plugin/ \
neutron-tempest-plugin/ ;\
pip3 install -U setuptools ;\
pip3 install wheel ;\
pip3 install -e tempest/ \
cinder-tempest-plugin/ \
heat-tempest-plugin/ \
keystone-tempest-plugin/ \
neutron-tempest-plugin/ ;\