diff --git a/docs/packstack.rst b/docs/packstack.rst index 8605beba8..6b50ff48f 100644 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -784,6 +784,9 @@ Neutron config **CONFIG_NEUTRON_FWAAS** Specify 'y' to configure OpenStack Networking's Firewall-as-a-Service (FWaaS). ['y', 'n'] +**CONFIG_NEUTRON_VPNAAS** + Specify 'y' to configure OpenStack Networking's VPN-as-a-Service (VPNaaS). ['y', 'n'] + Neutron ML2 plugin config ------------------------- diff --git a/packstack/plugins/neutron_350.py b/packstack/plugins/neutron_350.py index 5cd31ada4..d02b2fc5e 100644 --- a/packstack/plugins/neutron_350.py +++ b/packstack/plugins/neutron_350.py @@ -128,6 +128,18 @@ def initConfig(controller): "USE_DEFAULT": False, "NEED_CONFIRM": False, "CONDITION": False}, + + {"CMD_OPTION": "os-neutron-vpnaas-install", + "PROMPT": "Would you like to configure neutron VPNaaS?", + "OPTION_LIST": ["y", "n"], + "VALIDATORS": [validators.validate_options], + "DEFAULT_VALUE": "n", + "MASK_INPUT": False, + "LOOSE_VALIDATION": True, + "CONF_NAME": "CONFIG_NEUTRON_VPNAAS", + "USE_DEFAULT": False, + "NEED_CONFIRM": False, + "CONDITION": False}, ], "NEUTRON_LB_AGENT": [ @@ -414,6 +426,8 @@ def initSequences(controller): q_hosts = api_hosts | network_hosts | compute_hosts neutron_steps = [ + {'title': 'Adding Neutron VPNaaS Agent manifest entries', + 'functions': [create_vpnaas_manifests]}, {'title': 'Adding Neutron FWaaS Agent manifest entries', 'functions': [create_fwaas_manifests]}, {'title': 'Adding Neutron LBaaS Agent manifest entries', @@ -506,6 +520,9 @@ def create_manifests(config, messages): if config['CONFIG_NEUTRON_FWAAS'] == 'y': service_plugins.append('firewall') + if config['CONFIG_NEUTRON_VPNAAS'] == 'y': + service_plugins.append('vpnaas') + config['SERVICE_PLUGINS'] = (service_plugins if service_plugins else 'undef') @@ -687,6 +704,18 @@ def create_fwaas_manifests(config, messages): appendManifestFile(manifestfile, manifestdata + "\n") +def create_vpnaas_manifests(config, messages): + global network_hosts + + if config['CONFIG_NEUTRON_VPNAAS'] != 'y': + return + + for host in network_hosts: + manifestdata = getManifestTemplate("neutron_vpnaas") + manifestfile = "%s_neutron.pp" % (host,) + appendManifestFile(manifestfile, manifestdata + "\n") + + def create_lbaas_manifests(config, messages): global network_hosts diff --git a/packstack/puppet/templates/neutron_l3.pp b/packstack/puppet/templates/neutron_l3.pp index d81ca8cd5..8c166fbf2 100644 --- a/packstack/puppet/templates/neutron_l3.pp +++ b/packstack/puppet/templates/neutron_l3.pp @@ -1,6 +1,14 @@ + +$start_l3_agent = hiera('CONFIG_NEUTRON_VPNAAS') ? { + 'y' => false, + default => true +} + class { '::neutron::agents::l3': interface_driver => hiera('CONFIG_NEUTRON_L3_INTERFACE_DRIVER'), external_network_bridge => hiera('CONFIG_NEUTRON_L3_EXT_BRIDGE'), + manage_service => $start_l3_agent, + enabled => $start_l3_agent, debug => hiera('CONFIG_DEBUG_MODE'), } diff --git a/packstack/puppet/templates/neutron_vpnaas.pp b/packstack/puppet/templates/neutron_vpnaas.pp new file mode 100644 index 000000000..5f35d059c --- /dev/null +++ b/packstack/puppet/templates/neutron_vpnaas.pp @@ -0,0 +1,3 @@ +class { '::neutron::agents::vpnaas': + enabled => true, +}