Use containerized Openstack client

Change-Id: I17c841b74bf92fc3ac375404b27fa2562603604f
This commit is contained in:
Vladimir Kozhukalov 2024-01-31 13:42:43 -06:00
parent f641f34b00
commit 03225aad49
2 changed files with 16 additions and 10 deletions

View File

@ -14,13 +14,6 @@
set -xe set -xe
sudo -H -E pip3 install --upgrade pip
sudo -H -E pip3 install \
-c${UPPER_CONSTRAINTS_FILE:=https://releases.openstack.org/constraints/upper/${OPENSTACK_RELEASE:-xena}} \
cmd2 python-openstackclient python-heatclient --ignore-installed
export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${OSH_INFRA_PATH:="../openstack-helm-infra"}"}"
sudo -H mkdir -p /etc/openstack sudo -H mkdir -p /etc/openstack
sudo -H chown -R $(id -un): /etc/openstack sudo -H chown -R $(id -un): /etc/openstack
FEATURE_GATE="tls"; if [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])${FEATURE_GATE}($|[[:space:]]) ]]; then FEATURE_GATE="tls"; if [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])${FEATURE_GATE}($|[[:space:]]) ]]; then
@ -54,5 +47,18 @@ else
EOF EOF
fi fi
#NOTE: Build helm-toolkit, most charts depend on helm-toolkit sudo tee /usr/local/bin/openstack << EOF
make -C ${HELM_CHART_ROOT_PATH} helm-toolkit #!/bin/bash
args=("\$@")
sudo docker run \\
--rm \\
--network host \\
-w / \\
-v /etc/openstack/clouds.yaml:/etc/openstack/clouds.yaml \\
-v /etc/openstack-helm:/etc/openstack-helm \\
-e OS_CLOUD=\${OS_CLOUD} \\
\${OPENSTACK_CLIENT_CONTAINER_EXTRA_ARGS} \\
docker.io/openstackhelm/openstack-client:\${OPENSTACK_RELEASE:-2023.2} openstack "\${args[@]}"
EOF
sudo chmod +x /usr/local/bin/openstack

View File

@ -311,7 +311,7 @@
- ./tools/deployment/openstack-support/010-ingress.sh - ./tools/deployment/openstack-support/010-ingress.sh
- ./tools/deployment/ceph/ceph.sh - ./tools/deployment/ceph/ceph.sh
- ./tools/deployment/openstack-support/025-ceph-ns-activate.sh - ./tools/deployment/openstack-support/025-ceph-ns-activate.sh
- ./tools/deployment/mariadb-operator-cluster/012-setup-client.sh - ./tools/deployment/common/setup-client.sh
- ./tools/deployment/mariadb-operator-cluster/040-rabbitmq.sh - ./tools/deployment/mariadb-operator-cluster/040-rabbitmq.sh
- ./tools/deployment/mariadb-operator-cluster/050-memcached.sh - ./tools/deployment/mariadb-operator-cluster/050-memcached.sh
- ./tools/deployment/mariadb-operator-cluster/045-mariadb-operator-cluster.sh - ./tools/deployment/mariadb-operator-cluster/045-mariadb-operator-cluster.sh