4 LIBDIR="$(dirname "$PWD")"
6 source $LIBDIR/lib/common.sh
7 source $LIBDIR/lib/logging.sh
9 if [[ $EUID -ne 0 ]]; then
10 echo "This script must be run as root"
14 function install_essential_packages() {
32 function install_ironic_packages() {
38 python-ironic-inspector-client \
41 python-openstackclient \
45 if [ "$1" == "offline" ]; then
46 pip install --no-index
47 --find-links=file:$PIP_CACHE_DIR locat yq
56 function install_docker_packages() {
57 apt-get remove docker \
68 software-properties-common
69 if [ "$1" != "offline" ]; then
70 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
72 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
77 apt-get -y install docker-ce=18.06.0~ce~3-0~ubuntu
80 function install_podman_packages() {
81 if [ "$1" != "offline" ]; then
82 add-apt-repository -y ppa:projectatomic/ppa
85 apt-get -y install podman
88 function install_kubernetes_packages() {
89 if [ "$1" != "offline" ]; then
90 curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
91 bash -c 'cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
92 deb https://apt.kubernetes.io/ kubernetes-xenial main
96 apt-get install -y kubelet=1.15.0-00 kubeadm=1.15.0-00 kubectl=1.15.0-00
97 apt-mark hold kubelet kubeadm kubectl
101 install_essential_packages
102 install_ironic_packages $1
103 install_docker_packages $1
104 install_podman_packages $1
105 install_kubernetes_packages $1
108 if ["$1" == "-o"]; then