treasuremap/tools/openstack
Sergiy Markin c7c95f470e Airskiff updates
This PS provides the following changes:

- updates ssh host key for github upload zuul job;
- updates global manifests to use locally built charts.

Change-Id: I1e60f08a2460ce528bb686f39cbb44888b936211
2023-07-14 16:20:25 +00:00

42 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Utility to execute OpenStack CLI using utility container.
# This is an example, and should be adjusted to ones needs.
#
# Usage: openstack endpoint list
set -e
OS_CLOUD_CFG=${HOME}/.openstack/clouds.yaml
: ${TERM_OPTS:=-it}
: ${OSH_KEYSTONE_URL:='http://keystone.openstack.svc.cluster.local:80/'}
: ${OSH_REGION_NAME:='RegionOne'}
: ${OSH_ADMIN_PASSWD:='password123'}
if [ ! -f $OS_CLOUD_CFG ]; then
echo " => Creating OpenStack client config"
mkdir -p $(dirname $OS_CLOUD_CFG)
tee $OS_CLOUD_CFG << EOF
clouds:
openstack_helm:
region_name: '${OSH_REGION_NAME}'
identity_api_version: 3
auth:
username: 'admin'
password: '${OSH_ADMIN_PASSWD}'
project_name: 'admin'
project_domain_name: 'default'
user_domain_name: 'default'
auth_url: '${OSH_KEYSTONE_URL}'
EOF
fi
exec sudo docker run --rm ${TERM_OPTS} --net host \
-v $(pwd):/target \
-v ${OS_CLOUD_CFG}:/etc/openstack/clouds.yaml:ro \
-e OS_CLOUD=openstack_helm \
quay.io/airshipit/porthole-openstack-utility:latest-ubuntu_focal openstack "$@"