This change adds a DevStack plugin for Group-Based Policy. A new top-level directory, devstack, has been created to fulfill the contract of the DevStack plugin mechanism [1]. Documentation on how to enable the plugin has been added to doc/source/installation.rst. [1] http://docs.openstack.org/developer/devstack/plugins.html Change-Id: I7e6c95408fbb132e33823d803a44f2867541a922 Closes-Bug: #1564893
61 lines
2.0 KiB
Bash
Executable File
61 lines
2.0 KiB
Bash
Executable File
GBP="Group-Based Policy"
|
|
|
|
function gbp_configure_nova {
|
|
iniset $NOVA_CONF neutron allow_duplicate_networks "True"
|
|
}
|
|
|
|
function gbp_configure_heat {
|
|
local HEAT_PLUGINS_DIR="/opt/stack/gbpautomation/gbpautomation/heat"
|
|
iniset $HEAT_CONF DEFAULT plugin_dirs "$HEAT_PLUGINS_DIR"
|
|
}
|
|
|
|
function gbp_configure_neutron {
|
|
iniset $NEUTRON_CONF group_policy policy_drivers "implicit_policy,resource_mapping"
|
|
iniset $NEUTRON_CONF group_policy extension_drivers "proxy_group"
|
|
iniset $NEUTRON_CONF servicechain servicechain_drivers "simplechain_driver"
|
|
iniset $NEUTRON_CONF node_composition_plugin node_plumber "stitching_plumber"
|
|
iniset $NEUTRON_CONF node_composition_plugin node_drivers "heat_node_driver"
|
|
iniset $NEUTRON_CONF quotas default_quota "-1"
|
|
iniset $NEUTRON_CONF quotas quota_network "-1"
|
|
iniset $NEUTRON_CONF quotas quota_subnet "-1"
|
|
iniset $NEUTRON_CONF quotas quota_port "-1"
|
|
iniset $NEUTRON_CONF quotas quota_security_group "-1"
|
|
iniset $NEUTRON_CONF quotas quota_security_group_rule "-1"
|
|
iniset $NEUTRON_CONF quotas quota_router "-1"
|
|
iniset $NEUTRON_CONF quotas quota_floatingip "-1"
|
|
}
|
|
|
|
# Process contract
|
|
if is_service_enabled group-policy; then
|
|
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
|
|
echo_summary "Preparing $GBP"
|
|
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
|
|
echo_summary "Installing $GBP"
|
|
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
|
echo_summary "Configuring $GBP"
|
|
gbp_configure_nova
|
|
gbp_configure_heat
|
|
gbp_configure_neutron
|
|
# install_apic_ml2
|
|
# install_aim
|
|
# init_aim
|
|
install_gbpclient
|
|
install_gbpservice
|
|
init_gbpservice
|
|
install_gbpheat
|
|
install_gbpui
|
|
stop_apache_server
|
|
start_apache_server
|
|
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
|
echo_summary "Initializing $GBP"
|
|
fi
|
|
|
|
if [[ "$1" == "unstack" ]]; then
|
|
echo_summary "Removing $GBP"
|
|
fi
|
|
|
|
if [[ "$1" == "clean" ]]; then
|
|
echo_summary "Cleaning $GBP"
|
|
fi
|
|
fi
|