Add tf-ovh_coreos CI job (#4763)
This commit is contained in:
parent
2a5721b4d4
commit
b45f3f0004
4 changed files with 45 additions and 4 deletions
|
@ -35,6 +35,7 @@
|
||||||
ANSIBLE_INVENTORY_UNPARSED_FAILED: "true"
|
ANSIBLE_INVENTORY_UNPARSED_FAILED: "true"
|
||||||
ANSIBLE_INVENTORY: hosts
|
ANSIBLE_INVENTORY: hosts
|
||||||
CI_PLATFORM: tf
|
CI_PLATFORM: tf
|
||||||
|
TF_VAR_ssh_user: $SSH_USER
|
||||||
script:
|
script:
|
||||||
- tests/scripts/testcases_run.sh
|
- tests/scripts/testcases_run.sh
|
||||||
after_script:
|
after_script:
|
||||||
|
@ -113,7 +114,7 @@ tf-ovh_ubuntu18-calico:
|
||||||
CLUSTER: $CI_COMMIT_REF_NAME
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
ANSIBLE_TIMEOUT: "60"
|
ANSIBLE_TIMEOUT: "60"
|
||||||
SSH_USER: ubuntu
|
SSH_USER: ubuntu
|
||||||
TF_VAR_cluster_name: $CI_COMMIT_REF_SLUG
|
TF_VAR_cluster_name: $CI_COMMIT_REF_SLUG-$CI_JOB_ID
|
||||||
TF_VAR_number_of_k8s_masters: "0"
|
TF_VAR_number_of_k8s_masters: "0"
|
||||||
TF_VAR_number_of_k8s_masters_no_floating_ip: "1"
|
TF_VAR_number_of_k8s_masters_no_floating_ip: "1"
|
||||||
TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
|
TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
|
||||||
|
@ -131,3 +132,33 @@ tf-ovh_ubuntu18-calico:
|
||||||
TF_VAR_flavor_k8s_node: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
|
TF_VAR_flavor_k8s_node: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
|
||||||
TF_VAR_image: "Ubuntu 18.04"
|
TF_VAR_image: "Ubuntu 18.04"
|
||||||
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
|
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
|
||||||
|
|
||||||
|
tf-ovh_coreos-calico:
|
||||||
|
extends: .terraform_apply
|
||||||
|
stage: unit-tests
|
||||||
|
when: on_success
|
||||||
|
variables:
|
||||||
|
<<: *ovh_variables
|
||||||
|
TF_VERSION: 0.11.11
|
||||||
|
PROVIDER: openstack
|
||||||
|
CLUSTER: $CI_COMMIT_REF_NAME
|
||||||
|
ANSIBLE_TIMEOUT: "60"
|
||||||
|
SSH_USER: core
|
||||||
|
TF_VAR_cluster_name: $CI_COMMIT_REF_SLUG-$CI_JOB_ID
|
||||||
|
TF_VAR_number_of_k8s_masters: "0"
|
||||||
|
TF_VAR_number_of_k8s_masters_no_floating_ip: "1"
|
||||||
|
TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
|
||||||
|
TF_VAR_number_of_etcd: "0"
|
||||||
|
TF_VAR_number_of_k8s_nodes: "0"
|
||||||
|
TF_VAR_number_of_k8s_nodes_no_floating_ip: "1"
|
||||||
|
TF_VAR_number_of_gfs_nodes_no_floating_ip: "0"
|
||||||
|
TF_VAR_number_of_bastions: "0"
|
||||||
|
TF_VAR_number_of_k8s_masters_no_etcd: "0"
|
||||||
|
TF_VAR_use_neutron: "0"
|
||||||
|
TF_VAR_floatingip_pool: "Ext-Net"
|
||||||
|
TF_VAR_external_net: "6011fbc9-4cbf-46a4-8452-6890a340b60b"
|
||||||
|
TF_VAR_network_name: "Ext-Net"
|
||||||
|
TF_VAR_flavor_k8s_master: "4d4fd037-9493-4f2b-9afe-b542b5248eac" # b2-7
|
||||||
|
TF_VAR_flavor_k8s_node: "4d4fd037-9493-4f2b-9afe-b542b5248eac" # b2-7
|
||||||
|
TF_VAR_image: "CoreOS Stable"
|
||||||
|
TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
--config {{ kube_config_dir }}/kubeadm-client.conf
|
--config {{ kube_config_dir }}/kubeadm-client.conf
|
||||||
--ignore-preflight-errors=all
|
--ignore-preflight-errors=all
|
||||||
register: kubeadm_join
|
register: kubeadm_join
|
||||||
async: 60
|
async: 180
|
||||||
poll: 15
|
poll: 15
|
||||||
|
|
||||||
always:
|
always:
|
||||||
|
|
5
tests/files/tf-ovh_coreos-calico.yml
Normal file
5
tests/files/tf-ovh_coreos-calico.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
dns_min_replicas: 1
|
||||||
|
deploy_netchecker: true
|
||||||
|
|
||||||
|
# resolvconf_mode: host_resolvconf # this is required as long as the coreos stable channel uses docker < 1.12
|
|
@ -15,6 +15,11 @@ export ANSIBLE_BECOME_USER=root
|
||||||
cd tests && make create-${CI_PLATFORM} -s ; cd -
|
cd tests && make create-${CI_PLATFORM} -s ; cd -
|
||||||
ansible-playbook tests/cloud_playbooks/wait-for-ssh.yml
|
ansible-playbook tests/cloud_playbooks/wait-for-ssh.yml
|
||||||
|
|
||||||
|
# CoreOS needs auto update disabled
|
||||||
|
if [[ "$CI_JOB_NAME" =~ "coreos" ]]; then
|
||||||
|
ansible all -m raw -a 'systemctl disable locksmithd'
|
||||||
|
ansible all -m raw -a 'systemctl stop locksmithd'
|
||||||
|
fi
|
||||||
|
|
||||||
# Check out latest tag if testing upgrade
|
# Check out latest tag if testing upgrade
|
||||||
test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout "$KUBESPRAY_VERSION"
|
test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout "$KUBESPRAY_VERSION"
|
||||||
|
@ -22,14 +27,14 @@ test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout "$KUBESPRAY
|
||||||
test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml
|
test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml
|
||||||
|
|
||||||
# Create cluster
|
# Create cluster
|
||||||
ansible-playbook ${LOG_LEVEL} -e @${CI_TEST_VARS} -e ansible_ssh_user=${SSH_USER} -e local_release_dir=${PWD}/downloads --limit "all:!fake_hosts" cluster.yml
|
ansible-playbook ${LOG_LEVEL} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads --limit "all:!fake_hosts" cluster.yml
|
||||||
|
|
||||||
# Repeat deployment if testing upgrade
|
# Repeat deployment if testing upgrade
|
||||||
if [ "${UPGRADE_TEST}" != "false" ]; then
|
if [ "${UPGRADE_TEST}" != "false" ]; then
|
||||||
test "${UPGRADE_TEST}" == "basic" && PLAYBOOK="cluster.yml"
|
test "${UPGRADE_TEST}" == "basic" && PLAYBOOK="cluster.yml"
|
||||||
test "${UPGRADE_TEST}" == "graceful" && PLAYBOOK="upgrade-cluster.yml"
|
test "${UPGRADE_TEST}" == "graceful" && PLAYBOOK="upgrade-cluster.yml"
|
||||||
git checkout "${CI_BUILD_REF}"
|
git checkout "${CI_BUILD_REF}"
|
||||||
ansible-playbook ${LOG_LEVEL} -e @${CI_TEST_VARS} -e ansible_ssh_user=${SSH_USER} -e local_release_dir=${PWD}/downloads --limit "all:!fake_hosts" $PLAYBOOK
|
ansible-playbook ${LOG_LEVEL} -e @${CI_TEST_VARS} -e local_release_dir=${PWD}/downloads --limit "all:!fake_hosts" $PLAYBOOK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Tests Cases
|
# Tests Cases
|
||||||
|
|
Loading…
Reference in a new issue