Completely switch to python3 for developers installation
This addresses an issue with using py2 as interpreter while installing required dependencies with py3. Also switch kubeadm-aio image to bionic. Change-Id: I5a9e6678c45fad8288aa6971f57988b46001c665 Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
This commit is contained in:
parent
03273bd61d
commit
2b4cf6a2d9
@ -13,5 +13,5 @@
|
||||
# NOTE(portdirect): for use in the dev-deploy scripts, a valid vars.yaml is
|
||||
# required, so provide some nonsense, yet harmless input.
|
||||
---
|
||||
dummy_value: "Lorem Ipsum"
|
||||
ansible_python_interpreter: python3
|
||||
...
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
---
|
||||
- name: check if pip installed
|
||||
command: pip --version
|
||||
command: pip3 --version
|
||||
register: pip_version_output
|
||||
ignore_errors: yes
|
||||
changed_when: false
|
||||
@ -20,25 +20,25 @@
|
||||
- name: ensuring python pip package is present for ubuntu
|
||||
when: ( pip_version_output is failed ) and ( ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' )
|
||||
apt:
|
||||
name: python-pip
|
||||
name: python3-pip
|
||||
state: present
|
||||
|
||||
- name: ensuring python pip package is present for centos
|
||||
when: ( pip_version_output is failed ) and ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' )
|
||||
block:
|
||||
- name: ensuring epel-release package is present for centos as python-pip is in the epel repo
|
||||
- name: ensuring epel-release package is present for centos as python3-pip is in the epel repo
|
||||
yum:
|
||||
name: epel-release
|
||||
state: present
|
||||
- name: ensuring python pip package is present for centos
|
||||
yum:
|
||||
name: python-pip
|
||||
name: python3-pip
|
||||
state: present
|
||||
|
||||
- name: ensuring python pip package is present for fedora via the python2-pip rpm
|
||||
- name: ensuring python pip package is present for fedora via the python3-pip rpm
|
||||
when: ( pip_version_output is failed ) and ( ansible_distribution == 'Fedora' )
|
||||
dnf:
|
||||
name: python2-pip
|
||||
name: python3-pip
|
||||
state: present
|
||||
|
||||
- name: ensuring pip is the latest version
|
||||
@ -51,4 +51,5 @@
|
||||
pip:
|
||||
name: pip
|
||||
state: latest
|
||||
executable: pip3
|
||||
...
|
||||
|
@ -11,6 +11,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
---
|
||||
- name: ensuring python2 is present on all hosts
|
||||
raw: test -e /usr/bin/python || (sudo apt -y update && sudo apt install -y python-minimal) || (sudo yum install -y python) || (sudo dnf install -y python2)
|
||||
- name: ensuring python3 is present on all hosts
|
||||
raw: test -e /usr/bin/python3 || (sudo apt -y update && sudo apt install -y python3-minimal) || (sudo yum install -y python3) || (sudo dnf install -y python3)
|
||||
...
|
||||
|
@ -31,4 +31,4 @@ ALL_IMAGES="${KUBE_IMAGES} ${CHART_IMAGES}"
|
||||
jq -n -c -M \
|
||||
--arg devclass "$(echo ${ALL_IMAGES})" \
|
||||
'{"bootstrap": {"preload_images": ($devclass|split(" "))}}' | \
|
||||
python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)'
|
||||
python3 -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)'
|
||||
|
@ -10,7 +10,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM docker.io/ubuntu:xenial
|
||||
FROM docker.io/ubuntu:bionic
|
||||
MAINTAINER pete.birley@att.com
|
||||
|
||||
ARG UBUNTU_URL=http://archive.ubuntu.com/ubuntu/
|
||||
|
@ -13,6 +13,7 @@
|
||||
---
|
||||
all:
|
||||
vars:
|
||||
ansible_python_interpreter: python3
|
||||
my_container_name: null
|
||||
user:
|
||||
uid: null
|
||||
|
@ -1,4 +1,4 @@
|
||||
deb %%UBUNTU_URL%% xenial main universe
|
||||
deb %%UBUNTU_URL%% xenial-updates main universe
|
||||
deb %%UBUNTU_URL%% xenial-backports main universe
|
||||
deb %%UBUNTU_URL%% xenial-security main universe
|
||||
deb %%UBUNTU_URL%% bionic main universe
|
||||
deb %%UBUNTU_URL%% bionic-updates main universe
|
||||
deb %%UBUNTU_URL%% bionic-backports main universe
|
||||
deb %%UBUNTU_URL%% bionic-security main universe
|
||||
|
Loading…
Reference in New Issue
Block a user