You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

814 lines
23 KiB

8 years ago
8 years ago
8 years ago
6 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
contiv network support (#1914) * Add Contiv support Contiv is a network plugin for Kubernetes and Docker. It supports vlan/vxlan/BGP/Cisco ACI technologies. It support firewall policies, multiple networks and bridging pods onto physical networks. * Update contiv version to 1.1.4 Update contiv version to 1.1.4 and added SVC_SUBNET in contiv-config. * Load openvswitch module to workaround on CentOS7.4 * Set contiv cni version to 0.1.0 Correct contiv CNI version to 0.1.0. * Use kube_apiserver_endpoint for K8S_API_SERVER Use kube_apiserver_endpoint as K8S_API_SERVER to make contiv talks to a available endpoint no matter if there's a loadbalancer or not. * Make contiv use its own etcd Before this commit, contiv is using a etcd proxy mode to k8s etcd, this work fine when the etcd hosts are co-located with contiv etcd proxy, however the k8s peering certs are only in etcd group, as a result the etcd-proxy is not able to peering with the k8s etcd on etcd group, plus the netplugin is always trying to find the etcd endpoint on localhost, this will cause problem for all netplugins not runnign on etcd group nodes. This commit make contiv uses its own etcd, separate from k8s one. on kube-master nodes (where net-master runs), it will run as leader mode and on all rest nodes it will run as proxy mode. * Use cp instead of rsync to copy cni binaries Since rsync has been removed from hyperkube, this commit changes it to use cp instead. * Make contiv-etcd able to run on master nodes * Add rbac_enabled flag for contiv pods * Add contiv into CNI network plugin lists * migrate contiv test to tests/files Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> * Add required rules for contiv netplugin * Better handling json return of fwdMode * Make contiv etcd port configurable * Use default var instead of templating * roles/download/defaults/main.yml: use contiv 1.1.7 Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
7 years ago
8 years ago
6 years ago
8 years ago
6 years ago
  1. stages:
  2. - deploy-do
  3. - moderator
  4. - unit-tests
  5. - deploy-gce-part1
  6. - deploy-gce-part2
  7. - deploy-gce-special
  8. variables:
  9. FAILFASTCI_NAMESPACE: 'kargo-ci'
  10. # DOCKER_HOST: tcp://localhost:2375
  11. ANSIBLE_FORCE_COLOR: "true"
  12. MAGIC: "ci check this"
  13. TEST_ID: "$CI_PIPELINE_ID-$CI_BUILD_ID"
  14. CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
  15. GS_ACCESS_KEY_ID: $GS_KEY
  16. GS_SECRET_ACCESS_KEY: $GS_SECRET
  17. CONTAINER_ENGINE: docker
  18. SSH_USER: $GCE_USER
  19. GCE_PREEMPTIBLE: "false"
  20. ANSIBLE_KEEP_REMOTE_FILES: "1"
  21. ANSIBLE_CONFIG: ./tests/ansible.cfg
  22. IDEMPOT_CHECK: "false"
  23. RESET_CHECK: "false"
  24. UPGRADE_TEST: "false"
  25. KUBEADM_ENABLED: "false"
  26. LOG_LEVEL: "-vvv"
  27. # asia-east1-a
  28. # asia-northeast1-a
  29. # europe-west1-b
  30. # us-central1-a
  31. # us-east1-b
  32. # us-west1-a
  33. before_script:
  34. - pip install -r tests/requirements.txt
  35. - mkdir -p /.ssh
  36. .job: &job
  37. tags:
  38. - kubernetes
  39. - docker
  40. image: quay.io/kubespray/kubespray:master
  41. .docker_service: &docker_service
  42. services:
  43. - docker:dind
  44. .create_cluster: &create_cluster
  45. <<: *job
  46. <<: *docker_service
  47. .gce_variables: &gce_variables
  48. GCE_USER: travis
  49. SSH_USER: $GCE_USER
  50. CLOUD_MACHINE_TYPE: "g1-small"
  51. CI_PLATFORM: "gce"
  52. PRIVATE_KEY: $GCE_PRIVATE_KEY
  53. .do_variableS: &do_variables
  54. PRIVATE_KEY: $DO_PRIVATE_KEY
  55. CI_PLATFORM: "do"
  56. .testcases: &testcases
  57. <<: *job
  58. <<: *docker_service
  59. cache:
  60. key: "$CI_BUILD_REF_NAME"
  61. paths:
  62. - downloads/
  63. - $HOME/.cache
  64. before_script:
  65. - docker info
  66. - pip install -r tests/requirements.txt
  67. - mkdir -p /.ssh
  68. - mkdir -p $HOME/.ssh
  69. - ansible-playbook --version
  70. - export PYPATH=$([[ ! "$CI_JOB_NAME" =~ "coreos" ]] && echo /usr/bin/python || echo /opt/bin/python)
  71. - echo "CI_JOB_NAME is $CI_JOB_NAME"
  72. - echo "PYPATH is $PYPATH"
  73. script:
  74. - pwd
  75. - ls
  76. - echo ${PWD}
  77. - echo "${STARTUP_SCRIPT}"
  78. - cd tests && make create-${CI_PLATFORM} -s ; cd -
  79. # Check out latest tag if testing upgrade
  80. # Uncomment when gitlab kargo repo has tags
  81. #- test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
  82. - test "${UPGRADE_TEST}" != "false" && git checkout ba0a03a8ba2d97a73d06242ec4bb3c7e2012e58c
  83. # Checkout the CI vars file so it is available
  84. - test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml
  85. # Workaround https://github.com/kubernetes-incubator/kubespray/issues/2021
  86. - 'sh -c "echo ignore_assert_errors: true | tee -a tests/files/${CI_JOB_NAME}.yml"'
  87. # Create cluster
  88. - >
  89. ansible-playbook
  90. -i inventory/sample/hosts.ini
  91. -b --become-user=root
  92. --private-key=${HOME}/.ssh/id_rsa
  93. -u $SSH_USER
  94. ${SSH_ARGS}
  95. ${LOG_LEVEL}
  96. -e @${CI_TEST_VARS}
  97. -e ansible_python_interpreter=${PYPATH}
  98. -e ansible_ssh_user=${SSH_USER}
  99. -e local_release_dir=${PWD}/downloads
  100. --limit "all:!fake_hosts"
  101. cluster.yml
  102. # Repeat deployment if testing upgrade
  103. - >
  104. if [ "${UPGRADE_TEST}" != "false" ]; then
  105. test "${UPGRADE_TEST}" == "basic" && PLAYBOOK="cluster.yml";
  106. test "${UPGRADE_TEST}" == "graceful" && PLAYBOOK="upgrade-cluster.yml";
  107. git checkout "${CI_BUILD_REF}";
  108. ansible-playbook
  109. -i inventory/sample/hosts.ini
  110. -b --become-user=root
  111. --private-key=${HOME}/.ssh/id_rsa
  112. -u $SSH_USER
  113. ${SSH_ARGS}
  114. ${LOG_LEVEL}
  115. -e @${CI_TEST_VARS}
  116. -e ansible_python_interpreter=${PYPATH}
  117. -e ansible_ssh_user=${SSH_USER}
  118. -e local_release_dir=${PWD}/downloads
  119. --limit "all:!fake_hosts"
  120. $PLAYBOOK;
  121. fi
  122. # Tests Cases
  123. ## Test Master API
  124. - >
  125. ansible-playbook -i inventory/sample/hosts.ini -e ansible_python_interpreter=${PYPATH} -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root --limit "all:!fake_hosts" tests/testcases/010_check-apiserver.yml $LOG_LEVEL
  126. -e "{kubeadm_enabled: ${KUBEADM_ENABLED}}"
  127. ## Ping the between 2 pod
  128. - ansible-playbook -i inventory/sample/hosts.ini -e ansible_python_interpreter=${PYPATH} -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root --limit "all:!fake_hosts" tests/testcases/030_check-network.yml $LOG_LEVEL
  129. ## Advanced DNS checks
  130. - ansible-playbook -i inventory/sample/hosts.ini -e ansible_python_interpreter=${PYPATH} -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root --limit "all:!fake_hosts" tests/testcases/040_check-network-adv.yml $LOG_LEVEL
  131. ## Idempotency checks 1/5 (repeat deployment)
  132. - >
  133. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  134. ansible-playbook
  135. -i inventory/sample/hosts.ini
  136. -b --become-user=root
  137. --private-key=${HOME}/.ssh/id_rsa
  138. -u $SSH_USER
  139. ${SSH_ARGS}
  140. ${LOG_LEVEL}
  141. -e @${CI_TEST_VARS}
  142. -e ansible_python_interpreter=${PYPATH}
  143. -e local_release_dir=${PWD}/downloads
  144. --limit "all:!fake_hosts"
  145. cluster.yml;
  146. fi
  147. ## Idempotency checks 2/5 (Advanced DNS checks)
  148. - >
  149. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  150. ansible-playbook
  151. -i inventory/sample/hosts.ini
  152. -b --become-user=root
  153. --private-key=${HOME}/.ssh/id_rsa
  154. -u $SSH_USER
  155. ${SSH_ARGS}
  156. ${LOG_LEVEL}
  157. -e @${CI_TEST_VARS}
  158. --limit "all:!fake_hosts"
  159. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  160. fi
  161. ## Idempotency checks 3/5 (reset deployment)
  162. - >
  163. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  164. ansible-playbook
  165. -i inventory/sample/hosts.ini
  166. -b --become-user=root
  167. --private-key=${HOME}/.ssh/id_rsa
  168. -u $SSH_USER
  169. ${SSH_ARGS}
  170. ${LOG_LEVEL}
  171. -e @${CI_TEST_VARS}
  172. -e ansible_python_interpreter=${PYPATH}
  173. -e reset_confirmation=yes
  174. --limit "all:!fake_hosts"
  175. reset.yml;
  176. fi
  177. ## Idempotency checks 4/5 (redeploy after reset)
  178. - >
  179. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  180. ansible-playbook
  181. -i inventory/sample/hosts.ini
  182. -b --become-user=root
  183. --private-key=${HOME}/.ssh/id_rsa
  184. -u $SSH_USER
  185. ${SSH_ARGS}
  186. ${LOG_LEVEL}
  187. -e @${CI_TEST_VARS}
  188. -e ansible_python_interpreter=${PYPATH}
  189. -e local_release_dir=${PWD}/downloads
  190. --limit "all:!fake_hosts"
  191. cluster.yml;
  192. fi
  193. ## Idempotency checks 5/5 (Advanced DNS checks)
  194. - >
  195. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  196. ansible-playbook -i inventory/sample/hosts.ini -e ansible_python_interpreter=${PYPATH}
  197. -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root
  198. --limit "all:!fake_hosts"
  199. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  200. fi
  201. after_script:
  202. - cd tests && make delete-${CI_PLATFORM} -s ; cd -
  203. .gce: &gce
  204. <<: *testcases
  205. variables:
  206. <<: *gce_variables
  207. .do: &do
  208. variables:
  209. <<: *do_variables
  210. <<: *testcases
  211. # .do: &do
  212. # <<: *job
  213. # <<: *gce
  214. # cache:
  215. # key: "$CI_BUILD_REF_NAME"
  216. # paths:
  217. # - downloads/
  218. # - $HOME/.cache
  219. # before_script:
  220. # - docker info
  221. # - pip install ansible==2.2.1.0
  222. # - pip install netaddr
  223. # - pip install apache-libcloud==0.20.1
  224. # - pip install boto==2.9.0
  225. # - pip install dopy==0.3.5
  226. # - mkdir -p /.ssh
  227. # - mkdir -p $HOME/.ssh
  228. # - echo $DO_PRIVATE_KEY | base64 -d > $HOME/.ssh/id_rsa
  229. # - chmod 400 $HOME/.ssh/id_rsa
  230. # - md5sum ~/.ssh/id_rsa
  231. # - ansible-playbook --version
  232. # - export PYPATH=$([ $BOOTSTRAP_OS = coreos ] && echo /opt/bin/python || echo /usr/bin/python )
  233. # - echo $PYPATH
  234. # script:
  235. # - pwd
  236. # - ls
  237. # - echo ${PWD}
  238. # - >
  239. # ansible-playbook tests/cloud_playbooks/create-do.yml -i tests/local_inventory/hosts.cfg -c local
  240. # ${LOG_LEVEL}
  241. # -e cloud_image=${CLOUD_IMAGE}
  242. # -e cloud_region=${CLOUD_REGION}
  243. # -e inventory_path=${PWD}/inventory/inventory.ini
  244. # -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  245. # -e mode=${CLUSTER_MODE}
  246. # -e test_id=${TEST_ID}
  247. # # Check out latest tag if testing upgrade
  248. # # Uncomment when gitlab kargo repo has tags
  249. # #- test "${UPGRADE_TEST}" = "true" && git fetch --all && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
  250. # - test "${UPGRADE_TEST}" = "true" && git checkout 031cf565ec3ccd3ebbe80eeef3454c3780e5c598 && pip install ansible==2.2.0
  251. # # Create cluster
  252. # - >
  253. # ansible-playbook -i inventory/inventory.ini -b --become-user=root --private-key=${HOME}/.ssh/id_rsa -u root
  254. # ${SSH_ARGS}
  255. # ${LOG_LEVEL}
  256. # -e state=present
  257. # -e ansible_python_interpreter=${PYPATH}
  258. # -e ansible_ssh_user=root
  259. # -e bootstrap_os=${BOOTSTRAP_OS}
  260. # -e cert_management=${CERT_MGMT:-script}
  261. # -e cloud_provider=gce
  262. # -e deploy_netchecker=true
  263. # -e download_localhost=true
  264. # -e download_run_once=true
  265. # -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  266. # -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  267. # -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  268. # -e local_release_dir=${PWD}/downloads
  269. # -e resolvconf_mode=${RESOLVCONF_MODE}
  270. # -e vault_deployment_type=${VAULT_DEPLOYMENT}
  271. # cluster.yml
  272. # # Repeat deployment if testing upgrade
  273. # #FIXME(mattymo): repeat "Create cluster" above without duplicating code
  274. # - >
  275. # if [ "${UPGRADE_TEST}" = "true" ]; then
  276. # pip install ansible==2.2.1.0;
  277. # git checkout "${CI_BUILD_REF}";
  278. # ansible-playbook -i inventory/inventory.ini -b --become-user=root --private-key=${HOME}/.ssh/id_rsa -u root
  279. # ${SSH_ARGS}
  280. # ${LOG_LEVEL}
  281. # -e ansible_python_interpreter=${PYPATH}
  282. # -e ansible_ssh_user=root
  283. # -e bootstrap_os=${BOOTSTRAP_OS}
  284. # -e cloud_provider=gce
  285. # -e deploy_netchecker=true
  286. # -e download_localhost=true
  287. # -e download_run_once=true
  288. # -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  289. # -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  290. # -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  291. # -e local_release_dir=${PWD}/downloads
  292. # -e resolvconf_mode=${RESOLVCONF_MODE}
  293. # -e weave_cpu_requests=${WEAVE_CPU_LIMIT}
  294. # -e weave_cpu_limit=${WEAVE_CPU_LIMIT}
  295. # cluster.yml;
  296. # fi
  297. # # Tests Cases
  298. # ## Test Master API
  299. # - ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH} -u root -e ansible_ssh_user=root $SSH_ARGS -b --become-user=root tests/testcases/010_check-apiserver.yml $LOG_LEVEL
  300. # ## Ping the between 2 pod
  301. # - ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH} -u root -e ansible_ssh_user=root $SSH_ARGS -b --become-user=root tests/testcases/030_check-network.yml $LOG_LEVEL
  302. # ## Advanced DNS checks
  303. # - ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH} -u root -e ansible_ssh_user=root $SSH_ARGS -b --become-user=root tests/testcases/040_check-network-adv.yml $LOG_LEVEL
  304. # ## Idempotency checks 1/5 (repeat deployment)
  305. # - >
  306. # if [ "${IDEMPOT_CHECK}" = "true" ]; then
  307. # ansible-playbook -i inventory/inventory.ini -u root -e ansible_ssh_user=root $SSH_ARGS
  308. # -b --become-user=root -e cloud_provider=gce $LOG_LEVEL -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  309. # --private-key=${HOME}/.ssh/id_rsa
  310. # -e bootstrap_os=${BOOTSTRAP_OS}
  311. # -e ansible_python_interpreter=${PYPATH}
  312. # -e download_run_once=true
  313. # -e download_localhost=true
  314. # -e deploy_netchecker=true
  315. # -e resolvconf_mode=${RESOLVCONF_MODE}
  316. # -e local_release_dir=${PWD}/downloads
  317. # -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  318. # -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  319. # cluster.yml;
  320. # fi
  321. # ## Idempotency checks 2/5 (Advanced DNS checks)
  322. # - >
  323. # if [ "${IDEMPOT_CHECK}" = "true" ]; then
  324. # ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH}
  325. # -u root -e ansible_ssh_user=root $SSH_ARGS -b --become-user=root
  326. # tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  327. # fi
  328. # ## Idempotency checks 3/5 (reset deployment)
  329. # - >
  330. # if [ "${IDEMPOT_CHECK}" = "true" ]; then
  331. # ansible-playbook -i inventory/inventory.ini -u root -e ansible_ssh_user=root $SSH_ARGS
  332. # -b --become-user=root -e cloud_provider=gce $LOG_LEVEL -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  333. # --private-key=${HOME}/.ssh/id_rsa
  334. # -e bootstrap_os=${BOOTSTRAP_OS}
  335. # -e ansible_python_interpreter=${PYPATH}
  336. # reset.yml;
  337. # fi
  338. # ## Idempotency checks 4/5 (redeploy after reset)
  339. # - >
  340. # if [ "${IDEMPOT_CHECK}" = "true" ]; then
  341. # ansible-playbook -i inventory/inventory.ini -u root -e ansible_ssh_user=root $SSH_ARGS
  342. # -b --become-user=root -e cloud_provider=gce $LOG_LEVEL -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  343. # --private-key=${HOME}/.ssh/id_rsa
  344. # -e bootstrap_os=${BOOTSTRAP_OS}
  345. # -e ansible_python_interpreter=${PYPATH}
  346. # -e download_run_once=true
  347. # -e download_localhost=true
  348. # -e deploy_netchecker=true
  349. # -e resolvconf_mode=${RESOLVCONF_MODE}
  350. # -e local_release_dir=${PWD}/downloads
  351. # -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  352. # -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  353. # cluster.yml;
  354. # fi
  355. # ## Idempotency checks 5/5 (Advanced DNS checks)
  356. # - >
  357. # if [ "${IDEMPOT_CHECK}" = "true" ]; then
  358. # ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH}
  359. # -u root -e ansible_ssh_user=root $SSH_ARGS -b --become-user=root
  360. # tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  361. # fi
  362. # after_script:
  363. # - >
  364. # ansible-playbook -i inventory/inventory.ini tests/cloud_playbooks/create-do.yml -c local $LOG_LEVEL
  365. # -e state=absent
  366. # -e mode=${CLUSTER_MODE}
  367. # -e test_id=${TEST_ID}
  368. # -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  369. # -e gce_project_id=${GCE_PROJECT_ID}
  370. # -e gce_service_account_email=${GCE_ACCOUNT}
  371. # -e gce_credentials_file=${HOME}/.ssh/gce.json
  372. # -e cloud_image=${CLOUD_IMAGE}
  373. # -e inventory_path=${PWD}/inventory/inventory.ini
  374. # -e cloud_region=${CLOUD_REGION}
  375. # Test matrix. Leave the comments for markup scripts.
  376. .coreos_calico_aio_variables: &coreos_calico_aio_variables
  377. # stage: deploy-gce-part1
  378. MOVED_TO_GROUP_VARS: "true"
  379. .ubuntu_canal_ha_variables: &ubuntu_canal_ha_variables
  380. # stage: deploy-gce-part1
  381. UPGRADE_TEST: "graceful"
  382. .centos_weave_kubeadm_variables: &centos_weave_kubeadm_variables
  383. # stage: deploy-gce-part1
  384. UPGRADE_TEST: "graceful"
  385. .ubuntu_canal_kubeadm_variables: &ubuntu_canal_kubeadm_variables
  386. # stage: deploy-gce-part1
  387. MOVED_TO_GROUP_VARS: "true"
  388. .ubuntu_contiv_sep_variables: &ubuntu_contiv_sep_variables
  389. # stage: deploy-gce-special
  390. MOVED_TO_GROUP_VARS: "true"
  391. .rhel7_weave_variables: &rhel7_weave_variables
  392. # stage: deploy-gce-part1
  393. MOVED_TO_GROUP_VARS: "true"
  394. .centos7_flannel_addons_variables: &centos7_flannel_addons_variables
  395. # stage: deploy-gce-part2
  396. MOVED_TO_GROUP_VARS: "true"
  397. .debian8_calico_variables: &debian8_calico_variables
  398. # stage: deploy-gce-part2
  399. MOVED_TO_GROUP_VARS: "true"
  400. .coreos_canal_variables: &coreos_canal_variables
  401. # stage: deploy-gce-part2
  402. MOVED_TO_GROUP_VARS: "true"
  403. .rhel7_canal_sep_variables: &rhel7_canal_sep_variables
  404. # stage: deploy-gce-special
  405. MOVED_TO_GROUP_VARS: "true"
  406. .ubuntu_weave_sep_variables: &ubuntu_weave_sep_variables
  407. # stage: deploy-gce-special
  408. MOVED_TO_GROUP_VARS: "true"
  409. .centos7_calico_ha_variables: &centos7_calico_ha_variables
  410. # stage: deploy-gce-special
  411. MOVED_TO_GROUP_VARS: "true"
  412. .coreos_alpha_weave_ha_variables: &coreos_alpha_weave_ha_variables
  413. # stage: deploy-gce-special
  414. MOVED_TO_GROUP_VARS: "true"
  415. .ubuntu_rkt_sep_variables: &ubuntu_rkt_sep_variables
  416. # stage: deploy-gce-part1
  417. MOVED_TO_GROUP_VARS: "true"
  418. .ubuntu_vault_sep_variables: &ubuntu_vault_sep_variables
  419. # stage: deploy-gce-part1
  420. MOVED_TO_GROUP_VARS: "true"
  421. .ubuntu_flannel_variables: &ubuntu_flannel_variables
  422. # stage: deploy-gce-special
  423. MOVED_TO_GROUP_VARS: "true"
  424. # Builds for PRs only (premoderated by unit-tests step) and triggers (auto)
  425. coreos-calico-aio:
  426. stage: deploy-do
  427. # stage: deploy-gce-part1
  428. <<: *job
  429. <<: *gce
  430. variables:
  431. <<: *coreos_calico_aio_variables
  432. <<: *gce_variables
  433. when: on_success
  434. except: ['triggers']
  435. # only: [/^pr-.*$/]
  436. ubuntu-canal-ha-do:
  437. stage: deploy-do
  438. <<: *job
  439. <<: *do
  440. variables:
  441. <<: *do_variables
  442. when: on_success
  443. except: ['triggers']
  444. # only: [/^pr-.*$/]
  445. # coreos-calico-sep-triggers:
  446. # stage: deploy-gce-part1
  447. # <<: *job
  448. # <<: *gce
  449. # variables:
  450. # <<: *gce_variables
  451. # <<: *coreos_calico_aio_variables
  452. # when: on_success
  453. # only: ['triggers']
  454. # centos7-flannel-addons:
  455. # stage: deploy-gce-part2
  456. # <<: *job
  457. # <<: *gce
  458. # variables:
  459. # <<: *gce_variables
  460. # <<: *centos7_flannel_addons_variables
  461. # when: on_success
  462. # except: ['triggers']
  463. # only: [/^pr-.*$/]
  464. # centos7-flannel-addons-triggers:
  465. # stage: deploy-gce-part1
  466. # <<: *job
  467. # <<: *gce
  468. # variables:
  469. # <<: *gce_variables
  470. # <<: *centos7_flannel_addons_variables
  471. # when: on_success
  472. # only: ['triggers']
  473. # ubuntu-weave-sep:
  474. # stage: deploy-gce-special
  475. # <<: *job
  476. # <<: *gce
  477. # variables:
  478. # <<: *gce_variables
  479. # <<: *ubuntu_weave_sep_variables
  480. # when: on_success
  481. # except: ['triggers']
  482. # only: [/^pr-.*$/]
  483. # ubuntu-weave-sep-triggers:
  484. # stage: deploy-gce-part1
  485. # <<: *job
  486. # <<: *gce
  487. # variables:
  488. # <<: *gce_variables
  489. # <<: *ubuntu_weave_sep_variables
  490. # when: on_success
  491. # only: ['triggers']
  492. # # More builds for PRs/merges (manual) and triggers (auto)
  493. # ubuntu-canal-ha:
  494. # stage: deploy-gce-part1
  495. # <<: *job
  496. # <<: *gce
  497. # variables:
  498. # <<: *gce_variables
  499. # <<: *ubuntu_canal_ha_variables
  500. # when: manual
  501. # except: ['triggers']
  502. # only: ['master', /^pr-.*$/]
  503. # ubuntu-canal-ha-triggers:
  504. # stage: deploy-gce-part1
  505. # <<: *job
  506. # <<: *gce
  507. # variables:
  508. # <<: *gce_variables
  509. # <<: *ubuntu_canal_ha_variables
  510. # when: on_success
  511. # only: ['triggers']
  512. # ubuntu-canal-kubeadm:
  513. # stage: deploy-gce-part1
  514. # <<: *job
  515. # <<: *gce
  516. # variables:
  517. # <<: *gce_variables
  518. # <<: *ubuntu_canal_kubeadm_variables
  519. # when: manual
  520. # except: ['triggers']
  521. # only: ['master', /^pr-.*$/]
  522. # ubuntu-canal-kubeadm-triggers:
  523. # stage: deploy-gce-part1
  524. # <<: *job
  525. # <<: *gce
  526. # variables:
  527. # <<: *gce_variables
  528. # <<: *ubuntu_canal_kubeadm_variables
  529. # when: on_success
  530. # only: ['triggers']
  531. # centos-weave-kubeadm:
  532. # stage: deploy-gce-part1
  533. # <<: *job
  534. # <<: *gce
  535. # variables:
  536. # <<: *gce_variables
  537. # <<: *centos_weave_kubeadm_variables
  538. # when: manual
  539. # except: ['triggers']
  540. # only: ['master', /^pr-.*$/]
  541. # centos-weave-kubeadm-triggers:
  542. # stage: deploy-gce-part1
  543. # <<: *job
  544. # <<: *gce
  545. # variables:
  546. # <<: *gce_variables
  547. # <<: *centos_weave_kubeadm_variables
  548. # when: on_success
  549. # only: ['triggers']
  550. # ubuntu-contiv-sep:
  551. # stage: deploy-gce-special
  552. # <<: *job
  553. # <<: *gce
  554. # variables:
  555. # <<: *gce_variables
  556. # <<: *ubuntu_contiv_sep_variables
  557. # when: manual
  558. # except: ['triggers']
  559. # only: ['master', /^pr-.*$/]
  560. # rhel7-weave:
  561. # stage: deploy-gce-part1
  562. # <<: *job
  563. # <<: *gce
  564. # variables:
  565. # <<: *gce_variables
  566. # <<: *rhel7_weave_variables
  567. # when: manual
  568. # except: ['triggers']
  569. # only: ['master', /^pr-.*$/]
  570. # rhel7-weave-triggers:
  571. # stage: deploy-gce-part1
  572. # <<: *job
  573. # <<: *gce
  574. # variables:
  575. # <<: *gce_variables
  576. # <<: *rhel7_weave_variables
  577. # when: on_success
  578. # only: ['triggers']
  579. # debian8-calico-upgrade:
  580. # stage: deploy-gce-part2
  581. # <<: *job
  582. # <<: *gce
  583. # variables:
  584. # <<: *gce_variables
  585. # <<: *debian8_calico_variables
  586. # when: manual
  587. # except: ['triggers']
  588. # only: ['master', /^pr-.*$/]
  589. # debian8-calico-triggers:
  590. # stage: deploy-gce-part1
  591. # <<: *job
  592. # <<: *gce
  593. # variables:
  594. # <<: *gce_variables
  595. # <<: *debian8_calico_variables
  596. # when: on_success
  597. # only: ['triggers']
  598. # coreos-canal:
  599. # stage: deploy-gce-part2
  600. # <<: *job
  601. # <<: *gce
  602. # variables:
  603. # <<: *gce_variables
  604. # <<: *coreos_canal_variables
  605. # when: manual
  606. # except: ['triggers']
  607. # only: ['master', /^pr-.*$/]
  608. # coreos-canal-triggers:
  609. # stage: deploy-gce-part1
  610. # <<: *job
  611. # <<: *gce
  612. # variables:
  613. # <<: *gce_variables
  614. # <<: *coreos_canal_variables
  615. # when: on_success
  616. # only: ['triggers']
  617. # rhel7-canal-sep:
  618. # stage: deploy-gce-special
  619. # <<: *job
  620. # <<: *gce
  621. # variables:
  622. # <<: *gce_variables
  623. # <<: *rhel7_canal_sep_variables
  624. # when: manual
  625. # except: ['triggers']
  626. # only: ['master', /^pr-.*$/,]
  627. # rhel7-canal-sep-triggers:
  628. # stage: deploy-gce-part1
  629. # <<: *job
  630. # <<: *gce
  631. # variables:
  632. # <<: *gce_variables
  633. # <<: *rhel7_canal_sep_variables
  634. # when: on_success
  635. # only: ['triggers']
  636. # centos7-calico-ha:
  637. # stage: deploy-gce-special
  638. # <<: *job
  639. # <<: *gce
  640. # variables:
  641. # <<: *gce_variables
  642. # <<: *centos7_calico_ha_variables
  643. # when: manual
  644. # except: ['triggers']
  645. # only: ['master', /^pr-.*$/]
  646. # centos7-calico-ha-triggers:
  647. # stage: deploy-gce-part1
  648. # <<: *job
  649. # <<: *gce
  650. # variables:
  651. # <<: *gce_variables
  652. # <<: *centos7_calico_ha_variables
  653. # when: on_success
  654. # only: ['triggers']
  655. # # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613
  656. # coreos-alpha-weave-ha:
  657. # stage: deploy-gce-special
  658. # <<: *job
  659. # <<: *gce
  660. # variables:
  661. # <<: *gce_variables
  662. # <<: *coreos_alpha_weave_ha_variables
  663. # when: manual
  664. # except: ['triggers']
  665. # only: ['master', /^pr-.*$/]
  666. # ubuntu-rkt-sep:
  667. # stage: deploy-gce-part1
  668. # <<: *job
  669. # <<: *gce
  670. # variables:
  671. # <<: *gce_variables
  672. # <<: *ubuntu_rkt_sep_variables
  673. # when: manual
  674. # except: ['triggers']
  675. # only: ['master', /^pr-.*$/]
  676. # ubuntu-vault-sep:
  677. # stage: deploy-gce-part1
  678. # <<: *job
  679. # <<: *gce
  680. # variables:
  681. # <<: *gce_variables
  682. # <<: *ubuntu_vault_sep_variables
  683. # when: manual
  684. # except: ['triggers']
  685. # only: ['master', /^pr-.*$/]
  686. # ubuntu-flannel-sep:
  687. # stage: deploy-gce-special
  688. # <<: *job
  689. # <<: *gce
  690. # variables:
  691. # <<: *gce_variables
  692. # <<: *ubuntu_flannel_variables
  693. # when: manual
  694. # except: ['triggers']
  695. # only: ['master', /^pr-.*$/]
  696. # # Premoderated with manual actions
  697. # ci-authorized:
  698. # <<: *job
  699. # stage: moderator
  700. # before_script:
  701. # - apt-get -y install jq
  702. # script:
  703. # - /bin/sh scripts/premoderator.sh
  704. # except: ['triggers', 'master']
  705. # syntax-check:
  706. # <<: *job
  707. # stage: unit-tests
  708. # script:
  709. # - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  710. # - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  711. # - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  712. # - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root extra_playbooks/upgrade-only-k8s.yml -vvv --syntax-check
  713. # except: ['triggers', 'master']
  714. # yamllint:
  715. # <<: *job
  716. # stage: unit-tests
  717. # script:
  718. # - yamllint roles
  719. # except: ['triggers', 'master']
  720. # tox-inventory-builder:
  721. # stage: unit-tests
  722. # <<: *job
  723. # script:
  724. # - pip install tox
  725. # - cd contrib/inventory_builder && tox
  726. # when: manual
  727. # except: ['triggers', 'master']