Merge "heat had it's api split into two binaries (cfn & cloudwatch)"

This commit is contained in:
Jenkins 2012-09-13 14:45:38 +00:00 committed by Gerrit Code Review
commit c36d1926ff
3 changed files with 68 additions and 44 deletions

View File

@ -171,10 +171,10 @@ if [[ "$ENABLED_SERVICES" =~ "heat" ]]; then
--description="Heat Service") --description="Heat Service")
keystone endpoint-create \ keystone endpoint-create \
--region RegionOne \ --region RegionOne \
--service_id $HEAT_SERVICE \ --service_id $HEAT_CFN_SERVICE \
--publicurl "http://$SERVICE_HOST:$HEAT_API_PORT/v1" \ --publicurl "http://$SERVICE_HOST:$HEAT_API_CFN_PORT/v1" \
--adminurl "http://$SERVICE_HOST:$HEAT_API_PORT/v1" \ --adminurl "http://$SERVICE_HOST:$HEAT_API_CFN_PORT/v1" \
--internalurl "http://$SERVICE_HOST:$HEAT_API_PORT/v1" --internalurl "http://$SERVICE_HOST:$HEAT_API_CFN_PORT/v1"
fi fi
fi fi

102
lib/heat
View File

@ -1,7 +1,7 @@
# lib/heat # lib/heat
# Install and start Heat service # Install and start Heat service
# To enable, add the following to localrc # To enable, add the following to localrc
# ENABLED_SERVICES+=,heat,h-api,h-eng,h-meta # ENABLED_SERVICES+=,heat,h-api-cfn,h-api-cw,h-eng,h-meta
# Dependencies: # Dependencies:
# - functions # - functions
@ -43,43 +43,47 @@ function configure_heat() {
fi fi
sudo chown `whoami` $HEAT_CONF_DIR sudo chown `whoami` $HEAT_CONF_DIR
HEAT_API_HOST=${HEAT_API_HOST:-$SERVICE_HOST} HEAT_API_CFN_HOST=${HEAT_API_CFN_HOST:-$SERVICE_HOST}
HEAT_API_PORT=${HEAT_API_PORT:-8000} HEAT_API_CFN_PORT=${HEAT_API_CFN_PORT:-8000}
HEAT_ENGINE_HOST=${HEAT_ENGINE_HOST:-$SERVICE_HOST} HEAT_ENGINE_HOST=${HEAT_ENGINE_HOST:-$SERVICE_HOST}
HEAT_ENGINE_PORT=${HEAT_ENGINE_PORT:-8001} HEAT_ENGINE_PORT=${HEAT_ENGINE_PORT:-8001}
HEAT_METADATA_HOST=${HEAT_METADATA_HOST:-$SERVICE_HOST} HEAT_METADATA_HOST=${HEAT_METADATA_HOST:-$SERVICE_HOST}
HEAT_METADATA_PORT=${HEAT_METADATA_PORT:-8002} HEAT_METADATA_PORT=${HEAT_METADATA_PORT:-8002}
HEAT_API_CW_HOST=${HEAT_API_CW_HOST:-$SERVICE_HOST}
HEAT_API_CW_PORT=${HEAT_API_CW_PORT:-8003}
HEAT_API_CONF=$HEAT_CONF_DIR/heat-api.conf # cloudformation api
cp $HEAT_DIR/etc/heat-api.conf $HEAT_API_CONF HEAT_API_CFN_CONF=$HEAT_CONF_DIR/heat-api-cfn.conf
iniset $HEAT_API_CONF DEFAULT debug True cp $HEAT_DIR/etc/heat/heat-api-cfn.conf $HEAT_API_CFN_CONF
inicomment $HEAT_API_CONF DEFAULT log_file iniset $HEAT_API_CFN_CONF DEFAULT debug True
iniset $HEAT_API_CONF DEFAULT use_syslog $SYSLOG inicomment $HEAT_API_CFN_CONF DEFAULT log_file
iniset $HEAT_API_CONF DEFAULT bind_host $HEAT_API_HOST iniset $HEAT_API_CFN_CONF DEFAULT use_syslog $SYSLOG
iniset $HEAT_API_CONF DEFAULT bind_port $HEAT_API_PORT iniset $HEAT_API_CFN_CONF DEFAULT bind_host $HEAT_API_CFN_HOST
iniset $HEAT_API_CFN_CONF DEFAULT bind_port $HEAT_API_CFN_PORT
if is_service_enabled rabbit; then if is_service_enabled rabbit; then
iniset $HEAT_API_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_kombu iniset $HEAT_API_CFN_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_kombu
iniset $HEAT_API_CONF DEFAULT rabbit_password $RABBIT_PASSWORD iniset $HEAT_API_CFN_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $HEAT_API_CONF DEFAULT rabbit_host $RABBIT_HOST iniset $HEAT_API_CFN_CONF DEFAULT rabbit_host $RABBIT_HOST
elif is_service_enabled qpid; then elif is_service_enabled qpid; then
iniset $HEAT_API_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_qpid iniset $HEAT_API_CFN_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_qpid
fi fi
HEAT_API_PASTE_INI=$HEAT_CONF_DIR/heat-api-paste.ini HEAT_API_CFN_PASTE_INI=$HEAT_CONF_DIR/heat-api-cfn-paste.ini
cp $HEAT_DIR/etc/heat-api-paste.ini $HEAT_API_PASTE_INI cp $HEAT_DIR/etc/heat/heat-api-cfn-paste.ini $HEAT_API_CFN_PASTE_INI
iniset $HEAT_API_PASTE_INI filter:authtoken auth_host $KEYSTONE_AUTH_HOST iniset $HEAT_API_CFN_PASTE_INI filter:authtoken auth_host $KEYSTONE_AUTH_HOST
iniset $HEAT_API_PASTE_INI filter:authtoken auth_port $KEYSTONE_AUTH_PORT iniset $HEAT_API_CFN_PASTE_INI filter:authtoken auth_port $KEYSTONE_AUTH_PORT
iniset $HEAT_API_PASTE_INI filter:authtoken auth_protocol $KEYSTONE_AUTH_PROTOCOL iniset $HEAT_API_CFN_PASTE_INI filter:authtoken auth_protocol $KEYSTONE_AUTH_PROTOCOL
iniset $HEAT_API_PASTE_INI filter:authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0 iniset $HEAT_API_CFN_PASTE_INI filter:authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0
iniset $HEAT_API_PASTE_INI filter:authtoken admin_tenant_name $SERVICE_TENANT_NAME iniset $HEAT_API_CFN_PASTE_INI filter:authtoken admin_tenant_name $SERVICE_TENANT_NAME
iniset $HEAT_API_PASTE_INI filter:authtoken admin_user heat iniset $HEAT_API_CFN_PASTE_INI filter:authtoken admin_user heat
iniset $HEAT_API_PASTE_INI filter:authtoken admin_password $SERVICE_PASSWORD iniset $HEAT_API_CFN_PASTE_INI filter:authtoken admin_password $SERVICE_PASSWORD
iniset $HEAT_API_PASTE_INI filter:ec2authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0 iniset $HEAT_API_CFN_PASTE_INI filter:ec2authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0
iniset $HEAT_API_PASTE_INI filter:ec2authtoken keystone_ec2_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ec2tokens iniset $HEAT_API_CFN_PASTE_INI filter:ec2authtoken keystone_ec2_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ec2tokens
# engine
HEAT_ENGINE_CONF=$HEAT_CONF_DIR/heat-engine.conf HEAT_ENGINE_CONF=$HEAT_CONF_DIR/heat-engine.conf
cp $HEAT_DIR/etc/heat-engine.conf $HEAT_ENGINE_CONF cp $HEAT_DIR/etc/heat/heat-engine.conf $HEAT_ENGINE_CONF
iniset $HEAT_ENGINE_CONF DEFAULT debug True iniset $HEAT_ENGINE_CONF DEFAULT debug True
inicomment $HEAT_ENGINE_CONF DEFAULT log_file inicomment $HEAT_ENGINE_CONF DEFAULT log_file
iniset $HEAT_ENGINE_CONF DEFAULT use_syslog $SYSLOG iniset $HEAT_ENGINE_CONF DEFAULT use_syslog $SYSLOG
@ -96,18 +100,9 @@ function configure_heat() {
iniset $HEAT_ENGINE_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_qpid iniset $HEAT_ENGINE_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_qpid
fi fi
HEAT_ENGINE_PASTE_INI=$HEAT_CONF_DIR/heat-engine-paste.ini # metadata api
cp $HEAT_DIR/etc/heat-engine-paste.ini $HEAT_ENGINE_PASTE_INI
iniset $HEAT_ENGINE_PASTE_INI filter:authtoken auth_host $KEYSTONE_AUTH_HOST
iniset $HEAT_ENGINE_PASTE_INI filter:authtoken auth_port $KEYSTONE_AUTH_PORT
iniset $HEAT_ENGINE_PASTE_INI filter:authtoken auth_protocol $KEYSTONE_AUTH_PROTOCOL
iniset $HEAT_ENGINE_PASTE_INI filter:authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0
iniset $HEAT_ENGINE_PASTE_INI filter:authtoken admin_tenant_name $SERVICE_TENANT_NAME
iniset $HEAT_ENGINE_PASTE_INI filter:authtoken admin_user heat
iniset $HEAT_ENGINE_PASTE_INI filter:authtoken admin_password $SERVICE_PASSWORD
HEAT_METADATA_CONF=$HEAT_CONF_DIR/heat-metadata.conf HEAT_METADATA_CONF=$HEAT_CONF_DIR/heat-metadata.conf
cp $HEAT_DIR/etc/heat-metadata.conf $HEAT_METADATA_CONF cp $HEAT_DIR/etc/heat/heat-metadata.conf $HEAT_METADATA_CONF
iniset $HEAT_METADATA_CONF DEFAULT debug True iniset $HEAT_METADATA_CONF DEFAULT debug True
inicomment $HEAT_METADATA_CONF DEFAULT log_file inicomment $HEAT_METADATA_CONF DEFAULT log_file
iniset $HEAT_METADATA_CONF DEFAULT use_syslog $SYSLOG iniset $HEAT_METADATA_CONF DEFAULT use_syslog $SYSLOG
@ -123,8 +118,36 @@ function configure_heat() {
fi fi
HEAT_METADATA_PASTE_INI=$HEAT_CONF_DIR/heat-metadata-paste.ini HEAT_METADATA_PASTE_INI=$HEAT_CONF_DIR/heat-metadata-paste.ini
cp $HEAT_DIR/etc/heat-metadata-paste.ini $HEAT_METADATA_PASTE_INI cp $HEAT_DIR/etc/heat/heat-metadata-paste.ini $HEAT_METADATA_PASTE_INI
# cloudwatch api
HEAT_API_CW_CONF=$HEAT_CONF_DIR/heat-api-cloudwatch.conf
cp $HEAT_DIR/etc/heat/heat-api-cloudwatch.conf $HEAT_API_CW_CONF
iniset $HEAT_API_CW_CONF DEFAULT debug True
inicomment $HEAT_API_CW_CONF DEFAULT log_file
iniset $HEAT_API_CW_CONF DEFAULT use_syslog $SYSLOG
iniset $HEAT_API_CW_CONF DEFAULT bind_host $HEAT_API_CW_HOST
iniset $HEAT_API_CW_CONF DEFAULT bind_port $HEAT_API_CW_PORT
if is_service_enabled rabbit; then
iniset $HEAT_API_CW_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_kombu
iniset $HEAT_API_CW_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
iniset $HEAT_API_CW_CONF DEFAULT rabbit_host $RABBIT_HOST
elif is_service_enabled qpid; then
iniset $HEAT_API_CW_CONF DEFAULT rpc_backend heat.openstack.common.rpc.impl_qpid
fi
HEAT_API_CW_PASTE_INI=$HEAT_CONF_DIR/heat-api-cloudwatch-paste.ini
cp $HEAT_DIR/etc/heat/heat-api-cloudwatch-paste.ini $HEAT_API_CW_PASTE_INI
iniset $HEAT_API_CW_PASTE_INI filter:authtoken auth_host $KEYSTONE_AUTH_HOST
iniset $HEAT_API_CW_PASTE_INI filter:authtoken auth_port $KEYSTONE_AUTH_PORT
iniset $HEAT_API_CW_PASTE_INI filter:authtoken auth_protocol $KEYSTONE_AUTH_PROTOCOL
iniset $HEAT_API_CW_PASTE_INI filter:authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0
iniset $HEAT_API_CW_PASTE_INI filter:authtoken admin_tenant_name $SERVICE_TENANT_NAME
iniset $HEAT_API_CW_PASTE_INI filter:authtoken admin_user heat
iniset $HEAT_API_CW_PASTE_INI filter:authtoken admin_password $SERVICE_PASSWORD
iniset $HEAT_API_CW_PASTE_INI filter:ec2authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0
iniset $HEAT_API_CW_PASTE_INI filter:ec2authtoken keystone_ec2_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ec2tokens
} }
# init_heat() - Initialize database # init_heat() - Initialize database
@ -145,7 +168,8 @@ function install_heat() {
# start_heat() - Start running processes, including screen # start_heat() - Start running processes, including screen
function start_heat() { function start_heat() {
screen_it h-eng "cd $HEAT_DIR; bin/heat-engine --config-file=$HEAT_CONF_DIR/heat-engine.conf" screen_it h-eng "cd $HEAT_DIR; bin/heat-engine --config-file=$HEAT_CONF_DIR/heat-engine.conf"
screen_it h-api "cd $HEAT_DIR; bin/heat-api --config-dir=$HEAT_CONF_DIR/heat-api.conf" screen_it h-api-cfn "cd $HEAT_DIR; bin/heat-api-cfn --config-dir=$HEAT_CONF_DIR/heat-api-cfn.conf"
screen_it h-api-cw "cd $HEAT_DIR; bin/heat-api-cloudwatch --config-dir=$HEAT_CONF_DIR/heat-api-cloudwatch.conf"
screen_it h-meta "cd $HEAT_DIR; bin/heat-metadata --config-dir=$HEAT_CONF_DIR/heat-metadata.conf" screen_it h-meta "cd $HEAT_DIR; bin/heat-metadata --config-dir=$HEAT_CONF_DIR/heat-metadata.conf"
} }

View File

@ -990,7 +990,7 @@ if is_service_enabled key; then
ADMIN_PASSWORD=$ADMIN_PASSWORD SERVICE_TENANT_NAME=$SERVICE_TENANT_NAME SERVICE_PASSWORD=$SERVICE_PASSWORD \ ADMIN_PASSWORD=$ADMIN_PASSWORD SERVICE_TENANT_NAME=$SERVICE_TENANT_NAME SERVICE_PASSWORD=$SERVICE_PASSWORD \
SERVICE_TOKEN=$SERVICE_TOKEN SERVICE_ENDPOINT=$SERVICE_ENDPOINT SERVICE_HOST=$SERVICE_HOST \ SERVICE_TOKEN=$SERVICE_TOKEN SERVICE_ENDPOINT=$SERVICE_ENDPOINT SERVICE_HOST=$SERVICE_HOST \
S3_SERVICE_PORT=$S3_SERVICE_PORT KEYSTONE_CATALOG_BACKEND=$KEYSTONE_CATALOG_BACKEND \ S3_SERVICE_PORT=$S3_SERVICE_PORT KEYSTONE_CATALOG_BACKEND=$KEYSTONE_CATALOG_BACKEND \
DEVSTACK_DIR=$TOP_DIR ENABLED_SERVICES=$ENABLED_SERVICES HEAT_API_PORT=$HEAT_API_PORT \ DEVSTACK_DIR=$TOP_DIR ENABLED_SERVICES=$ENABLED_SERVICES HEAT_API_CFN_PORT=$HEAT_API_CFN_PORT \
bash -x $FILES/keystone_data.sh bash -x $FILES/keystone_data.sh
# Set up auth creds now that keystone is bootstrapped # Set up auth creds now that keystone is bootstrapped