From 742fd9bf47be553a1fd26fe92d2e65e9645692a4 Mon Sep 17 00:00:00 2001 From: Eliezer Croitoru Date: Sat, 31 Aug 2024 01:39:36 +0300 Subject: [PATCH] Added couple scripts and tested a version of kolla installation --- disable-selinux.sh | 4 ++++ install-aio-openstack.sh | 24 ++++++++++++++---------- install-docker.sh | 21 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 10 deletions(-) create mode 100755 disable-selinux.sh create mode 100755 install-docker.sh diff --git a/disable-selinux.sh b/disable-selinux.sh new file mode 100755 index 0000000..625304b --- /dev/null +++ b/disable-selinux.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +setenforce 0 +sed -i -e "s@^SELINUX=.*@SELINUX=disabled@g" /etc/selinux/config diff --git a/install-aio-openstack.sh b/install-aio-openstack.sh index af26d63..99d1a75 100755 --- a/install-aio-openstack.sh +++ b/install-aio-openstack.sh @@ -24,30 +24,34 @@ if [ -z "${EXTERNAL_INTERFACE}" ];then fi dnf group install -y "Development Tools" -dnf install -y python3.12-devel python3.12 cmake dbus-devel python3.12-pip pkgconfig glib2-devel +dnf install -y git python3-devel libffi-devel gcc openssl-devel python3-libselinux +dnf install -y python-devel python cmake dbus-devel python-pip pkgconfig glib2-devel dbus-tools dbus-daemon -update-alternatives --set python3 /usr/bin/python3.12 +#update-alternatives --set python3 /usr/bin/python #apt install -y build-essential python3-dev python3 #apt install -y libdbus-1-dev cmake libspice-client-glib-2.0-dev #apt install -y python3-venv -python3 -m venv /opt/deploy +python -m venv /opt/deploy source /opt/deploy/bin/activate -pip install -U pip +python -m pip install -U pip #pip install 'ansible>=4,<6' -pip install 'ansible-core>=2.16,<=2.17' +pip install 'ansible-core>=2.16,<2.17.99' +#python -m pip install 'ansible-core>=2.16,<=2.17' #pip install 'ansible>=7,<8' -pip install ansible +python -m pip install ansible #pip install ansible-core #pip install ansible -pip install dbus-python +python -m pip install dbus-python -pip install docker +python -m pip install docker -pip install git+https://opendev.org/openstack/kolla-ansible@master +python -m pip install selinux + +python -m pip install git+https://opendev.org/openstack/kolla-ansible@master mkdir -p /etc/kolla @@ -80,8 +84,8 @@ sed -i -e 's@^\#kolla_base_distro: ".*@kolla_base_distro: "ubuntu"@g' \ /etc/kolla/globals.yml cd /opt && \ - kolla-ansible -i all-in-one prechecks && \ kolla-ansible -i all-in-one bootstrap-servers && \ + kolla-ansible -i all-in-one prechecks && \ kolla-ansible -i all-in-one deploy && kolla-ansible -i all-in-one post-deploy diff --git a/install-docker.sh b/install-docker.sh new file mode 100755 index 0000000..3df8481 --- /dev/null +++ b/install-docker.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +dnf install curl jq -y + +dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + +dnf remove -y runc + +dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin + +DOCKER_COMPOSE_VERSION=$( curl -s 'https://api.github.com/repos/docker/compose/releases' |jq -r .[0].tag_name) + +if [ -f "docker-compose-linux-x86_64.xz" ];then + unxz docker-compose-linux-x86_64.xz + cp -v docker-compose-linux-x86_64 /usr/bin/docker-compose +else + curl -SL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64" -o /usr/bin/docker-compose +fi + +chmod +x /usr/bin/docker-compose +