Mitaka updates
This changeset contains updates for Mitaka. To build the basedisk (if necessary) and the cluster and launch a test VM once: ./tools/repeat-test.sh -b -r 1 To test Orchestration: ./tools/test-once.sh scripts/test/heat_stack.sh Change-Id: Idd96525c14abd5903a6631095ccd6797ba91365c
This commit is contained in:
@@ -11,18 +11,16 @@ source "$CONFIG_DIR/credentials"
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# OpenStack client environment scripts
|
# OpenStack client environment scripts
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-openrc.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-openrc.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
export OS_PROJECT_DOMAIN_ID=default
|
export OS_PROJECT_DOMAIN_NAME=default
|
||||||
export OS_USER_DOMAIN_ID=default
|
export OS_USER_DOMAIN_NAME=default
|
||||||
export OS_PROJECT_NAME=$ADMIN_PROJECT_NAME
|
export OS_PROJECT_NAME=$ADMIN_PROJECT_NAME
|
||||||
export OS_TENANT_NAME=$ADMIN_PROJECT_NAME
|
|
||||||
export OS_USERNAME=$ADMIN_USER_NAME
|
export OS_USERNAME=$ADMIN_USER_NAME
|
||||||
export OS_PASSWORD=$ADMIN_PASS
|
export OS_PASSWORD=$ADMIN_PASS
|
||||||
export OS_AUTH_URL=http://controller:35357/v3
|
export OS_AUTH_URL=http://controller:35357/v3
|
||||||
export OS_REGION_NAME=$REGION
|
|
||||||
export OS_IDENTITY_API_VERSION=3
|
export OS_IDENTITY_API_VERSION=3
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/glance-verify.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-verify.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
export OS_IMAGE_API_VERSION=2
|
export OS_IMAGE_API_VERSION=2
|
||||||
|
@@ -7,7 +7,7 @@ VM_SSH_PORT=2232
|
|||||||
# Assign network interfaces to networks
|
# Assign network interfaces to networks
|
||||||
NET_IF_0=dhcp
|
NET_IF_0=dhcp
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment-networking-compute.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-networking-compute.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Mgmt network
|
# Mgmt network
|
||||||
NET_IF_1="static 10.0.0.31"
|
NET_IF_1="static 10.0.0.31"
|
||||||
@@ -15,7 +15,7 @@ NET_IF_1="static 10.0.0.31"
|
|||||||
NET_IF_2="manual 203.0.113.0"
|
NET_IF_2="manual 203.0.113.0"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Controller node is running many services.
|
# Controller node is running many services.
|
||||||
# A default instance within compute uses 512 MB RAM. The install-guide
|
# A default instance within compute uses 512 MB RAM. The install-guide
|
||||||
|
@@ -9,7 +9,7 @@ VM_WWW_PORT=8888
|
|||||||
# Assign network interfaces to networks
|
# Assign network interfaces to networks
|
||||||
NET_IF_0=dhcp
|
NET_IF_0=dhcp
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment-networking-controller.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-networking-controller.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Mgmt network
|
# Mgmt network
|
||||||
NET_IF_1="static 10.0.0.11"
|
NET_IF_1="static 10.0.0.11"
|
||||||
@@ -17,10 +17,10 @@ NET_IF_1="static 10.0.0.11"
|
|||||||
NET_IF_2="manual 203.0.113.0"
|
NET_IF_2="manual 203.0.113.0"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Controller node is running many services.
|
# Controller node is running many services.
|
||||||
VM_MEM=2560
|
VM_MEM=4096
|
||||||
|
|
||||||
# Override number of virtual CPUs (default is 1)
|
# Override number of virtual CPUs (default is 1)
|
||||||
# To edit uncomment the line below
|
# To edit uncomment the line below
|
||||||
|
@@ -21,6 +21,11 @@
|
|||||||
|
|
||||||
# User name and password for administrator
|
# User name and password for administrator
|
||||||
: ${ADMIN_USER_NAME:=admin}
|
: ${ADMIN_USER_NAME:=admin}
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Passwords for OpenStack services
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-security.html
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
: ${ADMIN_PASS:=admin_user_secret}
|
: ${ADMIN_PASS:=admin_user_secret}
|
||||||
|
|
||||||
: ${CEILOMETER_DB_USER:=ceilometer}
|
: ${CEILOMETER_DB_USER:=ceilometer}
|
||||||
|
@@ -11,18 +11,16 @@ source "$CONFIG_DIR/credentials"
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# OpenStack client environment scripts
|
# OpenStack client environment scripts
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-openrc.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-openrc.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
export OS_PROJECT_DOMAIN_ID=default
|
export OS_PROJECT_DOMAIN_NAME=default
|
||||||
export OS_USER_DOMAIN_ID=default
|
export OS_USER_DOMAIN_NAME=default
|
||||||
export OS_PROJECT_NAME=$DEMO_PROJECT_NAME
|
export OS_PROJECT_NAME=$DEMO_PROJECT_NAME
|
||||||
export OS_TENANT_NAME=$DEMO_PROJECT_NAME
|
|
||||||
export OS_USERNAME=$DEMO_USER_NAME
|
export OS_USERNAME=$DEMO_USER_NAME
|
||||||
export OS_PASSWORD=$DEMO_PASS
|
export OS_PASSWORD=$DEMO_PASS
|
||||||
export OS_AUTH_URL=http://controller:5000/v3
|
export OS_AUTH_URL=http://controller:5000/v3
|
||||||
export OS_REGION_NAME=$REGION
|
|
||||||
export OS_IDENTITY_API_VERSION=3
|
export OS_IDENTITY_API_VERSION=3
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/glance-verify.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-verify.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
export OS_IMAGE_API_VERSION=2
|
export OS_IMAGE_API_VERSION=2
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment-networking-controller.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-networking-controller.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# controller
|
# controller
|
||||||
10.0.0.11 controller
|
10.0.0.11 controller
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# This file contains OpenStack configuration data. It is used by both
|
# This file contains OpenStack configuration data. It is used by both
|
||||||
# host (osbash, Windows batch) and VM guest scripts.
|
# host (osbash, Windows batch) and VM guest scripts.
|
||||||
|
|
||||||
# one of: icehouse [end of life], juno, kilo, liberty
|
# one of: mitaka, mitaka-proposed, mitaka-staging
|
||||||
: ${OPENSTACK_RELEASE:=liberty}
|
: ${OPENSTACK_RELEASE:=mitaka}
|
||||||
|
|
||||||
# CirrOS image URL
|
# CirrOS image URL
|
||||||
if [ "$(uname -m)" = "x86_64" ]; then
|
if [ "$(uname -m)" = "x86_64" ]; then
|
||||||
@@ -14,15 +14,15 @@ CIRROS_URL="http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-$arch-disk.img"
|
|||||||
unset arch
|
unset arch
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment-networking.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-networking.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Networks used by OpenStack training-labs setup
|
# Networks used by OpenStack training-labs setup
|
||||||
NETWORK_1="mgmt 10.0.0.0"
|
NETWORK_1="mgmt 10.0.0.0"
|
||||||
NETWORK_2="public 203.0.113.0"
|
NETWORK_2="provider 203.0.113.0"
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-networks-public.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-networks-public.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Public network
|
# Public network
|
||||||
@@ -33,7 +33,7 @@ NETWORK_2="public 203.0.113.0"
|
|||||||
: ${END_IP_ADDRESS:=203.0.113.200}
|
: ${END_IP_ADDRESS:=203.0.113.200}
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-networks-private.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-networks-private.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Private demo network
|
# Private demo network
|
||||||
@@ -46,7 +46,4 @@ NETWORK_2="public 203.0.113.0"
|
|||||||
|
|
||||||
: ${REGION:=RegionOne}
|
: ${REGION:=RegionOne}
|
||||||
|
|
||||||
# Should OpenStack services use verbose logging? (True, False)
|
|
||||||
: ${OPENSTACK_VERBOSE:=True}
|
|
||||||
|
|
||||||
# vim: set ai ts=4 sw=4 et ft=sh:
|
# vim: set ai ts=4 sw=4 et ft=sh:
|
||||||
|
@@ -9,6 +9,7 @@ cmd snapshot_cycle -n controller controller_node_init
|
|||||||
cmd queue ubuntu/apt_install_mysql.sh
|
cmd queue ubuntu/apt_install_mysql.sh
|
||||||
cmd queue ubuntu/apt_nosql_database.sh
|
cmd queue ubuntu/apt_nosql_database.sh
|
||||||
cmd queue ubuntu/install_rabbitmq.sh
|
cmd queue ubuntu/install_rabbitmq.sh
|
||||||
|
cmd queue ubuntu/install_memcached.sh
|
||||||
cmd snapshot_cycle -n controller pre-openstack_installed
|
cmd snapshot_cycle -n controller pre-openstack_installed
|
||||||
|
|
||||||
cmd queue ubuntu/setup_keystone.sh
|
cmd queue ubuntu/setup_keystone.sh
|
||||||
@@ -37,12 +38,10 @@ cmd snapshot_cycle -n controller horizon_installed
|
|||||||
#cmd queue ubuntu/setup_lbaas_controller.sh
|
#cmd queue ubuntu/setup_lbaas_controller.sh
|
||||||
#cmd snapshot_cycle -n controller lbaas-controller_installed
|
#cmd snapshot_cycle -n controller lbaas-controller_installed
|
||||||
|
|
||||||
# Telemetry service is disabled for the time being as it overloads
|
# Ceilometer; disable if necessary, fix comments in this file
|
||||||
# the cluster. For enabling the same, please uncomment the following.
|
# Note: Disable Telemetry service if it overloads the cluster.
|
||||||
# Warning: Use higher configuration (Disk space). The default
|
cmd queue ubuntu/setup_telemetry_controller.sh
|
||||||
# configuration is optimized for 4GB i3/i5 based machine.
|
cmd snapshot_cycle -n controller telemetry-controller_installed
|
||||||
# cmd queue ubuntu/setup_telemetry_controller.sh
|
|
||||||
# cmd snapshot_cycle -n controller telemetry-controller_installed
|
|
||||||
|
|
||||||
cmd queue ubuntu/setup_heat_controller.sh
|
cmd queue ubuntu/setup_heat_controller.sh
|
||||||
cmd snapshot_cycle -n controller heat_controller_installed
|
cmd snapshot_cycle -n controller heat_controller_installed
|
||||||
@@ -67,12 +66,8 @@ cmd snapshot_cycle -n compute1 neutron-compute_installed
|
|||||||
cmd queue ubuntu/setup_cinder_volumes.sh
|
cmd queue ubuntu/setup_cinder_volumes.sh
|
||||||
cmd snapshot_cycle -n compute1 cinder-volume_installed
|
cmd snapshot_cycle -n compute1 cinder-volume_installed
|
||||||
|
|
||||||
# Telemetry service is disabled for the time being as it overloads
|
cmd queue ubuntu/setup_telemetry_compute.sh
|
||||||
# the cluster. For enabling the same, please uncomment the following.
|
cmd snapshot_cycle -n compute1 telemetry-compute_installed
|
||||||
# Warning: Use higher configuration (RAM, CPU's). The default
|
|
||||||
# configuration is optimized for 4GB i3/i5 based machine.
|
|
||||||
# cmd queue ubuntu/setup_telemetry_compute.sh
|
|
||||||
# cmd snapshot_cycle -n compute1 telemetry-compute_installed
|
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Take snapshot of database changes on controller VM, too
|
# Take snapshot of database changes on controller VM, too
|
||||||
|
@@ -298,7 +298,7 @@ function wait_for_neutron {
|
|||||||
echo -n "Waiting for neutron to come up."
|
echo -n "Waiting for neutron to come up."
|
||||||
local cnt=0
|
local cnt=0
|
||||||
local auth="source $CONFIG_DIR/demo-openstackrc.sh"
|
local auth="source $CONFIG_DIR/demo-openstackrc.sh"
|
||||||
until neutron net-list >/dev/null 2>&1; do
|
until openstack network list >/dev/null 2>&1; do
|
||||||
if [ "$cnt" -eq 10 ]; then
|
if [ "$cnt" -eq 10 ]; then
|
||||||
echo
|
echo
|
||||||
echo "ERROR No response from neutron. Restarting neutron-server."
|
echo "ERROR No response from neutron. Restarting neutron-server."
|
||||||
|
@@ -10,7 +10,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Create private network
|
# Create private network
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-networks-private.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-networks-private.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo -n "Waiting for first DHCP namespace."
|
echo -n "Waiting for first DHCP namespace."
|
||||||
@@ -28,6 +28,10 @@ until [ "$(brctl show | grep -o "^brq[a-z0-9-]*" | wc -l)" -gt 0 ]; do
|
|||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Create the self-service network
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
(
|
(
|
||||||
echo "Sourcing the demo credentials."
|
echo "Sourcing the demo credentials."
|
||||||
source "$CONFIG_DIR/demo-openstackrc.sh"
|
source "$CONFIG_DIR/demo-openstackrc.sh"
|
||||||
@@ -36,16 +40,16 @@ source "$CONFIG_DIR/demo-openstackrc.sh"
|
|||||||
wait_for_neutron
|
wait_for_neutron
|
||||||
|
|
||||||
echo "Creating the private network."
|
echo "Creating the private network."
|
||||||
neutron net-create private
|
neutron net-create selfservice
|
||||||
|
|
||||||
echo "Creating a subnet on the tenant network."
|
echo "Creating a subnet on the tenant network."
|
||||||
neutron subnet-create private \
|
neutron subnet-create --name selfservice \
|
||||||
"$PRIVATE_NETWORK_CIDR" \
|
--dns-nameserver "$DNS_RESOLVER" --gateway "$PRIVATE_NETWORK_GATEWAY" \
|
||||||
--name private \
|
selfservice "$PRIVATE_NETWORK_CIDR"
|
||||||
--dns-nameserver "$DNS_RESOLVER" \
|
|
||||||
--gateway "$PRIVATE_NETWORK_GATEWAY"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo -n "Waiting for second DHCP namespace."
|
echo -n "Waiting for second DHCP namespace."
|
||||||
until [ "$(ip netns | grep -o "^qdhcp-[a-z0-9-]*" | wc -l)" -gt 1 ]; do
|
until [ "$(ip netns | grep -o "^qdhcp-[a-z0-9-]*" | wc -l)" -gt 1 ]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
@@ -63,12 +67,16 @@ echo
|
|||||||
echo "Bridges are:"
|
echo "Bridges are:"
|
||||||
brctl show
|
brctl show
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Create a router
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
(
|
(
|
||||||
echo "Sourcing the admin credentials."
|
echo "Sourcing the admin credentials."
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
|
||||||
echo "Adding 'router:external' option to the public provider network."
|
echo "Adding 'router:external' option to the public provider network."
|
||||||
neutron net-update public --router:external
|
neutron net-update provider --router:external
|
||||||
)
|
)
|
||||||
|
|
||||||
(
|
(
|
||||||
@@ -103,7 +111,7 @@ wait_for_agent neutron-dhcp-agent
|
|||||||
source "$CONFIG_DIR/demo-openstackrc.sh"
|
source "$CONFIG_DIR/demo-openstackrc.sh"
|
||||||
|
|
||||||
echo "Adding the private network subnet as an interface on the router."
|
echo "Adding the private network subnet as an interface on the router."
|
||||||
neutron router-interface-add router private
|
neutron router-interface-add router selfservice
|
||||||
)
|
)
|
||||||
|
|
||||||
# The following tests for router namespace, qr-* interface and bridges are just
|
# The following tests for router namespace, qr-* interface and bridges are just
|
||||||
@@ -126,9 +134,11 @@ done
|
|||||||
source "$CONFIG_DIR/demo-openstackrc.sh"
|
source "$CONFIG_DIR/demo-openstackrc.sh"
|
||||||
|
|
||||||
echo "Setting a gateway on the public network on the router."
|
echo "Setting a gateway on the public network on the router."
|
||||||
neutron router-gateway-set router public
|
neutron router-gateway-set router provider
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
# The following test for qg-* is just for show.
|
# The following test for qg-* is just for show.
|
||||||
echo -n "Waiting for interface qg-* in router namespace."
|
echo -n "Waiting for interface qg-* in router namespace."
|
||||||
until sudo ip netns exec "$nsrouter" ip addr|grep -Po "(?<=: )qg-.*(?=:)"; do
|
until sudo ip netns exec "$nsrouter" ip addr|grep -Po "(?<=: )qg-.*(?=:)"; do
|
||||||
@@ -136,6 +146,10 @@ until sudo ip netns exec "$nsrouter" ip addr|grep -Po "(?<=: )qg-.*(?=:)"; do
|
|||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Verify operation
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Listing network namespaces."
|
echo "Listing network namespaces."
|
||||||
ip netns
|
ip netns
|
||||||
|
|
||||||
@@ -167,7 +181,7 @@ function get_router_ip_address {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
PUBLIC_ROUTER_IP=$(get_router_ip_address "public")
|
PUBLIC_ROUTER_IP=$(get_router_ip_address "provider")
|
||||||
|
|
||||||
echo -n "Waiting for ping reply from public router IP ($PUBLIC_ROUTER_IP)."
|
echo -n "Waiting for ping reply from public router IP ($PUBLIC_ROUTER_IP)."
|
||||||
cnt=0
|
cnt=0
|
||||||
|
@@ -9,8 +9,8 @@ exec_logfile
|
|||||||
indicate_current_auto
|
indicate_current_auto
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Create the external network and a subnet on it
|
# Create the provier (external) network and a subnet on it
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-networks-public.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-networks-provider.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Sourcing the admin credentials."
|
echo "Sourcing the admin credentials."
|
||||||
@@ -39,19 +39,23 @@ echo "linuxbridge-agent and dhcp-agent must be up before we can add interfaces."
|
|||||||
wait_for_agent neutron-linuxbridge-agent
|
wait_for_agent neutron-linuxbridge-agent
|
||||||
wait_for_agent neutron-dhcp-agent
|
wait_for_agent neutron-dhcp-agent
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Create the provider network
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Creating the public network."
|
echo "Creating the public network."
|
||||||
neutron net-create public \
|
neutron net-create \
|
||||||
--shared \
|
--shared \
|
||||||
--provider:physical_network public \
|
--provider:physical_network provider \
|
||||||
--provider:network_type flat
|
--provider:network_type flat \
|
||||||
|
provider
|
||||||
|
|
||||||
echo "Creating a subnet on the public network."
|
echo "Creating a subnet on the public network."
|
||||||
neutron subnet-create public \
|
neutron subnet-create --name provider \
|
||||||
"$PUBLIC_NETWORK_CIDR" \
|
|
||||||
--name public \
|
|
||||||
--allocation-pool start="$START_IP_ADDRESS,end=$END_IP_ADDRESS" \
|
--allocation-pool start="$START_IP_ADDRESS,end=$END_IP_ADDRESS" \
|
||||||
--dns-nameserver "$DNS_RESOLVER" \
|
--dns-nameserver "$DNS_RESOLVER" \
|
||||||
--gateway "$PUBLIC_NETWORK_GATEWAY"
|
--gateway "$PUBLIC_NETWORK_GATEWAY" \
|
||||||
|
provider "$PUBLIC_NETWORK_CIDR"
|
||||||
|
|
||||||
echo -n "Waiting for DHCP namespace."
|
echo -n "Waiting for DHCP namespace."
|
||||||
until [ "$(ip netns | grep -o "^qdhcp-[a-z0-9-]*" | wc -l)" -gt 0 ]; do
|
until [ "$(ip netns | grep -o "^qdhcp-[a-z0-9-]*" | wc -l)" -gt 0 ]; do
|
||||||
|
@@ -12,7 +12,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Use OpenStack client environment script
|
# Use OpenStack client environment script
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-openrc.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-openrc.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Test in subshell enviroment to keep our environment clean
|
# Test in subshell enviroment to keep our environment clean
|
||||||
|
@@ -15,9 +15,13 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Verify the Orchestration Service installation
|
# Verify the Orchestration Service installation
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/launch-instance-heat.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-heat.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Create a template
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Verifying heat installation."
|
echo "Verifying heat installation."
|
||||||
echo "Waiting for heat-engine to start."
|
echo "Waiting for heat-engine to start."
|
||||||
|
|
||||||
@@ -30,11 +34,10 @@ function check_for_other_vms {
|
|||||||
echo "Verifying that no other instance VMs are left."
|
echo "Verifying that no other instance VMs are left."
|
||||||
(
|
(
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
if [ "$(nova list --all-tenants --minimal | wc -l)" -gt 4 ]; then
|
if [ "$(openstack server list --all-projects | wc -l)" -gt 4 ]; then
|
||||||
echo "ERROR Unexpected VMs found. There may not be enough resources" \
|
echo "WARNING Existing VMs found. There may not be enough resources" \
|
||||||
"for this test. Aborting..."
|
"for this test."
|
||||||
nova list --all-tenants
|
openstack server list --all-projects
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -44,12 +47,10 @@ echo "Creating a test heat template."
|
|||||||
|
|
||||||
node_ssh controller "cat > demo-template.yml" << HEAT
|
node_ssh controller "cat > demo-template.yml" << HEAT
|
||||||
heat_template_version: 2015-10-15
|
heat_template_version: 2015-10-15
|
||||||
description: Launch a basic instance using the ``m1.tiny`` flavor and one network.
|
description: Launch a basic instance with CirrOS image using the
|
||||||
|
``m1.tiny`` flavor, ``mykey`` key, and one network.
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
ImageID:
|
|
||||||
type: string
|
|
||||||
description: Image to use for the instance.
|
|
||||||
NetID:
|
NetID:
|
||||||
type: string
|
type: string
|
||||||
description: Network ID to use for the instance.
|
description: Network ID to use for the instance.
|
||||||
@@ -58,8 +59,9 @@ resources:
|
|||||||
server:
|
server:
|
||||||
type: OS::Nova::Server
|
type: OS::Nova::Server
|
||||||
properties:
|
properties:
|
||||||
image: { get_param: ImageID }
|
image: cirros
|
||||||
flavor: m1.tiny
|
flavor: m1.tiny
|
||||||
|
key_name: mykey
|
||||||
networks:
|
networks:
|
||||||
- network: { get_param: NetID }
|
- network: { get_param: NetID }
|
||||||
|
|
||||||
@@ -72,13 +74,16 @@ outputs:
|
|||||||
value: { get_attr: [ server, first_address ] }
|
value: { get_attr: [ server, first_address ] }
|
||||||
HEAT
|
HEAT
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Create a stack
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
TEST_STACK_NAME=stack
|
TEST_STACK_NAME=stack
|
||||||
DEMO_NET=public
|
DEMO_NET=provider
|
||||||
NET_ID=$(node_ssh controller "$AUTH; nova net-list" | awk "/ $DEMO_NET / { print \$2 }")
|
NET_ID=$(node_ssh controller "$AUTH; openstack network list" | awk "/ $DEMO_NET / { print \$2 }")
|
||||||
img_name=$(basename "$CIRROS_URL" -disk.img)
|
|
||||||
|
|
||||||
node_ssh controller "$AUTH; heat stack-create -f demo-template.yml \
|
node_ssh controller "$AUTH; heat stack-create -f demo-template.yml \
|
||||||
-P 'ImageID=$img_name;NetID=$NET_ID' $TEST_STACK_NAME"
|
-P 'NetID=$NET_ID' $TEST_STACK_NAME"
|
||||||
|
|
||||||
echo "Verifying successful creation of stack."
|
echo "Verifying successful creation of stack."
|
||||||
|
|
||||||
|
@@ -101,13 +101,6 @@ wait_for_service compute1 nova-compute
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
function wait_for_nova_compute {
|
function wait_for_nova_compute {
|
||||||
(
|
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
|
||||||
if openstack compute service list --service nova-compute | \
|
|
||||||
grep -q "| up "; then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
|
|
||||||
echo " Waiting for nova-compute service in state 'up'."
|
echo " Waiting for nova-compute service in state 'up'."
|
||||||
if ssh_no_chk_node compute1 service nova-compute status | \
|
if ssh_no_chk_node compute1 service nova-compute status | \
|
||||||
@@ -147,28 +140,50 @@ function wait_for_nova_compute {
|
|||||||
function wait_for_nova_services {
|
function wait_for_nova_services {
|
||||||
local start=$(date +%s)
|
local start=$(date +%s)
|
||||||
|
|
||||||
# TODO Can we replace "sudo nova-manage" with "openstack" here, too?
|
(
|
||||||
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
echo "Checking for nova services in openstack compute service list."
|
||||||
|
|
||||||
echo "Checking services in sudo nova-manage service list."
|
echo -n " nova-consoleauth"
|
||||||
echo -n " Waiting for controller services to switch from XXX to :-)."
|
until openstack compute service list --service nova-consoleauth | \
|
||||||
# Ignore nova-compute for now, even if a custom config has it on controller
|
grep -q '| up '; do
|
||||||
until sudo nova-manage service list --host controller | \
|
sleep 1
|
||||||
grep -v nova-compute | grep -q ':-)'; do
|
|
||||||
sleep 2
|
|
||||||
echo -n .
|
echo -n .
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if ! sudo nova-manage service list | grep -q nova-compute; then
|
echo -n " nova-cert"
|
||||||
echo -n " Waiting for nova-compute to turn up in list."
|
until openstack compute service list --service nova-cert | \
|
||||||
until sudo nova-manage service list | grep -q nova-compute; do
|
grep -q '| up '; do
|
||||||
sleep 2
|
sleep 1
|
||||||
echo -n .
|
echo -n .
|
||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
fi
|
|
||||||
|
|
||||||
|
echo -n " nova-scheduler"
|
||||||
|
until openstack compute service list --service nova-scheduler | \
|
||||||
|
grep -q '| up '; do
|
||||||
|
sleep 1
|
||||||
|
echo -n .
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo -n " nova-conductor"
|
||||||
|
until openstack compute service list --service nova-conductor | \
|
||||||
|
grep -q '| up '; do
|
||||||
|
sleep 1
|
||||||
|
echo -n .
|
||||||
|
done
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo -n " nova-compute"
|
||||||
|
if ! openstack compute service list --service nova-compute | \
|
||||||
|
grep -q '| up '; then
|
||||||
wait_for_nova_compute
|
wait_for_nova_compute
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
)
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "SUM wait for nova services: $(($(date +%s) - start))"
|
echo "SUM wait for nova services: $(($(date +%s) - start))"
|
||||||
}
|
}
|
||||||
@@ -179,19 +194,22 @@ fi
|
|||||||
|
|
||||||
wait_for_nova_services
|
wait_for_nova_services
|
||||||
|
|
||||||
echo "All services are ready:"
|
|
||||||
sudo nova-manage service list
|
|
||||||
echo
|
|
||||||
|
|
||||||
function show_compute_resource_usage {
|
|
||||||
echo "nova list:"
|
|
||||||
nova list
|
|
||||||
(
|
(
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
echo "As admin user, nova host-list:"
|
echo "All services are ready:"
|
||||||
nova host-list
|
openstack compute service list
|
||||||
echo "As admin user, nova host-describe compute:"
|
echo
|
||||||
nova host-describe compute
|
)
|
||||||
|
|
||||||
|
function show_compute_resource_usage {
|
||||||
|
echo "openstack server list:"
|
||||||
|
openstack server list
|
||||||
|
(
|
||||||
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
echo "As admin user, openstack host list:"
|
||||||
|
openstack host list
|
||||||
|
echo "As admin user, openstack host show compute1:"
|
||||||
|
openstack host show compute1
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,6 +249,27 @@ function wait_for_neutron_agents {
|
|||||||
|
|
||||||
wait_for_neutron_agents
|
wait_for_neutron_agents
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Launch an instance
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance.html
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Create m1.nano flavor
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
(
|
||||||
|
echo "Creating m1.nano flavor which is just big enough for CirrOS."
|
||||||
|
|
||||||
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
|
||||||
|
echo
|
||||||
|
)
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Generate a key pair
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
if [ ! -f ~/.ssh/id_rsa ]; then
|
if [ ! -f ~/.ssh/id_rsa ]; then
|
||||||
echo "Generating an ssh key pair (saved to ~/.ssh/id_rsa*)."
|
echo "Generating an ssh key pair (saved to ~/.ssh/id_rsa*)."
|
||||||
# For training cluster: no password protection on keys to make scripting
|
# For training cluster: no password protection on keys to make scripting
|
||||||
@@ -240,19 +279,19 @@ fi
|
|||||||
|
|
||||||
function check_demo_key {
|
function check_demo_key {
|
||||||
echo -n "Checking if 'mykey' is already in our OpenStack environment: "
|
echo -n "Checking if 'mykey' is already in our OpenStack environment: "
|
||||||
if nova keypair-show mykey >/dev/null 2>&1; then
|
if openstack keypair show mykey >/dev/null 2>&1; then
|
||||||
echo "yes."
|
echo "yes."
|
||||||
|
|
||||||
echo -n "Checking if the 'mykey' key pair matches our ssh key: "
|
echo -n "Checking if the 'mykey' key pair matches our ssh key: "
|
||||||
|
|
||||||
ssh_key=$(< ~/.ssh/id_rsa.pub awk '{print $2}')
|
ssh_key=$(< ~/.ssh/id_rsa.pub awk '{print $2}')
|
||||||
stored_key=$(nova keypair-show mykey | \
|
stored_key=$(openstack keypair show --public-key mykey | \
|
||||||
awk '/^Public key: ssh-rsa/ {print $4}')
|
awk '{print $2}')
|
||||||
|
|
||||||
if [ "$ssh_key" != "$stored_key" ]; then
|
if [ "$ssh_key" != "$stored_key" ]; then
|
||||||
echo "no."
|
echo "no."
|
||||||
echo "Removing the 'mykey' from the OpenStack envirnoment."
|
echo "Removing the 'mykey' from the OpenStack envirnoment."
|
||||||
nova keypair-delete mykey
|
openstack keypair delete mykey
|
||||||
else
|
else
|
||||||
echo "yes."
|
echo "yes."
|
||||||
fi
|
fi
|
||||||
@@ -262,52 +301,70 @@ function check_demo_key {
|
|||||||
}
|
}
|
||||||
check_demo_key
|
check_demo_key
|
||||||
|
|
||||||
if ! nova keypair-show mykey 2>/dev/null; then
|
if ! openstack keypair show mykey 2>/dev/null; then
|
||||||
echo "Adding the public key to our OpenStack environment."
|
echo "Adding the public key to our OpenStack environment."
|
||||||
nova keypair-add --pub-key ~/.ssh/id_rsa.pub mykey
|
openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Verifying addition of the public key."
|
echo "Verifying addition of the public key."
|
||||||
nova keypair-list
|
openstack keypair list
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Add security group rules
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Permitting ICMP (ping) to our instances."
|
echo "Permitting ICMP (ping) to our instances."
|
||||||
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0 || rc=$?
|
openstack security group rule create --proto icmp default || rc=$?
|
||||||
if [ ${rc:-0} -ne 0 ]; then
|
if [ ${rc:-0} -ne 0 ]; then
|
||||||
echo "Rule was already there."
|
echo "Rule was already there."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Permitting secure shell (SSH) access to our instances."
|
echo "Permitting secure shell (SSH) access to our instances."
|
||||||
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0 || rc=$?
|
openstack security group rule create --proto tcp --dst-port 22 default || rc=$?
|
||||||
if [ ${rc:-0} -ne 0 ]; then
|
if [ ${rc:-0} -ne 0 ]; then
|
||||||
echo "Rule was already there."
|
echo "Rule was already there."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Verifying security-group rules."
|
echo "Verifying security group rules."
|
||||||
nova secgroup-list-rules default
|
openstack security group list
|
||||||
|
openstack security group show default
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Launch an instance on the self-service network
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-selfservice.html
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Determine instance options
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Listing available flavors."
|
echo "Listing available flavors."
|
||||||
nova flavor-list
|
openstack flavor list
|
||||||
|
|
||||||
echo "Listing available images."
|
echo "Listing available images."
|
||||||
nova image-list
|
openstack image list
|
||||||
|
|
||||||
# Wait for neutron to start
|
# Wait for neutron to start
|
||||||
wait_for_neutron
|
wait_for_neutron
|
||||||
|
|
||||||
echo "Listing available networks."
|
echo "Listing available networks."
|
||||||
neutron net-list
|
openstack network list
|
||||||
|
|
||||||
PRIVATE_NET_ID=$(neutron net-list | awk '/ private / {print $2}')
|
PRIVATE_SUBNET=selfservice
|
||||||
|
|
||||||
|
PRIVATE_NET_ID=$(openstack network list | awk "/ $PRIVATE_SUBNET / {print \$2}")
|
||||||
echo "ID for demo-net tenant network: $PRIVATE_NET_ID"
|
echo "ID for demo-net tenant network: $PRIVATE_NET_ID"
|
||||||
|
|
||||||
echo "Listing available security groups."
|
echo "Listing available security groups."
|
||||||
nova secgroup-list
|
openstack security group list
|
||||||
|
|
||||||
PRIVATE_SUBNET=private
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# XXX Network settings
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Settings for $PRIVATE_SUBNET:"
|
echo "Settings for $PRIVATE_SUBNET:"
|
||||||
neutron subnet-show $PRIVATE_SUBNET
|
neutron subnet-show $PRIVATE_SUBNET
|
||||||
@@ -326,13 +383,17 @@ echo "Settings for $PRIVATE_SUBNET:"
|
|||||||
neutron subnet-show $PRIVATE_SUBNET
|
neutron subnet-show $PRIVATE_SUBNET
|
||||||
echo
|
echo
|
||||||
|
|
||||||
nova list
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
nova list | awk " / $DEMO_INSTANCE_NAME / {print \$2}" | while read instance; do
|
# Clean out old instances
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
openstack server list
|
||||||
|
openstack server list | awk " / $DEMO_INSTANCE_NAME / {print \$2}" | while read instance; do
|
||||||
echo "Removing instance $DEMO_INSTANCE_NAME ($instance)."
|
echo "Removing instance $DEMO_INSTANCE_NAME ($instance)."
|
||||||
nova delete "$instance"
|
openstack server delete "$instance"
|
||||||
done
|
done
|
||||||
echo -n "Waiting for removed instances to disappear (may take > 1 min)."
|
echo -n "Waiting for removed instances to disappear (may take > 1 min)."
|
||||||
while nova list|grep -q "$DEMO_INSTANCE_NAME"; do
|
while openstack server list|grep -q "$DEMO_INSTANCE_NAME"; do
|
||||||
sleep 1
|
sleep 1
|
||||||
echo -n .
|
echo -n .
|
||||||
done
|
done
|
||||||
@@ -342,14 +403,15 @@ function check_for_other_vms {
|
|||||||
echo "Verifying that no other instance VMs are left."
|
echo "Verifying that no other instance VMs are left."
|
||||||
(
|
(
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
if [ "$(nova list --all-tenants --minimal | wc -l)" -gt 4 ]; then
|
if [ "$(openstack server list --all-projects | wc -l)" -gt 4 ]; then
|
||||||
echo "SUM ERROR Unexpected VMs found. Aborting..."
|
echo "SUM ERROR Unexpected VMs found. Aborting..."
|
||||||
nova list --all-tenants
|
openstack server list --all-projects
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
check_for_other_vms
|
check_for_other_vms
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
NOVA_SCHED_LOG=/var/log/upstart/nova-scheduler.log
|
NOVA_SCHED_LOG=/var/log/upstart/nova-scheduler.log
|
||||||
NOVA_API_LOG=/var/log/upstart/nova-api.log
|
NOVA_API_LOG=/var/log/upstart/nova-api.log
|
||||||
@@ -371,9 +433,9 @@ function request_instance {
|
|||||||
local img_name=$(basename "$CIRROS_URL" -disk.img)
|
local img_name=$(basename "$CIRROS_URL" -disk.img)
|
||||||
|
|
||||||
echo "Requesting an instance."
|
echo "Requesting an instance."
|
||||||
nova boot \
|
openstack server create \
|
||||||
--flavor m1.tiny \
|
--flavor m1.nano \
|
||||||
--image "$img_name" \
|
--image "cirros" \
|
||||||
--nic net-id="$PRIVATE_NET_ID" \
|
--nic net-id="$PRIVATE_NET_ID" \
|
||||||
--security-group default \
|
--security-group default \
|
||||||
--key-name mykey \
|
--key-name mykey \
|
||||||
@@ -387,9 +449,9 @@ echo "Boot log: $BOOT_LOG"
|
|||||||
function save_boot_log {
|
function save_boot_log {
|
||||||
local rc=0
|
local rc=0
|
||||||
rm -f "$BOOT_LOG"
|
rm -f "$BOOT_LOG"
|
||||||
nova console-log "$DEMO_INSTANCE_NAME" >"$BOOT_LOG" 2>&1 || rc=$?
|
openstack console log show "$DEMO_INSTANCE_NAME" >"$BOOT_LOG" 2>&1 || rc=$?
|
||||||
if [ $rc -ne 0 ]; then
|
if [ $rc -ne 0 ]; then
|
||||||
echo >&2 "nova console-log returned error status $rc"
|
echo >&2 "openstack console log show returned error status $rc"
|
||||||
fi
|
fi
|
||||||
return $rc
|
return $rc
|
||||||
}
|
}
|
||||||
@@ -403,11 +465,11 @@ function explain_instance_failure {
|
|||||||
|
|
||||||
As an admin, we could list hosts (including compute hosts):
|
As an admin, we could list hosts (including compute hosts):
|
||||||
|
|
||||||
$ nova host-list
|
$ openstack host list
|
||||||
|
|
||||||
And check resource usage in description of host 'compute':
|
And check resource usage in description of host 'compute':
|
||||||
|
|
||||||
$ nova host-describe compute
|
$ openstack host show compute1
|
||||||
|
|
||||||
As a regular user, we would have to keep trying for up to a minute and hope
|
As a regular user, we would have to keep trying for up to a minute and hope
|
||||||
it works soon.
|
it works soon.
|
||||||
@@ -474,12 +536,12 @@ function console_status_404 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function instance_status {
|
function instance_status {
|
||||||
nova list | awk "/$DEMO_INSTANCE_NAME/ {print \$6}"
|
openstack server list | awk "/$DEMO_INSTANCE_NAME/ {print \$6}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function instance_status_is {
|
function instance_status_is {
|
||||||
local status=$1
|
local status=$1
|
||||||
nova list | grep "$DEMO_INSTANCE_NAME" | grep -q "$status"
|
openstack server list | grep "$DEMO_INSTANCE_NAME" | grep -q "$status"
|
||||||
}
|
}
|
||||||
|
|
||||||
while : ; do
|
while : ; do
|
||||||
@@ -488,7 +550,7 @@ while : ; do
|
|||||||
request_instance > /dev/null
|
request_instance > /dev/null
|
||||||
|
|
||||||
if console_status_409; then
|
if console_status_409; then
|
||||||
echo "nova console-log returned:"
|
echo "openstack console log show returned:"
|
||||||
cat "$BOOT_LOG"
|
cat "$BOOT_LOG"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -496,7 +558,7 @@ while : ; do
|
|||||||
|
|
||||||
echo "Instance build failed."
|
echo "Instance build failed."
|
||||||
echo "Deleting failed instance VM."
|
echo "Deleting failed instance VM."
|
||||||
nova delete "$DEMO_INSTANCE_NAME"
|
openstack server delete "$DEMO_INSTANCE_NAME"
|
||||||
|
|
||||||
echo "Checking nova-compute on the compute node."
|
echo "Checking nova-compute on the compute node."
|
||||||
wait_for_nova_compute
|
wait_for_nova_compute
|
||||||
@@ -506,7 +568,7 @@ while : ; do
|
|||||||
while : ; do
|
while : ; do
|
||||||
request_instance >/dev/null
|
request_instance >/dev/null
|
||||||
if console_status_409; then
|
if console_status_409; then
|
||||||
nova delete "$DEMO_INSTANCE_NAME"
|
openstack server delete "$DEMO_INSTANCE_NAME"
|
||||||
cnt=$((cnt + 1))
|
cnt=$((cnt + 1))
|
||||||
if [ $cnt -eq 5 ]; then
|
if [ $cnt -eq 5 ]; then
|
||||||
echo
|
echo
|
||||||
@@ -528,7 +590,7 @@ while : ; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if console_status_404; then
|
if console_status_404; then
|
||||||
echo "nova console-log returned:"
|
echo "openstack console log show returned:"
|
||||||
cat "$BOOT_LOG"
|
cat "$BOOT_LOG"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
@@ -566,7 +628,7 @@ while : ; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Deleting failed instance VM."
|
echo "Deleting failed instance VM."
|
||||||
nova delete "$DEMO_INSTANCE_NAME"
|
openstack server delete "$DEMO_INSTANCE_NAME"
|
||||||
elif instance_status_is ACTIVE; then
|
elif instance_status_is ACTIVE; then
|
||||||
echo "Instance VM status: ACTIVE."
|
echo "Instance VM status: ACTIVE."
|
||||||
break
|
break
|
||||||
@@ -627,24 +689,31 @@ until grep -q "$DEMO_INSTANCE_NAME login:" "$BOOT_LOG"; do
|
|||||||
done
|
done
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Access the instance using a virtual console
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Obtaining a VNC session URL for our instance."
|
echo "Obtaining a VNC session URL for our instance."
|
||||||
nova get-vnc-console "$DEMO_INSTANCE_NAME" novnc
|
openstack console url show "$DEMO_INSTANCE_NAME"
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Access the instance remotely
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Creating a floating IP address on the public network."
|
echo "Creating a floating IP address on the public network."
|
||||||
floating_ip_id=$(neutron floatingip-create public | awk '/ id / {print $4}')
|
floating_ip=$(openstack ip floating create provider | awk '/ ip / {print $4}')
|
||||||
neutron floatingip-show "$floating_ip_id"
|
openstack ip floating list
|
||||||
|
|
||||||
floating_ip=$(neutron floatingip-show "$floating_ip_id" |
|
|
||||||
awk '/ floating_ip_address / {print $4}')
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Associating the floating IP address with our instance."
|
echo "Associating the floating IP address with our instance."
|
||||||
nova floating-ip-associate "$DEMO_INSTANCE_NAME" "$floating_ip"
|
openstack ip floating add "$floating_ip" "$DEMO_INSTANCE_NAME"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Checking the status of your floating IP address."
|
echo "Checking the status of your floating IP address."
|
||||||
nova list
|
openstack server list
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo -n "Verifying network connectivity to instance VM (may take 2+ min)."
|
echo -n "Verifying network connectivity to instance VM (may take 2+ min)."
|
||||||
|
@@ -41,20 +41,52 @@ function ubuntu_cloud_archive {
|
|||||||
# cloud-keyring to verify packages from ubuntu-cloud repo
|
# cloud-keyring to verify packages from ubuntu-cloud repo
|
||||||
sudo apt-get install ubuntu-cloud-keyring
|
sudo apt-get install ubuntu-cloud-keyring
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
# Enable the OpenStack repository
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-packages.html
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
|
||||||
# Install packages needed for add-apt-repository
|
# Install packages needed for add-apt-repository
|
||||||
sudo apt-get -y install software-properties-common \
|
sudo apt-get -y install software-properties-common \
|
||||||
python-software-properties
|
python-software-properties
|
||||||
sudo add-apt-repository -y "cloud-archive:$OPENSTACK_RELEASE"
|
sudo add-apt-repository -y "cloud-archive:$OPENSTACK_RELEASE"
|
||||||
|
}
|
||||||
|
|
||||||
# Get index files only for ubuntu-cloud repo but keep standard lists
|
function ubuntu_cloud_staging {
|
||||||
sudo apt-get update \
|
#--------------------------------------------------------------------------
|
||||||
-o Dir::Etc::sourcelist="sources.list.d/cloudarchive-$OPENSTACK_RELEASE.list" \
|
# Enable the OpenStack repository
|
||||||
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
|
# https://launchpad.net/~ubuntu-cloud-archive/+archive/ubuntu/mitaka-staging
|
||||||
|
#
|
||||||
|
# NOTE: Using pre-release staging ppa is not documented in install-guide
|
||||||
|
#--------------------------------------------------------------------------
|
||||||
|
|
||||||
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9F68104E
|
||||||
|
|
||||||
|
cat << DEB |sudo tee /etc/apt/sources.list.d/cloudarchive-$OPENSTACK_RELEASE.list
|
||||||
|
deb http://ppa.launchpad.net/ubuntu-cloud-archive/$OPENSTACK_RELEASE/ubuntu trusty main
|
||||||
|
deb-src http://ppa.launchpad.net/ubuntu-cloud-archive/$OPENSTACK_RELEASE/ubuntu trusty main
|
||||||
|
DEB
|
||||||
}
|
}
|
||||||
|
|
||||||
# precise needs the cloud archive, and so does trusty for non-Icehouse releases
|
# precise needs the cloud archive, and so does trusty for non-Icehouse releases
|
||||||
if grep -qs DISTRIB_CODENAME=precise /etc/lsb-release ||
|
if grep -qs DISTRIB_CODENAME=precise /etc/lsb-release ||
|
||||||
[ "$OPENSTACK_RELEASE" != "icehouse" ]; then
|
[ "$OPENSTACK_RELEASE" != "icehouse" ]; then
|
||||||
|
if [[ "$OPENSTACK_RELEASE" =~ staging ]]; then
|
||||||
|
echo "Enabling the Ubuntu cloud staging ppa."
|
||||||
|
ubuntu_cloud_staging
|
||||||
|
else
|
||||||
echo "Enabling the Ubuntu cloud archive."
|
echo "Enabling the Ubuntu cloud archive."
|
||||||
ubuntu_cloud_archive
|
ubuntu_cloud_archive
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get index files only for ubuntu-cloud repo but keep standard lists
|
||||||
|
src_list=cloudarchive-$OPENSTACK_RELEASE.list
|
||||||
|
if [ -f "/etc/apt/sources.list.d/$src_list" ]; then
|
||||||
|
sudo apt-get update \
|
||||||
|
-o Dir::Etc::sourcelist="sources.list.d/$src_list" \
|
||||||
|
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
|
||||||
|
else
|
||||||
|
echo "ERROR: apt source not found: /etc/apt/sources.list.d/$src_list"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
@@ -21,21 +21,21 @@ echo "Will bind MySQL server to $DB_IP."
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Install and configure the database server
|
# Install and configure the database server
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment-sql-database.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-sql-database.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Sourced MySQL password from credentials: $DATABASE_PASSWORD"
|
echo "Sourced MySQL password from credentials: $DATABASE_PASSWORD"
|
||||||
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password '$DATABASE_PASSWORD''
|
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password '$DATABASE_PASSWORD''
|
||||||
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password '$DATABASE_PASSWORD''
|
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password '$DATABASE_PASSWORD''
|
||||||
|
|
||||||
echo "Installing MySQL."
|
echo "Installing MySQL (MariaDB)."
|
||||||
sudo apt-get install -y mariadb-server python-mysqldb
|
sudo apt-get install -y mariadb-server python-mysqldb
|
||||||
|
|
||||||
echo "Creating /etc/mysql/conf.d/mysqld_openstack.cnf."
|
|
||||||
echo '[mysqld]' | sudo tee /etc/mysql/conf.d/mysqld_openstack.cnf
|
|
||||||
|
|
||||||
|
|
||||||
conf=/etc/mysql/conf.d/mysqld_openstack.cnf
|
conf=/etc/mysql/conf.d/mysqld_openstack.cnf
|
||||||
|
|
||||||
|
echo "Creating $conf."
|
||||||
|
echo '[mysqld]' | sudo tee $conf
|
||||||
|
|
||||||
echo "Configuring MySQL to accept requests from management network."
|
echo "Configuring MySQL to accept requests from management network."
|
||||||
iniset_sudo $conf mysqld bind-address "$DB_IP"
|
iniset_sudo $conf mysqld bind-address "$DB_IP"
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Install the NoSQL (Mongo) service
|
# Install the NoSQL (Mongo) service
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment-nosql-database.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-nosql-database.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Setting up NoSQL database (MongoDB) for telemetry."
|
echo "Setting up NoSQL database (MongoDB) for telemetry."
|
||||||
|
@@ -42,9 +42,8 @@ function get_cirros {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function apt_download {
|
function apt_download {
|
||||||
|
echo "apt_download: $@"
|
||||||
sudo apt-get install -y --download-only "$@"
|
sudo apt-get install -y --download-only "$@"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get cirros image.
|
# Get cirros image.
|
||||||
@@ -55,6 +54,9 @@ get_cirros
|
|||||||
# MySQL, RabbitMQ
|
# MySQL, RabbitMQ
|
||||||
apt_download mariadb-server python-mysqldb rabbitmq-server
|
apt_download mariadb-server python-mysqldb rabbitmq-server
|
||||||
|
|
||||||
|
# NoSQL database (MongoDB)
|
||||||
|
apt_download mongodb-server mongodb-clients python-pymongo
|
||||||
|
|
||||||
# Other dependencies
|
# Other dependencies
|
||||||
apt_download python-argparse python-dev python-pip
|
apt_download python-argparse python-dev python-pip
|
||||||
|
|
||||||
@@ -71,8 +73,8 @@ apt_download nova-api nova-cert nova-conductor nova-consoleauth \
|
|||||||
|
|
||||||
# Neutron Controller
|
# Neutron Controller
|
||||||
apt_download neutron-server neutron-plugin-ml2 \
|
apt_download neutron-server neutron-plugin-ml2 \
|
||||||
neutron-plugin-linuxbridge-agent neutron-dhcp-agent \
|
neutron-linuxbridge-agent neutron-dhcp-agent \
|
||||||
neutron-metadata-agent neutron-l3-agent python-neutronclient
|
neutron-metadata-agent neutron-l3-agent python-neutronclient conntrack
|
||||||
|
|
||||||
# Cinder Controller
|
# Cinder Controller
|
||||||
apt_download cinder-api cinder-scheduler python-cinderclient
|
apt_download cinder-api cinder-scheduler python-cinderclient
|
||||||
@@ -87,18 +89,26 @@ apt_download lvm2 cinder-volume
|
|||||||
apt_download nova-compute nova-compute-qemu qemu sysfsutils
|
apt_download nova-compute nova-compute-qemu qemu sysfsutils
|
||||||
|
|
||||||
# Neutron Compute
|
# Neutron Compute
|
||||||
apt_download neutron-plugin-linuxbridge-agent
|
apt_download neutron-linuxbridge-agent
|
||||||
|
|
||||||
# Heat
|
# Heat
|
||||||
apt_download heat-api heat-api-cfn heat-engine python-heatclient
|
apt_download heat-api heat-api-cfn heat-engine python-heatclient
|
||||||
|
|
||||||
# Ceilometer
|
# ceilometer-install
|
||||||
apt_download mongodb-server mongodb-clients python-pymongo \
|
apt_download ceilometer-api ceilometer-collector \
|
||||||
ceilometer-api ceilometer-collector ceilometer-agent-central \
|
ceilometer-agent-central ceilometer-agent-notification \
|
||||||
ceilometer-agent-notification ceilometer-alarm-evaluator \
|
|
||||||
ceilometer-alarm-notifier ceilometer-agent-compute \
|
|
||||||
python-ceilometerclient
|
python-ceilometerclient
|
||||||
|
|
||||||
|
# ceilometer-aodh
|
||||||
|
apt_download aodh-api aodh-evaluator aodh-notifier \
|
||||||
|
aodh-listener aodh-expirer python-ceilometerclient
|
||||||
|
|
||||||
|
# ceilometer-nova
|
||||||
|
apt_download ceilometer-agent-compute
|
||||||
|
|
||||||
|
# ceilometer-swift
|
||||||
|
apt_download python-ceilometermiddleware
|
||||||
|
|
||||||
# Swift Controller
|
# Swift Controller
|
||||||
apt_download swift swift-proxy python-swiftclient \
|
apt_download swift swift-proxy python-swiftclient \
|
||||||
python-keystoneclient python-keystonemiddleware \
|
python-keystoneclient python-keystonemiddleware \
|
||||||
|
@@ -12,12 +12,21 @@ indicate_current_auto
|
|||||||
|
|
||||||
exec_logfile
|
exec_logfile
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Finalize the installation
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-packages.html
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Note: We assume that apt_init.sh set up repos and updated the apt index files
|
# Note: We assume that apt_init.sh set up repos and updated the apt index files
|
||||||
|
|
||||||
# Upgrade installed packages and the kernel
|
# Upgrade installed packages and the kernel
|
||||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
|
sudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
|
||||||
sudo apt-get -y dist-upgrade
|
sudo apt-get -y dist-upgrade
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Extra work not documented in install-guide
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
# If we upgraded the kernel, remove the old one
|
# If we upgraded the kernel, remove the old one
|
||||||
INSTALLED_KERNEL=$(readlink /vmlinuz)
|
INSTALLED_KERNEL=$(readlink /vmlinuz)
|
||||||
INSTALLED_KERNEL=${INSTALLED_KERNEL#boot/vmlinuz-}
|
INSTALLED_KERNEL=${INSTALLED_KERNEL#boot/vmlinuz-}
|
||||||
@@ -35,3 +44,10 @@ fi
|
|||||||
# Clean apt cache
|
# Clean apt cache
|
||||||
sudo apt-get -y autoremove
|
sudo apt-get -y autoremove
|
||||||
sudo apt-get -y clean
|
sudo apt-get -y clean
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Install OpenStack client (install-guide)
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
echo "Installing OpenStack client."
|
||||||
|
sudo apt-get install -y python-openstackclient
|
||||||
|
30
labs/osbash/scripts/ubuntu/install_memcached.sh
Executable file
30
labs/osbash/scripts/ubuntu/install_memcached.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit -o nounset
|
||||||
|
|
||||||
|
TOP_DIR=$(cd "$(dirname "$0")/.." && pwd)
|
||||||
|
|
||||||
|
source "$TOP_DIR/config/paths"
|
||||||
|
source "$CONFIG_DIR/credentials"
|
||||||
|
source "$LIB_DIR/functions.guest.sh"
|
||||||
|
|
||||||
|
exec_logfile
|
||||||
|
|
||||||
|
indicate_current_auto
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Memcached
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-memcached.html
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
echo "Installing memcache packages."
|
||||||
|
sudo apt-get install -y memcached python-memcache
|
||||||
|
|
||||||
|
MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
||||||
|
echo "Will bind memcached server to $MGMT_IP."
|
||||||
|
|
||||||
|
conf=/etc/memcached.conf
|
||||||
|
sudo sed -i "s/^-l 127.0.0.1/-l $MGMT_IP/" $conf
|
||||||
|
|
||||||
|
echo "Restarting memcache service."
|
||||||
|
sudo service memcached restart
|
@@ -14,10 +14,9 @@ indicate_current_auto
|
|||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Install the message broker service (RabbitMQ).
|
# Install the message broker service (RabbitMQ).
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/environment-messaging.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-messaging.html
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
echo "Installing RabbitMQ."
|
echo "Installing RabbitMQ."
|
||||||
sudo apt-get install -y rabbitmq-server
|
sudo apt-get install -y rabbitmq-server
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up Block Storage service controller (cinder controller node)
|
# Set up Block Storage service controller (cinder controller node)
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/cinder-controller-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/cinder-controller-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Setting up database for cinder."
|
echo "Setting up database for cinder."
|
||||||
@@ -79,7 +79,7 @@ openstack endpoint create \
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing cinder."
|
echo "Installing cinder."
|
||||||
sudo apt-get install -y cinder-api cinder-scheduler python-cinderclient \
|
sudo apt-get install -y cinder-api cinder-scheduler \
|
||||||
qemu-utils
|
qemu-utils
|
||||||
# Note: The package 'qemu-utils' is required for 'qemu-img' which allows cinder
|
# Note: The package 'qemu-utils' is required for 'qemu-img' which allows cinder
|
||||||
# to convert additional image types to bootable volumes. By default only
|
# to convert additional image types to bootable volumes. By default only
|
||||||
@@ -112,9 +112,9 @@ iniset_sudo $conf DEFAULT auth_strategy keystone
|
|||||||
# Configure [keystone_authtoken] section.
|
# Configure [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$cinder_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$cinder_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$CINDER_PASS"
|
iniset_sudo $conf keystone_authtoken password "$CINDER_PASS"
|
||||||
@@ -123,8 +123,6 @@ iniset_sudo $conf DEFAULT my_ip "$(hostname_to_ip controller)"
|
|||||||
|
|
||||||
iniset_sudo $conf oslo_concurrency lock_path /var/lib/cinder/tmp
|
iniset_sudo $conf oslo_concurrency lock_path /var/lib/cinder/tmp
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
echo "Creating the database tables for cinder."
|
echo "Creating the database tables for cinder."
|
||||||
sudo cinder-manage db sync
|
sudo cinder-manage db sync
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up Block Storage service (cinder).
|
# Set up Block Storage service (cinder).
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/cinder-storage-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/cinder-storage-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
MY_MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
MY_MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
||||||
@@ -61,7 +61,7 @@ sudo vgcreate cinder-volumes $cinder_loop_dev
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing cinder."
|
echo "Installing cinder."
|
||||||
sudo apt-get install -y cinder-volume python-mysqldb
|
sudo apt-get install -y cinder-volume
|
||||||
|
|
||||||
conf=/etc/cinder/cinder.conf
|
conf=/etc/cinder/cinder.conf
|
||||||
echo "Configuring $conf."
|
echo "Configuring $conf."
|
||||||
@@ -91,9 +91,9 @@ iniset_sudo $conf DEFAULT auth_strategy keystone
|
|||||||
# Configure [keystone_authtoken] section.
|
# Configure [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$cinder_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$cinder_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$CINDER_PASS"
|
iniset_sudo $conf keystone_authtoken password "$CINDER_PASS"
|
||||||
@@ -106,12 +106,10 @@ iniset_sudo $conf lvm iscsi_protocol iscsi
|
|||||||
iniset_sudo $conf lvm iscsi_helper tgtadm
|
iniset_sudo $conf lvm iscsi_helper tgtadm
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT enabled_backends lvm
|
iniset_sudo $conf DEFAULT enabled_backends lvm
|
||||||
iniset_sudo $conf DEFAULT glance_host controller
|
iniset_sudo $conf DEFAULT glance_api_servers http://controller:9292
|
||||||
|
|
||||||
iniset_sudo $conf oslo_concurrency lock_path /var/lib/cinder/tmp
|
iniset_sudo $conf oslo_concurrency lock_path /var/lib/cinder/tmp
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
# Finalize installation
|
# Finalize installation
|
||||||
echo "Restarting cinder service."
|
echo "Restarting cinder service."
|
||||||
sudo service tgt restart
|
sudo service tgt restart
|
||||||
@@ -121,7 +119,7 @@ sudo rm -f /var/lib/cinder/cinder.sqlite
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Verify the Block Storage installation
|
# Verify the Block Storage installation
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/cinder-verify.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/cinder-verify.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Verifying Block Storage installation on controller node."
|
echo "Verifying Block Storage installation on controller node."
|
||||||
@@ -174,11 +172,11 @@ check_cinder_services
|
|||||||
echo "Sourcing the demo credentials."
|
echo "Sourcing the demo credentials."
|
||||||
AUTH="source $CONFIG_DIR/demo-openstackrc.sh"
|
AUTH="source $CONFIG_DIR/demo-openstackrc.sh"
|
||||||
|
|
||||||
echo "cinder create --display-name demo-volume1 1"
|
echo "openstack volume create --size 1 volume1"
|
||||||
node_ssh controller "$AUTH; cinder create --display-name demo-volume1 1;sleep 20"
|
node_ssh controller "$AUTH; openstack volume create --size 1 volume1;sleep 20"
|
||||||
|
|
||||||
echo -n "Waiting for cinder to list the new volume."
|
echo -n "Waiting for cinder to list the new volume."
|
||||||
until node_ssh controller "$AUTH; cinder list | grep demo-volume1" > /dev/null 2>&1; do
|
until node_ssh controller "$AUTH; openstack volume list| grep volume1" > /dev/null 2>&1; do
|
||||||
echo -n .
|
echo -n .
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
@@ -189,7 +187,7 @@ function wait_for_cinder_volume {
|
|||||||
echo -n 'Waiting for cinder volume to be created.'
|
echo -n 'Waiting for cinder volume to be created.'
|
||||||
local i=1
|
local i=1
|
||||||
while : ; do
|
while : ; do
|
||||||
if [[ -z $(node_ssh controller "$AUTH;cinder list" | grep creating) ]] > /dev/null 2>&1; then
|
if [[ -z $(node_ssh controller "$AUTH;openstack volume list" | grep creating) ]] > /dev/null 2>&1; then
|
||||||
# Proceed if the state of cinder-volumes is error or created.
|
# Proceed if the state of cinder-volumes is error or created.
|
||||||
# Cinder volumes cannot be deleted when it is in creating state.
|
# Cinder volumes cannot be deleted when it is in creating state.
|
||||||
# Throw an error and stop this script.
|
# Throw an error and stop this script.
|
||||||
@@ -200,7 +198,7 @@ function wait_for_cinder_volume {
|
|||||||
if [[ "$i" -gt "20" ]]; then
|
if [[ "$i" -gt "20" ]]; then
|
||||||
echo "Error creating cinder volume."
|
echo "Error creating cinder volume."
|
||||||
echo "[Warning]: Debug cinder volumes service on the compute node.
|
echo "[Warning]: Debug cinder volumes service on the compute node.
|
||||||
Delete the cinder-volume demo-volume1. Script could not delete this
|
Delete the cinder-volume volume1. Script could not delete this
|
||||||
volume."
|
volume."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -213,8 +211,8 @@ function wait_for_cinder_volume {
|
|||||||
echo "Checking if volume is created."
|
echo "Checking if volume is created."
|
||||||
wait_for_cinder_volume
|
wait_for_cinder_volume
|
||||||
|
|
||||||
echo "cinder delete demo-volume1"
|
echo "openstack volume delete volume1"
|
||||||
node_ssh controller "$AUTH; cinder delete demo-volume1"
|
node_ssh controller "$AUTH; openstack volume delete volume1"
|
||||||
|
|
||||||
echo "cinder list"
|
echo "openstack volume list"
|
||||||
node_ssh controller "$AUTH; cinder list"
|
node_ssh controller "$AUTH; openstack volume list"
|
||||||
|
@@ -14,7 +14,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Install the Image Service (glance).
|
# Install the Image Service (glance).
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/glance-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@@ -63,8 +63,12 @@ openstack endpoint create \
|
|||||||
--region "$REGION" \
|
--region "$REGION" \
|
||||||
image admin http://controller:9292
|
image admin http://controller:9292
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Install and configure components
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing glance."
|
echo "Installing glance."
|
||||||
sudo apt-get install -y glance python-glanceclient
|
sudo apt-get install -y glance
|
||||||
|
|
||||||
function get_database_url {
|
function get_database_url {
|
||||||
local db_user=$GLANCE_DB_USER
|
local db_user=$GLANCE_DB_USER
|
||||||
@@ -85,9 +89,10 @@ iniset_sudo $conf database connection "$database_url"
|
|||||||
# Keystone_authtoken
|
# Keystone_authtoken
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$glance_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$glance_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$GLANCE_PASS"
|
iniset_sudo $conf keystone_authtoken password "$GLANCE_PASS"
|
||||||
@@ -95,14 +100,11 @@ iniset_sudo $conf keystone_authtoken password "$GLANCE_PASS"
|
|||||||
# Paste_deploy
|
# Paste_deploy
|
||||||
iniset_sudo $conf paste_deploy flavor "keystone"
|
iniset_sudo $conf paste_deploy flavor "keystone"
|
||||||
|
|
||||||
# Glance_store
|
# glance_store
|
||||||
|
iniset_sudo $conf glance_store stores "file,http"
|
||||||
iniset_sudo $conf glance_store default_store file
|
iniset_sudo $conf glance_store default_store file
|
||||||
iniset_sudo $conf glance_store filesystem_store_datadir /var/lib/glance/images/
|
iniset_sudo $conf glance_store filesystem_store_datadir /var/lib/glance/images/
|
||||||
|
|
||||||
# Default section
|
|
||||||
iniset_sudo $conf DEFAULT notification_driver noop
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
echo "Configuring glance-registry.conf."
|
echo "Configuring glance-registry.conf."
|
||||||
conf=/etc/glance/glance-registry.conf
|
conf=/etc/glance/glance-registry.conf
|
||||||
|
|
||||||
@@ -112,9 +114,10 @@ iniset_sudo $conf database connection "$database_url"
|
|||||||
# Keystone authtoken section
|
# Keystone authtoken section
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$glance_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$glance_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$GLANCE_PASS"
|
iniset_sudo $conf keystone_authtoken password "$GLANCE_PASS"
|
||||||
@@ -122,10 +125,6 @@ iniset_sudo $conf keystone_authtoken password "$GLANCE_PASS"
|
|||||||
# Paste deploy section
|
# Paste deploy section
|
||||||
iniset_sudo $conf paste_deploy flavor "keystone"
|
iniset_sudo $conf paste_deploy flavor "keystone"
|
||||||
|
|
||||||
# Default section
|
|
||||||
iniset_sudo $conf DEFAULT notification_driver noop
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
echo "Creating the database tables for glance."
|
echo "Creating the database tables for glance."
|
||||||
sudo glance-manage db_sync
|
sudo glance-manage db_sync
|
||||||
|
|
||||||
@@ -138,31 +137,30 @@ sudo rm -f /var/lib/glance/glance.sqlite
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Verify the Image Service installation
|
# Verify the Image Service installation
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/glance-verify.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-verify.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Our openstackrc.sh files already set OS_IMAGE_API_VERSION, we can skip this
|
# Our openstackrc.sh files already set OS_IMAGE_API_VERSION, we can skip this
|
||||||
# step in the install-guide.
|
# step in the install-guide.
|
||||||
|
|
||||||
echo "Waiting for glance to start."
|
echo -n "Waiting for glance to start."
|
||||||
until glance image-list >/dev/null 2>&1; do
|
until openstack image list >/dev/null 2>&1; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
echo -n .
|
||||||
done
|
done
|
||||||
|
echo
|
||||||
|
|
||||||
# cirros-0.3.4-x86_64-disk.img -> cirros-0.3.4-x86_64
|
# cirros-0.3.4-x86_64-disk.img -> cirros-0.3.4-x86_64
|
||||||
img_name=$(basename $CIRROS_URL -disk.img)
|
img_name=$(basename $CIRROS_URL -disk.img)
|
||||||
|
|
||||||
echo "Adding CirrOS image as $img_name to glance."
|
echo "Adding CirrOS image as $img_name to glance."
|
||||||
|
|
||||||
glance image-create \
|
openstack image create "cirros" \
|
||||||
--name "$img_name" \
|
|
||||||
--file "$HOME/img/$(basename $CIRROS_URL)" \
|
--file "$HOME/img/$(basename $CIRROS_URL)" \
|
||||||
--disk-format qcow2 \
|
--disk-format qcow2 --container-format bare \
|
||||||
--container-format bare \
|
--public
|
||||||
--visibility public \
|
|
||||||
--progress
|
|
||||||
|
|
||||||
echo "Verifying that the image was successfully added to the service."
|
echo "Verifying that the image was successfully added to the service."
|
||||||
|
|
||||||
echo "glance image-list"
|
echo "openstack image list"
|
||||||
glance image-list
|
openstack image list
|
||||||
|
@@ -14,7 +14,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Install the Orchestration Service (heat).
|
# Install the Orchestration Service (heat).
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/heat-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/heat-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@@ -93,9 +93,9 @@ openstack user create \
|
|||||||
openstack role add \
|
openstack role add \
|
||||||
--domain heat \
|
--domain heat \
|
||||||
--user heat_domain_admin \
|
--user heat_domain_admin \
|
||||||
admin
|
"$ADMIN_ROLE_NAME"
|
||||||
|
|
||||||
echo "Creating the heat stack owner role."
|
echo "Creating the heat_stack_owner role."
|
||||||
openstack role create "heat_stack_owner"
|
openstack role create "heat_stack_owner"
|
||||||
|
|
||||||
openstack role add \
|
openstack role add \
|
||||||
@@ -103,7 +103,7 @@ openstack role add \
|
|||||||
--user "$DEMO_USER_NAME" \
|
--user "$DEMO_USER_NAME" \
|
||||||
"heat_stack_owner"
|
"heat_stack_owner"
|
||||||
|
|
||||||
echo "Creating the heat stack user role."
|
echo "Creating the heat_stack_user role."
|
||||||
openstack role create "heat_stack_user"
|
openstack role create "heat_stack_user"
|
||||||
|
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@@ -111,7 +111,15 @@ openstack role create "heat_stack_user"
|
|||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing heat."
|
echo "Installing heat."
|
||||||
sudo apt-get install -y heat-api heat-api-cfn heat-engine python-heatclient
|
|
||||||
|
# Prevent start of heat services here so they don't get confused by the default
|
||||||
|
# configuration files. Otherwise, it takes up to 3 minutes for the heat
|
||||||
|
# stack-list to appear after the heat services restart below.
|
||||||
|
echo "manual" | sudo tee /etc/init/heat-api.override
|
||||||
|
echo "manual" | sudo tee /etc/init/heat-api-cfn.override
|
||||||
|
echo "manual" | sudo tee /etc/init/heat-engine.override
|
||||||
|
|
||||||
|
sudo apt-get install -y heat-api heat-api-cfn heat-engine
|
||||||
|
|
||||||
function get_database_url {
|
function get_database_url {
|
||||||
local db_user=$HEAT_DB_USER
|
local db_user=$HEAT_DB_USER
|
||||||
@@ -140,9 +148,10 @@ iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
|
|||||||
# Configure [keystone_authtoken] section.
|
# Configure [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$heat_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$heat_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$HEAT_PASS"
|
iniset_sudo $conf keystone_authtoken password "$HEAT_PASS"
|
||||||
@@ -152,10 +161,10 @@ iniset_sudo $conf trustee auth_plugin password
|
|||||||
iniset_sudo $conf trustee auth_url http://controller:35357
|
iniset_sudo $conf trustee auth_url http://controller:35357
|
||||||
iniset_sudo $conf trustee username "$heat_admin_user"
|
iniset_sudo $conf trustee username "$heat_admin_user"
|
||||||
iniset_sudo $conf trustee password "$HEAT_PASS"
|
iniset_sudo $conf trustee password "$HEAT_PASS"
|
||||||
iniset_sudo $conf trustee user_domain_id default
|
iniset_sudo $conf trustee user_domain_name default
|
||||||
|
|
||||||
# Configure [clients_keystone] section.
|
# Configure [clients_keystone] section.
|
||||||
iniset_sudo $conf clients_keystone auth_uri http://controller:5000
|
iniset_sudo $conf clients_keystone auth_uri http://controller:35357
|
||||||
|
|
||||||
# Configure [ec2authtoken] section.
|
# Configure [ec2authtoken] section.
|
||||||
iniset_sudo $conf ec2authtoken auth_uri http://controller:5000
|
iniset_sudo $conf ec2authtoken auth_uri http://controller:5000
|
||||||
@@ -168,27 +177,39 @@ iniset_sudo $conf DEFAULT heat_waitcondition_server_url http://controller:8000/v
|
|||||||
iniset_sudo $conf DEFAULT stack_domain_admin heat_domain_admin
|
iniset_sudo $conf DEFAULT stack_domain_admin heat_domain_admin
|
||||||
iniset_sudo $conf DEFAULT stack_domain_admin_password "$HEAT_DOMAIN_PASS"
|
iniset_sudo $conf DEFAULT stack_domain_admin_password "$HEAT_DOMAIN_PASS"
|
||||||
iniset_sudo $conf DEFAULT stack_user_domain_name heat
|
iniset_sudo $conf DEFAULT stack_user_domain_name heat
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
echo "Creating the database tables for heat."
|
echo "Creating the database tables for heat."
|
||||||
sudo heat-manage db_sync
|
sudo heat-manage db_sync
|
||||||
|
|
||||||
echo "Restarting heat service."
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Finalize installation
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
# Re-enable automatic start of heat services
|
||||||
|
sudo rm /etc/init/heat-api.override
|
||||||
|
sudo rm /etc/init/heat-api-cfn.override
|
||||||
|
sudo rm /etc/init/heat-engine.override
|
||||||
|
|
||||||
|
echo "Restarting heat services."
|
||||||
|
STARTTIME=$(date +%s)
|
||||||
sudo service heat-api restart
|
sudo service heat-api restart
|
||||||
sudo service heat-api-cfn restart
|
sudo service heat-api-cfn restart
|
||||||
sudo service heat-engine restart
|
sudo service heat-engine restart
|
||||||
|
|
||||||
echo "Waiting for heat stack-list."
|
echo -n "Waiting for heat stack-list."
|
||||||
until heat stack-list; do
|
until heat stack-list; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
echo -n .
|
||||||
done
|
done
|
||||||
|
ENDTIME=$(date +%s)
|
||||||
|
echo "Restarting heat servies took $((ENDTIME - STARTTIME)) seconds."
|
||||||
|
|
||||||
echo "Removing default SQLite database."
|
echo "Removing default SQLite database."
|
||||||
sudo rm -f /var/lib/heat/heat.sqlite
|
sudo rm -f /var/lib/heat/heat.sqlite
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Verify operation of Orchestration Service (heat).
|
# Verify operation of Orchestration Service (heat).
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/heat-verify.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/heat-verify.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Listing service components."
|
echo "Listing service components."
|
||||||
|
@@ -13,15 +13,16 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up OpenStack Dashboard (horizon)
|
# Set up OpenStack Dashboard (horizon)
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/horizon-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/horizon-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Install and configure components
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing horizon."
|
echo "Installing horizon."
|
||||||
sudo apt-get install -y openstack-dashboard
|
sudo apt-get install -y openstack-dashboard
|
||||||
|
|
||||||
echo "Purging Ubuntu theme."
|
|
||||||
sudo dpkg --purge openstack-dashboard-ubuntu-theme
|
|
||||||
|
|
||||||
# Edit the /etc/openstack-dashboard/local_settings.py file.
|
# Edit the /etc/openstack-dashboard/local_settings.py file.
|
||||||
conf=/etc/openstack-dashboard/local_settings.py
|
conf=/etc/openstack-dashboard/local_settings.py
|
||||||
auth_host=controller
|
auth_host=controller
|
||||||
@@ -29,29 +30,77 @@ auth_host=controller
|
|||||||
echo "Setting OPENSTACK_HOST = \"$auth_host\"."
|
echo "Setting OPENSTACK_HOST = \"$auth_host\"."
|
||||||
iniset_sudo_no_section $conf "OPENSTACK_HOST" "\"$auth_host\""
|
iniset_sudo_no_section $conf "OPENSTACK_HOST" "\"$auth_host\""
|
||||||
|
|
||||||
echo -n "Allowed hosts: "
|
echo "Allowing all hosts to access the dashboard: "
|
||||||
iniset_sudo_no_section $conf "ALLOWED_HOSTS" "['*', ]"
|
iniset_sudo_no_section $conf "ALLOWED_HOSTS" "['*', ]"
|
||||||
|
|
||||||
|
echo "Telling horizon to use the cache for sessions."
|
||||||
|
iniset_sudo_no_section $conf "SESSION_ENGINE" "'django.contrib.sessions.backends.cache'"
|
||||||
|
|
||||||
|
echo "Setting interface location of memcached."
|
||||||
|
sudo sed -i "/LOCATION/ s/127.0.0.1/controller/" $conf
|
||||||
|
|
||||||
|
echo "Comparing $conf to memcached.conf."
|
||||||
memcached_conf=/etc/memcached.conf
|
memcached_conf=/etc/memcached.conf
|
||||||
# Port is a number on line starting with "-p "
|
# Port is a number on line starting with "-p "
|
||||||
port=$(grep -Po -- '(?<=^-p )\d+' $memcached_conf)
|
port=$(grep -Po -- '(?<=^-p )\d+' $memcached_conf)
|
||||||
|
|
||||||
# Interface is an IP address on line starting with "-l "
|
# Interface is an IP address on line starting with "-l "
|
||||||
interface=$(grep -Po -- '(?<=^-l )[\d\.]+' $memcached_conf)
|
interface_ip=$(grep -Po -- '(?<=^-l )[\d\.]+' $memcached_conf)
|
||||||
|
|
||||||
echo "memcached listening on $interface:$port."
|
echo "memcached listening on $interface_ip:$port."
|
||||||
|
|
||||||
# Line should read something like: 'LOCATION' : '127.0.0.1:11211',
|
# Turn IP address into corresponding host name
|
||||||
if grep "LOCATION.*$interface:$port" $conf; then
|
interface_name=$(getent hosts "$auth_host" | awk '{ print $2 }')
|
||||||
|
|
||||||
|
# Line should read something like: 'LOCATION' : 'controller:11211',
|
||||||
|
if grep "LOCATION.*$interface_name:$port" $conf; then
|
||||||
echo "$conf agrees."
|
echo "$conf agrees."
|
||||||
else
|
else
|
||||||
echo >&2 "$conf disagrees. Aborting."
|
echo >&2 "$conf disagrees. Aborting."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Configure user as the default role for users created via dashboard.
|
echo "CACHES configuration in $conf:"
|
||||||
|
awk '/^CACHES =/,/^}/' $conf
|
||||||
|
|
||||||
|
echo "Enabling Identity API version 3."
|
||||||
|
iniset_sudo_no_section $conf "OPENSTACK_KEYSTONE_URL" '"http://%s:5000/v3" % OPENSTACK_HOST'
|
||||||
|
|
||||||
|
echo "Enabling support for domains."
|
||||||
|
iniset_sudo_no_section $conf "OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT" True
|
||||||
|
|
||||||
|
cat << API | sudo tee -a $conf
|
||||||
|
|
||||||
|
# Use Keystone V3 API for dashboard login.
|
||||||
|
OPENSTACK_API_VERSIONS = {
|
||||||
|
"identity": 3,
|
||||||
|
"image": 2,
|
||||||
|
"volume": 2,
|
||||||
|
}
|
||||||
|
API
|
||||||
|
|
||||||
|
echo "Configuring 'default' as the default domain for users created via " \
|
||||||
|
"dashboard."
|
||||||
|
iniset_sudo_no_section $conf "OPENSTACK_KEYSTONE_DEFAULT_DOMAIN" '"default"'
|
||||||
|
|
||||||
|
echo "Configuring 'user' as the default role for users created via dashboard."
|
||||||
iniset_sudo_no_section $conf "OPENSTACK_KEYSTONE_DEFAULT_ROLE" '"user"'
|
iniset_sudo_no_section $conf "OPENSTACK_KEYSTONE_DEFAULT_ROLE" '"user"'
|
||||||
|
|
||||||
|
# Here, we would disable layer-3 networking servies for networking option 1.
|
||||||
|
|
||||||
|
echo "Setting timezone to UTC."
|
||||||
iniset_sudo_no_section $conf "TIME_ZONE" '"UTC"'
|
iniset_sudo_no_section $conf "TIME_ZONE" '"UTC"'
|
||||||
|
|
||||||
echo "Reloading apache and memcached service."
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Customize Horizon
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
echo "Removing default Ubuntu theme."
|
||||||
|
sudo apt-get remove --auto-remove -y openstack-dashboard-ubuntu-theme
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Finalize installation
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
echo "Reloading the web server configuration."
|
||||||
sudo service apache2 reload
|
sudo service apache2 reload
|
||||||
|
@@ -15,7 +15,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up keystone for controller node
|
# Set up keystone for controller node
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Setting up database for keystone."
|
echo "Setting up database for keystone."
|
||||||
@@ -31,12 +31,8 @@ echo "$ADMIN_TOKEN"
|
|||||||
echo "Disabling the keystone service from starting automatically after installation."
|
echo "Disabling the keystone service from starting automatically after installation."
|
||||||
echo "manual" | sudo tee /etc/init/keystone.override
|
echo "manual" | sudo tee /etc/init/keystone.override
|
||||||
|
|
||||||
echo "Installing python openstack client"
|
echo "Installing keystone packages."
|
||||||
sudo apt-get install -y python-openstackclient
|
sudo apt-get install -y keystone apache2 libapache2-mod-wsgi
|
||||||
|
|
||||||
echo "Installing keystone."
|
|
||||||
sudo apt-get install -y keystone apache2 \
|
|
||||||
libapache2-mod-wsgi memcached python-memcache
|
|
||||||
|
|
||||||
conf=/etc/keystone/keystone.conf
|
conf=/etc/keystone/keystone.conf
|
||||||
echo "Configuring [DEFAULT] section in $conf."
|
echo "Configuring [DEFAULT] section in $conf."
|
||||||
@@ -58,26 +54,22 @@ echo "Configuring [database] section in /etc/keystone/keystone.conf."
|
|||||||
echo "Setting database connection: $database_url."
|
echo "Setting database connection: $database_url."
|
||||||
iniset_sudo $conf database connection "$database_url"
|
iniset_sudo $conf database connection "$database_url"
|
||||||
|
|
||||||
echo "Configuring the Memcache service."
|
echo "Configuring the Fernet token provider."
|
||||||
iniset_sudo $conf memcache servers localhost:11211
|
iniset_sudo $conf token provider fernet
|
||||||
|
|
||||||
echo "Configuring the UUID token provider and SQL driver."
|
|
||||||
iniset_sudo $conf token provider uuid
|
|
||||||
iniset_sudo $conf token driver memcache
|
|
||||||
|
|
||||||
echo "Configuring the SQL revocation driver."
|
|
||||||
iniset_sudo $conf revoke driver sql
|
|
||||||
|
|
||||||
echo "Enabling verbose logging."
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
echo "Creating the database tables for keystone."
|
echo "Creating the database tables for keystone."
|
||||||
sudo keystone-manage db_sync
|
sudo keystone-manage db_sync
|
||||||
|
|
||||||
|
echo "Initializing Fernet keys."
|
||||||
|
sudo keystone-manage fernet_setup \
|
||||||
|
--keystone-user keystone \
|
||||||
|
--keystone-group keystone
|
||||||
|
|
||||||
# Configure Apache HTTP server.
|
# Configure Apache HTTP server.
|
||||||
|
|
||||||
echo "Configuring ServerName option in /etc/apache2/apache2.conf to reference controller node."
|
conf=/etc/apache2/apache2.conf
|
||||||
echo "ServerName controller" | sudo tee -a /etc/apache2/apache2.conf
|
echo "Configuring ServerName option in $conf to reference controller node."
|
||||||
|
echo "ServerName controller" | sudo tee -a $conf
|
||||||
|
|
||||||
echo "Creating /etc/apache2/sites-available/wsgi-keystone.conf."
|
echo "Creating /etc/apache2/sites-available/wsgi-keystone.conf."
|
||||||
cat << WSGI | sudo tee -a /etc/apache2/sites-available/wsgi-keystone.conf
|
cat << WSGI | sudo tee -a /etc/apache2/sites-available/wsgi-keystone.conf
|
||||||
@@ -143,14 +135,22 @@ sudo rm -f /var/lib/keystone/keystone.db
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Create the service entity and API endpoints
|
# Create the service entity and API endpoints
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-services.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-services.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Prerequisites
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Using OS_TOKEN, OS_URL for authentication."
|
echo "Using OS_TOKEN, OS_URL for authentication."
|
||||||
export OS_TOKEN=$ADMIN_TOKEN
|
export OS_TOKEN=$ADMIN_TOKEN
|
||||||
export OS_URL=http://controller:35357/v3
|
export OS_URL=http://controller:35357/v3
|
||||||
export OS_IDENTITY_API_VERSION=3
|
export OS_IDENTITY_API_VERSION=3
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Create the service entity and API endpoints
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Creating keystone service."
|
echo "Creating keystone service."
|
||||||
openstack service create \
|
openstack service create \
|
||||||
--name keystone \
|
--name keystone \
|
||||||
@@ -159,22 +159,27 @@ openstack service create \
|
|||||||
|
|
||||||
echo "Creating endpoints for keystone."
|
echo "Creating endpoints for keystone."
|
||||||
openstack endpoint create --region "$REGION" \
|
openstack endpoint create --region "$REGION" \
|
||||||
identity public http://controller:5000/v2.0
|
identity public http://controller:5000/v3
|
||||||
|
|
||||||
openstack endpoint create --region "$REGION" \
|
openstack endpoint create --region "$REGION" \
|
||||||
identity internal http://controller:5000/v2.0
|
identity internal http://controller:5000/v3
|
||||||
|
|
||||||
openstack endpoint create --region "$REGION" \
|
openstack endpoint create --region "$REGION" \
|
||||||
identity admin http://controller:35357/v2.0
|
identity admin http://controller:35357/v3
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Create projects, users, and roles
|
# Create projects, users, and roles
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-users.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-users.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Wait for keystone to come up
|
# Wait for keystone to come up
|
||||||
wait_for_keystone
|
wait_for_keystone
|
||||||
|
|
||||||
|
echo "Creating default domain."
|
||||||
|
openstack domain create \
|
||||||
|
--description "Default Domain" \
|
||||||
|
default
|
||||||
|
|
||||||
echo "Creating admin project."
|
echo "Creating admin project."
|
||||||
openstack project create --domain default \
|
openstack project create --domain default \
|
||||||
--description "Admin Project" \
|
--description "Admin Project" \
|
||||||
@@ -221,7 +226,7 @@ openstack role add \
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Verify operation
|
# Verify operation
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-verify.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-verify.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Verifying keystone installation."
|
echo "Verifying keystone installation."
|
||||||
@@ -242,67 +247,73 @@ unset OS_TOKEN OS_URL
|
|||||||
echo "Requesting an authentication token as an admin user."
|
echo "Requesting an authentication token as an admin user."
|
||||||
openstack \
|
openstack \
|
||||||
--os-auth-url http://controller:35357/v3 \
|
--os-auth-url http://controller:35357/v3 \
|
||||||
--os-project-domain-id default \
|
--os-project-domain-name default \
|
||||||
--os-user-domain-id default \
|
--os-user-domain-name default \
|
||||||
--os-project-name "$ADMIN_PROJECT_NAME" \
|
--os-project-name "$ADMIN_PROJECT_NAME" \
|
||||||
--os-username "$ADMIN_USER_NAME" \
|
--os-username "$ADMIN_USER_NAME" \
|
||||||
--os-auth-type password \
|
--os-auth-type password \
|
||||||
--os-password "$ADMIN_PASS" \
|
--os-password "$ADMIN_PASS" \
|
||||||
token issue
|
token issue
|
||||||
|
|
||||||
echo "Requesting project list."
|
#echo "Requesting project list."
|
||||||
openstack \
|
#openstack \
|
||||||
--os-auth-url http://controller:35357 \
|
# --os-auth-url http://controller:35357 \
|
||||||
--os-project-name "$ADMIN_PROJECT_NAME" \
|
# --os-project-domain-name default \
|
||||||
--os-username "$ADMIN_USER_NAME" \
|
# --os-user-domain-name default \
|
||||||
--os-auth-type password \
|
# --os-project-name "$ADMIN_PROJECT_NAME" \
|
||||||
--os-password "$ADMIN_PASS" \
|
# --os-username "$ADMIN_USER_NAME" \
|
||||||
project list
|
# --os-auth-type password \
|
||||||
|
# --os-password "$ADMIN_PASS" \
|
||||||
echo "Requesting user list."
|
# project list
|
||||||
openstack \
|
#
|
||||||
--os-auth-url http://controller:35357 \
|
#echo "Requesting user list."
|
||||||
--os-project-name "$ADMIN_PROJECT_NAME" \
|
#openstack \
|
||||||
--os-username "$ADMIN_USER_NAME" \
|
# --os-auth-url http://controller:35357/v3 \
|
||||||
--os-auth-type password \
|
# --os-project-domain-name default \
|
||||||
--os-password "$ADMIN_PASS" \
|
# --os-user-domain-name default \
|
||||||
user list
|
# --os-project-name "$ADMIN_PROJECT_NAME" \
|
||||||
|
# --os-username "$ADMIN_USER_NAME" \
|
||||||
echo "Requesting role list."
|
# --os-auth-type password \
|
||||||
openstack \
|
# --os-password "$ADMIN_PASS" \
|
||||||
--os-auth-url http://controller:35357 \
|
# user list
|
||||||
--os-project-name "$ADMIN_PROJECT_NAME" \
|
#
|
||||||
--os-username "$ADMIN_USER_NAME" \
|
#echo "Requesting role list."
|
||||||
--os-auth-type password \
|
#openstack \
|
||||||
--os-password "$ADMIN_PASS" \
|
# --os-auth-url http://controller:35357/v3 \
|
||||||
role list
|
# --os-project-domain-name default \
|
||||||
|
# --os-user-domain-name default \
|
||||||
|
# --os-project-name "$ADMIN_PROJECT_NAME" \
|
||||||
|
# --os-username "$ADMIN_USER_NAME" \
|
||||||
|
# --os-auth-type password \
|
||||||
|
# --os-password "$ADMIN_PASS" \
|
||||||
|
# role list
|
||||||
|
|
||||||
echo "Requesting an authentication token for the demo user."
|
echo "Requesting an authentication token for the demo user."
|
||||||
openstack \
|
openstack \
|
||||||
--os-auth-url http://controller:5000/v3 \
|
--os-auth-url http://controller:5000/v3 \
|
||||||
--os-project-domain-id default \
|
--os-project-domain-name default \
|
||||||
--os-user-domain-id default \
|
--os-user-domain-name default \
|
||||||
--os-project-name "$DEMO_PROJECT_NAME" \
|
--os-project-name "$DEMO_PROJECT_NAME" \
|
||||||
--os-username "$DEMO_USER_NAME" \
|
--os-username "$DEMO_USER_NAME" \
|
||||||
--os-auth-type password \
|
--os-auth-type password \
|
||||||
--os-password "$DEMO_PASS" \
|
--os-password "$DEMO_PASS" \
|
||||||
token issue
|
token issue
|
||||||
|
|
||||||
echo "Verifying that an admin-only request by the demo user is denied."
|
#echo "Verifying that an admin-only request by the demo user is denied."
|
||||||
openstack \
|
#openstack \
|
||||||
--os-auth-url http://controller:5000 \
|
# --os-auth-url http://controller:5000/v3 \
|
||||||
--os-project-domain-id default \
|
# --os-project-domain-name default \
|
||||||
--os-user-domain-id default \
|
# --os-user-domain-name default \
|
||||||
--os-project-name "$DEMO_PROJECT_NAME" \
|
# --os-project-name "$DEMO_PROJECT_NAME" \
|
||||||
--os-username "$DEMO_USER_NAME" \
|
# --os-username "$DEMO_USER_NAME" \
|
||||||
--os-auth-type password \
|
# --os-auth-type password \
|
||||||
--os-password "$DEMO_PASS" \
|
# --os-password "$DEMO_PASS" \
|
||||||
user list || rc=$?
|
# user list || rc=$?
|
||||||
|
#
|
||||||
echo rc=$rc
|
#echo rc=$rc
|
||||||
if [ $rc -eq 0 ]; then
|
#if [ $rc -eq 0 ]; then
|
||||||
echo "The request was not denied. This is an error. Exiting."
|
# echo "The request was not denied. This is an error. Exiting."
|
||||||
exit 1
|
# exit 1
|
||||||
else
|
#else
|
||||||
echo "The request was correctly denied."
|
# echo "The request was correctly denied."
|
||||||
fi
|
#fi
|
||||||
|
@@ -15,11 +15,15 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up OpenStack Networking (neutron) for compute node.
|
# Set up OpenStack Networking (neutron) for compute node.
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/neutron-compute-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Installing networking components for compute node."
|
echo "Installing networking components for compute node."
|
||||||
sudo apt-get install -y neutron-plugin-linuxbridge-agent
|
sudo apt-get install -y neutron-linuxbridge-agent
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure the common component
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring neutron for compute node."
|
echo "Configuring neutron for compute node."
|
||||||
|
|
||||||
@@ -41,11 +45,10 @@ neutron_admin_user=$(service_to_user_name neutron)
|
|||||||
# Configuring [keystone_authtoken] section
|
# Configuring [keystone_authtoken] section
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$neutron_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$neutron_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$NEUTRON_PASS"
|
iniset_sudo $conf keystone_authtoken password "$NEUTRON_PASS"
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
@@ -15,31 +15,49 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up OpenStack Networking (neutron) for compute node.
|
# Set up OpenStack Networking (neutron) for compute node.
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/neutron-compute-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure Compute to use Networking
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
neutron_admin_user=$(service_to_user_name neutron)
|
neutron_admin_user=$(service_to_user_name neutron)
|
||||||
|
|
||||||
echo "Configuring Compute to use Networking."
|
echo "Configuring Compute to use Networking."
|
||||||
conf=/etc/nova/nova.conf
|
conf=/etc/nova/nova.conf
|
||||||
iniset_sudo $conf neutron url http://controller:9696
|
iniset_sudo $conf neutron url http://controller:9696
|
||||||
iniset_sudo $conf neutron auth_url http://controller:35357
|
iniset_sudo $conf neutron auth_url http://controller:35357
|
||||||
|
# No complaints without auth_type
|
||||||
|
#iniset_sudo $conf neutron auth_type password
|
||||||
|
# without this auth_plugin, launch vm failed (image not found, flavor not found etc.)
|
||||||
iniset_sudo $conf neutron auth_plugin password
|
iniset_sudo $conf neutron auth_plugin password
|
||||||
iniset_sudo $conf neutron project_domain_id default
|
iniset_sudo $conf neutron project_domain_name default
|
||||||
iniset_sudo $conf neutron user_domain_id default
|
iniset_sudo $conf neutron user_domain_name default
|
||||||
iniset_sudo $conf neutron region_name "$REGION"
|
iniset_sudo $conf neutron region_name "$REGION"
|
||||||
iniset_sudo $conf neutron project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf neutron project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf neutron username "$neutron_admin_user"
|
iniset_sudo $conf neutron username "$neutron_admin_user"
|
||||||
iniset_sudo $conf neutron password "$NEUTRON_PASS"
|
iniset_sudo $conf neutron password "$NEUTRON_PASS"
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Finalize installation
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Restarting the Compute service."
|
echo "Restarting the Compute service."
|
||||||
sudo service nova-compute restart
|
sudo service nova-compute restart
|
||||||
|
|
||||||
echo "Restarting neutron-plugin-linuxbridge-agent."
|
echo "Restarting neutron-linuxbridge-agent."
|
||||||
sudo service neutron-plugin-linuxbridge-agent restart
|
sudo service neutron-linuxbridge-agent restart
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Networking Option 2: Self-service networks
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-verify-option2.html
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Sourcing the admin credentials."
|
echo "Sourcing the admin credentials."
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
|
||||||
|
echo "List agents to verify successful launch of the neutron agents."
|
||||||
|
|
||||||
echo "neutron agent-list"
|
echo "neutron agent-list"
|
||||||
neutron agent-list
|
neutron agent-list
|
||||||
|
@@ -14,7 +14,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up OpenStack Networking (neutron) for controller node.
|
# Set up OpenStack Networking (neutron) for controller node.
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/neutron-controller-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Setting up database for neutron."
|
echo "Setting up database for neutron."
|
||||||
|
@@ -14,7 +14,7 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up OpenStack Networking (neutron) for controller node.
|
# Set up OpenStack Networking (neutron) for controller node.
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/neutron-controller-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
@@ -24,14 +24,18 @@ neutron_admin_user=$(service_to_user_name neutron)
|
|||||||
# Wait for keystone to come up
|
# Wait for keystone to come up
|
||||||
wait_for_keystone
|
wait_for_keystone
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure the metadata agent
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring the metadata agent."
|
echo "Configuring the metadata agent."
|
||||||
conf=/etc/neutron/metadata_agent.ini
|
conf=/etc/neutron/metadata_agent.ini
|
||||||
iniset_sudo $conf DEFAULT auth_uri http://controller:5000
|
iniset_sudo $conf DEFAULT auth_uri http://controller:5000
|
||||||
iniset_sudo $conf DEFAULT auth_url http://controller:35357
|
iniset_sudo $conf DEFAULT auth_url http://controller:35357
|
||||||
iniset_sudo $conf DEFAULT auth_region "$REGION"
|
iniset_sudo $conf DEFAULT auth_region "$REGION"
|
||||||
iniset_sudo $conf DEFAULT auth_plugin password
|
iniset_sudo $conf DEFAULT auth_type password
|
||||||
iniset_sudo $conf DEFAULT project_domain_id default
|
iniset_sudo $conf DEFAULT project_domain_name default
|
||||||
iniset_sudo $conf DEFAULT user_domain_id default
|
iniset_sudo $conf DEFAULT user_domain_name default
|
||||||
iniset_sudo $conf DEFAULT project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf DEFAULT project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf DEFAULT username "$neutron_admin_user"
|
iniset_sudo $conf DEFAULT username "$neutron_admin_user"
|
||||||
iniset_sudo $conf DEFAULT password "$NEUTRON_PASS"
|
iniset_sudo $conf DEFAULT password "$NEUTRON_PASS"
|
||||||
@@ -40,15 +44,22 @@ iniset_sudo $conf DEFAULT nova_metadata_ip controller
|
|||||||
|
|
||||||
iniset_sudo $conf DEFAULT metadata_proxy_shared_secret "$METADATA_SECRET"
|
iniset_sudo $conf DEFAULT metadata_proxy_shared_secret "$METADATA_SECRET"
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure Compute to use Networking
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring Compute to use Networking."
|
echo "Configuring Compute to use Networking."
|
||||||
conf=/etc/nova/nova.conf
|
conf=/etc/nova/nova.conf
|
||||||
iniset_sudo $conf neutron url http://controller:9696
|
iniset_sudo $conf neutron url http://controller:9696
|
||||||
iniset_sudo $conf neutron auth_url http://controller:35357
|
iniset_sudo $conf neutron auth_url http://controller:35357
|
||||||
|
# no complaints without auth_type
|
||||||
|
#iniset_sudo $conf neutron auth_type password
|
||||||
|
# without this auth_plugin line, we get
|
||||||
|
# Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
|
||||||
|
# <class 'neutronclient.common.exceptions.Unauthorized'> (HTTP 500) (Request-ID: req-1ac10a31-4da0-4bdc-8f9f-7d941b408072)
|
||||||
iniset_sudo $conf neutron auth_plugin password
|
iniset_sudo $conf neutron auth_plugin password
|
||||||
iniset_sudo $conf neutron project_domain_id default
|
iniset_sudo $conf neutron project_domain_name default
|
||||||
iniset_sudo $conf neutron user_domain_id default
|
iniset_sudo $conf neutron user_domain_name default
|
||||||
iniset_sudo $conf neutron region_name "$REGION"
|
iniset_sudo $conf neutron region_name "$REGION"
|
||||||
iniset_sudo $conf neutron project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf neutron project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf neutron username "$neutron_admin_user"
|
iniset_sudo $conf neutron username "$neutron_admin_user"
|
||||||
@@ -57,6 +68,10 @@ iniset_sudo $conf neutron password "$NEUTRON_PASS"
|
|||||||
iniset_sudo $conf neutron service_metadata_proxy True
|
iniset_sudo $conf neutron service_metadata_proxy True
|
||||||
iniset_sudo $conf neutron metadata_proxy_shared_secret "$METADATA_SECRET"
|
iniset_sudo $conf neutron metadata_proxy_shared_secret "$METADATA_SECRET"
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Finalize installation
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
sudo neutron-db-manage \
|
sudo neutron-db-manage \
|
||||||
--config-file /etc/neutron/neutron.conf \
|
--config-file /etc/neutron/neutron.conf \
|
||||||
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
|
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
|
||||||
@@ -68,8 +83,8 @@ sudo service nova-api restart
|
|||||||
echo "Restarting neutron-server."
|
echo "Restarting neutron-server."
|
||||||
sudo service neutron-server restart
|
sudo service neutron-server restart
|
||||||
|
|
||||||
echo "Restarting neutron-plugin-linuxbridge-agent."
|
echo "Restarting neutron-linuxbridge-agent."
|
||||||
sudo service neutron-plugin-linuxbridge-agent restart
|
sudo service neutron-linuxbridge-agent restart
|
||||||
|
|
||||||
echo "Restarting neutron-dhcp-agent."
|
echo "Restarting neutron-dhcp-agent."
|
||||||
sudo service neutron-dhcp-agent restart
|
sudo service neutron-dhcp-agent restart
|
||||||
@@ -86,6 +101,11 @@ fi
|
|||||||
echo "Removing default SQLite database."
|
echo "Removing default SQLite database."
|
||||||
sudo rm -f /var/lib/neutron/neutron.sqlite
|
sudo rm -f /var/lib/neutron/neutron.sqlite
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Set up OpenStack Networking (neutron) for controller node.
|
||||||
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-verify.html
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Verifying operation."
|
echo "Verifying operation."
|
||||||
until neutron ext-list >/dev/null 2>&1; do
|
until neutron ext-list >/dev/null 2>&1; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@@ -15,13 +15,18 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Set up OpenStack Compute (nova) for compute node.
|
# Set up OpenStack Compute (nova) for compute node.
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/nova-compute-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/nova-compute-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Installing nova for compute node."
|
echo "Installing nova for compute node."
|
||||||
# TODO Option to use nova-compute instead if we are inside KVM VM
|
|
||||||
# We can't use KVM inside VirtualBox.
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
sudo apt-get install -y nova-compute-qemu sysfsutils
|
# NOTE We deviate slightly from the install-guide here because inside our VMs,
|
||||||
|
# we cannot use KVM inside VirtualBox.
|
||||||
|
# TODO Add option to use nova-compute instead if we are inside a VM that allows
|
||||||
|
# using KVM.
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
sudo apt-get install -y nova-compute-qemu
|
||||||
|
|
||||||
echo "Configuring nova for compute node."
|
echo "Configuring nova for compute node."
|
||||||
|
|
||||||
@@ -46,33 +51,39 @@ MY_MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
|||||||
# Configure [keystone_authtoken] section.
|
# Configure [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$nova_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$nova_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$NOVA_PASS"
|
iniset_sudo $conf keystone_authtoken password "$NOVA_PASS"
|
||||||
|
|
||||||
# Configure [DEFAULT] section.
|
# Configure [DEFAULT] section.
|
||||||
iniset_sudo $conf DEFAULT my_ip "$MY_MGMT_IP"
|
iniset_sudo $conf DEFAULT my_ip "$MY_MGMT_IP"
|
||||||
iniset_sudo $conf DEFAULT network_api_class nova.network.neutronv2.api.API
|
iniset_sudo $conf DEFAULT use_neutron True
|
||||||
iniset_sudo $conf DEFAULT security_group_api neutron
|
|
||||||
iniset_sudo $conf DEFAULT linuxnet_interface_driver nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
|
|
||||||
iniset_sudo $conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
|
iniset_sudo $conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
|
||||||
|
|
||||||
# Configure [vnc] section.
|
# Configure [vnc] section.
|
||||||
iniset_sudo $conf vnc vnc_enabled True
|
iniset_sudo $conf vnc vnc_enabled True
|
||||||
iniset_sudo $conf vnc vncserver_listen 0.0.0.0
|
iniset_sudo $conf vnc vncserver_listen 0.0.0.0
|
||||||
iniset_sudo $conf vnc vncserver_proxyclient_address '$my_ip'
|
iniset_sudo $conf vnc vncserver_proxyclient_address '$my_ip'
|
||||||
|
# Using IP address because the host running the browser may not be able to
|
||||||
|
# resolve the host name "controller"
|
||||||
iniset_sudo $conf vnc novncproxy_base_url http://"$(hostname_to_ip controller)":6080/vnc_auto.html
|
iniset_sudo $conf vnc novncproxy_base_url http://"$(hostname_to_ip controller)":6080/vnc_auto.html
|
||||||
|
|
||||||
# Configure [glance] section.
|
# Configure [glance] section.
|
||||||
iniset_sudo $conf glance host controller
|
iniset_sudo $conf glance api_servers http://controller:9292
|
||||||
|
|
||||||
|
# Configure [oslo_concurrency] section.
|
||||||
iniset_sudo $conf oslo_concurrency lock_path /var/lib/nova/tmp
|
iniset_sudo $conf oslo_concurrency lock_path /var/lib/nova/tmp
|
||||||
|
|
||||||
# Configure [DEFAULT] section.
|
# Delete logdir line
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
sudo sed -i "/^logdir/ d" $conf
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Finalize installation
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
# Configure nova-compute.conf
|
# Configure nova-compute.conf
|
||||||
conf=/etc/nova/nova-compute.conf
|
conf=/etc/nova/nova-compute.conf
|
||||||
|
@@ -14,12 +14,19 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Install Compute controller services
|
# Install Compute controller services
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/nova-controller-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/nova-controller-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Setting up database for nova."
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Prerequisites
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
echo "Setting up database nova."
|
||||||
setup_database nova "$NOVA_DB_USER" "$NOVA_DBPASS"
|
setup_database nova "$NOVA_DB_USER" "$NOVA_DBPASS"
|
||||||
|
|
||||||
|
echo "Setting up database nova_api."
|
||||||
|
setup_database nova_api "$NOVA_DB_USER" "$NOVA_DBPASS"
|
||||||
|
|
||||||
echo "Sourcing the admin credentials."
|
echo "Sourcing the admin credentials."
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
|
||||||
@@ -48,38 +55,42 @@ openstack service create \
|
|||||||
echo "Creating nova endpoints."
|
echo "Creating nova endpoints."
|
||||||
openstack endpoint create \
|
openstack endpoint create \
|
||||||
--region "$REGION" \
|
--region "$REGION" \
|
||||||
compute public http://controller:8774/v2/%\(tenant_id\)s
|
compute public http://controller:8774/v2.1/%\(tenant_id\)s
|
||||||
|
|
||||||
openstack endpoint create \
|
openstack endpoint create \
|
||||||
--region "$REGION" \
|
--region "$REGION" \
|
||||||
compute internal http://controller:8774/v2/%\(tenant_id\)s
|
compute internal http://controller:8774/v2.1/%\(tenant_id\)s
|
||||||
|
|
||||||
openstack endpoint create \
|
openstack endpoint create \
|
||||||
--region "$REGION" \
|
--region "$REGION" \
|
||||||
compute admin http://controller:8774/v2/%\(tenant_id\)s
|
compute admin http://controller:8774/v2.1/%\(tenant_id\)s
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Install and configure components
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing nova for controller node."
|
echo "Installing nova for controller node."
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y nova-api nova-cert nova-conductor \
|
||||||
nova-api nova-cert nova-conductor nova-consoleauth \
|
nova-consoleauth nova-novncproxy nova-scheduler
|
||||||
nova-novncproxy nova-scheduler python-novaclient
|
|
||||||
|
|
||||||
function get_database_url {
|
|
||||||
local db_user=$NOVA_DB_USER
|
|
||||||
local database_host=controller
|
|
||||||
|
|
||||||
echo "mysql+pymysql://$db_user:$NOVA_DBPASS@$database_host/nova"
|
|
||||||
}
|
|
||||||
|
|
||||||
database_url=$(get_database_url)
|
|
||||||
|
|
||||||
conf=/etc/nova/nova.conf
|
conf=/etc/nova/nova.conf
|
||||||
|
|
||||||
|
# Configure [DEFAULT] section.
|
||||||
|
iniset_sudo $conf DEFAULT enabled_apis osapi_compute,metadata
|
||||||
|
|
||||||
|
# Configure [api_database] section.
|
||||||
|
database_url="mysql+pymysql://$NOVA_DB_USER:$NOVA_DBPASS@controller/nova_api"
|
||||||
|
echo "Setting API database connection: $database_url."
|
||||||
|
iniset_sudo $conf api_database connection "$database_url"
|
||||||
|
|
||||||
|
# Configure [database] section.
|
||||||
|
database_url="mysql+pymysql://$NOVA_DB_USER:$NOVA_DBPASS@controller/nova"
|
||||||
echo "Setting database connection: $database_url."
|
echo "Setting database connection: $database_url."
|
||||||
iniset_sudo $conf database connection "$database_url"
|
iniset_sudo $conf database connection "$database_url"
|
||||||
|
|
||||||
echo "Configuring nova services."
|
echo "Configuring nova services."
|
||||||
|
|
||||||
# Default Section.
|
# Configure [DEFAULT] section.
|
||||||
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
||||||
|
|
||||||
# Configure [oslo_messaging_rabbit] section.
|
# Configure [oslo_messaging_rabbit] section.
|
||||||
@@ -93,40 +104,40 @@ iniset_sudo $conf DEFAULT auth_strategy keystone
|
|||||||
# Configure [keystone_authtoken] section.
|
# Configure [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$nova_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$nova_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$NOVA_PASS"
|
iniset_sudo $conf keystone_authtoken password "$NOVA_PASS"
|
||||||
|
|
||||||
# Configure [DEFAULT] section.
|
# Configure [DEFAULT] section.
|
||||||
iniset_sudo $conf DEFAULT my_ip "$(hostname_to_ip controller)"
|
iniset_sudo $conf DEFAULT my_ip "$(hostname_to_ip controller)"
|
||||||
|
iniset_sudo $conf DEFAULT use_neutron True
|
||||||
iniset_sudo $conf DEFAULT network_api_class nova.network.neutronv2.api.API
|
iniset_sudo $conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
|
||||||
iniset_sudo $conf DEFAULT security_group_api neutron
|
|
||||||
iniset_sudo $conf DEFAULT linuxnet_interface_driver \
|
|
||||||
nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
|
|
||||||
iniset_sudo $conf DEFAULT \
|
|
||||||
firewall_driver nova.virt.firewall.NoopFirewallDriver
|
|
||||||
|
|
||||||
# Configure [VNC] section.
|
# Configure [VNC] section.
|
||||||
iniset_sudo $conf vnc vncserver_listen '$my_ip'
|
iniset_sudo $conf vnc vncserver_listen '$my_ip'
|
||||||
iniset_sudo $conf vnc vncserver_proxyclient_address '$my_ip'
|
iniset_sudo $conf vnc vncserver_proxyclient_address '$my_ip'
|
||||||
|
|
||||||
# Configure [glance] section.
|
# Configure [glance] section.
|
||||||
iniset_sudo $conf glance host controller
|
iniset_sudo $conf glance api_servers http://controller:9292
|
||||||
|
|
||||||
# Configure [oslo_concurrency] section.
|
# Configure [oslo_concurrency] section.
|
||||||
iniset_sudo $conf oslo_concurrency lock_path /var/lib/nova/tmp
|
iniset_sudo $conf oslo_concurrency lock_path /var/lib/nova/tmp
|
||||||
|
|
||||||
# Configure [DEFAULT] section.
|
# Delete logdir line
|
||||||
iniset_sudo $conf DEFAULT enabled_apis osapi_compute,metadata
|
sudo sed -i "/^logdir/ d" $conf
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
echo "Creating the database tables for nova."
|
echo "Creating the database tables for nova."
|
||||||
|
sudo nova-manage api_db sync
|
||||||
sudo nova-manage db sync
|
sudo nova-manage db sync
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Finalize installation
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Restarting nova services."
|
echo "Restarting nova services."
|
||||||
declare -a nova_services=(nova-api nova-cert nova-consoleauth \
|
declare -a nova_services=(nova-api nova-cert nova-consoleauth \
|
||||||
nova-scheduler nova-conductor nova-novncproxy)
|
nova-scheduler nova-conductor nova-novncproxy)
|
||||||
@@ -146,7 +157,7 @@ sudo rm -f /var/lib/nova/nova.sqlite
|
|||||||
echo "Verify nova service status."
|
echo "Verify nova service status."
|
||||||
echo "Checking nova services."
|
echo "Checking nova services."
|
||||||
loop=0
|
loop=0
|
||||||
until nova service-list 2>/dev/null; do
|
until openstack service list 2>/dev/null; do
|
||||||
echo -n .
|
echo -n .
|
||||||
loop=$((loop+1))
|
loop=$((loop+1))
|
||||||
if ((loop%10 == 0)); then
|
if ((loop%10 == 0)); then
|
||||||
@@ -157,8 +168,7 @@ until nova service-list 2>/dev/null; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "Checking nova endpoints."
|
echo "Checking nova endpoints."
|
||||||
nova endpoints
|
openstack catalog list
|
||||||
|
|
||||||
echo "Checking nova images."
|
echo "Checking nova images."
|
||||||
nova image-list
|
openstack image list
|
||||||
|
|
||||||
|
@@ -14,16 +14,20 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Networking Option 2: Self-service networks
|
# Networking Option 2: Self-service networks
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/neutron-compute-install-option2.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install-option2.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure the Linux bridge agent
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring the Linux bridge agent."
|
echo "Configuring the Linux bridge agent."
|
||||||
conf=/etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
conf=/etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
||||||
|
|
||||||
# Edit the [linux_bridge] section.
|
# Edit the [linux_bridge] section.
|
||||||
# TODO Better method of getting interface name
|
# TODO Better method of getting interface name
|
||||||
PUBLIC_INTERFACE_NAME=eth2
|
PUBLIC_INTERFACE_NAME=eth2
|
||||||
iniset_sudo $conf linux_bridge physical_interface_mappings public:$PUBLIC_INTERFACE_NAME
|
iniset_sudo $conf linux_bridge physical_interface_mappings provider:$PUBLIC_INTERFACE_NAME
|
||||||
|
|
||||||
# Edit the [vxlan] section.
|
# Edit the [vxlan] section.
|
||||||
OVERLAY_INTERFACE_IP_ADDRESS=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
OVERLAY_INTERFACE_IP_ADDRESS=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
||||||
|
@@ -15,14 +15,18 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Networking Option 2: Self-service networks
|
# Networking Option 2: Self-service networks
|
||||||
# http://docs.openstack.org/liberty/install-guide-ubuntu/neutron-controller-install-option2.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install-option2.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Install the components
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing additional packages for self-service networks."
|
echo "Installing additional packages for self-service networks."
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
neutron-server neutron-plugin-ml2 \
|
neutron-server neutron-plugin-ml2 \
|
||||||
neutron-plugin-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent \
|
neutron-linuxbridge-agent neutron-l3-agent neutron-dhcp-agent \
|
||||||
neutron-metadata-agent python-neutronclient
|
neutron-metadata-agent
|
||||||
|
|
||||||
echo "Configuring neutron for controller node."
|
echo "Configuring neutron for controller node."
|
||||||
function get_database_url {
|
function get_database_url {
|
||||||
@@ -50,6 +54,7 @@ iniset_sudo $conf database connection "$database_url"
|
|||||||
iniset_sudo $conf DEFAULT core_plugin ml2
|
iniset_sudo $conf DEFAULT core_plugin ml2
|
||||||
iniset_sudo $conf DEFAULT service_plugins router
|
iniset_sudo $conf DEFAULT service_plugins router
|
||||||
iniset_sudo $conf DEFAULT allow_overlapping_ips True
|
iniset_sudo $conf DEFAULT allow_overlapping_ips True
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
||||||
|
|
||||||
# Configure [oslo_messaging_rabbit] section.
|
# Configure [oslo_messaging_rabbit] section.
|
||||||
@@ -63,9 +68,10 @@ iniset_sudo $conf DEFAULT auth_strategy keystone
|
|||||||
# Configuring [keystone_authtoken] section.
|
# Configuring [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken auth_plugin password
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken project_domain_id default
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken user_domain_id default
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf keystone_authtoken username "$neutron_admin_user"
|
iniset_sudo $conf keystone_authtoken username "$neutron_admin_user"
|
||||||
iniset_sudo $conf keystone_authtoken password "$NEUTRON_PASS"
|
iniset_sudo $conf keystone_authtoken password "$NEUTRON_PASS"
|
||||||
@@ -77,15 +83,17 @@ iniset_sudo $conf DEFAULT nova_url http://controller:8774/v2
|
|||||||
|
|
||||||
# Configure [nova] section.
|
# Configure [nova] section.
|
||||||
iniset_sudo $conf nova auth_url http://controller:35357
|
iniset_sudo $conf nova auth_url http://controller:35357
|
||||||
iniset_sudo $conf nova auth_plugin password
|
iniset_sudo $conf nova auth_type password
|
||||||
iniset_sudo $conf nova project_domain_id default
|
iniset_sudo $conf nova project_domain_name default
|
||||||
iniset_sudo $conf nova user_domain_id default
|
iniset_sudo $conf nova user_domain_name default
|
||||||
iniset_sudo $conf nova region_name "$REGION"
|
iniset_sudo $conf nova region_name "$REGION"
|
||||||
iniset_sudo $conf nova project_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf nova project_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf nova username "$nova_admin_user"
|
iniset_sudo $conf nova username "$nova_admin_user"
|
||||||
iniset_sudo $conf nova password "$NOVA_PASS"
|
iniset_sudo $conf nova password "$NOVA_PASS"
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure the Modular Layer 2 (ML2) plug-in
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring the Modular Layer 2 (ML2) plug-in."
|
echo "Configuring the Modular Layer 2 (ML2) plug-in."
|
||||||
conf=/etc/neutron/plugins/ml2/ml2_conf.ini
|
conf=/etc/neutron/plugins/ml2/ml2_conf.ini
|
||||||
@@ -97,21 +105,24 @@ iniset_sudo $conf ml2 mechanism_drivers linuxbridge,l2population
|
|||||||
iniset_sudo $conf ml2 extension_drivers port_security
|
iniset_sudo $conf ml2 extension_drivers port_security
|
||||||
|
|
||||||
# Edit the [ml2_type_flat] section.
|
# Edit the [ml2_type_flat] section.
|
||||||
iniset_sudo $conf ml2_type_flat flat_networks public
|
iniset_sudo $conf ml2_type_flat flat_networks provider
|
||||||
|
|
||||||
iniset_sudo $conf ml2_type_vxlan vni_ranges 1:1000
|
iniset_sudo $conf ml2_type_vxlan vni_ranges 1:1000
|
||||||
|
|
||||||
# Edit the [securitygroup] section.
|
# Edit the [securitygroup] section.
|
||||||
iniset_sudo $conf securitygroup enable_ipset True
|
iniset_sudo $conf securitygroup enable_ipset True
|
||||||
|
|
||||||
# Configure the linuxbridge_agent.ini file.
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
echo "Configuring Linux Bridge agent"
|
# Configure the Linux bridge agent
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
|
echo "Configuring Linux Bridge agent."
|
||||||
conf=/etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
conf=/etc/neutron/plugins/ml2/linuxbridge_agent.ini
|
||||||
|
|
||||||
# Edit the [linux_bridge] section.
|
# Edit the [linux_bridge] section.
|
||||||
# TODO Better method of getting interface name
|
# TODO Better method of getting interface name
|
||||||
PUBLIC_INTERFACE_NAME=eth2
|
PUBLIC_INTERFACE_NAME=eth2
|
||||||
iniset_sudo $conf linux_bridge physical_interface_mappings public:$PUBLIC_INTERFACE_NAME
|
iniset_sudo $conf linux_bridge physical_interface_mappings provider:$PUBLIC_INTERFACE_NAME
|
||||||
|
|
||||||
# Edit the [vxlan] section.
|
# Edit the [vxlan] section.
|
||||||
OVERLAY_INTERFACE_IP_ADDRESS=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
OVERLAY_INTERFACE_IP_ADDRESS=$(get_node_ip_in_network "$(hostname)" "mgmt")
|
||||||
@@ -126,6 +137,10 @@ iniset_sudo $conf agent prevent_arp_spoofing True
|
|||||||
iniset_sudo $conf securitygroup enable_security_group True
|
iniset_sudo $conf securitygroup enable_security_group True
|
||||||
iniset_sudo $conf securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
iniset_sudo $conf securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure the layer-3 agent
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring the layer-3 agent."
|
echo "Configuring the layer-3 agent."
|
||||||
conf=/etc/neutron/l3_agent.ini
|
conf=/etc/neutron/l3_agent.ini
|
||||||
iniset_sudo $conf DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
|
iniset_sudo $conf DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
|
||||||
@@ -133,14 +148,17 @@ iniset_sudo $conf DEFAULT interface_driver neutron.agent.linux.interface.BridgeI
|
|||||||
# The external_network_bridge option intentionally lacks a value to enable
|
# The external_network_bridge option intentionally lacks a value to enable
|
||||||
# multiple external networks on a single agent.
|
# multiple external networks on a single agent.
|
||||||
iniset_sudo $conf DEFAULT external_network_bridge ""
|
iniset_sudo $conf DEFAULT external_network_bridge ""
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure the DHCP agent
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring the DHCP agent."
|
echo "Configuring the DHCP agent."
|
||||||
conf=/etc/neutron/dhcp_agent.ini
|
conf=/etc/neutron/dhcp_agent.ini
|
||||||
iniset_sudo $conf DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
|
iniset_sudo $conf DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
|
||||||
iniset_sudo $conf DEFAULT dhcp_driver neutron.agent.linux.dhcp.Dnsmasq
|
iniset_sudo $conf DEFAULT dhcp_driver neutron.agent.linux.dhcp.Dnsmasq
|
||||||
iniset_sudo $conf DEFAULT enable_isolated_metadata True
|
iniset_sudo $conf DEFAULT enable_isolated_metadata True
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
iniset_sudo $conf DEFAULT dnsmasq_config_file /etc/neutron/dnsmasq-neutron.conf
|
iniset_sudo $conf DEFAULT dnsmasq_config_file /etc/neutron/dnsmasq-neutron.conf
|
||||||
|
|
||||||
cat << DNSMASQ | sudo tee /etc/neutron/dnsmasq-neutron.conf
|
cat << DNSMASQ | sudo tee /etc/neutron/dnsmasq-neutron.conf
|
||||||
|
@@ -14,8 +14,8 @@ exec_logfile
|
|||||||
indicate_current_auto
|
indicate_current_auto
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Install the Telemetry service
|
# Enable Compute service meters
|
||||||
# http://docs.openstack.org/kilo/install-guide/install/apt/content/ceilometer-nova.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-nova.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Installing ceilometer."
|
echo "Installing ceilometer."
|
||||||
@@ -23,12 +23,10 @@ sudo apt-get install -y ceilometer-agent-compute
|
|||||||
|
|
||||||
ceilometer_admin_user=$(service_to_user_name ceilometer)
|
ceilometer_admin_user=$(service_to_user_name ceilometer)
|
||||||
|
|
||||||
echo "Configuring ceilometer.conf."
|
|
||||||
conf=/etc/ceilometer/ceilometer.conf
|
conf=/etc/ceilometer/ceilometer.conf
|
||||||
|
echo "Configuring $conf."
|
||||||
|
|
||||||
iniset_sudo $conf publisher telemetry_secret "$TELEMETRY_SECRET"
|
# Configure [DEFAULT] section.
|
||||||
|
|
||||||
# Configure RabbitMQ variables
|
|
||||||
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
||||||
|
|
||||||
# Configure [oslo_messaging_rabbit] section.
|
# Configure [oslo_messaging_rabbit] section.
|
||||||
@@ -36,22 +34,30 @@ iniset_sudo $conf oslo_messaging_rabbit rabbit_host controller
|
|||||||
iniset_sudo $conf oslo_messaging_rabbit rabbit_userid openstack
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_userid openstack
|
||||||
iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
|
||||||
|
|
||||||
# Configure [ketstone_authtoken] section.
|
# Configure [DEFAULT] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000/v2.0
|
iniset_sudo $conf DEFAULT auth_strategy keystone
|
||||||
iniset_sudo $conf keystone_authtoken identity_uri http://controller:35357
|
|
||||||
iniset_sudo $conf keystone_authtoken admin_tenant_name "$SERVICE_PROJECT_NAME"
|
# Configure [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken admin_user "$ceilometer_admin_user"
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken admin_password "$CEILOMETER_PASS"
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
|
iniset_sudo $conf keystone_authtoken username "$ceilometer_admin_user"
|
||||||
|
iniset_sudo $conf keystone_authtoken password "$CEILOMETER_PASS"
|
||||||
|
|
||||||
# Configure [service_credentials] section.
|
# Configure [service_credentials] section.
|
||||||
iniset_sudo $conf service_credentials os_auth_url http://controller:5000/v2.0
|
iniset_sudo $conf service_credentials os_auth_url http://controller:5000/v2.0
|
||||||
iniset_sudo $conf service_credentials os_username "$ceilometer_admin_user"
|
iniset_sudo $conf service_credentials os_username "$ceilometer_admin_user"
|
||||||
iniset_sudo $conf service_credentials os_tenant_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf service_credentials os_tenant_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf service_credentials os_password "$CEILOMETER_PASS"
|
iniset_sudo $conf service_credentials os_password "$CEILOMETER_PASS"
|
||||||
iniset_sudo $conf service_credentials os_endpoint_type internalURL
|
iniset_sudo $conf service_credentials interface internalURL
|
||||||
iniset_sudo $conf service_credentials os_region_name "$REGION"
|
iniset_sudo $conf service_credentials region_name "$REGION"
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
# Marked "optional" in install-guide
|
||||||
|
iniset_sudo $conf DEFAULT verbose True
|
||||||
|
|
||||||
echo "Configuring nova.conf."
|
echo "Configuring nova.conf."
|
||||||
conf=/etc/ceilometer/ceilometer.conf
|
conf=/etc/ceilometer/ceilometer.conf
|
||||||
@@ -69,44 +75,51 @@ echo "Restarting compute service."
|
|||||||
sudo service nova-compute restart
|
sudo service nova-compute restart
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Configure the Block Storage service(cinder-volume)
|
# Enable Block Storage meters
|
||||||
# http://docs.openstack.org/kilo/install-guide/install/apt/content/ceilometer-cinder.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-cinder.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Configure the Block Storage Service to send notifications to the message bus
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure Cinder to use Telemetry
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring cinder.conf."
|
|
||||||
conf=/etc/cinder/cinder.conf
|
conf=/etc/cinder/cinder.conf
|
||||||
|
echo "Configuring $conf."
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT control_exchange cinder
|
iniset_sudo $conf oslo_messaging_notifications driver messagingv2
|
||||||
iniset_sudo $conf DEFAULT notification_driver messagingv2
|
|
||||||
|
|
||||||
echo "Restarting cinder-volumes service."
|
echo "Restarting cinder-volumes service."
|
||||||
sudo service cinder-volume restart
|
sudo service cinder-volume restart
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Verify the Telemetry installation
|
# Verify operation
|
||||||
# http://docs.openstack.org/kilo/install-guide/install/apt/content/ceilometer-verify.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-verify.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Verifying the telemetry installation."
|
echo "Verifying the Telemetry installation."
|
||||||
|
|
||||||
AUTH="source $CONFIG_DIR/admin-openstackrc.sh"
|
AUTH="source $CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
|
||||||
echo "Waiting for ceilometer to start."
|
echo -n "Waiting for ceilometer to start."
|
||||||
until node_ssh controller "$AUTH; ceilometer meter-list" >/dev/null 2>&1; do
|
until node_ssh controller "$AUTH; ceilometer meter-list" >/dev/null 2>&1; do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
echo -n .
|
||||||
done
|
done
|
||||||
|
echo
|
||||||
|
|
||||||
echo "List available meters."
|
echo "Listing available meters."
|
||||||
node_ssh controller "$AUTH; ceilometer meter-list"
|
node_ssh controller "$AUTH; ceilometer meter-list"
|
||||||
|
|
||||||
echo "Download an image from the Image Service."
|
echo "Downloading an image from the Image service."
|
||||||
img_name=$(basename "$CIRROS_URL" -disk.img)
|
IMAGE_ID=$(node_ssh controller "$AUTH; glance image-list | grep 'cirros' | awk '{ print \$2 }'")
|
||||||
node_ssh controller "$AUTH; glance image-download \"$img_name\" > /tmp/cirros.img"
|
echo "IMAGE_ID: $IMAGE_ID"
|
||||||
|
node_ssh controller "$AUTH; glance image-download \"$IMAGE_ID\"" > /tmp/cirros.img
|
||||||
|
|
||||||
echo "List available meters again to validate detection of the image download."
|
echo "Listing available meters again to validate detection of the image download."
|
||||||
node_ssh controller "$AUTH; ceilometer meter-list"
|
node_ssh controller "$AUTH; ceilometer meter-list"
|
||||||
|
|
||||||
echo "Retrieve usage statistics from the image.download meter."
|
echo "Retrieving usage statistics from the image.download meter."
|
||||||
node_ssh controller "$AUTH; ceilometer statistics -m image.download -p 60"
|
node_ssh controller "$AUTH; ceilometer statistics -m image.download -p 60"
|
||||||
|
|
||||||
|
echo "Removing previously downloaded image file."
|
||||||
|
rm /tmp/cirros.img
|
||||||
|
@@ -15,11 +15,12 @@ indicate_current_auto
|
|||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Install the Telemetry service
|
# Install the Telemetry service
|
||||||
# http://docs.openstack.org/kilo/install-guide/install/apt/content/ceilometer-controller-install.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-install.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
echo "Sourcing the admin credentials."
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
source "$CONFIG_DIR/admin-openstackrc.sh"
|
# Prerequisites
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
# Create Ceilometer user and database.
|
# Create Ceilometer user and database.
|
||||||
ceilometer_admin_user=$(service_to_user_name ceilometer)
|
ceilometer_admin_user=$(service_to_user_name ceilometer)
|
||||||
@@ -27,14 +28,18 @@ ceilometer_admin_user=$(service_to_user_name ceilometer)
|
|||||||
mongodb_user=$CEILOMETER_DB_USER
|
mongodb_user=$CEILOMETER_DB_USER
|
||||||
|
|
||||||
echo "Creating the ceilometer database."
|
echo "Creating the ceilometer database."
|
||||||
mongo --host "$(hostname_to_ip controller)" --eval "
|
mongo --host controller --eval "
|
||||||
db = db.getSiblingDB(\"ceilometer\");
|
db = db.getSiblingDB(\"ceilometer\");
|
||||||
db.addUser({user: \"${mongodb_user}\",
|
db.addUser({user: \"${mongodb_user}\",
|
||||||
pwd: \"${CEILOMETER_DBPASS}\",
|
pwd: \"${CEILOMETER_DBPASS}\",
|
||||||
roles: [ \"readWrite\", \"dbAdmin\" ]})"
|
roles: [ \"readWrite\", \"dbAdmin\" ]})"
|
||||||
|
|
||||||
|
echo "Sourcing the admin credentials."
|
||||||
|
source "$CONFIG_DIR/admin-openstackrc.sh"
|
||||||
|
|
||||||
echo "Creating ceilometer user and giving it admin role under service tenant."
|
echo "Creating ceilometer user and giving it admin role under service tenant."
|
||||||
openstack user create \
|
openstack user create \
|
||||||
|
--domain default \
|
||||||
--password "$CEILOMETER_PASS" \
|
--password "$CEILOMETER_PASS" \
|
||||||
"$ceilometer_admin_user"
|
"$ceilometer_admin_user"
|
||||||
|
|
||||||
@@ -50,18 +55,28 @@ openstack service create \
|
|||||||
metering
|
metering
|
||||||
|
|
||||||
openstack endpoint create \
|
openstack endpoint create \
|
||||||
--publicurl http://controller:8777 \
|
|
||||||
--internalurl http://controller:8777 \
|
|
||||||
--adminurl http://controller:8777 \
|
|
||||||
--region "$REGION" \
|
--region "$REGION" \
|
||||||
metering
|
metering \
|
||||||
|
public http://controller:8777
|
||||||
|
|
||||||
|
openstack endpoint create \
|
||||||
|
--region "$REGION" \
|
||||||
|
metering \
|
||||||
|
internal http://controller:8777
|
||||||
|
|
||||||
|
openstack endpoint create \
|
||||||
|
--region "$REGION" \
|
||||||
|
metering \
|
||||||
|
admin http://controller:8777
|
||||||
|
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Install and configure components
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Installing ceilometer."
|
echo "Installing ceilometer."
|
||||||
sudo apt-get install -y ceilometer-api ceilometer-collector \
|
sudo apt-get install -y ceilometer-api ceilometer-collector \
|
||||||
ceilometer-agent-central \
|
ceilometer-agent-central \
|
||||||
ceilometer-agent-notification \
|
ceilometer-agent-notification \
|
||||||
ceilometer-alarm-evaluator \
|
|
||||||
ceilometer-alarm-notifier \
|
|
||||||
python-ceilometerclient
|
python-ceilometerclient
|
||||||
|
|
||||||
function get_database_url {
|
function get_database_url {
|
||||||
@@ -88,76 +103,86 @@ iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
|
|||||||
iniset_sudo $conf DEFAULT auth_strategy keystone
|
iniset_sudo $conf DEFAULT auth_strategy keystone
|
||||||
|
|
||||||
# Configure [keystone_authtoken] section.
|
# Configure [keystone_authtoken] section.
|
||||||
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000/v2.0
|
iniset_sudo $conf keystone_authtoken auth_uri http://controller:5000
|
||||||
iniset_sudo $conf keystone_authtoken identity_uri http://controller:35357
|
iniset_sudo $conf keystone_authtoken auth_url http://controller:35357
|
||||||
iniset_sudo $conf keystone_authtoken admin_tenant_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf keystone_authtoken memcached_servers controller:11211
|
||||||
iniset_sudo $conf keystone_authtoken admin_user "$ceilometer_admin_user"
|
iniset_sudo $conf keystone_authtoken auth_type password
|
||||||
iniset_sudo $conf keystone_authtoken admin_password "$CEILOMETER_PASS"
|
iniset_sudo $conf keystone_authtoken project_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken user_domain_name default
|
||||||
|
iniset_sudo $conf keystone_authtoken project_name "$SERVICE_PROJECT_NAME"
|
||||||
|
iniset_sudo $conf keystone_authtoken username "$ceilometer_admin_user"
|
||||||
|
iniset_sudo $conf keystone_authtoken password "$CEILOMETER_PASS"
|
||||||
|
|
||||||
# Configure [service_credentials] section.
|
# Configure [service_credentials] section.
|
||||||
iniset_sudo $conf service_credentials os_auth_url http://controller:5000/v2.0
|
iniset_sudo $conf service_credentials os_auth_url http://controller:5000/v2.0
|
||||||
iniset_sudo $conf service_credentials os_username "$ceilometer_admin_user"
|
iniset_sudo $conf service_credentials os_username "$ceilometer_admin_user"
|
||||||
iniset_sudo $conf service_credentials os_tenant_name "$SERVICE_PROJECT_NAME"
|
iniset_sudo $conf service_credentials os_tenant_name "$SERVICE_PROJECT_NAME"
|
||||||
iniset_sudo $conf service_credentials os_password "$CEILOMETER_PASS"
|
iniset_sudo $conf service_credentials os_password "$CEILOMETER_PASS"
|
||||||
iniset_sudo $conf service_credentials os_endpoint_type internalURL
|
iniset_sudo $conf service_credentials interface internalURL
|
||||||
iniset_sudo $conf service_credentials os_region_name "$REGION"
|
iniset_sudo $conf service_credentials region_name "$REGION"
|
||||||
|
|
||||||
# Configure [publisher] section.
|
iniset_sudo $conf DEFAULT verbose True
|
||||||
iniset_sudo $conf publisher telemetry_secret "$TELEMETRY_SECRET"
|
|
||||||
|
|
||||||
iniset_sudo $conf DEFAULT verbose "$OPENSTACK_VERBOSE"
|
|
||||||
|
|
||||||
echo "Restarting telemetry service."
|
echo "Restarting telemetry service."
|
||||||
sudo service ceilometer-agent-central restart
|
sudo service ceilometer-agent-central restart
|
||||||
sudo service ceilometer-agent-notification restart
|
sudo service ceilometer-agent-notification restart
|
||||||
sudo service ceilometer-api restart
|
sudo service ceilometer-api restart
|
||||||
sudo service ceilometer-collector restart
|
sudo service ceilometer-collector restart
|
||||||
sudo service ceilometer-alarm-evaluator restart
|
|
||||||
sudo service ceilometer-alarm-notifier restart
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Configure the Image service
|
# Enable Image service meters
|
||||||
# http://docs.openstack.org/kilo/install-guide/install/apt/content/ceilometer-glance.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-glance.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Configure the Image Service to send notifications to the message bus
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure the Image service to use Telemetry
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring glance-api.conf."
|
|
||||||
conf=/etc/glance/glance-api.conf
|
conf=/etc/glance/glance-api.conf
|
||||||
|
echo "Configuring $conf."
|
||||||
|
|
||||||
# Configure [DEFAULT] section.
|
# Configure [DEFAULT] section.
|
||||||
iniset_sudo $conf DEFAULT notification_driver messagingv2
|
|
||||||
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
||||||
iniset_sudo $conf DEFAULT rabbit_host controller
|
|
||||||
iniset_sudo $conf DEFAULT rabbit_userid openstack
|
|
||||||
iniset_sudo $conf DEFAULT rabbit_password "$RABBIT_PASS"
|
|
||||||
|
|
||||||
echo "Configuring glance-registry.conf."
|
# Configure [oslo_messaging_notifications] section.
|
||||||
|
iniset_sudo $conf oslo_messaging_notifications driver messagingv2
|
||||||
|
|
||||||
|
# Configure [oslo_messaging_rabbit] section.
|
||||||
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_host controller
|
||||||
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_userid openstack
|
||||||
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
|
||||||
|
|
||||||
conf=/etc/glance/glance-registry.conf
|
conf=/etc/glance/glance-registry.conf
|
||||||
|
echo "Configuring $conf."
|
||||||
|
|
||||||
# Configure [DEFAULT] section.
|
# Configure [DEFAULT] section.
|
||||||
iniset_sudo $conf DEFAULT notification_driver messagingv2
|
|
||||||
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
iniset_sudo $conf DEFAULT rpc_backend rabbit
|
||||||
iniset_sudo $conf DEFAULT rabbit_host controller
|
|
||||||
iniset_sudo $conf DEFAULT rabbit_userid openstack
|
# Configure [oslo_messaging_notifications] section.
|
||||||
iniset_sudo $conf DEFAULT rabbit_password "$RABBIT_PASS"
|
iniset_sudo $conf oslo_messaging_notifications driver messagingv2
|
||||||
|
|
||||||
|
# Configure [oslo_messaging_rabbit] section.
|
||||||
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_host controller
|
||||||
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_userid openstack
|
||||||
|
iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
|
||||||
|
|
||||||
sudo service glance-registry restart
|
sudo service glance-registry restart
|
||||||
sudo service glance-api restart
|
sudo service glance-api restart
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Configure the Block Storage service
|
# Enable Block Storage meters
|
||||||
# http://docs.openstack.org/kilo/install-guide/install/apt/content/ceilometer-cinder.html
|
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-cinder.html
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
# Configure the Block Storage Service to send notifications to the message bus
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
# Configure Cinder to use Telemetry
|
||||||
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
|
||||||
echo "Configuring cinder.conf."
|
|
||||||
conf=/etc/cinder/cinder.conf
|
conf=/etc/cinder/cinder.conf
|
||||||
|
echo "Configuring $conf."
|
||||||
|
|
||||||
# Configure [DEFAULT] section.
|
# Configure [oslo_messaging_notifications] section.
|
||||||
iniset_sudo $conf DEFAULT control_exchange cinder
|
iniset_sudo $conf oslo_messaging_notifications notification_driver messagingv2
|
||||||
iniset_sudo $conf DEFAULT notification_driver messagingv2
|
|
||||||
|
|
||||||
echo "Restarting cinder services."
|
echo "Restarting cinder services."
|
||||||
sudo service cinder-api restart
|
sudo service cinder-api restart
|
||||||
|
Reference in New Issue
Block a user