diff options
Diffstat (limited to 'scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks')
4 files changed, 192 insertions, 0 deletions
diff --git a/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/defaults/repo-packages/opendaylight.yml b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/defaults/repo-packages/opendaylight.yml new file mode 100644 index 0000000..5316b1b --- /dev/null +++ b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/defaults/repo-packages/opendaylight.yml @@ -0,0 +1,9 @@ +--- + +networking_odl_git_repo: https://git.openstack.org/openstack/networking-odl +networking_odl_git_install_branch: stable/pike +networking_odl_git_project_group: neutron_all + +networking_bgpvpn_git_repo: https://git.openstack.org/openstack/networking-bgpvpn +networking_bgpvpn_git_install_branch: stable/pike +networking_bgpvpn_project_group: neutron_all diff --git a/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/inventory/env.d/neutron.yml b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/inventory/env.d/neutron.yml new file mode 100644 index 0000000..f1d85b4 --- /dev/null +++ b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/inventory/env.d/neutron.yml @@ -0,0 +1,87 @@ +--- +# Copyright 2014, Rackspace US, Inc. +# +# 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. + +component_skel: + neutron_agent: + belongs_to: + - neutron_all + neutron_dhcp_agent: + belongs_to: + - neutron_all + neutron_linuxbridge_agent: + belongs_to: + - neutron_all + neutron_openvswitch_agent: + belongs_to: + - neutron_all + neutron_metering_agent: + belongs_to: + - neutron_all + neutron_l3_agent: + belongs_to: + - neutron_all + neutron_lbaas_agent: + belongs_to: + - neutron_all + neutron_bgp_dragent: + belongs_to: + - neutron_all + neutron_metadata_agent: + belongs_to: + - neutron_all + neutron_sriov_nic_agent: + belongs_to: + - neutron_all + neutron_server: + belongs_to: + - neutron_all + opendaylight: + belongs_to: + - neutron_all + + +container_skel: + neutron_agents_container: + belongs_to: + - network_containers + contains: + - neutron_agent + - neutron_bgp_dragent + - neutron_dhcp_agent + - neutron_l3_agent + - neutron_lbaas_agent + - neutron_linuxbridge_agent + - neutron_metadata_agent + - neutron_metering_agent + - neutron_openvswitch_agent + - neutron_sriov_nic_agent + properties: + is_metal: true + neutron_server_container: + belongs_to: + - network_containers + contains: + - neutron_server + - opendaylight + - quagga_server + + +physical_skel: + network_containers: + belongs_to: + - all_containers + network_hosts: + belongs_to: + - hosts diff --git a/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/inventory/env.d/quagga.yml b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/inventory/env.d/quagga.yml new file mode 100644 index 0000000..19b890c --- /dev/null +++ b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/inventory/env.d/quagga.yml @@ -0,0 +1,19 @@ +--- +# Copyright (c) 2017-2018 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. + +component_skel: + quagga_server: + belongs_to: + - quagga_all diff --git a/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/os-setup-bgp-odl.yml b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/os-setup-bgp-odl.yml new file mode 100644 index 0000000..67a3b2d --- /dev/null +++ b/scenarios/os-odl-bgpvpn/role/os-odl-bgpvpn/files/openstack-ansible/pike/playbooks/os-setup-bgp-odl.yml @@ -0,0 +1,77 @@ +--- +# Copyright (c) 2017-2018 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. + +- name: Install and Configure OpenDaylight for BGPVPN + hosts: quagga_all + gather_facts: "{{ osa_gather_facts | default(True) }}" + user: root + + tasks: + - name: Retrieve checksum for quagga download + uri: + url: "{{ quagga_package_url | replace('tar.gz', 'checksum') }}" + return_content: yes + register: quagga_package_checksum + + - name: Attempt quagga download + get_url: + url: "{{ quagga_package_url }}" + dest: "/var/cache/{{ quagga_package_url | basename }}" + checksum: "sha1:{{ quagga_package_checksum.content | trim }}" + register: osa_get_quagga + + - name: Unarchive pre-built quagga packages + unarchive: + src: "/var/cache/{{ quagga_package_url | basename }}" + dest: "{{ temp_quagga_dir | dirname }}" + copy: "no" + + - name: Prerequisite check for quagga + apt: + name: libglib2.0-0 + state: present + when: quagga_install_method == "deb_repo" + + - name: Prerequisite check for quagga + yum: + name: glib2,glib2-devel + state: present + when: quagga_install_method == "rpm_repo" + + - name: Install quagga rpm packages + shell: | + cd {{ temp_quagga_dir }} + packages=$(ls |grep -vE 'debuginfo|devel|contrib') + yum -y $packages + when: quagga_install_method == "rpm_repo" + + - name: Install quagga Debian packages + shell: | + cd {{ temp_quagga_dir }} + packages=$(ls |grep -vE 'debuginfo|devel|contrib') + dpkg -i $packages + when: quagga_install_method == "deb_repo" + + - name: Start Zebra RPC Daemon for Quagga + command: /opt/quagga/etc/init.d/zrpcd start + when: inventory_hostname == odl_bgp_speaker_host + + - name: Connect OpenDaylight with Quagga + command: "{{ opendaylight_karaf_client }} -h {{ opendaylight_karaf_host }} 'bgp-connect --host {{ opendaylight_karaf_host }} --port {{ bgp_config_server_port }} add'" + when: inventory_hostname == odl_bgp_speaker_host + + - name: Configure Opendaylight as BGP speaker + command: "{{ opendaylight_karaf_client }} -h {{ opendaylight_karaf_host }} 'odl:configure-bgp -op start-bgp-server --as-num 100 --router-id {{ odl_bgp_speaker_host }}'" + when: inventory_hostname == odl_bgp_speaker_host |