4 # shellcheck disable=SC1091
6 # shellcheck disable=SC1091
9 # sudo apt install -y libselinux-utils
10 # if selinuxenabled ; then
11 # sudo setenforce permissive
12 # sudo sed -i "s/=enforcing/=permissive/g" /etc/selinux/config
15 # Update to latest packages first
18 # Install EPEL required by some packages
19 # if [ ! -f /etc/yum.repos.d/epel.repo ] ; then
20 # if grep -q "Red Hat Enterprise Linux" /etc/redhat-release ; then
21 # sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/epel-release-7-11.noarch.rpm
23 # sudo yum -y install epel-release --enablerepo=extras
27 # Work around a conflict with a newer zeromq from epel
28 # if ! grep -q zeromq /etc/yum.repos.d/epel.repo; then
29 # sudo sed -i '/enabled=1/a exclude=zeromq*' /etc/yum.repos.d/epel.repo
32 # Install required packages
48 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
49 sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
53 if [[ $(cat ~/.bashrc) != *PYENV_ROOT* ]]; then
54 if ! [ -d "$HOME/.pyenv" ] ; then
55 git clone git://github.com/yyuu/pyenv.git ~/.pyenv
57 # shellcheck disable=SC2016
58 # shellcheck disable=SC2129
59 echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
60 # shellcheck disable=SC2016
61 echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
62 # shellcheck disable=SC2016
63 echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
66 if [[ $PATH != *pyenv* ]]; then
67 export PYENV_ROOT="$HOME/.pyenv"
68 export PATH="$PYENV_ROOT/bin:$PATH"
69 if command -v pyenv 1>/dev/null 2>&1; then
70 eval "$(pyenv init -)"
74 # There are some packages which are newer in the tripleo repos
76 # Setup yarn and nodejs repositories
77 #sudo curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
78 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
79 #curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
80 echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
82 # Add this repository to install podman
83 sudo add-apt-repository -y ppa:projectatomic/ppa
84 # Add this repository to install Golang 1.12
85 sudo add-apt-repository -y ppa:longsleep/golang-backports
87 # Update some packages from new repos
90 # make sure additional requirments are installed
92 ##No bind-utils. It is for host, nslookop,..., no need in ubuntu
98 libvirt-bin libvirt-clients libvirt-dev \
105 if [[ "${CONTAINER_RUNTIME}" == "podman" ]]; then
106 sudo apt -y install podman
108 sudo apt -y install \
109 apt-transport-https \
112 software-properties-common
113 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
114 sudo add-apt-repository \
115 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
119 sudo apt install -y docker-ce docker-ce-cli containerd.io
120 sudo systemctl start docker
123 # Install python packages not included as rpms
129 python-ironicclient \
130 python-ironic-inspector-client \
135 libvirt-python==5.7.0 \