progress on multi-host stack.sh

This commit is contained in:
Anthony Young 2011-09-13 20:07:44 -07:00
parent c6da0833a9
commit a841644e98
3 changed files with 18 additions and 9 deletions

View file

@ -21,7 +21,7 @@ use_syslog = False
# SQLAlchemy connection string for the reference implementation # SQLAlchemy connection string for the reference implementation
# registry server. Any valid SQLAlchemy connection string is fine. # registry server. Any valid SQLAlchemy connection string is fine.
# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
sql_connection = mysql://root:%MYSQL_PASS%@localhost/glance sql_connection = %SQL_CONN%
# Period in seconds after which SQLAlchemy should reestablish its connection # Period in seconds after which SQLAlchemy should reestablish its connection
# to the database. # to the database.

View file

@ -49,7 +49,7 @@ keystone-service-admin-role = KeystoneServiceAdmin
# server. Any valid SQLAlchemy connection string is fine. # server. Any valid SQLAlchemy connection string is fine.
# See: http://bit.ly/ideIpI # See: http://bit.ly/ideIpI
#sql_connection = sqlite:///keystone.db #sql_connection = sqlite:///keystone.db
sql_connection = mysql://root:%MYSQL_PASS%@localhost/keystone sql_connection = %SQL_CONN%
backend_entities = ['UserRoleAssociation', 'Endpoints', 'Role', 'Tenant', backend_entities = ['UserRoleAssociation', 'Endpoints', 'Role', 'Tenant',
'User', 'Credentials', 'EndpointTemplates', 'Token', 'User', 'Credentials', 'EndpointTemplates', 'Token',
'Service'] 'Service']

View file

