From c67b3b328d53e9a6183eb64ec6d4c9bba82fe8a8 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Mon, 1 Aug 2016 14:07:59 +0200 Subject: [PATCH] Add CI test layouts * Drop Trusty from test matrix * Add extra cases to test separate roles deployment Signed-off-by: Bogdan Dobrelya --- .travis.yml | 12 ++++++++---- tests/templates/inventory-gce.j2 | 11 +++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6c26cd110..126e579fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,19 +72,22 @@ env: CLOUD_IMAGE=ubuntu-1604-xenial CLOUD_REGION=asia-east1-c - # Ubuntu 15.10 + # Extra cases for separated roles - >- KUBE_NETWORK_PLUGIN=flannel - CLOUD_IMAGE=ubuntu-1510-wily + CLOUD_IMAGE=rhel-7-sudo CLOUD_REGION=europe-west1-b + MODE="separate" - >- KUBE_NETWORK_PLUGIN=calico - CLOUD_IMAGE=ubuntu-1510-wily + CLOUD_IMAGE=ubuntu-1604-xenial CLOUD_REGION=us-central1-a + MODE="separate" - >- KUBE_NETWORK_PLUGIN=weave - CLOUD_IMAGE=ubuntu-1510-wily + CLOUD_IMAGE=debian-8-kubespray CLOUD_REGION=us-east1-d + MODE="separate" before_install: @@ -113,6 +116,7 @@ before_script: script: - > $HOME/.local/bin/ansible-playbook tests/cloud_playbooks/create-gce.yml -i tests/local_inventory/hosts -c local $LOG_LEVEL + -e mode=${MODE} -e test_id=${TEST_ID} -e kube_network_plugin=${KUBE_NETWORK_PLUGIN} -e gce_project_id=${GCE_PROJECT_ID} diff --git a/tests/templates/inventory-gce.j2 b/tests/templates/inventory-gce.j2 index 72ad469de..ef2ae06e6 100644 --- a/tests/templates/inventory-gce.j2 +++ b/tests/templates/inventory-gce.j2 @@ -2,6 +2,16 @@ node1 ansible_ssh_host={{gce.instance_data[0].public_ip}} node2 ansible_ssh_host={{gce.instance_data[1].public_ip}} node3 ansible_ssh_host={{gce.instance_data[2].public_ip}} +{% if mode == "separate" %} +[kube-master] +node1 + +[kube-node] +node2 + +[etcd] +node3 +{% else %} [kube-master] node1 node2 @@ -14,6 +24,7 @@ node3 [etcd] node1 node2 +{% endif %} [k8s-cluster:children] kube-node