#!/usr/bin/env bash
-set -ex
+set -eux -o pipefail
# shellcheck disable=SC1091
source lib/logging.sh
# shellcheck disable=SC1091
source lib/common.sh
-# sudo apt install -y libselinux-utils
-# if selinuxenabled ; then
-# sudo setenforce permissive
-# sudo sed -i "s/=enforcing/=permissive/g" /etc/selinux/config
-# fi
-
# Update to latest packages first
sudo apt -y update
-# Install EPEL required by some packages
-# if [ ! -f /etc/yum.repos.d/epel.repo ] ; then
-# if grep -q "Red Hat Enterprise Linux" /etc/redhat-release ; then
-# sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/epel-release-7-11.noarch.rpm
-# else
-# sudo yum -y install epel-release --enablerepo=extras
-# fi
-# fi
-
-# Work around a conflict with a newer zeromq from epel
-# if ! grep -q zeromq /etc/yum.repos.d/epel.repo; then
-# sudo sed -i '/enabled=1/a exclude=zeromq*' /etc/yum.repos.d/epel.repo
-# fi
-
# Install required packages
sudo apt -y install \
nmap \
patch \
psmisc \
- python-pip \
+ python3-pip \
wget
-
+sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
+sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
# Install pyenv
fi
fi
-pyenv install -s 2.7.5
-pyenv versions
-pyenv global 2.7.5
# There are some packages which are newer in the tripleo repos
# Setup yarn and nodejs repositories
#curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
-# Add this repository to install podman
-sudo add-apt-repository -y ppa:projectatomic/ppa
# Add this repository to install Golang 1.12
sudo add-apt-repository -y ppa:longsleep/golang-backports
nodejs \
qemu-kvm \
libvirt-bin libvirt-clients libvirt-dev \
- python-ironicclient \
- python-ironic-inspector-client \
golang-go \
- python-lxml \
unzip \
yarn \
genisoimage
-
-if [[ "${CONTAINER_RUNTIME}" == "podman" ]]; then
- sudo apt -y install podman
-else
- sudo apt -y install \
- apt-transport-https \
- ca-certificates \
- gnupg-agent \
- software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository \
- "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) \
- stable"
- sudo apt update
- sudo apt install -y docker-ce docker-ce-cli containerd.io
- sudo systemctl start docker
-fi
-
# Install python packages not included as rpms
sudo pip install \
ansible==2.8.2 \
lolcat \
yq \
- virtualbmc \
+ virtualbmc==1.6.0 \
python-ironicclient \
python-ironic-inspector-client \
lxml \
netaddr \
requests \
setuptools \
- libvirt-python \
+ libvirt-python==5.7.0 \