diff options
| author | Monty Taylor <mordred@inaugust.com> | 2017-03-30 18:06:53 -0500 |
|---|---|---|
| committer | Michal Arbet <michal.arbet@ultimum.io> | 2022-08-08 12:19:47 +0000 |
| commit | 73a1812c5856be635827b6c6de81b39c22346457 (patch) | |
| tree | fb811cc3b5561edd25a5ba877f12bcd697e6ddaf /tools/init-runonce | |
| parent | 92f8e93bb31ebf95584b745356c47add24870cd7 (diff) | |
| download | kolla-ansible-73a1812c5856be635827b6c6de81b39c22346457.tar.gz kolla-ansible-73a1812c5856be635827b6c6de81b39c22346457.zip | |
Add clouds.yaml file and use it
clouds.yaml[0] is a richer way to express configuration for OpenStack
clouds. It's also fully supported by Ansible's OpenStack modules as
well as python-openstackclient and openstacksdk. It's the future - who
doesn't like the future?
Write a file using both the public (default) and the internal endpoints
for the admin user. Also, change all of the examples to reference it
and to get python-openstackclient to use it too.
[0] https://docs.openstack.org/openstacksdk/latest/user/guides/connect_from_config.html
Implements: blueprint use-clouds-yaml
Change-Id: I557d2e4975c7b3d3c713a556b9ba47af9567ce6e
Diffstat (limited to 'tools/init-runonce')
| -rwxr-xr-x | tools/init-runonce | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/init-runonce b/tools/init-runonce index f8d7b1c17..5a4914025 100755 --- a/tools/init-runonce +++ b/tools/init-runonce @@ -47,12 +47,16 @@ for i in curl openstack; do fi done -# Test for credentials set -if [[ "${OS_USERNAME}" == "" ]]; then - echo "No Keystone credentials specified. Try running source /etc/kolla/admin-openrc.sh command" - exit +# Test for clouds.yaml +if [[ ! -f /etc/openstack/clouds.yaml ]]; then + echo "/etc/openstack/clouds.yaml is missing." + echo " Did your deploy finish successfully?" + exit 1 fi +# Select admin account from clouds.yaml +export OS_CLOUD=kolla-admin + # Test to ensure configure script is run only once if $KOLLA_OPENSTACK_COMMAND image list | grep -q cirros; then echo "This tool should only be run once per deployment." @@ -144,7 +148,7 @@ Done. To deploy a demo instance, run: -openstack server create \\ +openstack --os-cloud=kolla-admin server create \\ --image ${IMAGE_NAME} \\ --flavor m1.tiny \\ --key-name mykey \\ |
