Files
training-guides/labs/scripts/config_tenant_network.sh
Roger Luethi cf0aa13715 labs: force LC_ALL=C for ssh
Mac OS X exports LC_CTYPE=UTF-8 to our ssh environment which makes the
keystone install fail (results in a Python traceback complaining about
"unknown locale: UTF-8").

This patch uses LC_ALL=C to override all locale settings.

The previous, limited work-arounds for neutron are no longer needed and
removed.

Change-Id: Ic7a2f5547fc4bd5d512da5197e48366c83c21c24
2014-12-22 15:17:41 +01:00

40 lines
1.2 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"
source "$CONFIG_DIR/demo-openstackrc.sh"
exec_logfile
indicate_current_auto
#------------------------------------------------------------------------------
# Create tenant network
# http://docs.openstack.org/icehouse/install-guide/install/apt/content/neutron_initial-tenant-network.html
#------------------------------------------------------------------------------
echo "Waiting for neutron to start."
until neutron net-list >/dev/null 2>&1; do
sleep 1
done
echo "Creating the tenant network."
neutron net-create demo-net
echo "Creating a subnet on the tenant network."
neutron subnet-create demo-net \
--name demo-subnet \
--gateway "$TENANT_NETWORK_GATEWAY" \
"$TENANT_NETWORK_CIDR"
echo "Creating a router on the tenant network."
neutron router-create demo-router
echo "Attaching the router to the demo tenant subnet."
neutron router-interface-add demo-router demo-subnet
echo "Attaching the router to the external network by setting it as the" \
"gateway."
neutron router-gateway-set demo-router ext-net