# Launch Services
# ===============
# Only run the services specified in ``ENABLED_SERVICES``
# Launch Swift Services
if is_service_enabled s-proxy; then
echo_summary "Starting Swift"
start_swift
fi
# Launch the Glance services
if is_service_enabled g-api g-reg; then
echo_summary "Starting Glance"
start_glance
fi
# Create an access key and secret key for nova ec2 register image
if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nova; then
NOVA_USER_ID=$(keystone user-list | grep ' nova ' | get_field 1)
NOVA_TENANT_ID=$(keystone tenant-list | grep " $SERVICE_TENANT_NAME " | get_field 1)
CREDS=$(keystone ec2-credentials-create --user_id $NOVA_USER_ID --tenant_id $NOVA_TENANT_ID)
ACCESS_KEY=$(echo "$CREDS" | awk '/ access / { print $4 }')
SECRET_KEY=$(echo "$CREDS" | awk '/ secret / { print $4 }')
iniset $NOVA_CONF DEFAULT s3_access_key "$ACCESS_KEY"
iniset $NOVA_CONF DEFAULT s3_secret_key "$SECRET_KEY"
iniset $NOVA_CONF DEFAULT s3_affix_tenant "True"
fi
if is_service_enabled zeromq; then
echo_summary "Starting zermomq receiver"
screen_it zeromq "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-rpc-zmq-receiver"
fi
# Launch the nova-api and wait for it to answer before continuing
if is_service_enabled n-api; then
echo_summary "Starting Nova API"
start_nova_api
fi
if is_service_enabled q-svc; then
echo_summary "Starting Neutron"
start_neutron_service_and_check
create_neutron_initial_network
setup_neutron_debug
elif is_service_enabled $DATABASE_BACKENDS && is_service_enabled n-net; then
NM_CONF=${NOVA_CONF}
if is_service_enabled n-cell; then
NM_CONF=${NOVA_CELLS_CONF}
fi
# Create a small network
$NOVA_BIN_DIR/nova-manage --config-file $NM_CONF network create "$PRIVATE_NETWORK_NAME" $FIXED_RANGE 1 $FIXED_NETWORK_SIZE $NETWORK_CREATE_ARGS
# Create some floating ips
$NOVA_BIN_DIR/nova-manage --config-file $NM_CONF floating create $FLOATING_RANGE --pool=$PUBLIC_NETWORK_NAME
# Create a second pool
$NOVA_BIN_DIR/nova-manage --config-file $NM_CONF floating create --ip_range=$TEST_FLOATING_RANGE --pool=$TEST_FLOATING_POOL
fi
if is_service_enabled neutron; then
start_neutron_agents
fi
if is_service_enabled nova; then
echo_summary "Starting Nova"
start_nova
fi
if is_service_enabled cinder; then
echo_summary "Starting Cinder"
start_cinder
fi
if is_service_enabled ceilometer; then
echo_summary "Starting Ceilometer"
init_ceilometer
start_ceilometer
fi
# Configure and launch heat engine, api and metadata
if is_service_enabled heat; then
# Initialize heat, including replacing nova flavors
echo_summary "Configuring Heat"
init_heat
echo_summary "Starting Heat"
start_heat
fi
的V
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.