From 888bb9cc8c68bf61fddc0ca08a69f764a4012121 Mon Sep 17 00:00:00 2001 From: Martin André Date: Fri, 20 Mar 2015 10:31:02 +0900 Subject: Move genenv.sh and start.sh to tools directory Rename them `genenv` and `start`. Have `genenv` create the openrc file in the top-level directory. Add openrc and compose/openstack.env to gitignore, as well as *.img. Change-Id: I5d8006e97efd77cf364215f55d5e585139ae273e --- compose/README.md | 4 +-- compose/genenv.sh | 106 ------------------------------------------------------ compose/start.sh | 75 -------------------------------------- 3 files changed, 2 insertions(+), 183 deletions(-) delete mode 100755 compose/genenv.sh delete mode 100755 compose/start.sh (limited to 'compose') diff --git a/compose/README.md b/compose/README.md index ba0ce74e5..a513f78a0 100644 --- a/compose/README.md +++ b/compose/README.md @@ -2,12 +2,12 @@ Docker compose ============== These scripts and docker compose files can be used to stand up a simple -installation of openstack. Running the 'genenv.sh' script creates an +installation of openstack. Running the 'tools/genenv' script creates an 'openstack.env' suitable for running on a single host system as well as 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 'start.sh' script which tries to start them +'docker-compose' command or try the 'tools/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: diff --git a/compose/genenv.sh b/compose/genenv.sh deleted file mode 100755 index dc1e52f80..000000000 --- a/compose/genenv.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -# -# This script generates a minimal set of environment variables to allow -# the openstack containers to operate. It is creating a configuration -# suitable for an all-in-one installation of openstack. -# -# It also creates a suitable 'openrc' for use with the installed system. - -MY_IP=$(ip route get $(ip route | awk '$1 == "default" {print $3}') | - awk '$4 == "src" {print $5}') - -MY_DEV=$(ip route get $(ip route | awk '$1 == "default" {print $3}') | - awk '$4 == "src" {print $3}') - -echo MY_IP=$MY_IP -echo MY_DEV=$MY_DEV - -# Database -HOST_IP=$MY_IP -MYSQL_ROOT_PASSWORD=kolla -PASSWORD=12345 - -# Host -ADMIN_TENANT_NAME=admin -PUBLIC_IP=$HOST_IP - -# RabbitMQ -RABBITMQ_SERVICE_HOST=$HOST_IP -RABBIT_USER=guest -RABBIT_PASSWORD=guest - -# Keystone -KEYSTONE_ADMIN_TOKEN=$PASSWORD -KEYSTONE_DB_PASSWORD=kolla -KEYSTONE_ADMIN_PASSWORD=$PASSWORD -KEYSTONE_PUBLIC_SERVICE_HOST=$HOST_IP -KEYSTONE_ADMIN_SERVICE_HOST=$HOST_IP -KEYSTONE_AUTH_PROTOCOL=http - -# Glance -GLANCE_DB_NAME=glance -GLANCE_DB_USER=glance -GLANCE_DB_PASSWORD=kolla -GLANCE_KEYSTONE_USER=glance -GLANCE_KEYSTONE_PASSWORD=glance -GLANCE_API_SERVICE_HOST=$HOST_IP -GLANCE_REGISTRY_SERVICE_HOST=$HOST_IP - -# Nova -NOVA_DB_PASSWORD=nova -NOVA_DB_NAME=nova -NOVA_DB_USER=nova -NOVA_KEYSTONE_USER=nova -NOVA_KEYSTONE_PASSWORD=nova -NOVA_API_SERVICE_HOST=$HOST_IP -NOVA_EC2_SERVICE_HOST=$HOST_IP -NOVA_PUBLIC_INTERFACE=$MY_DEV -NOVA_FLAT_INTERFACE=$MY_DEV -CONFIG_NETWORK=True - -cat > openrc < openstack.env <&2 - exit 1 -fi - -# Set SELinux to permissive -setenforce permissive - -# This directory is shared with the host to allow qemu instance -# configs to remain accross restarts. This is needed in the event libvirt -# is not installed in the system. -mkdir -p /etc/libvirt/qemu - -# This should probably go into nova-networking or nova-compute containers. -# but you can't modprobe from a container for some reason -modprobe ebtables - -MY_IP=$(ip route get $(ip route | awk '$1 == "default" {print $3}') | - awk '$4 == "src" {print $5}') - -# Source openrc for commands -source openrc - -echo Starting rabbitmq. -docker-compose -f rabbitmq.yml up -d - -echo Starting mariadb. -docker-compose -f mariadb.yml up -d - -echo Starting keystone. -docker-compose -f keystone.yml up -d - -echo Starting glance. -docker-compose -f glance-api-registry.yml up -d - -echo Starting nova. -docker-compose -f nova-api-conductor-scheduler.yml up -d - -echo Starting nova compute with nova networking. -docker-compose -f nova-compute-network.yml up -d - -IMAGE_URL=http://download.cirros-cloud.net/0.3.3/ -IMAGE=cirros-0.3.3-x86_64-disk.img -if ! [ -f "$IMAGE" ]; then - curl -o $IMAGE $IMAGE_URL/$IMAGE -fi - -until keystone user-list | grep glance -do - echo "Waiting for OpenStack services to become available" - sleep 2 -done - -sleep 3 - -echo Creating glance image. -glance image-create --name cirros --is-public false --disk-format qcow2 --container-format bare --file $IMAGE - -echo Example usage: -echo -echo nova secgroup-add-rule default tcp 22 22 0.0.0.0/0 -echo nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0 -echo nova network-create vmnet --fixed-range-v4=10.0.0.0/24 --bridge=br100 --multi-host=T -echo -echo nova keypair-add mykey > mykey.pem -echo chmod 600 mykey.pem -echo nova boot --flavor m1.medium --key_name mykey --image cirros kolla_vm -- cgit v1.2.3