diff --git a/tools/deployment/common/setup-client.sh b/tools/deployment/common/setup-client.sh index b870d4c6d..2b4ce4245 100755 --- a/tools/deployment/common/setup-client.sh +++ b/tools/deployment/common/setup-client.sh @@ -14,13 +14,6 @@ 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 chown -R $(id -un): /etc/openstack FEATURE_GATE="tls"; if [[ ${FEATURE_GATES//,/ } =~ (^|[[:space:]])${FEATURE_GATE}($|[[:space:]]) ]]; then @@ -54,5 +47,18 @@ else EOF fi -#NOTE: Build helm-toolkit, most charts depend on helm-toolkit -make -C ${HELM_CHART_ROOT_PATH} helm-toolkit +sudo tee /usr/local/bin/openstack << EOF +#!/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 diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 876e3dd7b..6218e2f32 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -311,7 +311,7 @@ - ./tools/deployment/openstack-support/010-ingress.sh - ./tools/deployment/ceph/ceph.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/050-memcached.sh - ./tools/deployment/mariadb-operator-cluster/045-mariadb-operator-cluster.sh