Files
training-labs/labs/osbash/scripts/ubuntu/setup_neutron_compute_part_2.sh
Roger Luethi 8ff32fa5a5 Mitaka updates
This changeset contains updates for Mitaka.

To build the basedisk (if necessary) and the cluster and launch a test VM
once:
./tools/repeat-test.sh -b -r 1

To test Orchestration:

./tools/test-once.sh scripts/test/heat_stack.sh

Change-Id: Idd96525c14abd5903a6631095ccd6797ba91365c
2016-04-09 09:23:49 +02:00

64 lines
2.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd "$(dirname "$0")/.." && pwd)
source "$TOP_DIR/config/paths"
source "$CONFIG_DIR/credentials"
source "$LIB_DIR/functions.guest.sh"
source "$CONFIG_DIR/openstack"
exec_logfile
indicate_current_auto
#------------------------------------------------------------------------------
# Set up OpenStack Networking (neutron) for compute node.
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install.html
#------------------------------------------------------------------------------
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Configure Compute to use Networking
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
neutron_admin_user=$(service_to_user_name neutron)
echo "Configuring Compute to use Networking."
conf=/etc/nova/nova.conf
iniset_sudo $conf neutron url http://controller:9696
iniset_sudo $conf neutron auth_url http://controller:35357
# No complaints without auth_type
#iniset_sudo $conf neutron auth_type password
# without this auth_plugin, launch vm failed (image not found, flavor not found etc.)
iniset_sudo $conf neutron auth_plugin password
iniset_sudo $conf neutron project_domain_name default
iniset_sudo $conf neutron user_domain_name default
iniset_sudo $conf neutron region_name "$REGION"
iniset_sudo $conf neutron project_name "$SERVICE_PROJECT_NAME"
iniset_sudo $conf neutron username "$neutron_admin_user"
iniset_sudo $conf neutron password "$NEUTRON_PASS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Finalize installation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
echo "Restarting the Compute service."
sudo service nova-compute restart
echo "Restarting neutron-linuxbridge-agent."
sudo service neutron-linuxbridge-agent restart
#------------------------------------------------------------------------------
# Networking Option 2: Self-service networks
# http://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-verify-option2.html
#------------------------------------------------------------------------------
echo "Sourcing the admin credentials."
source "$CONFIG_DIR/admin-openstackrc.sh"
echo "List agents to verify successful launch of the neutron agents."
echo "neutron agent-list"
neutron agent-list