+++ /dev/null
-# Place the scripts in run order:
-integration/test/csit/scripts/set_unique_node_uuid.sh
+++ /dev/null
-*** Settings ***
-Suite Setup Coe Suite Setup
-Suite Teardown Coe Suite Teardown
-Test Teardown Coe.Tear Down
-Library BuiltIn
-Library SSHLibrary
-Library String
-Resource ../../libraries/Coe.robot
-Resource ../../libraries/DataModels.robot
-Resource ../../libraries/SSHKeywords.robot
-Resource ../../libraries/Utils.robot
-Resource ../../variables/netvirt/Variables.robot
-Resource ../../variables/Variables.robot
-
-*** Variables ***
-@{POD_NAMES} ss1-busybox1 ss1-busybox2 ss1-busybox3 ss2-busybox4
-@{POD_YAMLS} busy-box-1.yaml busy-box-2.yaml busy-box-3.yaml busy-box-4.yaml
-
-*** Test Cases ***
-Verify L2 Connectivity Between Pods
- [Documentation] This testcase verifies the connectivity between pods brought up on the same node.Pods are brought on the same node by using the same node selector in busybox.yaml files.
- Coe.Create Pods ss1 ${POD_YAMLS[0]} ${POD_NAMES[0]}
- Coe.Create Pods ss1 ${POD_YAMLS[1]} ${POD_NAMES[1]}
- BuiltIn.Wait Until Keyword Succeeds 55s 2s Coe.Check Pod Status Is Running
- Coe.Collect Pod Names and Ping
-
-Verify L3 Connectivity Between Pods
- [Documentation] This testcase verifies the connectivity between pods brought up on different nodes.Nodes are given different labels(eg : ssd,ssl) through Coe.Label Nodes keyword.
- ... These labels are also inlcuded as node selectors in busybox.yaml files ,thus the pods are placed on the desired nodes avoiding random allocation of pods.
- ... For the pod to be eligible to run on a node, the node must have each of the indicated key-value pairs as labels.
- Coe.Create Pods ss1 ${POD_YAMLS[2]} ${POD_NAMES[2]}
- Coe.Create Pods ss2 ${POD_YAMLS[3]} ${POD_NAMES[3]}
- BuiltIn.Wait Until Keyword Succeeds 55s 2s Coe.Check Pod Status Is Running
- Coe.Collect Pod Names and Ping
+++ /dev/null
-*** Settings ***
-Suite Setup Coe Suite Setup
-Suite Teardown Coe Suite Teardown
-Test Teardown Coe.Tear Down
-Library BuiltIn
-Library SSHLibrary
-Library String
-Resource ../../libraries/Coe.robot
-Resource ../../libraries/DataModels.robot
-Resource ../../libraries/SSHKeywords.robot
-Resource ../../libraries/Utils.robot
-Resource ../../variables/netvirt/Variables.robot
-Resource ../../variables/Variables.robot
-
-*** Variables ***
-${NO_OF_PODS_PER_VM} 9
-
-*** Test Cases ***
-Verify Connectivity Between Pods
- Assign Labels
- BuiltIn.Wait Until Keyword Succeeds 55s 2s Coe.Check Pod Status Is Running
- Coe.Collect Pod Names and Ping
-
-*** Keywords ***
-Apply label and Create pods
- [Arguments] ${label}
- : FOR ${i} IN RANGE 1 ${NO_OF_PODS_PER_VM}+1
- \ Coe.Create Pods ${label} ${label}-busybox${i}.yaml ${label}-busybox${i}
-
-Assign Labels
- : FOR ${i} IN RANGE 1 ${NUM_TOOLS_SYSTEM}
- \ ${label} = BuiltIn.Set Variable ss${i}
- \ Apply label and Create pods ${label}
+++ /dev/null
-# Place the suites in run order:
-integration/test/csit/suites/coe/Pods_Basic_Connectivity_Tests.robot
-integration/test/csit/suites/coe/Pods_Scalability_Tests.robot
+++ /dev/null
-coe_data_models = [
- 'config/k8s-cluster:k8s-clusters-info',
- 'config/k8s-node:k8s-nodes-info',
- 'config/pod:coe',
- 'config/service:service-information',
- 'operational/pod-meta:podidentifier-info',
-]
+++ /dev/null
-apiVersion: v1
-kind: Pod
-metadata:
- name: busyboxname
- labels:
- app: busyboxname
-spec:
- containers:
- - image: busybox
- command:
- - sleep
- - "3600"
- imagePullPolicy: IfNotPresent
- name: busybox
- restartPolicy: Always
- nodeSelector:
- disktype: string
+++ /dev/null
-kube:
- config: ~/.kube/config
-odl:
- host: http://odlip:port
- user: admin
- password: admin
-
+++ /dev/null
----
-
-- hosts: coe-hosts
- vars:
- gopath: "{{ ansible_env.HOME }}/go"
- coe_path: "{{ gopath }}/src/git.opendaylight.org/gerrit/p/coe.git"
- environment:
- PATH: "{{ ansible_env.HOME }}:/usr/local/go/bin:{{ ansible_env.HOME }}/go/bin:/usr/local/go/bin:/usr/bin:/bin"
- GOPATH: "{{ gopath }}"
- GOROOT: /usr/local/go
- tasks:
- - name: Make CNI config directory
- file:
- path: /etc/cni/net.d
- state: directory
- become: true
- - name: Generate cni config
- template:
- src: "{{ conf_path }}"
- dest: /etc/cni/net.d/odlovs-cni.conf
- become: true
- - name: Create $HOME/go/bin
- file:
- path: "{{ ansible_env.HOME }}/go/bin"
- state: directory
- - name: Show gerrit details
- run_once: true
- debug:
- msg:
- - "Fetch COE git repository https://git.opendaylight.org/gerrit/p/coe.git"
- - "gerrit_branch {{ gerrit_branch }}"
- - "gerrit_refspec {{ gerrit_refspec }}"
- - name: Fetch COE git repository
- git:
- repo: "https://git.opendaylight.org/gerrit/p/coe.git"
- version: "{{ gerrit_branch }}"
- refspec: "{{ gerrit_refspec }}"
- dest: "{{ coe_path }}"
- - name: List COE git repository recent patches
- run_once: true
- shell: "git --no-pager log --pretty=format:'%h %<(30)%ad %<(30)%cd %<(20,trunc)%an%d %s' -n10"
- args:
- chdir: "{{ coe_path }}"
- register: git_log_output
- - name: git log header
- run_once: true
- debug:
- msg="Hash Author Date Commit Date Author Subject"
- - name: git log output
- run_once: true
- debug:
- var=git_log_output.stdout_lines
- - name: Build odlovs-cni
- shell: GO111MODULE=on go build
- args:
- chdir: "{{ coe_path }}/odlCNIPlugin/odlovs-cni"
- creates: "{{ coe_path }}/odlCNIPlugin/odlovs-cni/odlovs-cni"
- - name: Install odlovs-cni
- copy:
- src: "{{ coe_path }}/odlCNIPlugin/odlovs-cni/odlovs-cni"
- dest: "/opt/cni/bin/odlovs-cni"
- remote_src: true
- mode: 0755
- become: true
-
-- hosts: coe-master
- vars:
- gopath: "{{ ansible_env.HOME}}/go"
- coe_path: "{{ gopath }}/src/git.opendaylight.org/gerrit/p/coe.git"
- environment:
- PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin:{{ ansible_env.HOME }}/go/bin:/usr/local/go/bin:{{ gopath }}/bin:/usr/bin:/bin"
- GOPATH: "{{ gopath }}"
- GOROOT: /usr/local/go
- tasks:
- - name: Build watcher
- shell: GO111MODULE=on go build
- args:
- chdir: "{{ coe_path }}/watcher"
- creates: "{{ coe_path }}/watcher/watcher"
- - name: Copy watcher to /usr/local/bin
- copy:
- src: "{{ coe_path }}/watcher/watcher"
- dest: /usr/local/bin/watcher
- mode: 0755
- remote_src: true
- become: true
- - name: Copy coe.yaml to /etc
- copy:
- src: "{{ watcher_path }}"
- dest: /etc
- mode: 0755
- remote_src: true
- become: true
-
-- hosts: coe-hosts
- tasks:
- - name: Set OVS Manager
- shell: ovs-vsctl set-manager tcp:{{ manager_ip }}:{{ manager_port }} && touch /tmp/ovs-set-manager
- args:
- creates: /tmp/ovs-set-manager
- become: true
- - name: Enable auto-tunnelling
- shell: ovs-vsctl set O . other_config:local_ip={{ overlay_ip }} && touch /tmp/enable-auto-tunnel
- args:
- creates: /tmp/enable-auto-tunnel
- become: true
- - name: Enable docker in systemd
- systemd:
- name: docker
- daemon_reload: true
- enabled: true
- state: started
- become: true
-
-
-- hosts: coe-master
- tasks:
- - name: Disable swapfile
- shell: swapoff -a
- become: true
- - name: Run kubeadm init
- shell: kubeadm init --apiserver-advertise-address={{ k8s_advertise_address }} > /tmp/k8s-output
- args:
- creates: /tmp/k8s-output
- become: true
- - name: Create join script
- shell: echo "#!/bin/sh" > /tmp/join-k8s.sh && cat /tmp/k8s-output | grep "kubeadm join" | sed -e 's/^[[:space:]]*//g' >> /tmp/join-k8s.sh
- args:
- creates: /tmp/join-k8s.sh
- - name: Fetch join script
- fetch:
- src: /tmp/join-k8s.sh
- dest: /tmp/join-k8s.sh
- flat: true
- - name: Make kube directory
- file:
- path: "{{ ansible_env.HOME }}/.kube"
- state: directory
- - name: Copy kubeconfig
- copy:
- src: /etc/kubernetes/admin.conf
- dest: "{{ ansible_env.HOME }}/.kube/config"
- remote_src: true
- become: true
-
-- hosts: coe-master
- tasks:
- - name: Run watcher
- shell: nohup watcher odl </dev/null >/tmp/watcher.out 2>&1 &
- args:
- creates: /tmp/watcher.out
-
-- hosts: coe-minions
- tasks:
- - name: Disable swapfile
- shell: swapoff -a
- become: true
- - name: Copy join file
- copy:
- src: /tmp/join-k8s.sh
- dest: /tmp/join-k8s.sh
- mode: 0700
- become: true
- - name: Join cluster
- shell: /tmp/join-k8s.sh
- become: true
+++ /dev/null
-coe-master:
- hosts:
- master_ip:
- vars:
- external_interface: ~
- overlay_ip: master_ip
- external_ip: ~
- subnet: 10.11.1.0/24
- gateway: 10.11.1.1
- manager_ip: odl_ip
- manager_port: mport
- controller_ip: odl_ip
- controller_port: cport
- go_version: \1.10.2\
- conf_path: filepath
- k8s_advertise_address: master_ip
- watcher_path: yamlpath
+++ /dev/null
-coe-minion:
- hosts:
- minion_ip:
- vars:
- external_interface: enp0s9
- overlay_ip: minion_ip
- external_ip: 192.168.50.11
- subnet: 10.11.1.0/24
- gateway: 10.11.1.1
- manager_ip: odl_ip
- manager_port: mport
- controller_ip: odl_ip
- controller_port: cport
- go_version: \1.10.2\
- conf_path: filepath
+++ /dev/null
-{
- "cniVersion": "0.3.0",
- "name": "odl-cni",
- "type": "odlovs-cni",
- "mgrPort": {{ manager_port }},
- "mgrActive": true,
- "manager": "{{ manager_ip }}",
- "ovsBridge": "br-int",
- "ctlrPort": {{ controller_port }},
- "ctlrActive": true,
- "controller": "{{ controller_ip }}",
- "externalIntf": "{{ external_interface }}",
- "externalIp": "{{ external_ip }}",
- "ipam": {
- "type": "host-local",
- "subnet": "{{ subnet }}",
- "routes": [{
- "dst": "0.0.0.0/0"
- }],
- "gateway": "{{ gateway }}"
- }
-}
-