Newton updates

This changeset contains updates for Newton.

Notable changes include:
- Ubuntu 14.04 LTS (trusty) replaced by Ubuntu 16.04 LTS (xenial)
- Higher RAM requirements, the controller VM needs 5120 MB
- Script order changed (install-guide changes)
- By default, mariadb does not use a root password but socket auth (sudo)
- Nova does not configure any default flavors anymore; we create m1.nano
  and that's all there is when the cluster is built.
- Remaining differences to install-guide marked in the source code
- As always, new races fixed

Change-Id: Id59e145140252c4384584a3899e01a38e8a57158
This commit is contained in:
Roger Luethi
2016-10-02 19:08:14 +02:00
committed by Pranav Salunke
parent e229aea8ab
commit c5fdafc900
38 changed files with 615 additions and 513 deletions

View File

@@ -11,7 +11,7 @@ source "$CONFIG_DIR/credentials"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# OpenStack client environment scripts # OpenStack client environment scripts
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-openrc.html # http://docs.openstack.org/newton/install-guide-ubuntu/keystone-openrc.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
export OS_PROJECT_DOMAIN_NAME=default export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default export OS_USER_DOMAIN_NAME=default
@@ -20,7 +20,4 @@ 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_IDENTITY_API_VERSION=3 export OS_IDENTITY_API_VERSION=3
#------------------------------------------------------------------------------
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-verify.html
#------------------------------------------------------------------------------
export OS_IMAGE_API_VERSION=2 export OS_IMAGE_API_VERSION=2

View File

@@ -20,7 +20,7 @@ NET_IF_2="manual 203.0.113.0"
# http://docs.openstack.org/mitaka/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=4096 VM_MEM=5120
# 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

View File

@@ -11,7 +11,7 @@ source "$CONFIG_DIR/credentials"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# OpenStack client environment scripts # OpenStack client environment scripts
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-openrc.html # http://docs.openstack.org/newton/install-guide-ubuntu/keystone-openrc.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
export OS_PROJECT_DOMAIN_NAME=default export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default export OS_USER_DOMAIN_NAME=default
@@ -20,7 +20,4 @@ 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_IDENTITY_API_VERSION=3 export OS_IDENTITY_API_VERSION=3
#------------------------------------------------------------------------------
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-verify.html
#------------------------------------------------------------------------------
export OS_IMAGE_API_VERSION=2 export OS_IMAGE_API_VERSION=2

View File

@@ -15,7 +15,7 @@
# centos-7-x86_64 # centos-7-x86_64
#DISTRO=ubuntu-12.04.4-server-amd64 #DISTRO=ubuntu-12.04.4-server-amd64
#DISTRO=centos-7-x86_64 #DISTRO=centos-7-x86_64
: ${DISTRO:=ubuntu-14.04-server-amd64} : ${DISTRO:=ubuntu-16.04-server-amd64}
# PROVIDER: virtualbox or kvm (defaults to virtualbox) # PROVIDER: virtualbox or kvm (defaults to virtualbox)
# KVM tends to give better performance (on Linux), but may be harder to set up # KVM tends to give better performance (on Linux), but may be harder to set up

View File

@@ -1,8 +1,10 @@
# 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: mitaka, mitaka-proposed, mitaka-staging # newton (production release; cloud-archive:newton)
: ${OPENSTACK_RELEASE:=mitaka} # newton-proposed (pre-release testing: cloud-archive:newton-proposed)
# newton-staging (ppa:openstack-ubuntu-testing/newton)
: ${OPENSTACK_RELEASE:=newton}
# CirrOS image URL # CirrOS image URL
if [ "$(uname -m)" = "x86_64" ]; then if [ "$(uname -m)" = "x86_64" ]; then
@@ -29,12 +31,12 @@ NETWORK_2="provider 203.0.113.0"
PXE_INITIAL_NODE_IP="10.0.0.240" PXE_INITIAL_NODE_IP="10.0.0.240"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-networks-public.html # http://docs.openstack.org/newton/install-guide-ubuntu/launch-instance-networks-provider.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Public network # Public network
: ${PUBLIC_NETWORK_CIDR:=203.0.113.0/24} : ${PROVIDER_NETWORK_CIDR:=203.0.113.0/24}
: ${PUBLIC_NETWORK_GATEWAY:=203.0.113.1} : ${PROVIDER_NETWORK_GATEWAY:=203.0.113.1}
# Floating IP addresses # Floating IP addresses
: ${START_IP_ADDRESS:=203.0.113.101} : ${START_IP_ADDRESS:=203.0.113.101}
: ${END_IP_ADDRESS:=203.0.113.200} : ${END_IP_ADDRESS:=203.0.113.200}
@@ -44,8 +46,8 @@ PXE_INITIAL_NODE_IP="10.0.0.240"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Private demo network # Private demo network
: ${PRIVATE_NETWORK_CIDR:=172.16.1.0/24} : ${SELFSERVICE_NETWORK_CIDR:=172.16.1.0/24}
: ${PRIVATE_NETWORK_GATEWAY:=172.16.1.1} : ${SELFSERVICE_NETWORK_GATEWAY:=172.16.1.1}
# DNS name server used by instance VMs. # DNS name server used by instance VMs.
# Default is Google Public DNS (8.8.4.4). # Default is Google Public DNS (8.8.4.4).

View File

@@ -7,45 +7,56 @@ cmd queue etc_hosts.sh
cmd queue osbash/enable_osbash_ssh_keys.sh cmd queue osbash/enable_osbash_ssh_keys.sh
cmd snapshot_cycle -n controller controller_node_init cmd snapshot_cycle -n controller controller_node_init
# Environment
cmd queue ubuntu/apt_install_mysql.sh cmd queue ubuntu/apt_install_mysql.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 queue ubuntu/install_memcached.sh
cmd snapshot_cycle -n controller pre-openstack_installed cmd snapshot_cycle -n controller pre-openstack_installed
# Identity
cmd queue ubuntu/setup_keystone.sh cmd queue ubuntu/setup_keystone.sh
cmd queue test/get_auth_token.sh cmd queue test/get_auth_token.sh
cmd snapshot_cycle -n controller keystone_installed cmd snapshot_cycle -n controller keystone_installed
# Image
cmd queue ubuntu/setup_glance.sh cmd queue ubuntu/setup_glance.sh
cmd snapshot_cycle -n controller glance_installed cmd snapshot_cycle -n controller glance_installed
# Compute
cmd queue ubuntu/setup_nova_controller.sh cmd queue ubuntu/setup_nova_controller.sh
cmd snapshot_cycle -n controller nova-controller_installed cmd snapshot_cycle -n controller nova-controller_installed
# Networking
cmd queue ubuntu/setup_neutron_controller.sh cmd queue ubuntu/setup_neutron_controller.sh
cmd queue ubuntu/setup_self-service_controller.sh cmd queue ubuntu/setup_self-service_controller.sh
cmd queue ubuntu/setup_neutron_controller_part_2.sh cmd queue ubuntu/setup_neutron_controller_part_2.sh
cmd snapshot_cycle -n controller neutron-controller_installed cmd snapshot_cycle -n controller neutron-controller_installed
cmd queue ubuntu/setup_cinder_controller.sh # Dashboard
cmd snapshot_cycle -n controller cinder_installed
cmd queue ubuntu/setup_horizon.sh cmd queue ubuntu/setup_horizon.sh
cmd snapshot_cycle -n controller horizon_installed cmd snapshot_cycle -n controller horizon_installed
# FIXME Our LBaaS support for kilo is broken; the configuration edits # Block Storage
cmd queue ubuntu/setup_cinder_controller.sh
cmd snapshot_cycle -n controller cinder_installed
# Orchestration
cmd queue ubuntu/setup_heat_controller.sh
cmd snapshot_cycle -n controller heat_controller_installed
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Telemetry (currently unsupported)
# NoSQL DB (mongo) needed for Telemetry
#cmd queue ubuntu/apt_nosql_database.sh
# Note: Disable Telemetry service if it overloads the cluster.
#cmd queue ubuntu/setup_telemetry_controller.sh
#cmd snapshot_cycle -n controller telemetry-controller_installed
# FIXME Our LBaaS support is broken; the configuration edits
# in setup_lbaas_controller.sh break neutron # in setup_lbaas_controller.sh break neutron
#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
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Ceilometer; disable if necessary, fix comments in this file
# Note: Disable Telemetry service if it overloads the cluster.
cmd queue ubuntu/setup_telemetry_controller.sh
cmd snapshot_cycle -n controller telemetry-controller_installed
cmd queue ubuntu/setup_heat_controller.sh
cmd snapshot_cycle -n controller heat_controller_installed
cmd boot -n controller cmd boot -n controller
#============================================================================== #==============================================================================
@@ -57,21 +68,25 @@ cmd queue etc_hosts.sh
cmd queue osbash/enable_osbash_ssh_keys.sh cmd queue osbash/enable_osbash_ssh_keys.sh
cmd snapshot_cycle -n compute1 compute1_node_init cmd snapshot_cycle -n compute1 compute1_node_init
# Compute
cmd queue ubuntu/setup_nova_compute.sh cmd queue ubuntu/setup_nova_compute.sh
cmd snapshot_cycle -n compute1 nova-compute1_installed cmd snapshot_cycle -n compute1 nova-compute1_installed
# Networking
cmd queue ubuntu/setup_neutron_compute.sh cmd queue ubuntu/setup_neutron_compute.sh
cmd queue ubuntu/setup_self-service_compute.sh cmd queue ubuntu/setup_self-service_compute.sh
cmd queue ubuntu/setup_neutron_compute_part_2.sh cmd queue ubuntu/setup_neutron_compute_part_2.sh
cmd snapshot_cycle -n compute1 neutron-compute_installed cmd snapshot_cycle -n compute1 neutron-compute_installed
# Block Storage
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
cmd queue ubuntu/setup_telemetry_compute.sh # Telemetry
cmd snapshot_cycle -n compute1 telemetry-compute_installed #cmd queue ubuntu/setup_telemetry_compute.sh
cmd boot -n compute1 #cmd snapshot_cycle -n compute1 telemetry-compute_installed
cmd boot -n compute1
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Take snapshot of database changes on controller VM, too # Take snapshot of database changes on controller VM, too
cmd shutdown -n controller cmd shutdown -n controller
@@ -81,5 +96,6 @@ cmd snapshot -n controller controller_-_compute1_node_installed
cmd queue config_public_network.sh cmd queue config_public_network.sh
cmd queue config_private_network.sh cmd queue config_private_network.sh
cmd snapshot_cycle -n controller public_private_networks cmd snapshot_cycle -n controller public_private_networks
#==============================================================================
cmd boot -n controller cmd boot -n controller

View File

