7 if [[ $EUID -ne 0 ]]; then
8 echo "This script must be run as root"
12 function install_essential_packages() {
30 function install_ironic_packages() {
36 python-ironic-inspector-client \
39 python-openstackclient \
43 if [ "$1" == "offline" ]; then
44 pip install --no-index
45 --find-links=file:$PIP_CACHE_DIR locat yq
54 function install_docker_packages() {
55 apt-get remove docker \
66 software-properties-common
67 if [ "$1" != "offline" ]; then
68 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
70 "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
75 apt-get -y install docker-ce=18.06.0~ce~3-0~ubuntu
78 function install_podman_packages() {
79 if [ "$1" != "offline" ]; then
80 add-apt-repository -y ppa:projectatomic/ppa
83 apt-get -y install podman
86 function install_kubernetes_packages() {
87 if [ "$1" != "offline" ]; then
88 curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
89 bash -c 'cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
90 deb https://apt.kubernetes.io/ kubernetes-xenial main
94 apt-get install -y kubelet=1.15.0-00 kubeadm=1.15.0-00 kubectl=1.15.0-00
95 apt-mark hold kubelet kubeadm kubectl
99 install_essential_packages
100 install_ironic_packages $1
101 install_docker_packages $1
102 install_podman_packages $1
103 install_kubernetes_packages $1
106 if ["$1" == "-o"]; then