ea0f5c7efa
Add Heat-api-cfn for wait conditions Magnum needs wait conditions in order to operate properly. heat-api-cfn is where wait conditions connect. Change-Id: I56742dd96e4607dc0042d0cef4e18c922f9ed736 Implements: blueprint container-heat-api-cfn
196 lines
6.0 KiB
Bash
Executable File
196 lines
6.0 KiB
Bash
Executable File
#!/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.
|
|
|
|
# Move to top level directory
|
|
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
|
cd "$(dirname "$REAL_PATH")/.."
|
|
|
|
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
|
|
|
|
# Admin user password
|
|
ADMIN_USER_PASSWORD=steakfordinner
|
|
|
|
# Database
|
|
HOST_IP=$MY_IP
|
|
MARIADB_ROOT_PASSWORD=kolla
|
|
PASSWORD=12345
|
|
|
|
# Host
|
|
ADMIN_TENANT_NAME=admin
|
|
PUBLIC_IP=$HOST_IP
|
|
|
|
# Logging
|
|
DEBUG_LOGGING=false
|
|
VERBOSE_LOGGING=true
|
|
NOVA_LOG_DIR=
|
|
NEUTRON_LOG_DIR=/var/log/neutron
|
|
NOVA_API_LOG_FILE=
|
|
NOVA_CONDUCTOR_LOG_FILE=
|
|
NOVA_SCHEDULER_LOG_FILE=
|
|
NOVA_COMPUTE_LOG_FILE=
|
|
NEUTRON_SERVER_LOG_FILE=
|
|
NEUTRON_L3_AGENT_LOG_FILE=
|
|
NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE=
|
|
NEUTRON_METADATA_AGENT_LOG_FILE=
|
|
|
|
# RabbitMQ
|
|
RABBITMQ_SERVICE_HOST=$HOST_IP
|
|
RABBIT_USER=guest
|
|
RABBIT_PASSWORD=guest
|
|
|
|
# Networking Options are nova or neutron
|
|
NETWORK_MANAGER=neutron
|
|
|
|
# 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_METADATA_API_SERVICE_HOST=$HOST_IP
|
|
NOVA_EC2_SERVICE_HOST=$HOST_IP
|
|
NOVA_PUBLIC_INTERFACE=$MY_DEV
|
|
NOVA_FLAT_INTERFACE=eth1
|
|
ENABLED_APIS=ec2,osapi_compute,metadata
|
|
METADATA_HOST=$HOST_IP
|
|
|
|
# Neutron
|
|
NEUTRON_DB_NAME=neutron
|
|
NEUTRON_DB_USER=neutron
|
|
NEUTRON_DB_PASSWORD=password
|
|
NEUTRON_KEYSTONE_USER=neutron
|
|
NEUTRON_KEYSTONE_PASSWORD=neutron
|
|
NEUTRON_SERVER_SERVICE_HOST=$HOST_IP
|
|
NEUTRON_API_PASTE_CONFIG=/usr/share/neutron/api-paste.ini
|
|
# Neutron ML2 Plugin
|
|
TYPE_DRIVERS=flat,vxlan
|
|
TENANT_NETWORK_TYPES=flat,vxlan
|
|
MECHANISM_DRIVERS=linuxbridge,l2population
|
|
# Neutron Linux Bridge Agent
|
|
NEUTRON_FLAT_NETWORK_NAME=physnet1
|
|
NEUTRON_FLAT_NETWORK_INTERFACE=eth1
|
|
|
|
# Nova/Neutron
|
|
NEUTRON_SHARED_SECRET=sharedsecret
|
|
|
|
# Heat
|
|
HEAT_DB_NAME=heat
|
|
HEAT_DB_PASSWORD=kolla
|
|
HEAT_KEYSTONE_PASSWORD=heat
|
|
HEAT_API_SERVICE_HOST=$HOST_IP
|
|
HEAT_API_CFN_SERVICE_HOST=$HOST_IP
|
|
HEAT_API_CFN_URL_HOST=$HOST_IP
|
|
|
|
cat > ./openrc <<EOF
|
|
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
|
|
export OS_USERNAME=$ADMIN_TENANT_NAME
|
|
export OS_PASSWORD=$ADMIN_USER_PASSWORD
|
|
export OS_TENANT_NAME=$ADMIN_TENANT_NAME
|
|
EOF
|
|
|
|
cat > ./compose/openstack.env <<EOF
|
|
DEBUG_LOGGING=$DEBUG_LOGGING
|
|
VERBOSE_LOGGING=$VERBOSE_LOGGING
|
|
NOVA_LOG_DIR=$NOVA_LOG_DIR
|
|
NEUTRON_LOG_DIR=$NEUTRON_LOG_DIR
|
|
NOVA_API_LOG_FILE=$NOVA_API_LOG_FILE
|
|
NOVA_CONDUCTOR_LOG_FILE=$NOVA_CONDUCTOR_LOG_FILE
|
|
NOVA_SCHEDULER_LOG_FILE=$NOVA_SCHEDULER_LOG_FILE
|
|
NOVA_COMPUTE_LOG_FILE=$NOVA_COMPUTE_LOG_FILE
|
|
NEUTRON_SERVER_LOG_FILE=$NEUTRON_SERVER_LOG_FILE
|
|
NEUTRON_L3_AGENT_LOG_FILE=$NEUTRON_L3_AGENT_LOG_FILE
|
|
NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE=$NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE
|
|
NEUTRON_METADATA_AGENT_LOG_FILE=$NEUTRON_METADATA_AGENT_LOG_FILE
|
|
TYPE_DRIVERS=$TYPE_DRIVERS
|
|
TENANT_NETWORK_TYPES=$TENANT_NETWORK_TYPES
|
|
MECHANISM_DRIVERS=$MECHANISM_DRIVERS
|
|
ADMIN_USER_PASSWORD=$ADMIN_USER_PASSWORD
|
|
ADMIN_TENANT_NAME=$ADMIN_TENANT_NAME
|
|
DB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD
|
|
FLAT_INTERFACE=$NOVA_FLAT_INTERFACE
|
|
GLANCE_API_SERVICE_HOST=$GLANCE_API_SERVICE_HOST
|
|
GLANCE_DB_NAME=$GLANCE_DB_NAME
|
|
GLANCE_DB_PASSWORD=$GLANCE_DB_PASSWORD
|
|
GLANCE_DB_USER=$GLANCE_DB_USER
|
|
GLANCE_KEYSTONE_PASSWORD=$GLANCE_KEYSTONE_PASSWORD
|
|
GLANCE_KEYSTONE_USER=$GLANCE_KEYSTONE_USER
|
|
GLANCE_REGISTRY_SERVICE_HOST=$GLANCE_REGISTRY_SERVICE_HOST
|
|
KEYSTONE_ADMIN_PASSWORD=$KEYSTONE_ADMIN_PASSWORD
|
|
KEYSTONE_ADMIN_SERVICE_HOST=$KEYSTONE_ADMIN_SERVICE_HOST
|
|
KEYSTONE_ADMIN_SERVICE_PORT=35357
|
|
KEYSTONE_ADMIN_TOKEN=$KEYSTONE_ADMIN_TOKEN
|
|
KEYSTONE_AUTH_PROTOCOL=$KEYSTONE_AUTH_PROTOCOL
|
|
KEYSTONE_DB_PASSWORD=$KEYSTONE_DB_PASSWORD
|
|
KEYSTONE_PUBLIC_SERVICE_HOST=$KEYSTONE_PUBLIC_SERVICE_HOST
|
|
MARIADB_SERVICE_HOST=$HOST_IP
|
|
MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD
|
|
NETWORK_MANAGER=$NETWORK_MANAGER
|
|
NOVA_API_SERVICE_HOST=$NOVA_API_SERVICE_HOST
|
|
NOVA_METADATA_API_SERVICE_HOST=$NOVA_METADATA_API_SERVICE_HOST
|
|
ENABLED_APIS=$ENABLED_APIS
|
|
METADATA_HOST=$METADATA_HOST
|
|
NOVA_DB_NAME=$NOVA_DB_NAME
|
|
NOVA_DB_PASSWORD=$NOVA_DB_PASSWORD
|
|
NOVA_DB_USER=$NOVA_DB_USER
|
|
NOVA_EC2_API_SERVICE_HOST=$NOVA_EC2_SERVICE_HOST
|
|
NOVA_EC2_SERVICE_HOST=$NOVA_EC2_SERVICE_HOST
|
|
NOVA_KEYSTONE_PASSWORD=$NOVA_KEYSTONE_PASSWORD
|
|
NOVA_KEYSTONE_USER=$NOVA_KEYSTONE_USER
|
|
NEUTRON_SHARED_SECRET=$NEUTRON_SHARED_SECRET
|
|
NEUTRON_DB_NAME=$NEUTRON_DB_NAME
|
|
NEUTRON_DB_USER=$NEUTRON_DB_USER
|
|
NEUTRON_DB_PASSWORD=$NEUTRON_DB_PASSWORD
|
|
NEUTRON_KEYSTONE_USER=$NEUTRON_KEYSTONE_USER
|
|
NEUTRON_KEYSTONE_PASSWORD=$NEUTRON_KEYSTONE_PASSWORD
|
|
NEUTRON_SERVER_SERVICE_HOST=$NEUTRON_SERVER_SERVICE_HOST
|
|
NEUTRON_API_PASTE_CONFIG=$NEUTRON_API_PASTE_CONFIG
|
|
NEUTRON_FLAT_NETWORK_NAME=$NEUTRON_FLAT_NETWORK_NAME
|
|
NEUTRON_FLAT_NETWORK_INTERFACE=$NEUTRON_FLAT_NETWORK_INTERFACE
|
|
HEAT_DB_NAME=$HEAT_DB_NAME
|
|
HEAT_DB_PASSWORD=$HEAT_DB_PASSWORD
|
|
HEAT_KEYSTONE_PASSWORD=$HEAT_KEYSTONE_PASSWORD
|
|
HEAT_API_SERVICE_HOST=$HEAT_API_SERVICE_HOST
|
|
PUBLIC_INTERFACE=$NOVA_PUBLIC_INTERFACE
|
|
PUBLIC_IP=$HOST_IP
|
|
PUBLIC_IP=$PUBLIC_IP
|
|
RABBITMQ_PASS=$RABBIT_PASSWORD
|
|
RABBITMQ_SERVICE_HOST=$RABBITMQ_SERVICE_HOST
|
|
RABBITMQ_USER=$RABBIT_USER
|
|
RABBIT_PASSWORD=$RABBIT_PASSWORD
|
|
RABBIT_USERID=$RABBIT_USER
|
|
HEAT_API_CFN_SERVICE_HOST=$HEAT_API_CFN_SERVICE_HOST
|
|
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.
|
|
echo the FLAT_INTERFACE should not have an IP address assigned.
|