From 6a11f694d4ca6e4965ff9562bfd3eb128dad98ba Mon Sep 17 00:00:00 2001 From: Pete Vander Giessen Date: Thu, 10 Aug 2017 19:05:52 +0000 Subject: [PATCH] Added config files to snap. This is part of a transition to storing the config files in the snap, rather than in snapstack. Also updated .gitignore to ignore emacs temp files and snapcraft cruft. Change-Id: Ic08196c14649ed27178453335935acc7ea990455 --- .gitignore | 9 +++++++++ tests/etc/neutron/metadata_agent.ini | 3 +++ .../neutron/plugins/ml2/openvswitch_agent.ini | 10 ++++++++++ .../nova/nova.conf.d/glance.conf | 2 ++ .../nova/nova.conf.d/keystone.conf | 13 +++++++++++++ .../nova/nova.conf.d/neutron.conf | 17 +++++++++++++++++ .../nova/nova.conf.d/nova-placement.conf | 9 +++++++++ .../nova/nova.conf.d/rabbitmq.conf | 2 ++ tests/nova-hypervisor_cleanup.sh | 13 +++++++++++++ 9 files changed, 78 insertions(+) create mode 100644 tests/etc/neutron/metadata_agent.ini create mode 100644 tests/etc/neutron/plugins/ml2/openvswitch_agent.ini create mode 100644 tests/etc/snap-nova-hypervisor/nova/nova.conf.d/glance.conf create mode 100644 tests/etc/snap-nova-hypervisor/nova/nova.conf.d/keystone.conf create mode 100644 tests/etc/snap-nova-hypervisor/nova/nova.conf.d/neutron.conf create mode 100644 tests/etc/snap-nova-hypervisor/nova/nova.conf.d/nova-placement.conf create mode 100644 tests/etc/snap-nova-hypervisor/nova/nova.conf.d/rabbitmq.conf create mode 100755 tests/nova-hypervisor_cleanup.sh diff --git a/.gitignore b/.gitignore index 07ee36e..be29be6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,12 @@ prime stage *.snap .tox + +# Snapcraft +.snapcraft +__pycache__ +.cache + +# emacs +*~ +\#* diff --git a/tests/etc/neutron/metadata_agent.ini b/tests/etc/neutron/metadata_agent.ini new file mode 100644 index 0000000..22dc623 --- /dev/null +++ b/tests/etc/neutron/metadata_agent.ini @@ -0,0 +1,3 @@ +[DEFAULT] +nova_metadata_ip = localhost +metadata_proxy_shared_secret = supersecret diff --git a/tests/etc/neutron/plugins/ml2/openvswitch_agent.ini b/tests/etc/neutron/plugins/ml2/openvswitch_agent.ini new file mode 100644 index 0000000..58f7bfd --- /dev/null +++ b/tests/etc/neutron/plugins/ml2/openvswitch_agent.ini @@ -0,0 +1,10 @@ +[securitygroup] +enable_security_group = True +firewall_driver = iptables_hybrid + +[AGENT] +tunnel_types = geneve,vxlan,gre + +[ovs] +local_ip = 127.0.0.1 +bridge_mappings = physnet1:br-ex diff --git a/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/glance.conf b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/glance.conf new file mode 100644 index 0000000..3c7673b --- /dev/null +++ b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/glance.conf @@ -0,0 +1,2 @@ +[glance] +api_servers = http://localhost:9292 diff --git a/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/keystone.conf b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/keystone.conf new file mode 100644 index 0000000..8328116 --- /dev/null +++ b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/keystone.conf @@ -0,0 +1,13 @@ +[DEFAULT] +auth_strategy = keystone + +[keystone_authtoken] +auth_uri = http://localhost:5000 +auth_url = http://localhost:35357 +memcached_servers = localhost:11211 +auth_type = password +project_domain_name = default +user_domain_name = default +project_name = service +username = nova +password = nova diff --git a/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/neutron.conf b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/neutron.conf new file mode 100644 index 0000000..2b5b3fa --- /dev/null +++ b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/neutron.conf @@ -0,0 +1,17 @@ +[DEFAULT] +use_neutron = True +firewall_driver = nova.virt.firewall.NoopFirewallDriver + +[neutron] +url = http://localhost:9696 +auth_url = http://localhost:35357 +memcached_servers = localhost:11211 +auth_type = password +project_domain_name = default +user_domain_name = default +region_name = RegionOne +project_name = service +username = neutron +password = neutron +service_metadata_proxy = True +metadata_proxy_shared_secret = supersecret diff --git a/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/nova-placement.conf b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/nova-placement.conf new file mode 100644 index 0000000..21901b1 --- /dev/null +++ b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/nova-placement.conf @@ -0,0 +1,9 @@ +[placement] +os_region_name = RegionOne +project_domain_name = default +project_name = service +auth_type = password +user_domain_name = default +auth_url = http://localhost:35357 +username = placement +password = placement diff --git a/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/rabbitmq.conf b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/rabbitmq.conf new file mode 100644 index 0000000..7988700 --- /dev/null +++ b/tests/etc/snap-nova-hypervisor/nova/nova.conf.d/rabbitmq.conf @@ -0,0 +1,2 @@ +[DEFAULT] +transport_url = rabbit://openstack:rabbitmq@localhost diff --git a/tests/nova-hypervisor_cleanup.sh b/tests/nova-hypervisor_cleanup.sh new file mode 100755 index 0000000..43c49a3 --- /dev/null +++ b/tests/nova-hypervisor_cleanup.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -x + +# Manually define aliases if snap isn't installed from snap store. +# Otherwise, snap store defines these aliases automatically. +snap aliases nova-hypervisor | grep neutron-ovs-cleanup || \ + sudo snap alias nova-hypervisor.neutron-ovs-cleanup neutron-ovs-cleanup +snap aliases nova-hypervisor | grep neutron-netns-cleanup || \ + sudo snap alias nova-hypervisor.neutron-netns-cleanup neutron-netns-cleanup + +sudo neutron-ovs-cleanup +sudo neutron-netns-cleanup