This commit is contained in:
Eliezer Croitoru 2026-05-08 12:40:40 +03:00
parent 3d84ed1a00
commit 5384a90a85
4 changed files with 65 additions and 7 deletions

View File

@ -67,7 +67,14 @@ echo "*************************************************"
#Remove temporary files #Remove temporary files
rm -rf /tmp/* rm -rf /tmp/*
echo "Removed temporary files" echo "Removed temporary files"
#Stop and start docker daemon to prevent this error "failed to register layer" systemctl stop docker
service docker stop
service docker start dnf -y remove docker-ce docker-ce-cli containerd.io docker-compose-plugin
echo "Docker Daemon restarted"
dnf clean all
dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
systemctl enable --now docker

25
install-docker.sh Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env bash
dnf install curl jq -y
dnf install -y kernel-modules-extra-$(uname -r) kernel-modules-extra
dnf remove podman* -y
dnf config-manager --add-repo https://download.docker.com/linux/rhel/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

View File

@ -56,7 +56,7 @@ python3 -m venv "${KOLLA_VENV}"
source "${KOLLA_VENV}/bin/activate" source "${KOLLA_VENV}/bin/activate"
pip install -U pip pip install -U pip
pip install git+https://opendev.org/openstack/kolla-ansible@master pip install git+https://opendev.org/openstack/kolla-ansible@stable/2025.2
# 3. Configuration Setup # 3. Configuration Setup
cp -r ${KOLLA_VENV}/share/kolla-ansible/etc_examples/kolla/* /etc/kolla cp -r ${KOLLA_VENV}/share/kolla-ansible/etc_examples/kolla/* /etc/kolla
@ -70,6 +70,9 @@ kolla-genpwd
# 4. Patch globals.yml # 4. Patch globals.yml
GLOBALS_FILENAME="/etc/kolla/globals.yml" GLOBALS_FILENAME="/etc/kolla/globals.yml"
#openstack_release: "master"
sed -i "s@^#openstack_release:.*@openstack_release: \"2025.2\"@g" "${GLOBALS_FILENAME}"
# Note: Using @ as delimiter to avoid issues with potential paths # Note: Using @ as delimiter to avoid issues with potential paths
sed -i "s@^#kolla_base_distro:.*@kolla_base_distro: \"rocky\"@g" "${GLOBALS_FILENAME}" sed -i "s@^#kolla_base_distro:.*@kolla_base_distro: \"rocky\"@g" "${GLOBALS_FILENAME}"
sed -i "s@^#network_interface:.*@network_interface: \"${FIRST_INTERFACE}\"@g" "${GLOBALS_FILENAME}" sed -i "s@^#network_interface:.*@network_interface: \"${FIRST_INTERFACE}\"@g" "${GLOBALS_FILENAME}"
@ -79,6 +82,10 @@ sed -i "s@^#kolla_internal_vip_address:.*@kolla_internal_vip_address: \"${INTERN
# Enable Keystone/Horizon by default (often needed for a working UI) # Enable Keystone/Horizon by default (often needed for a working UI)
sed -i "s@^#enable_horizon:.*@enable_horizon: \"yes\"@g" "${GLOBALS_FILENAME}" sed -i "s@^#enable_horizon:.*@enable_horizon: \"yes\"@g" "${GLOBALS_FILENAME}"
sed -i "s@^#enable_cinder:.*@enable_cinder: yes@g" "${GLOBALS_FILENAME}" sed -i "s@^#enable_cinder:.*@enable_cinder: yes@g" "${GLOBALS_FILENAME}"
#sed -i "s@^#enable_cinder_backend_nfs:.*@enable_cinder_backend_nfs: true@g" "${GLOBALS_FILENAME}"
sed -i "s@^#enable_cinder_backend_lvm:.*@enable_cinder_backend_lvm: true@g" "${GLOBALS_FILENAME}"
sed -i "s@^#cinder_volume_group:.*@cinder_volume_group: \"cinder-volumes\"@g" "${GLOBALS_FILENAME}"
sed -i "s@^#enable_valkey:.*@enable_valkey: true@g" "${GLOBALS_FILENAME}"
# to allow load balancer # to allow load balancer
sed -i "s@^#enable_octavia:.*@enable_octavia: true@g" "${GLOBALS_FILENAME}" sed -i "s@^#enable_octavia:.*@enable_octavia: true@g" "${GLOBALS_FILENAME}"
@ -92,9 +99,16 @@ EOF
# 5. Deployment # 5. Deployment
kolla-ansible bootstrap-servers -i ./all-in-one kolla-ansible bootstrap-servers -i ./all-in-one
kolla-ansible prechecks -i ./all-in-one
kolla-ansible octavia-certificates -i ./all-in-one kolla-ansible octavia-certificates -i ./all-in-one
kolla-ansible prechecks -i ./all-in-one
# Since 2026.2
#kolla-ansible prechecks -i ./all-in-one --use-test-images
kolla-ansible deploy -i ./all-in-one kolla-ansible deploy -i ./all-in-one
# 6. Post-Install # 6. Post-Install

View File

@ -163,7 +163,7 @@ OL8_LOCAL="http://www.ngtech.home/static/cloud-images/OL8U10_x86_64-kvm-b271.qco
upload_image_if_needed "oracle-linux-8" "${IMAGES_DIR}/OL8U10_x86_64-kvm-b271.qcow" "${OL8_URL}" upload_image_if_needed "oracle-linux-8" "${IMAGES_DIR}/OL8U10_x86_64-kvm-b271.qcow" "${OL8_URL}"
# Oracle Linux 9 # Oracle Linux 9
OL9_URL="https://yum.oracle.com/templates/OracleLinux/OL9/u7/x86_64/OL9U7_x86_64-k vm-b269.qcow2" OL9_URL="https://yum.oracle.com/templates/OracleLinux/OL9/u7/x86_64/OL9U7_x86_64-kvm-b269.qcow2"
OL9_LOCAL="http://www.ngtech.home/static/cloud-images/OL9U7_x86_64-kvm-b269.qcow2" OL9_LOCAL="http://www.ngtech.home/static/cloud-images/OL9U7_x86_64-kvm-b269.qcow2"
[ "$USE_LOCAL" = true ] && curl --fail --silent --head --location "${OL9_LOCAL}" >/dev/null && OL9_URL="${OL9_LOCAL}" [ "$USE_LOCAL" = true ] && curl --fail --silent --head --location "${OL9_LOCAL}" >/dev/null && OL9_URL="${OL9_LOCAL}"
upload_image_if_needed "oracle-linux-9" "${IMAGES_DIR}/OL9U7_x86_64-kvm-b269.qcow2" "${OL9_URL}" upload_image_if_needed "oracle-linux-9" "${IMAGES_DIR}/OL9U7_x86_64-kvm-b269.qcow2" "${OL9_URL}"
@ -217,6 +217,18 @@ UBUNTU_NOBLE_LOCAL="http://www.ngtech.home/static/cloud-images/noble-server-clou
[ "$USE_LOCAL" = true ] && curl --fail --silent --head --location "${UBUNTU_NOBLE_LOCAL}" >/dev/null && UBUNTU_NOBLE_URL="${UBUNTU_NOBLE_LOCAL}" [ "$USE_LOCAL" = true ] && curl --fail --silent --head --location "${UBUNTU_NOBLE_LOCAL}" >/dev/null && UBUNTU_NOBLE_URL="${UBUNTU_NOBLE_LOCAL}"
upload_image_if_needed "ubuntu-noble" "${IMAGES_DIR}/noble-server-cloudimg-amd64.img" "${UBUNTU_NOBLE_URL}" upload_image_if_needed "ubuntu-noble" "${IMAGES_DIR}/noble-server-cloudimg-amd64.img" "${UBUNTU_NOBLE_URL}"
# Ubuntu Resolute (26.04)
UBUNTU_RESOLUTE_URL="https://cloud-images.ubuntu.com/resolute/current/resolute-server-cloudimg-amd64.img"
UBUNTU_RESOLUTE_LOCAL="http://www.ngtech.home/static/cloud-images/resolute-server-cloudimg-amd64.img"
[ "$USE_LOCAL" = true ] && curl --fail --silent --head --location "${UBUNTU_RESOLUTE_LOCAL}" >/dev/null && UBUNTU_RESOLUTE_URL="${UBUNTU_RESOLUTE_LOCAL}"
upload_image_if_needed "ubuntu-resolute" "${IMAGES_DIR}/resolute-server-cloudimg-amd64.img" "${UBUNTU_RESOLUTE_URL}"
# Alpine Linux 3.23.4 Generic
ALPINE_GENERIC_URL="https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/cloud/generic_alpine-3.23.4-x86_64-bios-cloudinit-r0.qcow2"
ALPINE_GENERIC_LOCAL="http://www.ngtech.home/static/cloud-images/generic_alpine-3.23.4-x86_64-bios-cloudinit-r0.qcow2"
[ "$USE_LOCAL" = true ] && curl --fail --silent --head --location "${ALPINE_GENERIC_LOCAL}" >/dev/null && ALPINE_GENERIC_URL="${ALPINE_GENERIC_LOCAL}"
upload_image_if_needed "alpine-generic-3.23.4" "${IMAGES_DIR}/generic_alpine-3.23.4-x86_64-bios-cloudinit-r0.qcow2" "${ALPINE_GENERIC_URL}"
# openEuler 24.03 LTS SP3 - compressed .xz - special handling # openEuler 24.03 LTS SP3 - compressed .xz - special handling
OPENEULER_URL="https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-24.03-LTS-SP3/virtual_machine_img/x86_64/openEuler-24.03-LTS-SP3-x86_64.qcow2.xz" OPENEULER_URL="https://mirrors.tuna.tsinghua.edu.cn/openeuler/openEuler-24.03-LTS-SP3/virtual_machine_img/x86_64/openEuler-24.03-LTS-SP3-x86_64.qcow2.xz"
OPENEULER_LOCAL="http://www.ngtech.home/static/cloud-images/openEuler-24.03-LTS-SP3-x86_64.qcow2.xz" OPENEULER_LOCAL="http://www.ngtech.home/static/cloud-images/openEuler-24.03-LTS-SP3-x86_64.qcow2.xz"