From 4c7e3e983bd92d3793658c5d04fabea140cf0d51 Mon Sep 17 00:00:00 2001 From: Venkata Harshavardhan Reddy Allu Date: Mon, 15 Oct 2018 06:12:51 +0530 Subject: Create new scenario: os-odl-sfc_osm This change creates os-odl-sfc_osm scenario. - copy the base scenario, os-odl-sfc - remove tacker and pike config - add tasks, vars, defaults and templates from os-nosdn-osm role https://gerrit.opnfv.org/gerrit/#/c/63507/ Verification of this patch has be done using a change in releng-xci pointing to this commit/corresponding patch on Gerrit to verify it works in order to help with the review. Change-Id: I90148063c6ff9881ef188e97956adea0e7cb5a7d Signed-off-by: Venkata Harshavardhan Reddy Allu --- .../os-odl-sfc_osm/tasks/configure-opnfvhost.yml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/configure-opnfvhost.yml (limited to 'scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/configure-opnfvhost.yml') diff --git a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/configure-opnfvhost.yml b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/configure-opnfvhost.yml new file mode 100644 index 00000000..3a0226b0 --- /dev/null +++ b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/configure-opnfvhost.yml @@ -0,0 +1,74 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 Ericsson AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +- name: install OSM required packages + package: + name: "{{ osm_required_packages[ansible_pkg_mgr] }}" + state: present + +- name: initialize LXD + command: "{{ item }}" + with_items: + - lxd init --auto + - lxd waitready + changed_when: False +- name: stop lxd-bridge service + systemd: + name: lxd-bridge + state: stopped + daemon_reload: yes +- name: create lxd-bridge configuration + template: + src: lxd-bridge.j2 + dest: /etc/default/lxd-bridge + mode: 0755 + +- name: ensure dnsmasq service is stopped before attempting to start lxd-bridge + service: + name: dnsmasq + state: stopped + +- name: ensure dnsmasq uses interface br-vlan for lxd-bridge + lineinfile: + path: /etc/dnsmasq.conf + regexp: '^interface=' + line: 'interface=br-vlan' + +- name: ensure docker and lxd-bridge services are started and enabled + service: + name: "{{ item }}" + state: started + enabled: yes + with_items: + - docker + - lxd-bridge + +- name: get default interface + shell: route -n | awk '$1~/^0.0.0.0/ {print $8}' + register: default_interface + ignore_errors: False + changed_when: False + +- name: get mtu of the default interface {{ default_interface.stdout }} + shell: ip addr show {{ default_interface.stdout }} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}' + register: default_interface_mtu + ignore_errors: False + changed_when: False + +- name: set lxdbr0 mtu to {{ default_interface_mtu.stdout }} + command: ifconfig lxdbr0 mtu {{ default_interface_mtu.stdout }} + ignore_errors: False + changed_when: False + +- name: add devuser to lxd and docker groups + user: + name: devuser + groups: lxd, docker + append: yes -- cgit 1.2.3-korg