summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
Diffstat (limited to 'xci')
-rwxr-xr-xxci/config/env-vars1
-rwxr-xr-xxci/config/pinned-versions4
-rwxr-xr-xxci/installer/osa/deploy.sh16
-rw-r--r--xci/installer/osa/playbooks/post-deployment.yml65
-rw-r--r--xci/opnfv-scenario-requirements.yml12
-rw-r--r--xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml6
-rwxr-xr-xxci/scripts/vm/start-new-vm.sh11
-rw-r--r--xci/var/opnfv.yml4
8 files changed, 111 insertions, 8 deletions
diff --git a/xci/config/env-vars b/xci/config/env-vars
index fe75cb80..23388829 100755
--- a/xci/config/env-vars
+++ b/xci/config/env-vars
@@ -11,6 +11,7 @@ export OPENSTACK_OSA_OPENRC_GIT_URL=${OPENSTACK_OSA_OPENRC_GIT_URL:-https://git.
export KUBESPRAY_GIT_URL=${KUBESPRAY_GIT_URL:-https://github.com/kubernetes-incubator/kubespray.git}
export OPENSTACK_OSA_HAPROXY_GIT_URL=${OPENSTACK_OSA_HAPROXY_GIT_URL:-https://git.openstack.org/openstack/openstack-ansible-haproxy_server}
export KEEPALIVED_GIT_URL=${KEEPALIVED_GIT_URL:-https://github.com/evrardjp/ansible-keepalived}
+export OSM_DEVOPS_GIT_URL=${OSM_DEVOPS_GIT_URL:-https://osm.etsi.org/gerrit/osm/devops.git}
# Configuration
export OPENSTACK_OSA_ETC_PATH=/etc/openstack_deploy
diff --git a/xci/config/pinned-versions b/xci/config/pinned-versions
index 5ef0c7c2..15c3c8b9 100755
--- a/xci/config/pinned-versions
+++ b/xci/config/pinned-versions
@@ -47,3 +47,7 @@ export HAPROXY_VERSION=$(grep -E '.*name: haproxy_server' -A 3 \
| tail -n1 | sed -n 's/\(^.*: \)\([0-9a-z].*$\)/\2/p')
# HEAD of kubspray "master" as of 16.05.2018
export KUBESPRAY_VERSION=${KUBESPRAY_VERSION:-"38e727dbe1bdf5316fae8d645718cc8279fbda20"}
+# use tagged version of OSM devops repo until the integration is done
+# also, this version is not OSM version. This needs to be looked into for
+# specifying exact version for OSM itself.
+export OSM_DEVOPS_VERSION=${OSM_DEVOPS_VERSION:-"v4.0.1"}
diff --git a/xci/installer/osa/deploy.sh b/xci/installer/osa/deploy.sh
index 4542a4e3..fd794d01 100755
--- a/xci/installer/osa/deploy.sh
+++ b/xci/installer/osa/deploy.sh
@@ -68,7 +68,6 @@ echo "Info: Configured opnfv deployment host for openstack-ansible"
#-------------------------------------------------------------------------------
# This playbook is only run for the all flavors except aio since aio is configured
# by an upstream script.
-
# This playbook
# - adds public keys to target hosts
# - configures network
@@ -181,4 +180,19 @@ echo "Info: Admin username - ${USERNAME##*=}"
echo "Info: Admin password - ${PASSWORD##*=}"
echo "Info: It is recommended to change the default password."
+#-------------------------------------------------------------------------------
+# Execute post-installation tasks
+#-------------------------------------------------------------------------------
+# Playbook post.yml is used in order to execute any post-deployment tasks that
+# are required for the scenario under test.
+#-------------------------------------------------------------------------------
+echo "-----------------------------------------------------------------------"
+echo "Info: Running post-deployment scenario role"
+echo "-----------------------------------------------------------------------"
+cd $OSA_XCI_PLAYBOOKS
+ansible-playbook ${XCI_ANSIBLE_PARAMS} -i ${XCI_PLAYBOOKS}/dynamic_inventory.py \
+ post-deployment.yml
+echo "-----------------------------------------------------------------------"
+echo
+echo "Info: Post-deployment scenario role execution done"
# vim: set ts=4 sw=4 expandtab:
diff --git a/xci/installer/osa/playbooks/post-deployment.yml b/xci/installer/osa/playbooks/post-deployment.yml
new file mode 100644
index 00000000..c0cd0171
--- /dev/null
+++ b/xci/installer/osa/playbooks/post-deployment.yml
@@ -0,0 +1,65 @@
+---
+# 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
+##############################################################################
+- hosts: opnfv
+ remote_user: root
+ vars_files:
+ - "{{ xci_path }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/installer/osa/files/openstack_services.yml"
+
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
+ HTTP_PROXY: "{{ lookup('env','http_proxy') }}"
+ HTTPS_PROXY: "{{ lookup('env','https_proxy') }}"
+ NO_PROXY: "{{ lookup('env','no_proxy') }}"
+ pre_tasks:
+ - name: Load distribution variables
+ include_vars:
+ file: "{{ item }}"
+ with_items:
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+ - name: Set facts for remote deployment
+ set_fact:
+ remote_xci_scenario_path: "{{ ansible_env.HOME }}/releng-xci/.cache/repos/scenarios/{{ deploy_scenario }}/scenarios/{{ deploy_scenario }}"
+
+ roles:
+ - role: peru.proxy_settings
+ proxy_settings_http_proxy: "{{ lookup('env','http_proxy') }}"
+ proxy_settings_https_proxy: "{{ lookup('env','https_proxy') }}"
+ proxy_settings_ftp_proxy: "{{ lookup('env','ftp_proxy') }}"
+ proxy_settings_no_proxy: "{{ lookup('env','no_proxy') }}"
+
+ tasks:
+ - name: "Configure http_proxy_env_url"
+ lineinfile:
+ path: "{{openstack_osa_etc_path}}/user_variables_proxy.yml"
+ regexp: "^http_proxy_env_url:.*"
+ line: "{{ 'http_proxy_env_url: ' + lookup('env','http_proxy') }}"
+ when:
+ - lookup('env','http_proxy') != ""
+
+ - name: Reload XCI deployment host facts
+ setup:
+ filter: ansible_local
+ gather_subset: "!all"
+ delegate_to: 127.0.0.1
+
+ - name: Check if any post-deployment task defined for {{ deploy_scenario }} role
+ stat:
+ path: "{{ remote_xci_scenario_path }}/role/{{ deploy_scenario }}/tasks/post-deployment.yml"
+ register: post_deployment_yml
+
+ - name: Execute post-deployment tasks of {{ deploy_scenario }} role
+ include_role:
+ name: "{{ hostvars['opnfv'].ansible_local.xci.scenarios.role }}"
+ tasks_from: post-deployment
+ when:
+ - post_deployment_yml.stat.exists
diff --git a/xci/opnfv-scenario-requirements.yml b/xci/opnfv-scenario-requirements.yml
index a43127b5..1c7c8d5b 100644
--- a/xci/opnfv-scenario-requirements.yml
+++ b/xci/opnfv-scenario-requirements.yml
@@ -29,6 +29,18 @@
- ubuntu
- centos
+- scenario: os-nosdn-osm
+ scm: git
+ src: https://gerrit.opnfv.org/gerrit/releng-xci-scenarios
+ version: master
+ role: scenarios/os-nosdn-osm/role/os-nosdn-osm
+ installers:
+ - installer: osa
+ flavors:
+ - mini
+ distros:
+ - ubuntu
+
- scenario: os-odl-nofeature
scm: git
src: https://gerrit.opnfv.org/gerrit/releng-xci-scenarios
diff --git a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
index b2585be2..008e5531 100644
--- a/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
+++ b/xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml
@@ -40,6 +40,12 @@
path: "{{ opnfv_image_path }}/{{ vm_name }}.qcow2"
register: _vm_volume_prepared
+ - name: Resize opnfv VM image to {{ item.disks[0].disk_capacity }}
+ command: "qemu-img resize {{ opnfv_image_path }}/opnfv.qcow2 {{ item.disks[0].disk_capacity }}"
+ when:
+ - vm_name == 'opnfv'
+ - _vm_volume_prepared.stat.exists
+
# NOTE(pas-ha) Ansible still lacks modules to operate on libvirt volumes
# mbuil: Assuming there is only one disk [0]
- name: create volume for vm
diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh
index ecc2998d..9eab0e5a 100755
--- a/xci/scripts/vm/start-new-vm.sh
+++ b/xci/scripts/vm/start-new-vm.sh
@@ -119,17 +119,14 @@ COMMON_DISTRO_PKGS=(vim strace gdb htop dnsmasq docker iptables ebtables virt-ma
case ${ID,,} in
*suse*)
- pkg_mgr_cmd="sudo zypper -q -n ref"
- pkg_mgr_cmd+=" && sudo zypper -q -n install ${COMMON_DISTRO_PKGS[@]} qemu-tools libvirt-daemon libvirt-client libvirt-daemon-driver-qemu"
+ pkg_mgr_cmd="sudo zypper -q -n install ${COMMON_DISTRO_PKGS[@]} qemu-tools libvirt-daemon libvirt-client libvirt-daemon-driver-qemu"
;;
centos)
- pkg_mgr_cmd="yum updateinfo"
- pkg_mgr_cmd+=" && sudo yum install -q -y epel-release"
- pkg_mgr_cmd+=" && sudo yum install -q -y in ${COMMON_DISTRO_PKGS[@]} qemu-kvm-tools qemu-img libvirt-daemon-kvm"
+ pkg_mgr_cmd="sudo yum install -C -q -y epel-release"
+ pkg_mgr_cmd+=" && sudo yum install -C -q -y in ${COMMON_DISTRO_PKGS[@]} qemu-kvm-tools qemu-img libvirt-daemon-kvm"
;;
ubuntu)
- pkg_mgr_cmd="sudo apt-get update"
- pkg_mgr_cmd+=" && sudo apt-get install -y -q=3 ${COMMON_DISTRO_PKGS[@]} libvirt-bin qemu-utils docker.io"
+ pkg_mgr_cmd="sudo apt-get install --no-upgrade -y -q=3 ${COMMON_DISTRO_PKGS[@]} libvirt-bin qemu-utils docker.io"
;;
esac
diff --git a/xci/var/opnfv.yml b/xci/var/opnfv.yml
index e7e3b76c..269fc105 100644
--- a/xci/var/opnfv.yml
+++ b/xci/var/opnfv.yml
@@ -30,6 +30,10 @@ kubespray_git_url: "{{ lookup('env','KUBESPRAY_GIT_URL') }}"
kubespray_version: "{{ lookup('env','KUBESPRAY_VERSION') }}"
xci_kube_ansible_pip_version: "{{ lookup('env','XCI_KUBE_ANSIBLE_PIP_VERSION') }}"
+# osm variables
+osm_devops_git_url: "{{ lookup('env','OSM_DEVOPS_GIT_URL') }}"
+osm_devops_version: "{{ lookup('env','OSM_DEVOPS_VERSION') }}"
+
# variables for other components
keepalived_git_url: "{{ lookup('env','KEEPALIVED_GIT_URL') }}"
haproxy_version: "{{ lookup('env','HAPROXY_VERSION') }}"