@ -35,6 +35,8 @@ KEYSTONE_DIR=$DEST/keystone
NOVACLIENT_DIR=$DEST/python-novaclient NOVACLIENT_DIR=$DEST/python-novaclient
API_DIR=$DEST/openstackx API_DIR=$DEST/openstackx
NOVNC_DIR=$DEST/noVNC NOVNC_DIR=$DEST/noVNC
# Specify which services to launch. These generally correspond to screen tabs
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash ENABLED_SERVICES=g-api,g-reg,key,n-api,n-cpu,n-net,n-sch,n-vnc,dash
# Use the first IP unless an explicit is set by ``HOST_IP`` environment variable # Use the first IP unless an explicit is set by ``HOST_IP`` environment variable
@ -47,6 +49,7 @@ INTERFACE=${INTERFACE:-eth0}
FLOATING_RANGE=${FLOATING_RANGE:-10.6.0.0/27} FLOATING_RANGE=${FLOATING_RANGE:-10.6.0.0/27}
FIXED_RANGE=${FIXED_RANGE:-10.0.0.0/24} FIXED_RANGE=${FIXED_RANGE:-10.0.0.0/24}
NET_MAN=${NET_MAN:-VlanManager} NET_MAN=${NET_MAN:-VlanManager}
EC2_DMZ_HOST=${EC2_DMZ_HOST:-$HOST_IP}
# If you are using FlatDHCP on multiple hosts, set the ``FLAT_INTERFACE`` # If you are using FlatDHCP on multiple hosts, set the ``FLAT_INTERFACE``
# variable but make sure that the interface doesn't already have an # variable but make sure that the interface doesn't already have an
@ -56,11 +59,14 @@ NET_MAN=${NET_MAN:-VlanManager}
# Nova hypervisor configuration # Nova hypervisor configuration
LIBVIRT_TYPE=${LIBVIRT_TYPE:-qemu} LIBVIRT_TYPE=${LIBVIRT_TYPE:-qemu}
# Mysql connection info
# TODO: switch to mysql for all services
MYSQL_PASS=${MYSQL_PASS:-nova} MYSQL_PASS=${MYSQL_PASS:-nova}
SQL_CONN=${SQL_CONN:-mysql://root:$MYSQL_PASS@localhost/nova} MYSQL_HOST=${MYSQL_HOST:-localhost}
# TODO: set rabbitmq conn string explicitly as well # don't specify /db in this string, so we can use it for multiple services
BASE_SQL_CONN=${BASE_SQL_CONN:-mysql://root:$MYSQL_PASS@$MYSQL_HOST}
# Rabbit connection info
RABBIT_HOST=${RABBIT_HOST:-localhost}
# Install Packages # Install Packages
# ================ # ================
@ -180,7 +186,7 @@ mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE glance;'
# Copy over our glance-registry.conf # Copy over our glance-registry.conf
GLANCE_CONF=$GLANCE_DIR/etc/glance-registry.conf GLANCE_CONF=$GLANCE_DIR/etc/glance-registry.conf
cp $DIR/files/glance-registry.conf $GLANCE_CONF cp $DIR/files/glance-registry.conf $GLANCE_CONF
sudo sed -e "s,%MYSQL_PASS%,$MYSQL_PASS,g" -i $GLANCE_CONF sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/glance,g" -i $GLANCE_CONF
# Nova # Nova
# ---- # ----
@ -198,13 +204,16 @@ add_nova_flag "--network_manager=nova.network.manager.$NET_MAN"
add_nova_flag "--my_ip=$HOST_IP" add_nova_flag "--my_ip=$HOST_IP"
add_nova_flag "--public_interface=$INTERFACE" add_nova_flag "--public_interface=$INTERFACE"
add_nova_flag "--vlan_interface=$INTERFACE" add_nova_flag "--vlan_interface=$INTERFACE"
add_nova_flag "--sql_connection=$SQL_CONN" add_nova_flag "--sql_connection=$BASE_SQL_CONN/nova"
add_nova_flag "--libvirt_type=$LIBVIRT_TYPE" add_nova_flag "--libvirt_type=$LIBVIRT_TYPE"
add_nova_flag "--osapi_extensions_path=$API_DIR/extensions" add_nova_flag "--osapi_extensions_path=$API_DIR/extensions"
add_nova_flag "--vncproxy_url=http://$HOST_IP:6080" add_nova_flag "--vncproxy_url=http://$HOST_IP:6080"
add_nova_flag "--vncproxy_wwwroot=$NOVNC_DIR/" add_nova_flag "--vncproxy_wwwroot=$NOVNC_DIR/"
add_nova_flag "--api_paste_config=$KEYSTONE_DIR/examples/paste/nova-api-paste.ini" add_nova_flag "--api_paste_config=$KEYSTONE_DIR/examples/paste/nova-api-paste.ini"
add_nova_flag "--image_service=nova.image.glance.GlanceImageService" add_nova_flag "--image_service=nova.image.glance.GlanceImageService"
add_nova_flag "--image_service=nova.image.glance.GlanceImageService"
add_nova_flag "--ec2_dmz_host=$EC2_DMZ_HOST"
add_nova_flag "--rabbit_host=$RABBIT_HOST"
if [ -n "$FLAT_INTERFACE" ]; then if [ -n "$FLAT_INTERFACE" ]; then
add_nova_flag "--flat_interface=$FLAT_INTERFACE" add_nova_flag "--flat_interface=$FLAT_INTERFACE"
fi fi
@ -253,7 +262,7 @@ mysql -uroot -p$MYSQL_PASS -e 'CREATE DATABASE keystone;'
# FIXME (anthony) keystone should use keystone.conf.example # FIXME (anthony) keystone should use keystone.conf.example
KEYSTONE_CONF=$KEYSTONE_DIR/etc/keystone.conf KEYSTONE_CONF=$KEYSTONE_DIR/etc/keystone.conf
cp $DIR/files/keystone.conf $KEYSTONE_CONF cp $DIR/files/keystone.conf $KEYSTONE_CONF
sudo sed -e "s,%MYSQL_PASS%,$MYSQL_PASS,g" -i $KEYSTONE_CONF sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/keystone,g" -i $KEYSTONE_CONF
# initialize keystone with default users/endpoints # initialize keystone with default users/endpoints
BIN_DIR=$KEYSTONE_DIR/bin bash $DIR/files/keystone_data.sh BIN_DIR=$KEYSTONE_DIR/bin bash $DIR/files/keystone_data.sh