Reference Airship manifests, CICD, and reference architecture.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

41 lines
1.0 KiB

#!/bin/bash
# Utility to execute OpenStack CLI using Heat 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 \
docker.io/openstackhelm/heat:ocata openstack "$@"