aboutsummaryrefslogtreecommitdiffstats
path: root/scenarios
diff options
context:
space:
mode:
authorVenkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>2018-10-26 20:01:37 +0530
committerVenkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>2018-10-30 01:00:00 +0530
commit6c11ccaa5e9f036a1b56926d80aaccb3dc5e3d78 (patch)
treef9ceeb6112e536bed125b12a01f53eed704b84db /scenarios
parent59697c6c0425b3179f0a51e92de7dc035c1ff38c (diff)
Improve ansible tasks and fix license headers
This patch does two things: 1. improve the ansible tasks: - register Openstack as VIM - create osmrc file - install OSM (master) 2. fix license headers in unit tests installer-type:osa deploy-scenario:os-odl-sfc_osm Change-Id: I02297dae2b0108397541cedeb2f47183f1df99fc Signed-off-by: Venkata Harshavardhan Reddy Allu <venkataharshavardhan_ven@srmuniv.edu.in>
Diffstat (limited to 'scenarios')
-rw-r--r--scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/README2
-rw-r--r--scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/files/osmrc2
-rw-r--r--scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/install-osm.yml22
-rw-r--r--scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/post-deployment.yml3
-rw-r--r--scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/register-vim.yml16
-rw-r--r--scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/vars/main.yml7
6 files changed, 26 insertions, 26 deletions
diff --git a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/README b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/README
index 7ae8b9f6..b65c1d52 100644
--- a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/README
+++ b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/README
@@ -5,7 +5,7 @@ This role currently works with:
- OpenStack stable/rocky
- ODL Fluorine
- OVS 2.9.2
-- OSM Release FOUR
+- OSM master
- Ubuntu 16.04
Follow this link:
diff --git a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/files/osmrc b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/files/osmrc
deleted file mode 100644
index d9028b2f..00000000
--- a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/files/osmrc
+++ /dev/null
@@ -1,2 +0,0 @@
-export OSM_HOSTNAME=127.0.0.1
-export OSM_SOL005=True
diff --git a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/install-osm.yml b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/install-osm.yml
index 4f6b990a..5c12e333 100644
--- a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/install-osm.yml
+++ b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/install-osm.yml
@@ -1,30 +1,32 @@
---
# SPDX-license-identifier: Apache-2.0
##############################################################################
-# Copyright (c) 2018 Venkata Harshavardhan Reddy Allu and others.
+# 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: get OSM installer {{ osm_release_version }}
+- name: clone OSM devops repo and checkout version {{ osm_devops_version }}
become_user: "{{ osm_install_user }}"
become: yes
- get_url:
- url: "https://osm-download.etsi.org/ftp/{{ osm_release_version }}/install_osm.sh"
- dest: "/home/{{ osm_install_user }}/install_osm.sh"
- mode: u+x
+ git:
+ repo: "{{ osm_devops_git_url }}"
+ dest: "{{ osm_devops_clone_location }}"
+ version: "{{ osm_devops_version }}"
- name: install OSM
become_user: "{{ osm_install_user }}"
become: yes
- command: "/bin/bash ./install_osm.sh --nolxd -y "
+ command: "/bin/bash ./full_install_osm.sh --test -b {{ osm_devops_version }} --nolxd -y"
args:
- chdir: "/home/{{ osm_install_user }}"
+ chdir: "{{ osm_devops_clone_location }}/installers"
creates: "/usr/bin/osm"
-- name: Create osmrc file
+- name: create osmrc file
copy:
- src: osmrc
dest: "{{ osmrc_file_dest }}"
+ content: |
+ export OSM_HOSTNAME=127.0.0.1
+ export OSM_OL005=True
diff --git a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/post-deployment.yml b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/post-deployment.yml
index c462065e..a181ce77 100644
--- a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/post-deployment.yml
+++ b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/post-deployment.yml
@@ -18,11 +18,10 @@
include: register-vim.yml
# fetch ODL variables for functest
-- name: "Fetch the ip of the neutron server container"
+- name: Fetch the ip of the neutron server container
shell: 'grep controller00_neutron_server_container -n1 /etc/openstack_deploy/openstack_inventory.json | grep ansible_host | cut -d":" -f2 | cut -d "\"" -f2'
register: ip
changed_when: False
-
- name: Fetch the ml2_conf.ini to process ODL variables
command: "scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no {{ ip.stdout }}:/etc/neutron/plugins/ml2/ml2_conf.ini /tmp/ml2_conf.ini"
changed_when: False
diff --git a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/register-vim.yml b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/register-vim.yml
index 25b238ab..07e044bf 100644
--- a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/register-vim.yml
+++ b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/tasks/register-vim.yml
@@ -10,15 +10,16 @@
# This is a simple fix to wait for the OSM services in
# the docker containers to start functioning as expected.
-# TO DO: Once healthchecks are added to the OSM
-# container stack, we'll use them to identify that
-# they were started functioning and modify this task.
+# TODO: Once healthchecks are added to the OSM
+# container stack, use them to identify the status
+# of the containers and modify this task.
- name: Wait till the OSM services are ready
- pause:
- minutes: 2
+ wait_for: timeout=120
+ delegate_to: localhost
- name: Register OpenStack as VIM
- shell: "osm vim-create \
+ shell: ". {{ osmrc_file_dest }} ;
+ osm vim-create \
--name openstack-site \
--user admin \
--password {{ openrc_os_password }} \
@@ -26,5 +27,4 @@
--account_type openstack \
--auth_url {{ openrc_os_auth_url }} \
--config='{insecure: true}'"
- environment:
- OSM_HOSTNAME: 127.0.0.1
+ changed_when: False
diff --git a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/vars/main.yml b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/vars/main.yml
index e46cf193..41051830 100644
--- a/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/vars/main.yml
+++ b/scenarios/os-odl-sfc_osm/role/os-odl-sfc_osm/vars/main.yml
@@ -19,8 +19,9 @@ osm_required_packages:
- snapd
- lxd
-osm_release_version: "osm-4.0-four"
+osm_devops_version: "master"
+osm_devops_git_url: "https://osm.etsi.org/gerrit/osm/devops.git"
+osm_devops_clone_location: "/home/{{ osm_install_user }}/osm-devops"
osm_install_user: "devuser"
-## Create osmrc file
-osmrc_file_dest: "{{ ansible_env.HOME }}/osmrc"
+osmrc_file_dest: "/root/osmrc"