Use Vagrantfile to build virtual site
[icn.git] / deploy / metal3-vm / ubuntu_install_requirements.sh
index fc1974d..c39e1d1 100755 (executable)
@@ -6,29 +6,9 @@ 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 \
@@ -42,10 +22,11 @@ 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
 
@@ -70,9 +51,6 @@ if [[ $PATH != *pyenv* ]]; then
   fi
 fi
 
-pyenv install -s 2.7.18
-pyenv versions
-pyenv global 2.7.18
 # There are some packages which are newer in the tripleo repos
 
 # Setup yarn and nodejs repositories
@@ -81,8 +59,6 @@ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
 #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
 
@@ -98,33 +74,11 @@ sudo apt -y install \
   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 \