@@ -270,8 +270,9 @@ $option = $value
function mysql_exe { function mysql_exe {
local cmd="$1" local cmd="$1"
echo "MySQL cmd: $cmd." echo "mysql cmd: $cmd."
mysql -u "root" -p"$DATABASE_PASSWORD" -e "$cmd" # XXX install-guide uses password, but distro install uses socket auth
sudo mysql -u "root" -e "$cmd"
} }
function setup_database { function setup_database {
@@ -295,14 +296,15 @@ function setup_database {
# process, the neutron server sometimes fails to come up. We restart the # process, the neutron server sometimes fails to come up. We restart the
# neutron server if it does not reply for too long. # neutron server if it does not reply for too long.
function wait_for_neutron { function wait_for_neutron {
(
source $CONFIG_DIR/demo-openstackrc.sh
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"
until openstack network 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."
node_ssh controller "$auth; sudo service neutron-server restart" node_ssh controller "sudo service neutron-server restart"
echo -n "Waiting for neutron to come up." echo -n "Waiting for neutron to come up."
elif [ "$cnt" -eq 20 ]; then elif [ "$cnt" -eq 20 ]; then
echo echo
@@ -314,6 +316,7 @@ function wait_for_neutron {
cnt=$((cnt + 1)) cnt=$((cnt + 1))
done done
echo echo
)
} }
# Wait for keystone to come up # Wait for keystone to come up
@@ -329,19 +332,6 @@ function wait_for_keystone {
) )
} }
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Service-specific users in keystone
function service_to_user_name {
local service_name=$1
echo "${service_name}"
}
function service_to_user_password {
local service_name=$1
echo "${service_name}_pass"
}
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Network configuration # Network configuration
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@@ -367,6 +357,27 @@ function set_iface_list {
echo "Set IF_NAMES to ${IF_NAMES[*]}" echo "Set IF_NAMES to ${IF_NAMES[*]}"
} }
# Return the nth network interface name (not counting loopback; 0 -> eth0)
function ifnum_to_ifname {
local if_num=$1
# Skip loopback and start counting with next interface
local iface=${IF_NAMES[$((if_num + 1))]}
echo >&2 "ifnum_to_ifname: interface $if_num is $iface"
echo "$iface"
}
# Get all network interfaces (e.g. eth0, p2p1, ens0, enp0s3) into an array
function set_iface_list {
unset IF_NAMES
local iface
for iface in $(ip -o link show|awk '/: / {print $2}'|tr -d ':'); do
IF_NAMES+=($iface)
done
echo "Set IF_NAMES to ${IF_NAMES[*]}"
}
function hostname_to_ip { function hostname_to_ip {
local host_name=$1 local host_name=$1
getent hosts "$host_name"|awk '{print $1}' getent hosts "$host_name"|awk '{print $1}'

View File

@@ -0,0 +1,89 @@
# Ubuntu 16.04 LTS amd64 server
# Default scripts for all Ubuntu installs
: ${BASE_INSTALL_SCRIPTS:=scripts.ubuntu_base}
#-------------------------------------------------------------------------------
# Installation from ISO image
#-------------------------------------------------------------------------------
readonly ISO_URL_BASE=http://releases.ubuntu.com/16.04/
ISO_URL=$ISO_URL_BASE/ubuntu-16.04.1-server-amd64.iso
#ISO_MD5=23e97cd5d4145d4105fbf29878534049
ISO_MD5=d2d939ca0e65816790375f6826e4032f
readonly _PS_ssh=http://git.openstack.org/cgit/openstack/training-labs/plain/labs/osbash/lib/osbash/netboot/preseed-ssh-v4.cfg
readonly _PS_vbadd=http://git.openstack.org/cgit/openstack/training-labs/plain/labs/osbash/lib/osbash/netboot/preseed-vbadd-v3.cfg
readonly _PS_all=http://git.openstack.org/cgit/openstack/training-labs/plain/labs/osbash/lib/osbash/netboot/preseed-all-v2.cfg
# Arguments for ISO image installer
readonly _BOOT_ARGS="/install/vmlinuz
noapic
preseed/url=%s
debian-installer=en_US
auto=true
locale=en_US
hostname=osbash
fb=false
debconf/frontend=noninteractive
keyboard-configuration/modelcode=SKIP
initrd=/install/initrd.gz
console-setup/ask_detect=false"
# file=/bin/cdrom-checker-menu vga=788 initrd=/install/initrd.gz quiet ---
# Fallback function to find current ISO image in case the file in ISO_URL is
# neither on the disk nor at the configured URL.
# This mechanism was added because old Ubuntu ISOs are removed from the server
# as soon as a new ISO appears.
function update_iso_variables {
# Get matching line from distro repo's MD5SUMS file, e.g.
# "9e5fecc94b3925bededed0fdca1bd417 *ubuntu-14.04.3-server-amd64.iso"
local distro_info=$(wget -O - "$ISO_URL_BASE/MD5SUMS"|grep server-amd64)
# First part (removing everything after first space) is the md5sum
ISO_MD5=${distro_info%% *}
# Second part (keeping everything after ' *') is the ISO file name
local iso_file=${distro_info#* \*}
ISO_URL=$ISO_URL_BASE/$iso_file
echo -e >&2 "${CStatus:-}New ISO_URL: ${CData:-}$ISO_URL${CReset:-}"
}
# ostype used by VirtualBox to choose icon and flags (64-bit, IOAPIC)
VBOX_OSTYPE=Ubuntu_64
# Boot the ISO image operating system installer
function distro_start_installer {
local vm_name=$1
# pick a _PS_* file
local preseed=_PS_$VM_ACCESS
echo "Using $preseed ${!preseed}"
local boot_args=$(printf "$_BOOT_ARGS" "${!preseed}")
if [ -n "${VM_PROXY:-""}" ]; then
echo >&2 "Using proxy $VM_PROXY."
boot_args="$boot_args mirror/http/proxy=$VM_PROXY http_proxy=$VM_PROXY"
fi
keyboard_send_enter "$vm_name"
keyboard_send_f6 "$vm_name"
keyboard_send_escape "$vm_name"
for i in $(seq 1 83); do
keyboard_send_backspace "$vm_name"
done
echo -e "${CStatus:-}Pushing boot command line${CReset:-}"
keyboard_send_string "$vm_name" "$boot_args"
echo "Initiating boot sequence"
keyboard_send_enter "$vm_name"
}
# vim: set ai ts=4 sw=4 et ft=sh:

View File

@@ -10,7 +10,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Create private network # Create private network
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-networks-private.html # http://docs.openstack.org/newton/install-guide-ubuntu/launch-instance-networks-selfservice.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo -n "Waiting for first DHCP namespace." echo -n "Waiting for first DHCP namespace."
@@ -28,6 +28,9 @@ until [ "$(/sbin/brctl show | grep -c -o "^brq[a-z0-9-]*")" -gt 0 ]; do
done done
echo echo
# Wait for neutron to start
wait_for_neutron
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Create the self-service network # Create the self-service network
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -36,20 +39,17 @@ echo
echo "Sourcing the demo credentials." echo "Sourcing the demo credentials."
source "$CONFIG_DIR/demo-openstackrc.sh" source "$CONFIG_DIR/demo-openstackrc.sh"
# Wait for neutron to start
wait_for_neutron
echo "Creating the private network." echo "Creating the private network."
neutron net-create selfservice neutron net-create selfservice
echo "Creating a subnet on the tenant network." echo "Creating a subnet on the private network."
neutron subnet-create --name selfservice \ neutron subnet-create --name selfservice \
--dns-nameserver "$DNS_RESOLVER" --gateway "$PRIVATE_NETWORK_GATEWAY" \ --dns-nameserver "$DNS_RESOLVER" --gateway "$SELFSERVICE_NETWORK_GATEWAY" \
selfservice "$PRIVATE_NETWORK_CIDR" selfservice "$SELFSERVICE_NETWORK_CIDR"
) )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Not in install-guide:
echo -n "Waiting for second DHCP namespace." echo -n "Waiting for second DHCP namespace."
until [ "$(ip netns | grep -c -o "^qdhcp-[a-z0-9-]*")" -gt 1 ]; do until [ "$(ip netns | grep -c -o "^qdhcp-[a-z0-9-]*")" -gt 1 ]; do
sleep 1 sleep 1
@@ -87,13 +87,16 @@ echo "Creating a router."
neutron router-create router neutron router-create router
) )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Not in install-guide:
function wait_for_agent { function wait_for_agent {
local agent=$1 local agent=$1
echo -n "Waiting for neutron agent $agent." echo -n "Waiting for neutron agent $agent."
( (
source "$CONFIG_DIR/admin-openstackrc.sh" source "$CONFIG_DIR/admin-openstackrc.sh"
while neutron agent-list|grep "$agent" | grep "xxx" >/dev/null; do while neutron agent-list | grep "$agent" | grep "xxx" >/dev/null; do
sleep 1 sleep 1
echo -n . echo -n .
done done
@@ -107,12 +110,15 @@ 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
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
( (
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 selfservice neutron router-interface-add router selfservice
) )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Not in install-guide:
# The following tests for router namespace, qr-* interface and bridges are just # The following tests for router namespace, qr-* interface and bridges are just
# for show. They are not needed to prevent races. # for show. They are not needed to prevent races.
@@ -129,15 +135,15 @@ until sudo ip netns exec "$nsrouter" ip addr|grep -Po "(?<=: )qr-.*(?=:)"; do
echo -n "." echo -n "."
sleep 1 sleep 1
done 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 provider neutron router-gateway-set router provider
) )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Not in install-guide:
# 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."
@@ -188,7 +194,7 @@ cnt=0
until ping -c1 "$PUBLIC_ROUTER_IP" > /dev/null; do until ping -c1 "$PUBLIC_ROUTER_IP" > /dev/null; do
cnt=$((cnt + 1)) cnt=$((cnt + 1))
if [ $cnt -eq 20 ]; then if [ $cnt -eq 20 ]; then
echo "ERROR no reply from public router IP in 20 s, exiting." echo "ERROR No reply from public router IP in 20 seconds, aborting."
exit 1 exit 1
fi fi
sleep 1 sleep 1

View File

@@ -10,7 +10,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Create the provier (external) network and a subnet on it # Create the provier (external) network and a subnet on it
# http://docs.openstack.org/mitaka/install-guide-ubuntu/launch-instance-networks-provider.html # http://docs.openstack.org/newton/install-guide-ubuntu/launch-instance-networks-provider.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Sourcing the admin credentials." echo "Sourcing the admin credentials."
@@ -54,9 +54,11 @@ echo "Creating a subnet on the public network."
neutron subnet-create --name provider \ neutron subnet-create --name provider \
--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 "$PROVIDER_NETWORK_GATEWAY" \
provider "$PUBLIC_NETWORK_CIDR" provider "$PROVIDER_NETWORK_CIDR"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Not in install-guide:
echo -n "Waiting for DHCP namespace." echo -n "Waiting for DHCP namespace."
until [ "$(ip netns | grep -c -o "^qdhcp-[a-z0-9-]*")" -gt 0 ]; do until [ "$(ip netns | grep -c -o "^qdhcp-[a-z0-9-]*")" -gt 0 ]; do
sleep 1 sleep 1
@@ -73,3 +75,4 @@ done
echo echo
/sbin/brctl show /sbin/brctl show
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -11,4 +11,4 @@ exec_logfile
echo "Shutting down" echo "Shutting down"
# Shutdown some time after returning so our caller has time to finish # Shutdown some time after returning so our caller has time to finish
sudo -b sh -c 'sleep 2; /sbin/shutdown -P now' sudo -b sh -c 'sleep 2; systemctl poweroff'

View File

@@ -45,10 +45,14 @@ check_for_other_vms
echo "Creating a test heat template." echo "Creating a test heat template."
# FIXME mykey is created in launch_instance_private_net.sh
# Note: unlike install-guide, we use m1.nano (default flavors like m1.tiny
# are no longer installed)
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 with CirrOS image using the description: Launch a basic instance with CirrOS image using the
``m1.tiny`` flavor, ``mykey`` key, and one network. ``m1.nano`` flavor, ``mykey`` key, and one network.
parameters: parameters:
NetID: NetID:
@@ -60,7 +64,7 @@ resources:
type: OS::Nova::Server type: OS::Nova::Server
properties: properties:
image: cirros image: cirros
flavor: m1.tiny flavor: m1.nano
key_name: mykey key_name: mykey
networks: networks:
- network: { get_param: NetID } - network: { get_param: NetID }
@@ -74,6 +78,29 @@ outputs:
value: { get_attr: [ server, first_address ] } value: { get_attr: [ server, first_address ] }
HEAT HEAT
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Create m1.nano flavor
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Newton does no longer create default flavors:
# http://docs.openstack.org/releasenotes/nova/unreleased.html 2016-09-25
(
echo
source "$CONFIG_DIR/admin-openstackrc.sh"
if openstack flavor list | grep m1.nano; then
echo "Proceeding, m1.nano flavor exists."
else
echo "Creating m1.nano flavor which is just big enough for CirrOS."
openstack flavor create --id 0 --vcpus 1 --ram 64 --disk 1 m1.nano
fi
echo "Current flavors:"
openstack flavor list
echo
)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Create a stack # Create a stack
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -82,19 +109,21 @@ TEST_STACK_NAME=stack
DEMO_NET=provider DEMO_NET=provider
NET_ID=$(node_ssh controller "$AUTH; openstack network list" | awk "/ $DEMO_NET / { print \$2 }") NET_ID=$(node_ssh controller "$AUTH; openstack network list" | awk "/ $DEMO_NET / { print \$2 }")
node_ssh controller "$AUTH; heat stack-create -f demo-template.yml \ echo "NET_ID: $NET_ID"
-P 'NetID=$NET_ID' $TEST_STACK_NAME"
node_ssh controller "$AUTH; openstack stack create -t demo-template.yml \
--parameter 'NetID=$NET_ID' $TEST_STACK_NAME"
echo "Verifying successful creation of stack." echo "Verifying successful creation of stack."
cnt=0 cnt=0
echo "heat stack-list" echo "openstack stack list"
until node_ssh controller "$AUTH; heat stack-list" 2>/dev/null | grep "CREATE_COMPLETE"; do until node_ssh controller "$AUTH; openstack stack list" 2>/dev/null | grep "CREATE_COMPLETE"; do
cnt=$((cnt + 1)) cnt=$((cnt + 1))
if [ $cnt -eq 60 ]; then if [ $cnt -eq 60 ]; then
# Print current stack list to help with debugging # Print current stack list to help with debugging
echo echo
node_ssh controller "$AUTH; heat stack-list" node_ssh controller "$AUTH; openstack stack list"
echo "Heat stack creation failed. Exiting." echo "Heat stack creation failed. Exiting."
echo "[Warning]: Please debug heat services on the echo "[Warning]: Please debug heat services on the
controller node. Heat may not work." controller node. Heat may not work."
@@ -106,15 +135,15 @@ until node_ssh controller "$AUTH; heat stack-list" 2>/dev/null | grep "CREATE_CO
done done
echo "Showing the name and IP address of the instance." echo "Showing the name and IP address of the instance."
node_ssh controller "$AUTH; heat output-show --all $TEST_STACK_NAME; nova list" node_ssh controller "$AUTH; openstack stack output show --all $TEST_STACK_NAME; nova list"
echo "Deleting the test stack." echo "Deleting the test stack."
heat_stack_id=$(node_ssh controller "$AUTH; heat stack-list" | awk "/ $TEST_STACK_NAME / {print \$2}") heat_stack_id=$(node_ssh controller "$AUTH; openstack stack list" | awk "/ $TEST_STACK_NAME / {print \$2}")
node_ssh controller "$AUTH; heat stack-delete $heat_stack_id" node_ssh controller "$AUTH; openstack stack delete $heat_stack_id"
echo -n "Waiting for test stack to disappear." echo -n "Waiting for test stack to disappear."
while node_ssh controller "$AUTH; heat stack-list|grep $heat_stack_id" >/dev/null 2>&1; do while node_ssh controller "$AUTH; openstack stack list|grep $heat_stack_id" >/dev/null 2>&1; do
sleep 1 sleep 1
echo -n . echo -n .
done done

View File

@@ -67,7 +67,7 @@ function wait_for_service {
local cnt=0 local cnt=0
echo -n "Node $node, service $service:" echo -n "Node $node, service $service:"
until ssh_no_chk_node "$node" service "$service" status | \ until ssh_no_chk_node "$node" service "$service" status | \
grep -q "start/running"; do grep -q "active (running)"; do
cnt=$((cnt + 1)) cnt=$((cnt + 1))
if [ $((cnt % 150)) -eq 0 ]; then if [ $((cnt % 150)) -eq 0 ]; then
echo " does not seem to come up. Forcing restart." echo " does not seem to come up. Forcing restart."
@@ -152,14 +152,6 @@ function wait_for_nova_services {
done done
echo echo
echo -n " nova-cert"
until openstack compute service list --service nova-cert | \
grep -q '| up '; do
sleep 1
echo -n .
done
echo
echo -n " nova-scheduler" echo -n " nova-scheduler"
until openstack compute service list --service nova-scheduler | \ until openstack compute service list --service nova-scheduler | \
grep -q '| up '; do grep -q '| up '; do
@@ -259,6 +251,9 @@ echo
echo "Check if m1.nano flavor is existing or else, create the flavor." echo "Check if m1.nano flavor is existing or else, create the flavor."
source "$CONFIG_DIR/admin-openstackrc.sh" source "$CONFIG_DIR/admin-openstackrc.sh"
echo "Current flavors:"
openstack flavor list
if openstack flavor list | grep m1.nano; then if openstack flavor list | grep m1.nano; then
echo "Proceeding, m1.nano flavor exists." echo "Proceeding, m1.nano flavor exists."
else else
@@ -415,8 +410,8 @@ function check_for_other_vms {
check_for_other_vms check_for_other_vms
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NOVA_SCHED_LOG=/var/log/upstart/nova-scheduler.log NOVA_SCHED_LOG=/var/log/nova/nova-scheduler.log
NOVA_API_LOG=/var/log/upstart/nova-api.log NOVA_API_LOG=/var/log/nova/nova-api.log
VM_LAUNCHES=0 VM_LAUNCHES=0
@@ -704,12 +699,12 @@ openstack console url show "$DEMO_INSTANCE_NAME"
echo echo
echo "Creating a floating IP address on the public network." echo "Creating a floating IP address on the public network."
floating_ip=$(openstack ip floating create provider | awk '/ ip / {print $4}') floating_ip=$(openstack floating ip create provider | awk '/ floating_ip_address / {print $4}')
openstack ip floating list openstack ip floating list
echo echo
echo "Associating the floating IP address with our instance." echo "Associating the floating IP address with our instance."
openstack ip floating add "$floating_ip" "$DEMO_INSTANCE_NAME" openstack server add floating ip "$DEMO_INSTANCE_NAME" "$floating_ip"
echo echo
echo "Checking the status of your floating IP address." echo "Checking the status of your floating IP address."

View File

@@ -151,18 +151,22 @@ NET_ID=$(grep "provider" $OUTPUT_FILE3 | \
echo "The provider NET_ID is $NET_ID" echo "The provider NET_ID is $NET_ID"
#######
# The following part is broken.
# The same DATA section works on the previous requests so either the
# REFERER or the IMG_URL (not likely) have changed since Mitaka
IMG_URL="http://$IP/horizon/project/images/" #IMG_URL="http://$IP/horizon/project/images/"
DATA="login_region='http://controller:5000/v3'&login_domain=default&\ #DATA="login_region='http://controller:5000/v3'&login_domain=default&\
csrfmiddlewaretoken=$TOKEN&sessionid=$SESSIONID" #csrfmiddlewaretoken=$TOKEN&sessionid=$SESSIONID"
# Step 4: Load the page with the available images ## Step 4: Load the page with the available images
echo "Loading the images tab and parsing the image ID for cirros." #echo "Loading the images tab and parsing the image ID for cirros."
request_cmd "$IMG_URL" $OUTPUT_FILE4 "$DATA" "$REFERER" #request_cmd "$IMG_URL" $OUTPUT_FILE4 "$DATA" "$REFERER"
#
# Parse (cirros) image ID ## Parse (cirros) image ID
IMAGE_ID=$(grep "cirros" $OUTPUT_FILE4 | \ #IMAGE_ID=$(grep "cirros" $OUTPUT_FILE4 | \
awk -F"obj_id=" '{print $2}' | \ # awk -F"obj_id=" '{print $2}' | \
awk -F'"' '{print $1}') # awk -F'"' '{print $1}')
#
echo "The cirros IMAGE_ID is $IMAGE_ID" #echo "The cirros IMAGE_ID is $IMAGE_ID"

View File

@@ -37,56 +37,49 @@ set_apt_proxy
# Get apt index files # Get apt index files
sudo apt-get update sudo apt-get update
function ubuntu_cloud_archive { # ---------------------------------------------------------------------------
# cloud-keyring to verify packages from ubuntu-cloud repo # Enable the OpenStack repository
sudo apt-get install ubuntu-cloud-keyring # http://docs.openstack.org/newton/install-guide-ubuntu/environment-packages.html
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# NOTE: Using pre-release staging ppa is not documented in install-guide
# https://launchpad.net/~ubuntu-cloud-archive/+archive/ubuntu/newton-staging
#--------------------------------------------------------------------------
#-------------------------------------------------------------------------- echo "Installing packages needed for add-apt-repository."
# Enable the OpenStack repository sudo apt-get -y install software-properties-common
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-packages.html
#--------------------------------------------------------------------------
# Install packages needed for add-apt-repository case "$OPENSTACK_RELEASE" in
sudo apt-get -y install software-properties-common \ newton)
python-software-properties REPO=cloud-archive:newton
sudo add-apt-repository -y "cloud-archive:$OPENSTACK_RELEASE" SRC_FILE=cloudarchive-newton.list
} ;;
newton-proposed)
function ubuntu_cloud_staging { REPO=cloud-archive:newton-proposed
#-------------------------------------------------------------------------- SRC_FILE=cloudarchive-newton-proposed.list
# Enable the OpenStack repository ;;
# https://launchpad.net/~ubuntu-cloud-archive/+archive/ubuntu/mitaka-staging newton-staging)
# REPO=ppa:ubuntu-cloud-archive/newton-staging
# NOTE: Using pre-release staging ppa is not documented in install-guide SRC_FILE=ubuntu-cloud-archive-ubuntu-newton-staging-xenial.list
#-------------------------------------------------------------------------- ;;
*)
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9F68104E echo >&2 "Unknown OpenStack release: $OPENSTACK_RELEASE. Aborting."
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
if grep -qs DISTRIB_CODENAME=precise /etc/lsb-release ||
[ "$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."
ubuntu_cloud_archive
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 exit 1
fi ;;
esac
echo "Adding cloud repo: $REPO"
sudo add-apt-repository "$REPO"
# Get index files only for ubuntu-cloud repo but keep standard lists
if [ -f "/etc/apt/sources.list.d/$SRC_FILE" ]; then
sudo apt-get update \
-o Dir::Etc::sourcelist="sources.list.d/$SRC_FILE" \
-o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
else
echo "ERROR: apt source not found: /etc/apt/sources.list.d/$SRC_FILE"
exit 1
fi fi
# Disable automatic updates (they compete with our scripts for the dpkg lock)
sudo systemctl disable apt-daily.service
sudo systemctl disable apt-daily.timer

View File

@@ -16,38 +16,47 @@ indicate_current_auto
# Controller setup # Controller setup
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
DB_IP=$(get_node_ip_in_network "$(hostname)" "mgmt") DB_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
echo "Will bind MySQL server to $DB_IP." echo "Will bind MySQL server to $DB_IP."
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Install and configure the database server # Install and configure the database server
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-sql-database.html # http://docs.openstack.org/newton/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_again 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''
echo "Installing MySQL (MariaDB)." echo "Installing MySQL (MariaDB)."
sudo apt-get install -y mariadb-server python-mysqldb sudo apt-get install -y mariadb-server python-mysqldb
conf=/etc/mysql/conf.d/mysqld_openstack.cnf # Not in the install-guide
echo "Sanity check: distro default is socket auth."
sudo mysql -u root -e quit
# Not in install-guide
# To drop socket auth for root user and use root password:
# sudo mysql -u "root" -e "use mysql; update user set plugin='' where user='root'; update user set password=PASSWORD('$DATABASE_PASSWORD') where user='root'; flush privileges;"
conf=/etc/mysql/mariadb.conf.d/99-openstack.cnf
echo "Creating $conf." echo "Creating $conf."
echo '[mysqld]' | sudo tee $conf echo '[mysqld]' | sudo tee $conf
echo "Configuring MySQL to accept requests from management network." echo "Configuring MySQL to accept requests from management network ($DB_IP)."
iniset_sudo $conf mysqld bind-address "$DB_IP" iniset_sudo $conf mysqld bind-address "$DB_IP"
# Enable InnoDB
iniset_sudo $conf mysqld default-storage-engine innodb iniset_sudo $conf mysqld default-storage-engine innodb
iniset_sudo $conf mysqld innodb_file_per_table "" iniset_sudo $conf mysqld innodb_file_per_table ""
iniset_sudo $conf mysqld max_connections 4096
# Enable UTF-8 character set and UTF-8 collation by default
iniset_sudo $conf mysqld collation-server utf8_general_ci iniset_sudo $conf mysqld collation-server utf8_general_ci
iniset_sudo $conf mysqld init-connect "'SET NAMES utf8'"
iniset_sudo $conf mysqld character-set-server utf8 iniset_sudo $conf mysqld character-set-server utf8
echo "Restarting MySQL service." echo "Restarting MySQL service."
# Close the file descriptor or the script will hang due to open ssh connection # Close the file descriptor or the script will hang due to open ssh connection
sudo service mysql restart 2>/dev/null sudo service mysql restart 2>/dev/null
# Difference to install-guide: not running mysql_secure_installation

View File

@@ -14,11 +14,13 @@ exec_logfile
indicate_current_auto indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Install the NoSQL (Mongo) service # NoSQL database for Ubuntu
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-nosql-database.html # http://docs.openstack.org/project-install-guide/telemetry/newton/database/environment-nosql-database-ubuntu.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Setting up NoSQL database (MongoDB) for telemetry." # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Install and configure components
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Installing the MongoDB packages." echo "Installing the MongoDB packages."
sudo apt-get install -y mongodb-server mongodb-clients python-pymongo sudo apt-get install -y mongodb-server mongodb-clients python-pymongo
@@ -32,7 +34,7 @@ echo "Stopping mongodb."
sudo service mongodb stop sudo service mongodb stop
echo "Removing initial journal files (if any)." echo "Removing initial journal files (if any)."
sudo rm -f /var/lib/mongodb/journal/prealloc.* sudo rm -vf /var/lib/mongodb/journal/prealloc.*
echo "Starting mongodb." echo "Starting mongodb."
sudo service mongodb start sudo service mongodb start
@@ -42,3 +44,4 @@ while sudo service mongodb status 2>/dev/null | grep "stop"; do
sleep 2 sleep 2
echo -n . echo -n .
done done
echo

View File

@@ -36,8 +36,8 @@ apt_download keystone python-openstackclient apache2 \
apt_download glance python-glanceclient apt_download glance python-glanceclient
# Nova Controller # Nova Controller
apt_download nova-api nova-cert nova-conductor nova-consoleauth \ apt_download nova-api nova-conductor nova-consoleauth \
nova-novncproxy nova-scheduler python-novaclient nova-novncproxy nova-scheduler
# Neutron Controller # Neutron Controller
apt_download neutron-server neutron-plugin-ml2 \ apt_download neutron-server neutron-plugin-ml2 \

View File

@@ -20,7 +20,10 @@ exec_logfile
# 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 # Keep our changes to /etc/sudoers from tripping up apt-get
sudo DEBIAN_FRONTEND=noninteractive apt-get \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
-y upgrade
sudo apt-get -y dist-upgrade sudo apt-get -y dist-upgrade
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@@ -14,14 +14,14 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Memcached # Memcached
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-memcached.html # http://docs.openstack.org/newton/install-guide-ubuntu/environment-memcached.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Installing memcache packages." echo "Installing memcache packages."
sudo apt-get install -y memcached python-memcache sudo apt-get install -y memcached python-memcache
MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt") MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
echo "Will bind memcached server to $MGMT_IP." echo "Binding memcached server to $MGMT_IP."
conf=/etc/memcached.conf conf=/etc/memcached.conf
sudo sed -i "s/^-l 127.0.0.1/-l $MGMT_IP/" $conf sudo sed -i "s/^-l 127.0.0.1/-l $MGMT_IP/" $conf

View File

@@ -14,14 +14,29 @@ indicate_current_auto
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Install the message broker service (RabbitMQ). # Install the message broker service (RabbitMQ).
# http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-messaging.html # http://docs.openstack.org/newton/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
echo -n "Waiting for RabbitMQ to start."
while ! sudo rabbitmqctl status >/dev/null; do
sleep 1
echo -n .
done
echo
echo ---------------------------------------------------------------
echo "sudo rabbitmqctl status"
sudo rabbitmqctl status
echo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "sudo rabbitmqctl report"
sudo rabbitmqctl report
echo ---------------------------------------------------------------
echo "Adding openstack user to messaging service." echo "Adding openstack user to messaging service."
sudo rabbitmqctl add_user openstack "$RABBIT_PASS" sudo rabbitmqctl add_user openstack "$RABBIT_PASS"
echo "Permit configuration, write and read access for the openstack user." echo "Permitting configuration, write and read access for the openstack user."
sudo rabbitmqctl set_permissions openstack ".*" ".*" ".*" sudo rabbitmqctl set_permissions openstack ".*" ".*" ".*"

View File

@@ -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/mitaka/install-guide-ubuntu/cinder-controller-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/cinder-controller-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Setting up database for cinder." echo "Setting up database for cinder."
@@ -22,7 +22,7 @@ setup_database cinder "$CINDER_DB_USER" "$CINDER_DBPASS"
source "$CONFIG_DIR/admin-openstackrc.sh" source "$CONFIG_DIR/admin-openstackrc.sh"
cinder_admin_user=$(service_to_user_name cinder) cinder_admin_user=cinder
# Wait for keystone to come up # Wait for keystone to come up
wait_for_keystone wait_for_keystone
@@ -47,7 +47,7 @@ openstack service create \
openstack service create \ openstack service create \
--name cinderv2 \ --name cinderv2 \
--description "OpenStack Block Storage v2" \ --description "OpenStack Block Storage" \
volumev2 volumev2
openstack endpoint create \ openstack endpoint create \
@@ -112,6 +112,7 @@ 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 memcached_servers controller:11211
iniset_sudo $conf keystone_authtoken auth_type password iniset_sudo $conf keystone_authtoken auth_type password
iniset_sudo $conf keystone_authtoken project_domain_name default iniset_sudo $conf keystone_authtoken project_domain_name default
iniset_sudo $conf keystone_authtoken user_domain_name default iniset_sudo $conf keystone_authtoken user_domain_name default
@@ -123,20 +124,30 @@ 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
echo "Creating the database tables for cinder." echo "Populating the Block Storage database."
sudo cinder-manage db sync sudo cinder-manage db sync
echo "Configuring nova.conf" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Configure Compute to use Block Storage
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Configuring Compute to use Block Storage."
conf=/etc/nova/nova.conf conf=/etc/nova/nova.conf
iniset_sudo $conf cinder os_region_name "$REGION" iniset_sudo $conf cinder os_region_name "$REGION"
echo "Restart Compute API service." # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Finalize installation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Restarting the Compute API service."
sudo service nova-api restart sudo service nova-api restart
echo "Restarting cinder service." echo "Restarting the Block Storage services."
sudo service cinder-scheduler restart sudo service cinder-scheduler restart
sudo service cinder-api restart sudo service cinder-api restart
echo "Removing unused SQLite database file (if any)." # Not in the install-guide:
sudo rm -f /var/lib/cinder/cinder.sqlite echo "Removing unused SQLite database file."
sudo rm -v /var/lib/cinder/cinder.sqlite

View File

@@ -14,8 +14,8 @@ exec_logfile
indicate_current_auto indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up Block Storage service (cinder). # Install and configure a storage node
# http://docs.openstack.org/mitaka/install-guide-ubuntu/cinder-storage-install.html # http://docs.openstack.org/newton/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")
@@ -35,16 +35,29 @@ echo "Configuring LVM physical and logical volumes."
cinder_dev=sdb cinder_dev=sdb
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Not in install-guide
# Avoid error due to service not running
# XXX Alternatively, in /etc/lvm/lvm.conf, set use_lvmetad = 0
sudo systemctl enable lvm2-lvmetad.service
sudo systemctl enable lvm2-lvmetad.socket
sudo systemctl start lvm2-lvmetad.service
sudo systemctl start lvm2-lvmetad.socket
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
sudo pvcreate /dev/$cinder_dev sudo pvcreate /dev/$cinder_dev
sudo vgcreate cinder-volumes /dev/$cinder_dev sudo vgcreate cinder-volumes /dev/$cinder_dev
conf=/etc/lvm/lvm.conf conf=/etc/lvm/lvm.conf
echo "Setting LVM filter line in $conf to only allow /dev/$cinder_dev:"
sudo sed -i '/^[[:space:]]\{1,\}filter/ s|= .*|= [ "a/'$cinder_dev'/", "r/.*/"]|' $conf echo "Setting LVM filter line in $conf to only allow /dev/$cinder_dev."
sudo sed -i '0,/# filter = / {s|# filter = .*|filter = [ "a/'$cinder_dev'/", "r/.*/"]|}' $conf
echo "Verifying LVM filter."
grep "^[[:space:]]\{1,\}filter" $conf grep "^[[:space:]]\{1,\}filter" $conf
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Install and configure Cinder Volumes # Install and configure components
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Installing cinder." echo "Installing cinder."
@@ -61,7 +74,7 @@ function get_database_url {
} }
database_url=$(get_database_url) database_url=$(get_database_url)
cinder_admin_user=$(service_to_user_name cinder) cinder_admin_user=cinder
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"
@@ -78,6 +91,7 @@ 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 memcached_servers controller:11211
iniset_sudo $conf keystone_authtoken auth_type password iniset_sudo $conf keystone_authtoken auth_type password
iniset_sudo $conf keystone_authtoken project_domain_name default iniset_sudo $conf keystone_authtoken project_domain_name default
iniset_sudo $conf keystone_authtoken user_domain_name default iniset_sudo $conf keystone_authtoken user_domain_name default
@@ -87,26 +101,30 @@ iniset_sudo $conf keystone_authtoken password "$CINDER_PASS"
iniset_sudo $conf DEFAULT my_ip "$MY_MGMT_IP" iniset_sudo $conf DEFAULT my_ip "$MY_MGMT_IP"
iniset_sudo $conf lvm volume_driver cinder.volume.drivers.lvm.LVMVolumeDriver iniset_sudo $conf DEFAULT volume_driver cinder.volume.drivers.lvm.LVMVolumeDriver
iniset_sudo $conf lvm volume_group cinder-volumes iniset_sudo $conf DEFAULT volume_group cinder-volumes
iniset_sudo $conf lvm iscsi_protocol iscsi iniset_sudo $conf DEFAULT iscsi_protocol iscsi
iniset_sudo $conf lvm iscsi_helper tgtadm iniset_sudo $conf DEFAULT iscsi_helper tgtadm
iniset_sudo $conf DEFAULT enabled_backends lvm iniset_sudo $conf DEFAULT enabled_backends lvm
iniset_sudo $conf DEFAULT glance_api_servers http://controller:9292 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
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Finalize installation # Finalize installation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Restarting cinder service." echo "Restarting cinder service."
sudo service tgt restart sudo service tgt restart
sudo service cinder-volume restart sudo service cinder-volume restart
sudo rm -f /var/lib/cinder/cinder.sqlite # Not in the install-guide:
sudo rm -v /var/lib/cinder/cinder.sqlite
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Verify the Block Storage installation # Verify the Block Storage installation
# http://docs.openstack.org/mitaka/install-guide-ubuntu/cinder-verify.html # http://docs.openstack.org/newton/install-guide-ubuntu/cinder-verify.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Verifying Block Storage installation on controller node." echo "Verifying Block Storage installation on controller node."
@@ -114,17 +132,21 @@ echo "Verifying Block Storage installation on controller node."
echo "Sourcing the admin credentials." echo "Sourcing the admin credentials."
AUTH="source $CONFIG_DIR/admin-openstackrc.sh" AUTH="source $CONFIG_DIR/admin-openstackrc.sh"
# It takes time for Cinder to be aware of its services status. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Force restart cinder API and wait for 20 seconds. # Not in install-guide:
echo "Restarting Cinder API." echo "Restarting Cinder API."
node_ssh controller "sudo service cinder-api restart" node_ssh controller "sudo service cinder-api restart"
echo "Restarting restarting cinder-scheduler."
node_ssh controller "sudo service cinder-scheduler restart"
echo -n "Waiting for cinder to start." echo -n "Waiting for cinder to start."
until node_ssh controller "$AUTH; cinder service-list" >/dev/null 2>&1; do until node_ssh controller "$AUTH; cinder service-list" >/dev/null 2>&1; do
echo -n . echo -n .
sleep 1 sleep 1
done done
echo echo
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "cinder service-list is available:" echo "cinder service-list is available:"
node_ssh controller "$AUTH; cinder service-list" node_ssh controller "$AUTH; cinder service-list"
@@ -165,6 +187,12 @@ function check_cinder_services {
echo -n "Waiting for all cinder services to start." echo -n "Waiting for all cinder services to start."
check_cinder_services check_cinder_services
#------------------------------------------------------------------------------
# Verify the Block Storage installation
# http://docs.openstack.org/newton/install-guide-ubuntu/launch-instance-cinder.html
# (partial implementation without instance)
#------------------------------------------------------------------------------
echo "Sourcing the demo credentials." echo "Sourcing the demo credentials."
AUTH="source $CONFIG_DIR/demo-openstackrc.sh" AUTH="source $CONFIG_DIR/demo-openstackrc.sh"

View File

@@ -14,7 +14,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Install the Image Service (glance). # Install the Image Service (glance).
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/glance-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -27,7 +27,7 @@ setup_database glance "$GLANCE_DB_USER" "$GLANCE_DBPASS"
echo "Sourcing the admin credentials." echo "Sourcing the admin credentials."
source "$CONFIG_DIR/admin-openstackrc.sh" source "$CONFIG_DIR/admin-openstackrc.sh"
glance_admin_user=$(service_to_user_name glance) glance_admin_user=glance
# Wait for keystone to come up # Wait for keystone to come up
wait_for_keystone wait_for_keystone
@@ -43,11 +43,10 @@ openstack role add \
--user "$glance_admin_user" \ --user "$glance_admin_user" \
"$ADMIN_ROLE_NAME" "$ADMIN_ROLE_NAME"
# Create glance user
echo "Registering glance with keystone so that other services can locate it." echo "Registering glance with keystone so that other services can locate it."
openstack service create \ openstack service create \
--name glance \ --name glance \
--description "OpenStack Image Service" \ --description "OpenStack Image" \
image image
# Create glance endpoints. # Create glance endpoints.
@@ -132,17 +131,11 @@ echo "Restarting glance service."
sudo service glance-registry restart sudo service glance-registry restart
sudo service glance-api restart sudo service glance-api restart
echo "Removing default SQLite database."
sudo rm -f /var/lib/glance/glance.sqlite
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Verify the Image Service installation # Verify the Image Service installation
# http://docs.openstack.org/mitaka/install-guide-ubuntu/glance-verify.html # http://docs.openstack.org/newton/install-guide-ubuntu/glance-verify.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Our openstackrc.sh files already set OS_IMAGE_API_VERSION, we can skip this
# step in the install-guide.
echo -n "Waiting for glance to start." echo -n "Waiting for glance to start."
until openstack image list >/dev/null 2>&1; do until openstack image list >/dev/null 2>&1; do
sleep 1 sleep 1
@@ -150,7 +143,7 @@ until openstack image list >/dev/null 2>&1; do
done done
echo echo
echo "Adding CirrOS image as $CIRROS_IMG_NAME to glance." echo "Adding pre-downloaded CirrOS image as $CIRROS_IMG_NAME to glance."
openstack image create "$CIRROS_IMG_NAME" \ openstack image create "$CIRROS_IMG_NAME" \
--file "$HOME/img/$(basename $CIRROS_URL)" \ --file "$HOME/img/$(basename $CIRROS_URL)" \

View File

@@ -12,9 +12,12 @@ exec_logfile
indicate_current_auto indicate_current_auto
# Wait for keystone to come up
wait_for_keystone
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Install the Orchestration Service (heat). # Install the Orchestration Service (heat)
# http://docs.openstack.org/mitaka/install-guide-ubuntu/heat-install.html # http://docs.openstack.org/project-install-guide/orchestration/newton/install-ubuntu.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -27,7 +30,7 @@ setup_database heat "$HEAT_DB_USER" "$HEAT_DBPASS"
echo "Sourcing the admin credentials." echo "Sourcing the admin credentials."
source "$CONFIG_DIR/admin-openstackrc.sh" source "$CONFIG_DIR/admin-openstackrc.sh"
heat_admin_user=$(service_to_user_name heat) heat_admin_user=heat
# Wait for keystone to come up # Wait for keystone to come up
wait_for_keystone wait_for_keystone
@@ -92,6 +95,7 @@ openstack user create \
openstack role add \ openstack role add \
--domain heat \ --domain heat \
--user-domain heat \
--user heat_domain_admin \ --user heat_domain_admin \
"$ADMIN_ROLE_NAME" "$ADMIN_ROLE_NAME"
@@ -112,6 +116,7 @@ openstack role create "heat_stack_user"
echo "Installing heat." echo "Installing heat."
# Not in install-guide:
# Prevent start of heat services here so they don't get confused by the default # 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 # configuration files. Otherwise, it takes up to 3 minutes for the heat
# stack-list to appear after the heat services restart below. # stack-list to appear after the heat services restart below.
@@ -157,7 +162,7 @@ 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"
# Configure [trustee] section. # Configure [trustee] section.
iniset_sudo $conf trustee auth_plugin password iniset_sudo $conf trustee auth_type 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"
@@ -185,7 +190,7 @@ sudo heat-manage db_sync
# Finalize installation # Finalize installation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Re-enable automatic start of heat services # Not in install-guide: Re-enable automatic start of heat services
sudo rm /etc/init/heat-api.override sudo rm /etc/init/heat-api.override
sudo rm /etc/init/heat-api-cfn.override sudo rm /etc/init/heat-api-cfn.override
sudo rm /etc/init/heat-engine.override sudo rm /etc/init/heat-engine.override
@@ -196,21 +201,18 @@ 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 -n "Waiting for heat stack-list." echo -n "Waiting for openstack stack list."
until heat stack-list; do until openstack stack list; do
sleep 1 sleep 1
echo -n . echo -n .
done done
ENDTIME=$(date +%s) ENDTIME=$(date +%s)
echo "Restarting heat servies took $((ENDTIME - STARTTIME)) seconds." echo "Restarting heat servies took $((ENDTIME - STARTTIME)) seconds."
echo "Removing default SQLite database."
sudo rm -f /var/lib/heat/heat.sqlite
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Verify operation of Orchestration Service (heat). # Verify operation of Orchestration Service (heat).
# http://docs.openstack.org/mitaka/install-guide-ubuntu/heat-verify.html # http://docs.openstack.org/project-install-guide/orchestration/newton/verify.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Listing service components." echo "Listing service components."
heat service-list openstack orchestration service list

View File

@@ -13,13 +13,19 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up OpenStack Dashboard (horizon) # Set up OpenStack Dashboard (horizon)
# http://docs.openstack.org/mitaka/install-guide-ubuntu/horizon-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/horizon-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Install and configure components # Install and configure components
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Note: Installing the dashboard here reloads the apache configuration.
# Below, we are also changing the configuration and reloading it once we
# are done. This race can result in a stopped apache (which also means
# stopped keystone services). We can either sleep for a second
# after the "apt-get install" call below or do a restart instead
# of a reload when we are done changing the configuration files.
echo "Installing horizon." echo "Installing horizon."
sudo apt-get install -y openstack-dashboard sudo apt-get install -y openstack-dashboard
@@ -30,7 +36,7 @@ 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 "Allowing all hosts to access the dashboard: " 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." echo "Telling horizon to use the cache for sessions."
@@ -38,7 +44,7 @@ iniset_sudo_no_section $conf "SESSION_ENGINE" "'django.contrib.sessions.backends
echo "Setting interface location of memcached." echo "Setting interface location of memcached."
sudo sed -i "/LOCATION/ s/127.0.0.1/controller/" $conf sudo sed -i "/LOCATION/ s/127.0.0.1/controller/" $conf
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Comparing $conf to memcached.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 "
@@ -62,6 +68,7 @@ fi
echo "CACHES configuration in $conf:" echo "CACHES configuration in $conf:"
awk '/^CACHES =/,/^}/' $conf awk '/^CACHES =/,/^}/' $conf
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Enabling Identity API version 3." echo "Enabling Identity API version 3."
iniset_sudo_no_section $conf "OPENSTACK_KEYSTONE_URL" '"http://%s:5000/v3" % OPENSTACK_HOST' iniset_sudo_no_section $conf "OPENSTACK_KEYSTONE_URL" '"http://%s:5000/v3" % OPENSTACK_HOST'
@@ -92,7 +99,7 @@ echo "Setting timezone to UTC."
iniset_sudo_no_section $conf "TIME_ZONE" '"UTC"' iniset_sudo_no_section $conf "TIME_ZONE" '"UTC"'
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Customize Horizon # Customize Horizon (not in install-guide)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Removing default Ubuntu theme." echo "Removing default Ubuntu theme."
@@ -103,4 +110,5 @@ sudo apt-get remove --auto-remove -y openstack-dashboard-ubuntu-theme
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Reloading the web server configuration." echo "Reloading the web server configuration."
sudo service apache2 reload # Restarting instead of reloading for reasons explained in comment above.
sudo service apache2 restart

View File

@@ -15,31 +15,29 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up keystone for controller node # Set up keystone for controller node
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/keystone-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Setting up database for keystone." echo "Setting up database for keystone."
setup_database keystone "$KEYSTONE_DB_USER" "$KEYSTONE_DBPASS" setup_database keystone "$KEYSTONE_DB_USER" "$KEYSTONE_DBPASS"
# Create a "shared secret" used as OS_TOKEN, together with OS_URL, before # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# keystone can be used for authentication # Not in install-guide:
echo -n "Using openssl to generate a random admin token: " echo "Sanity check: local auth should work."
ADMIN_TOKEN=$(openssl rand -hex 10) mysql -u keystone -p"$KEYSTONE_DBPASS" keystone -e quit
echo "$ADMIN_TOKEN"
echo "Sanity check: remote auth should work."
mysql -u keystone -p"$KEYSTONE_DBPASS" keystone -h controller -e quit
echo "Disabling the keystone service from starting automatically after installation." # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Will not be re-enabled because apache2 wsgi serves these ports now # Install and configure components
echo "manual" | sudo tee /etc/init/keystone.override # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Installing keystone packages." echo "Installing keystone."
sudo apt-get install -y keystone apache2 libapache2-mod-wsgi sudo apt-get install -y keystone
conf=/etc/keystone/keystone.conf conf=/etc/keystone/keystone.conf
echo "Configuring [DEFAULT] section in $conf." echo "Editing $conf."
echo "Setting admin_token to bootstrap authentication."
iniset_sudo $conf DEFAULT admin_token "$ADMIN_TOKEN"
function get_database_url { function get_database_url {
local db_user=$KEYSTONE_DB_USER local db_user=$KEYSTONE_DB_USER
@@ -50,8 +48,6 @@ function get_database_url {
database_url=$(get_database_url) database_url=$(get_database_url)
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"
@@ -61,72 +57,43 @@ iniset_sudo $conf token provider fernet
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." echo "Initializing Fernet key repositories."
sudo keystone-manage fernet_setup \ sudo keystone-manage fernet_setup \
--keystone-user keystone \ --keystone-user keystone \
--keystone-group keystone --keystone-group keystone
# Configure Apache HTTP server. sudo keystone-manage credential_setup \
--keystone-user keystone \
--keystone-group keystone
echo "Bootstrapping the Identity service."
sudo keystone-manage bootstrap --bootstrap-password "$ADMIN_PASS" \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:35357/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id "$REGION"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Configure the Apache HTTP server
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
conf=/etc/apache2/apache2.conf conf=/etc/apache2/apache2.conf
echo "Configuring ServerName option in $conf to reference controller node." echo "Configuring ServerName option in $conf to reference controller node."
echo "ServerName controller" | sudo tee -a $conf echo "ServerName controller" | sudo tee -a $conf
echo "Creating /etc/apache2/sites-available/wsgi-keystone.conf."
cat << WSGI | sudo tee -a /etc/apache2/sites-available/wsgi-keystone.conf
Listen 5000
Listen 35357
<VirtualHost *:5000> conf=/etc/apache2/sites-enabled/keystone.conf
WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} if [ -f $conf ]; then
WSGIProcessGroup keystone-public echo "Identity service virtual hosts enabled already."
WSGIScriptAlias / /usr/bin/keystone-wsgi-public else
WSGIApplicationGroup %{GLOBAL} echo "Enabling the Identity service virtual hosts."
WSGIPassAuthorization On sudo ln -s /etc/apache2/sites-available/keystone.conf \
<IfVersion >= 2.4> /etc/apache2/sites-enabled
ErrorLogFormat "%{cu}t %M" fi
</IfVersion>
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin> # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<IfVersion >= 2.4> # Finalize the installation
Require all granted # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
<VirtualHost *:35357>
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
WSGIProcessGroup keystone-admin
WSGIScriptAlias / /usr/bin/keystone-wsgi-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog /var/log/apache2/keystone.log
CustomLog /var/log/apache2/keystone_access.log combined
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
</VirtualHost>
WSGI
echo "Enabling the identity service virtual hosts."
sudo ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled
echo "Restarting apache." echo "Restarting apache."
sudo service apache2 restart sudo service apache2 restart
@@ -134,72 +101,23 @@ sudo service apache2 restart
echo "Removing default SQLite database." echo "Removing default SQLite database."
sudo rm -f /var/lib/keystone/keystone.db sudo rm -f /var/lib/keystone/keystone.db
#------------------------------------------------------------------------------ # Set environment variables for authentication
# Create the service entity and API endpoints export OS_USERNAME=$ADMIN_USER_NAME
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-services.html export OS_PASSWORD=$ADMIN_PASS
#------------------------------------------------------------------------------ export OS_PROJECT_NAME=$ADMIN_PROJECT_NAME
export OS_USER_DOMAIN_NAME=Default
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - export OS_PROJECT_DOMAIN_NAME=Default
# Prerequisites export OS_AUTH_URL=http://controller:35357/v3
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Using OS_TOKEN, OS_URL for authentication."
export OS_TOKEN=$ADMIN_TOKEN
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."
openstack service create \
--name keystone \
--description "OpenStack Identity" \
identity
echo "Creating endpoints for keystone."
openstack endpoint create --region "$REGION" \
identity public http://controller:5000/v3
openstack endpoint create --region "$REGION" \
identity internal http://controller:5000/v3
openstack endpoint create --region "$REGION" \
identity admin http://controller:35357/v3
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Create projects, users, and roles # Create a domain, projects, users, and roles
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-users.html # http://docs.openstack.org/newton/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."
openstack project create --domain default \
--description "Admin Project" \
"$ADMIN_PROJECT_NAME"
echo "Creating admin user."
openstack user create --domain default \
--password "$ADMIN_PASS" \
"$ADMIN_USER_NAME"
echo "Creating admin role."
openstack role create "$ADMIN_ROLE_NAME"
echo "Adding admin role to admin project."
openstack role add \
--project "$ADMIN_PROJECT_NAME" \
--user "$ADMIN_USER_NAME" \
"$ADMIN_ROLE_NAME"
echo "Creating service project." echo "Creating service project."
openstack project create --domain default \ openstack project create --domain default \
--description "Service Project" \ --description "Service Project" \
@@ -227,23 +145,21 @@ openstack role add \
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Verify operation # Verify operation
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-verify.html # http://docs.openstack.org/newton/install-guide-ubuntu/keystone-verify.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Verifying keystone installation." echo "Verifying keystone installation."
# Disable temporary authentication token mechanism # Disable the temporary authentication token mechanism
conf=/etc/keystone/keystone-paste.ini conf=/etc/keystone/keystone-paste.ini
echo "Removing admin_token_auth from pipelines."
sudo ls -l $conf
sudo sed -i '/^pipeline = / s/admin_token_auth //' $conf
sudo ls -l $conf
for section in pipeline:public_api pipeline:admin_api pipeline:api_v3; do # XXX still in install-guide, but no longer necessary
if ini_has_option_sudo $conf $section admin_token_auth; then
echo "Disabling admin_token_auth in section $section."
inicomment_sudo $conf $section admin_token_auth
fi
done
# From this point on, we are going to use keystone for authentication # From this point on, we are going to use keystone for authentication
unset OS_TOKEN OS_URL unset OS_URL
echo "Requesting an authentication token as an admin user." echo "Requesting an authentication token as an admin user."
openstack \ openstack \
@@ -256,39 +172,6 @@ openstack \
--os-password "$ADMIN_PASS" \ --os-password "$ADMIN_PASS" \
token issue token issue
#echo "Requesting project list."
#openstack \
# --os-auth-url http://controller:35357 \
# --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" \
# project list
#
#echo "Requesting user list."
#openstack \
# --os-auth-url http://controller:35357/v3 \
# --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" \
# user list
#
#echo "Requesting role list."
#openstack \
# --os-auth-url http://controller:35357/v3 \
# --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 \
@@ -299,22 +182,3 @@ openstack \
--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."
#openstack \
# --os-auth-url http://controller:5000/v3 \
# --os-project-domain-name default \
# --os-user-domain-name default \
# --os-project-name "$DEMO_PROJECT_NAME" \
# --os-username "$DEMO_USER_NAME" \
# --os-auth-type password \
# --os-password "$DEMO_PASS" \
# user list || rc=$?
#
#echo rc=$rc
#if [ $rc -eq 0 ]; then
# echo "The request was not denied. This is an error. Exiting."
# exit 1
#else
# echo "The request was correctly denied."
#fi

View File

@@ -15,7 +15,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up OpenStack Networking (neutron) for compute node. # Set up OpenStack Networking (neutron) for compute node.
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/neutron-compute-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Installing networking components for compute node." echo "Installing networking components for compute node."
@@ -40,7 +40,7 @@ iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
# Configuring [DEFAULT] section # Configuring [DEFAULT] section
iniset_sudo $conf DEFAULT auth_strategy keystone iniset_sudo $conf DEFAULT auth_strategy keystone
neutron_admin_user=$(service_to_user_name neutron) neutron_admin_user=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

View File

@@ -15,23 +15,20 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up OpenStack Networking (neutron) for compute node. # Set up OpenStack Networking (neutron) for compute node.
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/neutron-compute-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Configure Compute to use Networking # Configure Compute to use Networking
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
neutron_admin_user=$(service_to_user_name neutron) neutron_admin_user=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
#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 project_domain_name default iniset_sudo $conf neutron project_domain_name default
iniset_sudo $conf neutron user_domain_name default iniset_sudo $conf neutron user_domain_name default
iniset_sudo $conf neutron region_name "$REGION" iniset_sudo $conf neutron region_name "$REGION"
@@ -51,13 +48,13 @@ sudo service neutron-linuxbridge-agent restart
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Networking Option 2: Self-service networks # Networking Option 2: Self-service networks
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-verify-option2.html # http://docs.openstack.org/newton/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 "Listing agents to verify successful launch of the neutron agents."
echo "neutron agent-list" echo "neutron agent-list"
neutron agent-list neutron agent-list

View File

@@ -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/mitaka/install-guide-ubuntu/neutron-controller-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/neutron-controller-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Setting up database for neutron." echo "Setting up database for neutron."
@@ -22,7 +22,7 @@ setup_database neutron "$NEUTRON_DB_USER" "$NEUTRON_DBPASS"
source "$CONFIG_DIR/admin-openstackrc.sh" source "$CONFIG_DIR/admin-openstackrc.sh"
neutron_admin_user=$(service_to_user_name neutron) neutron_admin_user=neutron
# Wait for keystone to come up # Wait for keystone to come up
wait_for_keystone wait_for_keystone

View File

@@ -14,12 +14,12 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up OpenStack Networking (neutron) for controller node. # Set up OpenStack Networking (neutron) for controller node.
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/neutron-controller-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
source "$CONFIG_DIR/admin-openstackrc.sh" source "$CONFIG_DIR/admin-openstackrc.sh"
neutron_admin_user=$(service_to_user_name neutron) neutron_admin_user=neutron
# Wait for keystone to come up # Wait for keystone to come up
wait_for_keystone wait_for_keystone
@@ -30,18 +30,7 @@ wait_for_keystone
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_url http://controller:35357
iniset_sudo $conf DEFAULT auth_region "$REGION"
iniset_sudo $conf DEFAULT auth_type password
iniset_sudo $conf DEFAULT project_domain_name default
iniset_sudo $conf DEFAULT user_domain_name default
iniset_sudo $conf DEFAULT project_name "$SERVICE_PROJECT_NAME"
iniset_sudo $conf DEFAULT username "$neutron_admin_user"
iniset_sudo $conf DEFAULT password "$NEUTRON_PASS"
iniset_sudo $conf DEFAULT nova_metadata_ip controller 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"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -52,19 +41,13 @@ 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
#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 project_domain_name default iniset_sudo $conf neutron project_domain_name default
iniset_sudo $conf neutron user_domain_name 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"
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"
@@ -72,6 +55,7 @@ iniset_sudo $conf neutron metadata_proxy_shared_secret "$METADATA_SECRET"
# Finalize installation # Finalize installation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Populating the database."
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 \
@@ -98,17 +82,16 @@ if type neutron-l3-agent; then
sudo service neutron-l3-agent restart sudo service neutron-l3-agent restart
fi fi
echo "Removing default SQLite database."
sudo rm -f /var/lib/neutron/neutron.sqlite
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up OpenStack Networking (neutron) for controller node. # Set up OpenStack Networking (neutron) for controller node.
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-verify.html # http://docs.openstack.org/newton/install-guide-ubuntu/neutron-verify.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Verifying operation." echo -n "Verifying operation."
until neutron ext-list >/dev/null 2>&1; do until neutron ext-list >/dev/null 2>&1; do
sleep 1 sleep 1
echo -n .
done done
echo
neutron ext-list neutron ext-list

View File

@@ -14,18 +14,17 @@ exec_logfile
indicate_current_auto indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Set up OpenStack Compute (nova) for compute node. # Install and configure a compute node
# http://docs.openstack.org/mitaka/install-guide-ubuntu/nova-compute-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/nova-compute-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Installing nova for compute node."
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# NOTE We deviate slightly from the install-guide here because inside our VMs, # NOTE We deviate slightly from the install-guide here because inside our VMs,
# we cannot use KVM inside VirtualBox. # we cannot use KVM inside VirtualBox.
# TODO Add option to use nova-compute instead if we are inside a VM that allows # TODO Add option to use nova-compute instead if we are inside a VM that allows
# using KVM. # using KVM.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Installing nova for compute node."
sudo apt-get install -y nova-compute-qemu sudo apt-get install -y nova-compute-qemu
echo "Configuring nova for compute node." echo "Configuring nova for compute node."
@@ -34,6 +33,7 @@ conf=/etc/nova/nova.conf
echo "Configuring $conf." echo "Configuring $conf."
# Configure [DEFAULT] section. # Configure [DEFAULT] section.
iniset_sudo $conf DEFAULT enabled_apis osapi_compute,metadata
iniset_sudo $conf DEFAULT rpc_backend rabbit iniset_sudo $conf DEFAULT rpc_backend rabbit
# Configure [oslo_messaging_rabbit] section. # Configure [oslo_messaging_rabbit] section.
@@ -44,7 +44,7 @@ iniset_sudo $conf oslo_messaging_rabbit rabbit_password "$RABBIT_PASS"
# Configuring [DEFAULT] section. # Configuring [DEFAULT] section.
iniset_sudo $conf DEFAULT auth_strategy keystone iniset_sudo $conf DEFAULT auth_strategy keystone
nova_admin_user=$(service_to_user_name nova) nova_admin_user=nova
MY_MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt") MY_MGMT_IP=$(get_node_ip_in_network "$(hostname)" "mgmt")
@@ -100,5 +100,16 @@ echo "Config: $(sudo grep virt_type $conf)"
echo "Restarting nova services." echo "Restarting nova services."
sudo service nova-compute restart sudo service nova-compute restart
# Not in install-guide:
# Remove SQLite database created by Ubuntu package for nova. # Remove SQLite database created by Ubuntu package for nova.
sudo rm -v /var/lib/nova/nova.sqlite sudo rm -v /var/lib/nova/nova.sqlite
#------------------------------------------------------------------------------
# Verify operation
# http://docs.openstack.org/newton/install-guide-ubuntu/nova-verify.html
#------------------------------------------------------------------------------
echo "Verifying operation of the Compute service."
echo "openstack compute service list"
openstack compute service list

View File

@@ -14,7 +14,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Install Compute controller services # Install Compute controller services
# http://docs.openstack.org/mitaka/install-guide-ubuntu/nova-controller-install.html # http://docs.openstack.org/newton/install-guide-ubuntu/nova-controller-install.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -30,7 +30,7 @@ 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"
nova_admin_user=$(service_to_user_name nova) nova_admin_user=nova
# Wait for keystone to come up # Wait for keystone to come up
wait_for_keystone wait_for_keystone
@@ -70,8 +70,8 @@ openstack endpoint create \
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Installing nova for controller node." echo "Installing nova for controller node."
sudo apt-get install -y nova-api nova-cert nova-conductor \ sudo apt-get install -y nova-api nova-conductor nova-consoleauth \
nova-consoleauth nova-novncproxy nova-scheduler nova-novncproxy nova-scheduler
conf=/etc/nova/nova.conf conf=/etc/nova/nova.conf
@@ -128,9 +128,11 @@ iniset_sudo $conf glance api_servers http://controller:9292
iniset_sudo $conf oslo_concurrency lock_path /var/lib/nova/tmp iniset_sudo $conf oslo_concurrency lock_path /var/lib/nova/tmp
# Delete logdir line # Delete logdir line
# According to install-guide, "Due to a packaging bug, remove the logdir option
# from the [DEFAULT] section."
sudo sed -i "/^logdir/ d" $conf sudo sed -i "/^logdir/ d" $conf
echo "Creating the database tables for nova." echo "Populating the Compute databases."
sudo nova-manage api_db sync sudo nova-manage api_db sync
sudo nova-manage db sync sudo nova-manage db sync
@@ -139,33 +141,28 @@ sudo nova-manage db sync
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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-consoleauth nova-scheduler \
nova-scheduler nova-conductor nova-novncproxy) nova-conductor nova-novncproxy)
for nova_service in "${nova_services[@]}"; do for nova_service in "${nova_services[@]}"; do
echo "Restarting $nova_service." echo "Restarting $nova_service."
sudo service "$nova_service" restart sudo service "$nova_service" restart
done done
# Not in install-guide:
echo "Removing default SQLite database." echo "Removing default SQLite database."
sudo rm -f /var/lib/nova/nova.sqlite sudo rm -v /var/lib/nova/nova.sqlite
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Verify the Compute controller installation # Verify the Compute controller installation (not in install-guide)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Verify nova service status." echo -n "Verifying operation of the Compuyte service."
echo "Checking nova services."
loop=0
until openstack service list 2>/dev/null; do until openstack service list 2>/dev/null; do
echo -n .
loop=$((loop+1))
if ((loop%10 == 0)); then
echo
echo still checking
fi
sleep 1 sleep 1
echo -n .
done done
echo
echo "Checking nova endpoints." echo "Checking nova endpoints."
openstack catalog list openstack catalog list

View File

@@ -14,7 +14,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Networking Option 2: Self-service networks # Networking Option 2: Self-service networks
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install-option2.html # http://docs.openstack.org/newton/install-guide-ubuntu/neutron-compute-install-option2.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -36,9 +36,6 @@ iniset_sudo $conf vxlan enable_vxlan True
iniset_sudo $conf vxlan local_ip $OVERLAY_INTERFACE_IP_ADDRESS iniset_sudo $conf vxlan local_ip $OVERLAY_INTERFACE_IP_ADDRESS
iniset_sudo $conf vxlan l2_population True iniset_sudo $conf vxlan l2_population True
# Edit the [agent] section.
iniset_sudo $conf agent prevent_arp_spoofing True
# Edit the [securitygroup] section. # Edit the [securitygroup] section.
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

View File

@@ -15,7 +15,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Networking Option 2: Self-service networks # Networking Option 2: Self-service networks
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-controller-install-option2.html # http://docs.openstack.org/newton/install-guide-ubuntu/neutron-controller-install-option2.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -38,11 +38,9 @@ function get_database_url {
database_url=$(get_database_url) database_url=$(get_database_url)
# Get neutron service info. neutron_admin_user=neutron
neutron_admin_user=$(service_to_user_name neutron)
# Get nova service info. nova_admin_user=nova
nova_admin_user=$(service_to_user_name nova)
echo "Setting database connection: $database_url." echo "Setting database connection: $database_url."
conf=/etc/neutron/neutron.conf conf=/etc/neutron/neutron.conf
@@ -79,7 +77,6 @@ iniset_sudo $conf keystone_authtoken password "$NEUTRON_PASS"
# Configure nova related parameters # Configure nova related parameters
iniset_sudo $conf DEFAULT notify_nova_on_port_status_changes True iniset_sudo $conf DEFAULT notify_nova_on_port_status_changes True
iniset_sudo $conf DEFAULT notify_nova_on_port_data_changes True iniset_sudo $conf DEFAULT notify_nova_on_port_data_changes True
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
@@ -131,9 +128,6 @@ iniset_sudo $conf vxlan enable_vxlan True
iniset_sudo $conf vxlan local_ip $OVERLAY_INTERFACE_IP_ADDRESS iniset_sudo $conf vxlan local_ip $OVERLAY_INTERFACE_IP_ADDRESS
iniset_sudo $conf vxlan l2_population True iniset_sudo $conf vxlan l2_population True
# Edit the [agent] section.
iniset_sudo $conf agent prevent_arp_spoofing True
# Edit the [securitygroup] section. # Edit the [securitygroup] section.
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
@@ -160,6 +154,7 @@ iniset_sudo $conf DEFAULT interface_driver neutron.agent.linux.interface.BridgeI
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
# Not in install-guide:
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

View File

@@ -15,13 +15,17 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Enable Compute service meters # Enable Compute service meters
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-nova.html # http://docs.openstack.org/project-install-guide/telemetry/newton/configure_services/nova/install-nova-ubuntu.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Install and configure components
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Installing ceilometer." echo "Installing ceilometer."
sudo apt-get install -y ceilometer-agent-compute sudo apt-get install -y ceilometer-agent-compute
ceilometer_admin_user=$(service_to_user_name ceilometer) ceilometer_admin_user=ceilometer
conf=/etc/ceilometer/ceilometer.conf conf=/etc/ceilometer/ceilometer.conf
echo "Configuring $conf." echo "Configuring $conf."
@@ -49,15 +53,19 @@ iniset_sudo $conf keystone_authtoken username "$ceilometer_admin_user"
iniset_sudo $conf keystone_authtoken password "$CEILOMETER_PASS" 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 auth_url http://controller:5000
iniset_sudo $conf service_credentials os_username "$ceilometer_admin_user" iniset_sudo $conf service_credentials project_domain_id default
iniset_sudo $conf service_credentials os_tenant_name "$SERVICE_PROJECT_NAME" iniset_sudo $conf service_credentials user_domain_id default
iniset_sudo $conf service_credentials os_password "$CEILOMETER_PASS" iniset_sudo $conf service_credentials auth_type password
iniset_sudo $conf service_credentials username "$ceilometer_admin_user"
iniset_sudo $conf service_credentials project_name "$SERVICE_PROJECT_NAME"
iniset_sudo $conf service_credentials password "$CEILOMETER_PASS"
iniset_sudo $conf service_credentials interface internalURL iniset_sudo $conf service_credentials interface internalURL
iniset_sudo $conf service_credentials region_name "$REGION" iniset_sudo $conf service_credentials region_name "$REGION"
# Marked "optional" in install-guide # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
iniset_sudo $conf DEFAULT verbose True # Configure Compute to use Telemetry
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Configuring nova.conf." echo "Configuring nova.conf."
conf=/etc/ceilometer/ceilometer.conf conf=/etc/ceilometer/ceilometer.conf
@@ -66,7 +74,12 @@ conf=/etc/ceilometer/ceilometer.conf
iniset_sudo $conf DEFAULT instance_usage_audit True iniset_sudo $conf DEFAULT instance_usage_audit True
iniset_sudo $conf DEFAULT instance_usage_audit_period hour iniset_sudo $conf DEFAULT instance_usage_audit_period hour
iniset_sudo $conf DEFAULT notify_on_state_change vm_and_task_state iniset_sudo $conf DEFAULT notify_on_state_change vm_and_task_state
iniset_sudo $conf DEFAULT notification_driver messagingv2
iniset_sudo $conf oslo_messaging_notifications driver messagingv2
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Finalize installation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Restarting telemetry service." echo "Restarting telemetry service."
sudo service ceilometer-agent-compute restart sudo service ceilometer-agent-compute restart
@@ -76,7 +89,7 @@ sudo service nova-compute restart
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Enable Block Storage meters # Enable Block Storage meters
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-cinder.html # http://docs.openstack.org/project-install-guide/telemetry/newton/configure_services/cinder/install-cinder-ubuntu.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -88,12 +101,12 @@ echo "Configuring $conf."
iniset_sudo $conf oslo_messaging_notifications driver messagingv2 iniset_sudo $conf oslo_messaging_notifications driver messagingv2
echo "Restarting cinder-volumes service." echo "Restarting the Block Storage services."
sudo service cinder-volume restart sudo service cinder-volume restart
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Verify operation # Verify operation
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-verify.html # http://docs.openstack.org/project-install-guide/telemetry/newton/verify.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
echo "Verifying the Telemetry installation." echo "Verifying the Telemetry installation."

View File

@@ -15,7 +15,7 @@ indicate_current_auto
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Install the Telemetry service # Install the Telemetry service
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-install.html # http://docs.openstack.org/project-install-guide/telemetry/newton/install-base-ubuntu.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -23,7 +23,7 @@ indicate_current_auto
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Create Ceilometer user and database. # Create Ceilometer user and database.
ceilometer_admin_user=$(service_to_user_name ceilometer) ceilometer_admin_user=ceilometer
mongodb_user=$CEILOMETER_DB_USER mongodb_user=$CEILOMETER_DB_USER
@@ -117,24 +117,54 @@ iniset_sudo $conf keystone_authtoken username "$ceilometer_admin_user"
iniset_sudo $conf keystone_authtoken password "$CEILOMETER_PASS" 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 auth_type password
iniset_sudo $conf service_credentials os_username "$ceilometer_admin_user" iniset_sudo $conf service_credentials os_auth_url http://controller:5000/v3
iniset_sudo $conf service_credentials os_tenant_name "$SERVICE_PROJECT_NAME" iniset_sudo $conf service_credentials project_domain_name default
iniset_sudo $conf service_credentials os_password "$CEILOMETER_PASS" iniset_sudo $conf service_credentials user_domain_name default
iniset_sudo $conf service_credentials project_name "$SERVICE_PROJECT_NAME"
iniset_sudo $conf service_credentials username "$ceilometer_admin_user"
iniset_sudo $conf service_credentials password "$CEILOMETER_PASS"
iniset_sudo $conf service_credentials interface internalURL iniset_sudo $conf service_credentials interface internalURL
iniset_sudo $conf service_credentials region_name "$REGION" iniset_sudo $conf service_credentials region_name "$REGION"
iniset_sudo $conf DEFAULT verbose True # FIXME /var/www/cgi-bin/ceilometer/app does not exist
echo "Creating /etc/apache2/sites-available/wsgi-ceilometer.conf"
cat << WSGI | sudo tee -a /etc/apache2/sites-available/wsgi-ceilometer.conf
Listen 8777
<VirtualHost *:8777>
WSGIDaemonProcess ceilometer-api processes=2 threads=10 user=ceilometer group=ceilometer display-name=%{GROUP}
WSGIProcessGroup ceilometer-api
WSGIScriptAlias / "/var/www/cgi-bin/ceilometer/app"
WSGIApplicationGroup %{GLOBAL}
ErrorLog /var/log/apache2/ceilometer_error.log
CustomLog /var/log/apache2/ceilometer_access.log combined
</VirtualHost>
WSGISocketPrefix /var/run/apache2
WSGI
echo "Enabling the Telemetry service virtual hosts."
# FIXME The documentation uses ceilometer here
# https://bugs.launchpad.net/ceilometer/+bug/1631629
sudo a2ensite wsgi-ceilometer
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Install and configure components
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Reloading the Apache HTTP server."
sudo service apache2 reload
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-collector restart sudo service ceilometer-collector restart
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Enable Image service meters # Enable Image service meters
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-glance.html # http://docs.openstack.org/project-install-guide/telemetry/newton/configure_services/glance/install-glance-ubuntu.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -169,12 +199,13 @@ 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"
echo "Restarting the Image service."
sudo service glance-registry restart sudo service glance-registry restart
sudo service glance-api restart sudo service glance-api restart
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Enable Block Storage meters # Enable Block Storage meters
# http://docs.openstack.org/mitaka/install-guide-ubuntu/ceilometer-cinder.html # http://docs.openstack.org/project-install-guide/telemetry/newton/configure_services/cinder/install-cinder-ubuntu.html
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -185,8 +216,8 @@ conf=/etc/cinder/cinder.conf
echo "Configuring $conf." echo "Configuring $conf."
# Configure [oslo_messaging_notifications] section. # Configure [oslo_messaging_notifications] section.
iniset_sudo $conf oslo_messaging_notifications notification_driver messagingv2 iniset_sudo $conf oslo_messaging_notifications driver messagingv2
echo "Restarting cinder services." echo "Restarting the Block Storage services on the controller node."
sudo service cinder-api restart sudo service cinder-api restart
sudo service cinder-scheduler restart sudo service cinder-scheduler restart

0
labs/osbash/tools/repeat-test.sh Normal file → Executable file
View File