From affd58df2e9856b4b2eddf4be570348ac04450a9 Mon Sep 17 00:00:00 2001 From: Subbarayudu Mukkamala Date: Fri, 3 Oct 2014 20:15:38 -0700 Subject: [PATCH 1/7] update nuage vsp charmhelpers neutron.py context.py --- hooks/charmhelpers/contrib/openstack/context.py | 16 ++++++++++++++++ hooks/charmhelpers/contrib/openstack/neutron.py | 14 ++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py index 755e1a25..432407ac 100644 --- a/hooks/charmhelpers/contrib/openstack/context.py +++ b/hooks/charmhelpers/contrib/openstack/context.py @@ -642,6 +642,20 @@ class NeutronContext(OSContextGenerator): return ovs_ctxt + def nuage_ctxt(self): + driver = neutron_plugin_attribute(self.plugin, 'driver', + self.network_manager) + config = neutron_plugin_attribute(self.plugin, 'config', + self.network_manager) + nuage_ctxt = { + 'core_plugin': driver, + 'neutron_plugin': 'vsp', + 'neutron_security_groups': self.neutron_security_groups, + 'local_ip': unit_private_ip(), + 'config': config + } + return nuage_ctxt + def nvp_ctxt(self): driver = neutron_plugin_attribute(self.plugin, 'driver', self.network_manager) @@ -706,6 +720,8 @@ class NeutronContext(OSContextGenerator): if self.plugin == 'ovs': ctxt.update(self.ovs_ctxt()) + elif self.plugin == 'vsp': + ctxt.update(self.nuage_ctxt()) elif self.plugin in ['nvp', 'nsx']: ctxt.update(self.nvp_ctxt()) elif self.plugin == 'n1kv': diff --git a/hooks/charmhelpers/contrib/openstack/neutron.py b/hooks/charmhelpers/contrib/openstack/neutron.py index 84d97bca..e9dd488b 100644 --- a/hooks/charmhelpers/contrib/openstack/neutron.py +++ b/hooks/charmhelpers/contrib/openstack/neutron.py @@ -142,6 +142,20 @@ def neutron_plugins(): 'server_packages': ['neutron-server', 'neutron-plugin-cisco'], 'server_services': ['neutron-server'] + }, + 'vsp': { + 'config': '/etc/neutron/plugins/nuage/nuage_plugin.ini', + 'driver': 'neutron.plugins.nuage.plugin.NuagePlugin', + 'contexts': [ + context.SharedDBContext(user=config('neutron-database-user'), + database=config('neutron-database'), + relation_prefix='neutron', + ssl_dir=NEUTRON_CONF_DIR)], + 'services': [], + 'packages': [], + 'server_packages': ['neutron-server', + 'neutron-plugin-nuage'], + 'server_services': ['neutron-server'] } } if release >= 'icehouse': From 9fee771bf3cb1f1539c5d8a6b63cc04ee984d4a4 Mon Sep 17 00:00:00 2001 From: Subbarayudu Mukkamala Date: Tue, 4 Nov 2014 06:54:10 -0800 Subject: [PATCH 2/7] nova.conf fixes --- templates/juno/nova.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/juno/nova.conf b/templates/juno/nova.conf index 7e51a503..83d650bd 100644 --- a/templates/juno/nova.conf +++ b/templates/juno/nova.conf @@ -57,6 +57,13 @@ firewall_driver = nova.virt.firewall.NoopFirewallDriver {% endif -%} {% endif -%} +{% if neutron_plugin and neutron_plugin == 'vsp' -%} +network_api_class=nova.network.neutronv2.api.API +libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver +neutron_ovs_bridge=alubr0 +security_group_api=nova +{% endif -%} + {% if neutron_plugin and (neutron_plugin == 'nvp' or neutron_plugin == 'nsx') -%} libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtOpenVswitchVirtualPortDriver security_group_api = neutron From 03141ae604bd443fff682af5ef40099a3f903fb5 Mon Sep 17 00:00:00 2001 From: Aniket Bhat Date: Tue, 4 Nov 2014 10:42:08 -0500 Subject: [PATCH 3/7] Added firewall_driver conf option to nova-compute config --- templates/juno/nova.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/juno/nova.conf b/templates/juno/nova.conf index 83d650bd..5cc4715a 100644 --- a/templates/juno/nova.conf +++ b/templates/juno/nova.conf @@ -62,6 +62,7 @@ network_api_class=nova.network.neutronv2.api.API libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver neutron_ovs_bridge=alubr0 security_group_api=nova +firewall_driver = nova.virt.firewall.NoopFirewallDriver {% endif -%} {% if neutron_plugin and (neutron_plugin == 'nvp' or neutron_plugin == 'nsx') -%} From 8f8bde3a1f159f0c9b92f401662e6e45e1e5b26b Mon Sep 17 00:00:00 2001 From: Aniket Bhat Date: Tue, 4 Nov 2014 14:12:49 -0500 Subject: [PATCH 4/7] Adding nova.conf to icehouse --- templates/icehouse/nova.conf | 125 +++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 templates/icehouse/nova.conf diff --git a/templates/icehouse/nova.conf b/templates/icehouse/nova.conf new file mode 100644 index 00000000..5cc4715a --- /dev/null +++ b/templates/icehouse/nova.conf @@ -0,0 +1,125 @@ +# havana +############################################################################### +# [ WARNING ] +# Configuration file maintained by Juju. Local changes may be overwritten. +{% if restart_trigger -%} +# restart trigger: {{ restart_trigger }} +{% endif -%} +############################################################################### +[DEFAULT] +dhcpbridge_flagfile=/etc/nova/nova.conf +dhcpbridge=/usr/bin/nova-dhcpbridge +logdir=/var/log/nova +state_path=/var/lib/nova +lock_path=/var/lock/nova +force_dhcp_release=True +libvirt_use_virtio_for_bridges=True +verbose=True +use_syslog = {{ use_syslog }} +ec2_private_dns_show_ip=True +api_paste_config=/etc/nova/api-paste.ini +enabled_apis=ec2,osapi_compute,metadata +auth_strategy=keystone +compute_driver=libvirt.LibvirtDriver + +{% include "parts/database" %} + +{% include "parts/rabbitmq" %} + +{% if glance_api_servers -%} +glance_api_servers = {{ glance_api_servers }} +{% endif -%} + +{% if console_vnc_type -%} +vnc_enabled = True +novnc_enabled = True +vnc_keymap = {{ console_keymap }} +vncserver_listen = 0.0.0.0 +vncserver_proxyclient_address = {{ console_listen_addr }} +{% if console_access_protocol == 'novnc' or console_access_protocol == 'vnc' -%} +novncproxy_base_url = {{ novnc_proxy_address }} +{% endif -%} +{% if console_access_protocol == 'xvpvnc' or console_access_protocol == 'vnc' -%} +xvpvncproxy_port = {{ xvpvnc_proxy_port }} +xvpvncproxy_host = {{ xvpvnc_proxy_host }} +xvpvncproxy_base_url = {{ xvpvnc_proxy_address }} +{% endif -%} +{% else -%} +vnc_enabled = False +novnc_enabled = False +{% endif -%} + +{% if neutron_plugin and neutron_plugin == 'ovs' -%} +libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtGenericVIFDriver +{% if neutron_security_groups -%} +security_group_api = neutron +firewall_driver = nova.virt.firewall.NoopFirewallDriver +{% endif -%} +{% endif -%} + +{% if neutron_plugin and neutron_plugin == 'vsp' -%} +network_api_class=nova.network.neutronv2.api.API +libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtGenericVIFDriver +neutron_ovs_bridge=alubr0 +security_group_api=nova +firewall_driver = nova.virt.firewall.NoopFirewallDriver +{% endif -%} + +{% if neutron_plugin and (neutron_plugin == 'nvp' or neutron_plugin == 'nsx') -%} +libvirt_vif_driver = nova.virt.libvirt.vif.LibvirtOpenVswitchVirtualPortDriver +security_group_api = neutron +firewall_driver = nova.virt.firewall.NoopFirewallDriver +{% endif -%} + +{% if network_manager_config -%} +{% for key, value in network_manager_config.iteritems() -%} +{{ key }} = {{ value }} +{% endfor -%} +{% endif -%} + +{% if network_manager == 'neutron' -%} +network_api_class = nova.network.neutronv2.api.API +{% else -%} +network_manager = nova.network.manager.FlatDHCPManager +{% endif -%} + +{% if volume_service -%} +volume_api_class = nova.volume.cinder.API +{% endif -%} + +{% if user_config_flags -%} +{% for key, value in user_config_flags.iteritems() -%} +{{ key }} = {{ value }} +{% endfor -%} +{% endif -%} + +{% if instances_path -%} +instances_path = {{ instances_path }} +{% endif -%} + +{% if sections and 'DEFAULT' in sections -%} +{% for key, value in sections['DEFAULT'] -%} +{{ key }} = {{ value }} +{% endfor -%} +{% endif -%} + +{% if console_access_protocol == 'spice' -%} +[spice] +agent_enabled = True +enabled = True +html5proxy_base_url = {{ spice_proxy_address }} +keymap = {{ console_keymap }} +server_listen = 0.0.0.0 +server_proxyclient_address = {{ console_listen_addr }} +{% endif -%} + +[libvirt] +{% if rbd_pool -%} +rbd_pool = {{ rbd_pool }} +rbd_user = {{ rbd_user }} +rbd_secret_uuid = {{ rbd_secret_uuid }} +{% endif -%} +{% if live_migration_uri -%} +live_migration_uri = {{ live_migration_uri }} +{% endif -%} + From b55e29b337e47d5dbd549c3df203d76a29084308 Mon Sep 17 00:00:00 2001 From: Subbarayudu Mukkamala Date: Wed, 11 Feb 2015 08:04:42 -0800 Subject: [PATCH 5/7] Fix Merge related syntax error: missing }, --- hooks/charmhelpers/contrib/openstack/neutron.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hooks/charmhelpers/contrib/openstack/neutron.py b/hooks/charmhelpers/contrib/openstack/neutron.py index 102a0ad5..6821ed4b 100644 --- a/hooks/charmhelpers/contrib/openstack/neutron.py +++ b/hooks/charmhelpers/contrib/openstack/neutron.py @@ -173,6 +173,7 @@ def neutron_plugins(): 'server_packages': ['neutron-server', 'neutron-plugin-nuage'], 'server_services': ['neutron-server'] + }, 'Calico': { 'config': '/etc/neutron/plugins/ml2/ml2_conf.ini', 'driver': 'neutron.plugins.ml2.plugin.Ml2Plugin', From 7e0ccc3c38580ceaf70c72b376bc49dba198b043 Mon Sep 17 00:00:00 2001 From: Subbarayudu Mukkamala Date: Wed, 11 Feb 2015 20:20:50 -0800 Subject: [PATCH 6/7] Fix default for disable-neutron-security-groups --- config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index 013d86b3..427afe5f 100644 --- a/config.yaml +++ b/config.yaml @@ -124,7 +124,7 @@ options: this allows you to differentiate between them. disable-neutron-security-groups: type: boolean - default: + default: False description: | Disable neutron based security groups - setting this configuration option will override any settings configured via the nova-cloud-controller charm. From 211218312dd98b1fd23cf11d4332defb243fcda7 Mon Sep 17 00:00:00 2001 From: Subbarayudu Mukkamala Date: Thu, 9 Apr 2015 20:20:43 -0700 Subject: [PATCH 7/7] templates/icehouse/nova.conf with template comment: replace havana with icehouse --- templates/icehouse/nova.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/icehouse/nova.conf b/templates/icehouse/nova.conf index 5cc4715a..d5913ab5 100644 --- a/templates/icehouse/nova.conf +++ b/templates/icehouse/nova.conf @@ -1,4 +1,4 @@ -# havana +# icehouse ############################################################################### # [ WARNING ] # Configuration file maintained by Juju. Local changes may be overwritten.