ungleich-tools/openstack/setup-openstack-client.sh
2024-01-06 19:29:52 +01:00

26 lines
833 B
Bash
Executable file

#!/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