diff --git a/devstack/local.conf.sample b/devstack/local.conf.sample new file mode 100644 index 00000000..58820379 --- /dev/null +++ b/devstack/local.conf.sample @@ -0,0 +1,45 @@ +# +# Sample DevStack local.conf. +# +# This sample file is intended to be used for your typical DevStack environment +# that's running all of OpenStack on a single host. This can also be used as +# the first host of a multi-host test environment. +# +# No changes to this sample configuration are required for this to work. +# + +[[local|localrc]] + +DATABASE_PASSWORD=password +RABBIT_PASSWORD=password +SERVICE_PASSWORD=password +SERVICE_TOKEN=password +ADMIN_PASSWORD=password +LOGFILE=/opt/stack/logs/stack.sh.log +VERBOSE=True +LOG_COLOR=True +SCREEN_LOGDIR=/opt/stack/logs +HOST_IP=172.16.10.10 +FIXED_RANGE=10.0.0.0/24 +NETWORK_GATEWAY=10.0.0.1 +FIXED_NETWORK_SIZE=256 +FLOATING_RANGE=10.100.100.160/24 +Q_FLOATING_ALLOCATION_POOL=start=10.100.100.160,end=10.100.100.192 + +PUBLIC_NETWORK_GATEWAY=10.100.100.3 + + +Q_ENABLE_TRICIRCLE=True +enable_plugin tricircle https://git.openstack.org/cgit/stackforge/tricircle/ experiment + +# Use Neutron instead of nova-network +disable_service n-net +enable_service q-svc +disable_service q-dhcp +disable_service q-l3 +disable_service q-agt +disable_service c-api +disable_service c-vol +disable_service c-bak +disable_service c-sch +disable_service cinder diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 00000000..ca7d5152 --- /dev/null +++ b/devstack/plugin.sh @@ -0,0 +1,28 @@ +# Devstack extras script to install Tricircle +function configure_tricircle_plugin { + echo "Configuring Neutron for Tricircle" + + if is_service_enabled q-svc ; then + Q_PLUGIN_CLASS="tricircle.networking_tricircle.plugin.TricirclePlugin" + + iniset $NEUTRON_CONF DEFAULT core_plugin "$Q_PLUGIN_CLASS" + iniset $NEUTRON_CONF DEFAULT service_plugins "" + fi +} + + +if [[ "$Q_ENABLE_TRICIRCLE" == "True" ]]; then + if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then + echo summary "Tricircle pre-install" + elif [[ "$1" == "stack" && "$2" == "install" ]]; then + echo_summary "Installing Tricircle" + + git_clone $TRICIRCLE_REPO $TRICIRCLE_DIR $TRICIRCLE_BRANCH + + + elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + echo_summary "Configure Tricircle" + configure_tricircle_plugin + echo export PYTHONPATH=\$PYTHONPATH:$TRICIRCLE_DIR >> $RC_DIR/.localrc.auto + fi +fi diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 00000000..582a230c --- /dev/null +++ b/devstack/settings @@ -0,0 +1,6 @@ +# Git information +TRICIRCLE_REPO=${TRICIRCLE_REPO:-https://git.openstack.org/cgit/stackforge/tricircle/} +TRICIRCLE_DIR=$DEST/tricircle +TRICIRCLE_BRANCH=${TRICIRCLE_BRANCH:-master} + +export PYTHONPATH=$PYTHONPATH:$TRICIRCLE_DIR