Support of opensuse in OSH-XCI 44/68244/20
authorNikos Mimigiannis <nmimi@intracom-telecom.com>
Thu, 18 Jul 2019 09:01:51 +0000 (12:01 +0300)
committerManuel Buil <mbuil@suse.com>
Mon, 5 Aug 2019 13:06:45 +0000 (15:06 +0200)
deploy-scenario:k8-calico-nofeature
installer-type:osh

Change-Id: Ie198ee7e25579f1438561f71fd965518b067fe42
Signed-off-by: Nikos Mimigiannis <nmimi@intracom-telecom.com>
xci/config/pinned-versions
xci/config/user-vars
xci/installer/osh/playbooks/install-openstack-helm.yml
xci/installer/osh/playbooks/roles/install-osh-mini/tasks/main.yml
xci/installer/osh/playbooks/roles/prepare-opnfvhost-osh/vars/main.yml
xci/opnfv-scenario-requirements.yml
xci/playbooks/configure-localhost.yml
xci/var/opnfv.yml

index f58ce96..e40cf44 100755 (executable)
@@ -37,6 +37,7 @@ export BIFROST_IRONIC_INSPECTOR_VERSION=${BIFROST_IRONIC_INSPECTOR_VERSION:-"0b3
 export BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION:-"81ae133bd570ea7359b4797ee5699d2d4233b445"}
 # HEAD of osa "stable/rocky" as of 04.01.2019
 export OPENSTACK_OSA_VERSION=${OPENSTACK_OSA_VERSION:-"2087cd98f28b35f655ca398d25d2a6c71e38328e"}
+export OPENSTACK_OSH_VERSION="rocky"
 # HEAD of osh "master" as of 17.07.2019
 export OSH_VERSION=${OSH_VERSION:-"dadf9946e076df2b09556f4a18107dc487788cdd"}
 # HEAD of osh-infra "master" as of 16.07.2019
index 951688a..d3d7b2f 100755 (executable)
@@ -34,6 +34,14 @@ export XCI_CEPH_ENABLED=${XCI_CEPH_ENABLED:-false}
 #    export INSTALLER_TYPE="kubespray"
 export INSTALLER_TYPE=${INSTALLER_TYPE:-osa}
 
+#Wait upstream in openstack-helm (OSH) to support opensuse
+if [ "$XCI_DISTRO" == "opensuse" ] && [ "$INSTALLER_TYPE" == "osh" ]; then
+    export XCI_DISTRO=ubuntu-bionic
+    export OSH_DISTRO=opensuse
+elif [ "$XCI_DISTRO" == "ubuntu" ] && [ "$INSTALLER_TYPE" == "osh" ]; then
+    export OSH_DISTRO=ubuntu
+fi
+
 #-------------------------------------------------------------------------------
 # Set DEPLOYMENT
 #-------------------------------------------------------------------------------
index 10d8d6d..a16572a 100644 (file)
   remote_user: root
   vars_files:
     - "{{ xci_path }}/xci/var/opnfv.yml"
-
   roles:
     - role: prepare-opnfvhost-osh
     - role: prepare-osh
     - role: install-osh-mini
       when: xci_flavor == 'mini'
+      environment:
+        - CONTAINER_DISTRO_NAME: "{{ container_distro_name }}"
+        - CONTAINER_DISTRO_VERSION: "{{ container_distro_version }}"
+        - OPENSTACK_RELEASE: "{{ openstack_osh_version }}"
     - role: install-osh-noha
       when: xci_flavor == 'noha'
index c9d23dd..e3fa2dd 100644 (file)
@@ -1,3 +1,20 @@
+---
+- set_fact:
+    container_distro_name: "opensuse"
+    container_distro_version: "15"
+    cacheable: yes
+  when: osh_distro == 'opensuse'
+  tags:
+    - skip_ansible_lint
+
+- set_fact:
+    container_distro_name: "ubuntu"
+    container_distro_version: "xenial"
+    cacheable: yes
+  when: osh_distro == 'ubuntu'
+  tags:
+    - skip_ansible_lint
+
 - name: Setup Clients
   command: ./tools/deployment/common/setup-client.sh
   changed_when: false
index 3fd0377..f509494 100644 (file)
         - noha
       distros:
         - ubuntu
+        - opensuse
+        - ubuntu-bionic
 
 - scenario: k8-flannel-nofeature
   scm: git
index a84f1aa..7aab18f 100644 (file)
       args:
         executable: /bin/bash
         creates: "{{ xci_path }}/.cache/xci.env"
+
+    #TODO: Create an Ansible variable for
+    #      kube_service_addresses(10.233.0.0/18)
+    - name: Update iptables
+      command: "iptables -t nat -I POSTROUTING 3 -s 192.168.122.0/24 -d 10.233.0.0/18 -j RETURN"
+      become: true
+      tags:
+        - skip_ansible_lint
+
+    #Provide access to the external network (for tests)
+    - name: Update iptables
+      command: "iptables -t nat -I POSTROUTING 3 -s 192.168.122.0/24 -d 172.24.4.0/24 -j RETURN"
+      become: true
+      tags:
+        - skip_ansible_lint
index 62ac9fd..8e4f9b8 100644 (file)
@@ -37,6 +37,7 @@ osh_infra_git_url: "{{ lookup('env','OSH_INFRA_GIT_URL') }}"
 osh_infra_version: "{{ lookup('env','OSH_INFRA_VERSION') }}"
 osh_helm_binary_url: "{{ lookup('env','OSH_HELM_BINARY_URL') }}"
 osh_helm_binary_version: "{{ lookup('env','OSH_HELM_BINARY_VERSION') }}"
+openstack_osh_version: "{{ lookup('env','OPENSTACK_OSH_VERSION') }}"
 
 # variables for other components
 keepalived_git_url: "{{ lookup('env','KEEPALIVED_GIT_URL') }}"
@@ -57,6 +58,7 @@ run_tempest: "{{ lookup('env', 'RUN_TEMPEST') }}"
 core_openstack_install: "{{ lookup('env', 'CORE_OPENSTACK_INSTALL') }}"
 deploy_scenario: "{{ lookup('env','DEPLOY_SCENARIO') }}"
 installer_type: "{{ lookup('env','INSTALLER_TYPE') }}"
+osh_distro: "{{ lookup('env', 'OSH_DISTRO') }}"
 
 # baremetal variables
 baremetal: "{{ lookup('env','BAREMETAL') }}"