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
|
# NOTE(portdirect): for use in the dev-deploy scripts, a valid vars.yaml is
|
||||||
# required, so provide some nonsense, yet harmless input.
|
# 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
|
- name: check if pip installed
|
||||||
command: pip --version
|
command: pip3 --version
|
||||||
register: pip_version_output
|
register: pip_version_output
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
changed_when: false
|
changed_when: false
|
||||||
@ -20,25 +20,25 @@
|
|||||||
- name: ensuring python pip package is present for ubuntu
|
- name: ensuring python pip package is present for ubuntu
|
||||||
when: ( pip_version_output is failed ) and ( ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' )
|
when: ( pip_version_output is failed ) and ( ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' )
|
||||||
apt:
|
apt:
|
||||||
name: python-pip
|
name: python3-pip
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: ensuring python pip package is present for centos
|
- 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' )
|
when: ( pip_version_output is failed ) and ( ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' )
|
||||||
block:
|
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:
|
yum:
|
||||||
name: epel-release
|
name: epel-release
|
||||||
state: present
|
state: present
|
||||||
- name: ensuring python pip package is present for centos
|
- name: ensuring python pip package is present for centos
|
||||||
yum:
|
yum:
|
||||||
name: python-pip
|
name: python3-pip
|
||||||
state: present
|
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' )
|
when: ( pip_version_output is failed ) and ( ansible_distribution == 'Fedora' )
|
||||||
dnf:
|
dnf:
|
||||||
name: python2-pip
|
name: python3-pip
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: ensuring pip is the latest version
|
- name: ensuring pip is the latest version
|
||||||
@ -51,4 +51,5 @@
|
|||||||
pip:
|
pip:
|
||||||
name: pip
|
name: pip
|
||||||
state: latest
|
state: latest
|
||||||
|
executable: pip3
|
||||||
...
|
...
|
||||||
|
@ -11,6 +11,6 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
---
|
---
|
||||||
- name: ensuring python2 is present on all hosts
|
- name: ensuring python3 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)
|
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 \
|
jq -n -c -M \
|
||||||
--arg devclass "$(echo ${ALL_IMAGES})" \
|
--arg devclass "$(echo ${ALL_IMAGES})" \
|
||||||
'{"bootstrap": {"preload_images": ($devclass|split(" "))}}' | \
|
'{"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
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
FROM docker.io/ubuntu:xenial
|
FROM docker.io/ubuntu:bionic
|
||||||
MAINTAINER pete.birley@att.com
|
MAINTAINER pete.birley@att.com
|
||||||
|
|
||||||
ARG UBUNTU_URL=http://archive.ubuntu.com/ubuntu/
|
ARG UBUNTU_URL=http://archive.ubuntu.com/ubuntu/
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
---
|
---
|
||||||
all:
|
all:
|
||||||
vars:
|
vars:
|
||||||
|
ansible_python_interpreter: python3
|
||||||
my_container_name: null
|
my_container_name: null
|
||||||
user:
|
user:
|
||||||
uid: null
|
uid: null
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
deb %%UBUNTU_URL%% xenial main universe
|
deb %%UBUNTU_URL%% bionic main universe
|
||||||
deb %%UBUNTU_URL%% xenial-updates main universe
|
deb %%UBUNTU_URL%% bionic-updates main universe
|
||||||
deb %%UBUNTU_URL%% xenial-backports main universe
|
deb %%UBUNTU_URL%% bionic-backports main universe
|
||||||
deb %%UBUNTU_URL%% xenial-security main universe
|
deb %%UBUNTU_URL%% bionic-security main universe
|
||||||
|
Loading…
x
Reference in New Issue
Block a user