From 68eb88caa42dbfc566db0a607a11e19a331e6fdd Mon Sep 17 00:00:00 2001 From: Logan V Date: Fri, 22 Mar 2019 14:24:15 -0400 Subject: [PATCH] Add Calico networking AIO scenario Depends-On: I47543778487b6a9a2972b29d270d199a4d1e9b61 Change-Id: Iaf392898c072ac4b39d878bb27654406c5ab0d8b --- etc/openstack_deploy/conf.d/etcd.yml.aio | 4 +++ .../{etcd.conf.example => etcd.yml.example} | 0 etc/openstack_deploy/env.d/calico.yml.example | 32 ++++++++++++++++++ scripts/log-collect.sh | 1 + .../tasks/prepare_aio_config.yml | 10 ++++++ .../templates/user_variables_calico.yml.j2 | 33 +++++++++++++++++++ tests/roles/bootstrap-host/vars/main.yml | 3 ++ 7 files changed, 83 insertions(+) create mode 100644 etc/openstack_deploy/conf.d/etcd.yml.aio rename etc/openstack_deploy/conf.d/{etcd.conf.example => etcd.yml.example} (100%) create mode 100644 etc/openstack_deploy/env.d/calico.yml.example create mode 100644 tests/roles/bootstrap-host/templates/user_variables_calico.yml.j2 diff --git a/etc/openstack_deploy/conf.d/etcd.yml.aio b/etc/openstack_deploy/conf.d/etcd.yml.aio new file mode 100644 index 0000000000..3d171c9b4b --- /dev/null +++ b/etc/openstack_deploy/conf.d/etcd.yml.aio @@ -0,0 +1,4 @@ +--- +etcd_hosts: + aio1: + ip: 172.29.236.100 diff --git a/etc/openstack_deploy/conf.d/etcd.conf.example b/etc/openstack_deploy/conf.d/etcd.yml.example similarity index 100% rename from etc/openstack_deploy/conf.d/etcd.conf.example rename to etc/openstack_deploy/conf.d/etcd.yml.example diff --git a/etc/openstack_deploy/env.d/calico.yml.example b/etc/openstack_deploy/env.d/calico.yml.example new file mode 100644 index 0000000000..1809914769 --- /dev/null +++ b/etc/openstack_deploy/env.d/calico.yml.example @@ -0,0 +1,32 @@ +--- +# Copyright 2019, Logan Vig +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Add the calico dhcp agents to the compute hosts +component_skel: + neutron_calico_dhcp_agent: + belongs_to: + - neutron_all + +container_skel: + neutron_agents_container: + contains: {} + + neutron_calico_dhcp_agent_container: + belongs_to: + - compute_containers + contains: + - neutron_calico_dhcp_agent + properties: + is_metal: true diff --git a/scripts/log-collect.sh b/scripts/log-collect.sh index d1d50a4c8f..bde4b2dbcf 100755 --- a/scripts/log-collect.sh +++ b/scripts/log-collect.sh @@ -37,6 +37,7 @@ export RSYNC_CMD="rsync --archive --copy-links --ignore-errors --quiet --no-perm # easy for folks to find and adjust items as needed. COMMON_ETC_LOG_NAMES="apt \ apache2 \ + calico \ haproxy \ httpd \ memcached \ diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index d0f504b6a2..0f2398c060 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -179,6 +179,9 @@ - src: user_variables_manila.yml.j2 dest: user_variables_manila.yml condition: "{{ 'manila' in bootstrap_host_scenarios_expanded }}" + - src: user_variables_calico.yml.j2 + dest: user_variables_calico.yml + condition: "{{ 'calico' in bootstrap_host_scenarios_expanded }}" - name: Copy modified cinder-volume env.d file for ceph scenario copy: @@ -194,6 +197,13 @@ when: - "'metal' in bootstrap_host_scenarios" +- name: Copy modified env.d file for calico scenario + copy: + src: "{{ playbook_dir }}/../etc/openstack_deploy/env.d/calico.yml.example" + dest: "/etc/openstack_deploy/env.d/calico.yml" + when: + - "'calico' in bootstrap_host_scenarios" + - name: Create vars override folders if we need to test them file: path: "{{ item }}" diff --git a/tests/roles/bootstrap-host/templates/user_variables_calico.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_calico.yml.j2 new file mode 100644 index 0000000000..9dac606e01 --- /dev/null +++ b/tests/roles/bootstrap-host/templates/user_variables_calico.yml.j2 @@ -0,0 +1,33 @@ +--- +# Copyright 2019, Logan Vig +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +nova_network_type: calico +neutron_plugin_type: ml2.calico + +neutron_provider_networks: + network_types: local + +# NOTE(logan): This is a workaroun for a bug in networking-calico, which +# sends None as the user and project domain name if none is specified in +# neutron.conf. +neutron_neutron_conf_overrides: + keystone_authtoken: + user_domain_name: Default + project_domain_name: Default + +tempest_private_net_provider_type: "local" +tempest_private_net_seg_id: '' +tempest_public_net_provider_type: "local" +tempest_public_net_physical_type: '' diff --git a/tests/roles/bootstrap-host/vars/main.yml b/tests/roles/bootstrap-host/vars/main.yml index f08a6783e1..ab8beaa501 100644 --- a/tests/roles/bootstrap-host/vars/main.yml +++ b/tests/roles/bootstrap-host/vars/main.yml @@ -32,6 +32,9 @@ bootstrap_host_scenarios_expanded: |- {% endif %} {% endif %} {# Service additions based on scenario presence #} + {% if 'calico' in bootstrap_host_scenarios %} + {% set _ = scenario_list.extend(['etcd']) %} + {% endif %} {% if 'ironic' in bootstrap_host_scenarios %} {% set _ = scenario_list.extend(['swift']) %} {% endif %}