treasuremap/tools/openstack
Kaspars Skels a292a70695 Enable https for airship-seaworthy ingress endpoints
Change-Id: I0e04e896e537facc4a992c9efc8d7f12c6c14352
2018-10-12 08:07:12 -05:00

39 lines
900 B
Bash
Executable File

#!/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}
if [ ! -f $OS_CLOUD_CFG ]; then
echo " => Creating OpenStack client config"
mkdir -p ~/.openstack
tee $OS_CLOUD_CFG << EOF
clouds:
openstack_helm:
region_name: 'airship-seaworthy'
identity_api_version: 3
auth:
username: 'admin'
password: 'password123'
project_name: 'admin'
project_domain_name: 'default'
user_domain_name: 'default'
auth_url: 'https://identity.atlantafoundry.com/v3'
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 "$@"