From 29f99f0a04df280d646de049e6c2686b923c7028 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Tue, 6 Mar 2018 18:26:46 +0100 Subject: Connect ODL CI-CD to XCI Provide the possibility to select what version of ODL to use, master included. Before executing xci-deploy.sh, the user can specify ODL's version by using the XCI_ANSIBLE_PARAMS variable: export XCI_ANSIBLE_PARAMS="-e ODL_VERSION=oxygen" Change-Id: I5b3879b0c197059b3aecace48760e983c65a586b Signed-off-by: Manuel Buil --- .../files/user_variables_os-odl-nofeature.yml | 39 ------------------- .../role/os-odl-nofeature/tasks/main.yml | 4 +- .../user_variables_os-odl-nofeature.yml.j2 | 45 ++++++++++++++++++++++ .../role/os-odl-nofeature/vars/main.yml | 10 +++++ 4 files changed, 57 insertions(+), 41 deletions(-) delete mode 100644 xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/files/user_variables_os-odl-nofeature.yml create mode 100644 xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/templates/user_variables_os-odl-nofeature.yml.j2 create mode 100644 xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml diff --git a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/files/user_variables_os-odl-nofeature.yml b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/files/user_variables_os-odl-nofeature.yml deleted file mode 100644 index 403d372c..00000000 --- a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/files/user_variables_os-odl-nofeature.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -# Copyright (c) 2017 Ericsson AB and others. -# -# 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. - -# ## -# ## This file contains commonly used overrides for convenience. Please inspect -# ## the defaults for each role to find additional override options. -# ## - -# Ensure the openvswitch kernel module is loaded -openstack_host_specific_kernel_modules: - - name: "openvswitch" - pattern: "CONFIG_OPENVSWITCH" - group: "network_hosts" - -# Use OpenDaylight SDN Controller -neutron_plugin_type: "ml2.opendaylight" -neutron_opendaylight_conf_ini_overrides: - ml2_odl: - username: "admin" - password: "admin" - port_binding_controller: "pseudo-agentdb-binding" - url: "http://{{ internal_lb_vip_address }}:8180/controller/nb/v2/neutron" - -neutron_ml2_drivers_type: "flat,vlan,vxlan" - -neutron_plugin_base: - - odl-router_v2 \ No newline at end of file diff --git a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml index cd016f5f..7e872787 100644 --- a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml +++ b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/tasks/main.yml @@ -9,8 +9,8 @@ ############################################################################## - name: copy user_variables_os-odl-nofeature.yml - copy: - src: "user_variables_os-odl-nofeature.yml" + template: + src: "user_variables_os-odl-nofeature.yml.j2" dest: "{{openstack_osa_etc_path}}/user_variables_os-odl-nofeature.yml" - name: copy user_variables_os-odl-nofeature-ha.yml diff --git a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/templates/user_variables_os-odl-nofeature.yml.j2 b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/templates/user_variables_os-odl-nofeature.yml.j2 new file mode 100644 index 00000000..5a5ec553 --- /dev/null +++ b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/templates/user_variables_os-odl-nofeature.yml.j2 @@ -0,0 +1,45 @@ +--- +# Copyright (c) 2017 Ericsson AB and others. +# +# 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. + +# ## +# ## This file contains commonly used overrides for convenience. Please inspect +# ## the defaults for each role to find additional override options. +# ## + +{% raw %} +# Ensure the openvswitch kernel module is loaded +openstack_host_specific_kernel_modules: + - name: "openvswitch" + pattern: "CONFIG_OPENVSWITCH" + group: "network_hosts" + +# Use OpenDaylight SDN Controller +neutron_plugin_type: "ml2.opendaylight" +neutron_opendaylight_conf_ini_overrides: + ml2_odl: + username: "admin" + password: "admin" + port_binding_controller: "pseudo-agentdb-binding" + url: "http://{{ internal_lb_vip_address }}:8180/controller/nb/v2/neutron" + +neutron_ml2_drivers_type: "flat,vlan,vxlan" + +neutron_plugin_base: + - odl-router_v2 +{% endraw %} + +{% if ODL_VERSION is defined %} +odl_repo_url: "{{ repo_url[ ansible_pkg_mgr ] }}" +{% endif %} diff --git a/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml new file mode 100644 index 00000000..5f672b37 --- /dev/null +++ b/xci/scenarios/os-odl-nofeature/role/os-odl-nofeature/vars/main.yml @@ -0,0 +1,10 @@ +--- +odl_version: + master: 9 + oxygen: 8 + nitrogen: 7 + +repo_url: + zypper: "{% if ODL_VERSION is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version[ODL_VERSION] }}-opensuse-devel.repo{% endif %}" + yum: "{% if ODL_VERSION is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version[ODL_VERSION] }}-devel.repo{% endif %}" + apt: "{% if ODL_VERSION is defined %}https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-{{ odl_version[ODL_VERSION] }}-ubuntu-devel.repo{% endif %}" -- cgit 1.2.3-korg