From 73a1812c5856be635827b6c6de81b39c22346457 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 30 Mar 2017 18:06:53 -0500 Subject: 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 --- tools/init-runonce | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tools/init-runonce') 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 \\ -- cgit v1.2.3