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 {
30 software-properties-common \
33 update-alternatives --install /usr/bin/python python /usr/bin/python3 1
34 update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
36 add-apt-repository -y ppa:longsleep/golang-backports
38 apt-get install golang-go -y
41 function install_ironic_packages {
46 python3-ironicclient \
47 python3-ironic-inspector-client \
50 python3-openstackclient \
55 if [ "$1" == "offline" ]; then
56 pip install --no-index
57 --find-links=file:$PIP_CACHE_DIR locat yq
67 install_essential_packages
68 install_ironic_packages $1
71 if [ "$#" -eq 0 ]; then
73 elif [ "$1" == "-o" ]; then