From 2dbde4ad8e2dfdc89701cae48a1fc77f5489ddda Mon Sep 17 00:00:00 2001 From: Ryan Hallisey Date: Mon, 22 Jun 2015 15:29:54 -0400 Subject: [PATCH] Add option to not run db sync Database syncs should not be required every time a container starts. We can default database startup to true, but give the option to set it to false. Change-Id: Ib76876b2671f6c31f4511412efd3a438ec78f01f Closes-bug: #1467576 --- .../common/designate/designate-central/start.sh | 4 ++-- docker/common/glance/glance-registry/start.sh | 9 ++++++--- docker/common/heat/heat-engine/start.sh | 9 ++++++--- docker/common/keystone/start.sh | 6 +++--- .../nova-controller/nova-conductor/start.sh | 11 +++++++---- docs/integration-guide.md | 8 ++++++-- tools/genenv | 15 +++++++++++++-- 7 files changed, 43 insertions(+), 19 deletions(-) diff --git a/docker/common/designate/designate-central/start.sh b/docker/common/designate/designate-central/start.sh index fef7e23532..44cf89130b 100755 --- a/docker/common/designate/designate-central/start.sh +++ b/docker/common/designate/designate-central/start.sh @@ -5,13 +5,13 @@ set -e . /opt/kolla/config-designate.sh check_required_vars MARIADB_SERVICE_HOST DB_ROOT_PASSWORD DESIGNATE_DB_NAME \ - DESIGNATE_DB_USER DESIGNATE_DB_PASSWORD DESIGNATE_INITDB + DESIGNATE_DB_USER DESIGNATE_DB_PASSWORD INIT_DESIGNATE_DB fail_unless_db CONF=/etc/designate/designate.conf -if [ "${DESIGNATE_INITDB}" == "true" ]; then +if [ "${INIT_DESIGNATE_DB}" == "true" ]; then echo "Configuring database" mysql -h ${MARIADB_SERVICE_HOST} -u root -p"${DB_ROOT_PASSWORD}" mysql < - The IP Address where the Heat API service is hosted HEAT_API_CFN_SERVICE_HOST= - The IP Address where Heat users will contact the heat-engine in search for meta data HEAT_API_CFN_URL_HOST= - The IP Address where Heat virtual machines will contact the heat-engine to signal wait conditions + INIT_CINDER_DB= - Initialize or update the Cinder db + INIT_DESIGNATE_DB= - Initialize or update the Designate db + INIT_GLANCE_DB= - Initialize or update the Glance db + INIT_HEAT_DB= - Initialize or update the Heat db + INIT_KEYSTONE_DB= - Initialize or update the Keystone db + INIT_NOVA_DB= - Initialize or update the Nova db PUBLIC_INTERFACE= - The nova public interface PUBLIC_IP= - The IP Address of this host RABBITMQ_PASS= - The rabbitmq password used to join AMQP @@ -135,7 +141,6 @@ all containers. This allows a simple method of ensuring every type of node DESIGNATE_API_SERVICE_PORT=<9001> - The port of the Designate API DESIGNATE_MDNS_PORT=<5354> - The port of the Designate MiniDNS server acting as master server DESIGNATE_DNS_PORT=<53> - The port of the Designate-backed DNS slaves that are used by the world - DESIGNATE_INITDB= - Configures if the database should be created and initialised DESIGNATE_ALLOW_RECURSION= - Configure a recursive nameserver DESIGNATE_DEFAULT_POOL_NS_RECORD= - Name of server used to generate NS records DESIGNATE_SINK_NOVA_DOMAIN_NAME= - Name of domain used to create records from Nova notifications @@ -162,7 +167,6 @@ all containers. This allows a simple method of ensuring every type of node CINDER_VOLUME_BACKEND_NAME= - The backend name for a given driver implementation CINDER_VOLUME_DRIVER= - The driver used for volume creation CINDER_ENABLED_BACKEND= - A list of backend names to use - INIT_CINDER_DB= - Initialize or update the cinder db [Minimum environment variable setup guide.](https://github.com/stackforge/kolla/blob/master/docs/minimal-environment-vars.md) diff --git a/tools/genenv b/tools/genenv index b1a13fd378..5fdc8a7ba3 100755 --- a/tools/genenv +++ b/tools/genenv @@ -24,9 +24,15 @@ ADMIN_USER_PASSWORD=steakfordinner # Database HOST_IP=$MY_IP +INIT_CINDER_DB=true +INIT_DESIGNATE_DB=true +INIT_GLANCE_DB=true +INIT_HEAT_DB=true +INIT_KEYSTONE_DB=true +INIT_NOVA_DB=true MARIADB_ROOT_PASSWORD=kolla PASSWORD=12345 -INIT_CINDER_DB=true + # Galera DB_CLUSTER_BIND_ADDRESS=0.0.0.0 @@ -155,7 +161,6 @@ DESIGNATE_DNS_PORT=53 DESIGNATE_POOLMAN_POOLID=$(uuidgen) DESIGNATE_POOLMAN_TARGETS=$(uuidgen) DESIGNATE_POOLMAN_NSS=$(uuidgen) -DESIGNATE_INITDB=true DESIGNATE_ALLOW_RECURSION=true DESIGNATE_DEFAULT_POOL_NS_RECORD=ns1.example.org. DESIGNATE_SINK_NOVA_DOMAIN_NAME=nova.example.org. @@ -334,6 +339,12 @@ CINDER_API_LOG_FILE=$CINDER_API_LOG_FILE CINDER_VOLUME_LOG_FILE=$CINDER_VOLUME_LOG_FILE CINDER_BACKUP_LOG_FILE=$CINDER_BACKUP_LOG_FILE CINDER_SCHEDULER_LOG_FILE=$CINDER_SCHEDULER_LOG_FILE +INIT_CINDER_DB=$INIT_CINDER_DB +INIT_DESIGNATE_DB=$INIT_DESIGNATE_DB +INIT_GLANCE_DB=$INIT_GLANCE_DB +INIT_HEAT_DB=$INIT_HEAT_DB +INIT_KEYSTONE_DB=$INIT_KEYSTONE_DB +INIT_NOVA_DB=$INIT_NOVA_DB EOF echo Please customize your FLAT_INTERFACE to a different network then your echo main network. The FLAT_INTERFACE is used for inter-VM communication.