ungleich-tools/openstack/setup-openstack-client.sh

27 lines
833 B
Bash
Raw Normal View History

2024-01-06 16:25:46 +00:00
#!/bin/sh
mkdir -p ~/osh
python3 -m venv ~/osh/venv
. ~/osh/venv/bin/activate
UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/${OPENSTACK_RELEASE:-xena}} pip install cmd2 python-openstackclient python-heatclient --ignore-installed
# Create /etc/openstack for me
sudo -H mkdir -p /etc/openstack
sudo -H chown -R $(id -un): /etc/openstack
# create config - probably need to fix auth_url
tee /etc/openstack/clouds.yaml << EOF
clouds:
openstack_helm:
region_name: RegionOne
identity_api_version: 3
cacert: /etc/openstack-helm/certs/ca/ca.pem
auth:
username: 'admin'
password: 'password'
project_name: 'admin'
project_domain_name: 'default'
user_domain_name: 'default'
auth_url: 'https://keystone.openstack.svc.cluster.local/v3'
EOF