From e245eb2ff558e2fd77b37b57a56ad4583ef268a5 Mon Sep 17 00:00:00 2001 From: digambar Date: Mon, 27 Jul 2015 12:13:53 +0530 Subject: Implement kolla-compose script Renamed kolla script to kolla-compose Update change in the dev guide also Change-Id: I6cae3d13752ecb4bb3deeb91c5e0f827fde80c2a Implements: blueprint kolla-compose-script --- compose/README.md | 2 +- devenv/README.md | 2 +- docs/dev-quickstart.md | 4 +- tools/kolla | 156 ------------------------------------------------- tools/kolla-compose | 156 +++++++++++++++++++++++++++++++++++++++++++++++++ tox.ini | 2 +- 6 files changed, 161 insertions(+), 161 deletions(-) delete mode 100755 tools/kolla create mode 100755 tools/kolla-compose diff --git a/compose/README.md b/compose/README.md index 4cd0cf63c..6300ff5b9 100644 --- a/compose/README.md +++ b/compose/README.md @@ -7,7 +7,7 @@ installation of openstack. Running the 'tools/genenv' script creates an 'openrc' to allow access to the installation. Once you have run that you can either manually start the containers using the -'docker-compose' command or try the 'tools/kolla start' script which tries to +'docker-compose' command or try the 'tools/kolla-compose start' script which tries to start them all in a reasonable order, waiting at key points for services to become available. Once stood up you can issue the typical openstack commands to use the installation. If using nova networking use: diff --git a/devenv/README.md b/devenv/README.md index 000bbd071..53f0a3417 100644 --- a/devenv/README.md +++ b/devenv/README.md @@ -120,7 +120,7 @@ you can edit for a different setup. Next, run the start script. - $ ./tools/kolla start + $ ./tools/kolla-compose start The `start` script is responsible for starting the containers using `docker-compose -f up -d`. diff --git a/docs/dev-quickstart.md b/docs/dev-quickstart.md index 0f718e22e..6323166b6 100644 --- a/docs/dev-quickstart.md +++ b/docs/dev-quickstart.md @@ -90,11 +90,11 @@ interface name in `compose/openstack.env`: Next, run the start command: - $ sudo ./tools/kolla start + $ sudo ./tools/kolla-compose start Finally, run the status command: - $ sudo ./tools/kolla status + $ sudo ./tools/kolla-compose status This will display information about all Kolla containers. diff --git a/tools/kolla b/tools/kolla deleted file mode 100755 index 4df9ea4db..000000000 --- a/tools/kolla +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/bash -# -# This script can be used to interact with kolla. - -# Move to top level directory -REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')") -cd "$(dirname "$REAL_PATH")/.." - -. tools/validate-docker-execute - -NETWORK_MANAGER=$(grep -sri NETWORK_MANAGER ./compose/openstack.env | cut -f2 -d'=') -if [[ -z "$NETWORK_MANAGER" ]]; then - echo 'No network manager defined in ./compose/openstack.env, defaulting to "neutron".' - NETWORK_MANAGER="neutron" -fi - -function process { - local service=$1 - echo "$ACTION $service" - docker-compose -f ./compose/${service}.yml $COMPOSE_CMD - if [[ $? -ne 0 ]]; then - echo "Call docker-compose -f ./compose/${service}.yml $COMPOSE_CMD fail." - exit 1 - fi -} - -function process_all { - process rabbitmq - process mariadb - process keystone - process glance-api-registry - process nova-api-conductor-scheduler-consoleauth-novncproxy - if [[ "${NETWORK_MANAGER}" == "nova" ]] ; then - process nova-compute-network - else - # Defaulting to neutron - process nova-compute - process neutron-server - process neutron-linuxbridge-agent - process neutron-agents - fi - process heat-api-engine - process magnum-api-conductor - process horizon - process cinder-api-scheduler - process cinder-backup - process cinder-volume - process ceilometer - process gnocchi -} - -function check_selinux { - # Check for SELinux in Enforcing mode and exit if found - if [[ -x /usr/sbin/getenforce ]]; then - if [[ $(/usr/sbin/getenforce) == "Enforcing" ]]; then - echo "You must execute this script without SELinux enforcing mode." - echo "Turn off SELinux enforcing mode by running:" - echo "$ sudo setenforce permissive" - exit 1 - fi - fi -} - -function pre_start { - check_selinux - - if [[ -r ./openrc ]]; then - # Source openrc for commands - source ./openrc - else - echo 'Could not find ./openrc; bootstrap your environment with "./tools/genenv".' - exit 1 - fi -} - -function post_start { - echo -n "Waiting for OpenStack services to become available" - - until [ $(nova service-list 2>&1 | grep -c enabled) -ge 4 ]; do - echo -n . - sleep 2 - done - - until [ $(neutron agent-list 2>&1 | grep -c ':-)') -ge 4 ]; do - echo -n . - sleep 2 - done - echo " done" - - echo Example Usage: - echo source openrc # source keystone credentials - - echo Configure your environment once by running: - echo tools/init-runonce -} - -function usage { - cat <&1 | grep -c enabled) -ge 4 ]; do + echo -n . + sleep 2 + done + + until [ $(neutron agent-list 2>&1 | grep -c ':-)') -ge 4 ]; do + echo -n . + sleep 2 + done + echo " done" + + echo Example Usage: + echo source openrc # source keystone credentials + + echo Configure your environment once by running: + echo tools/init-runonce +} + +function usage { + cat <