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.

233 lines
6.9 KiB

Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
Fix terraform0.13 errors (#7077) * [terraform/aws] Fix Terraform >=0.13 warnings Terraform >=0.13 gives the following warning: ``` Warning: Interpolation-only expressions are deprecated ``` The fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings. * [terraform/openstack] Fixes for Terraform >=0.13 Terraform >=0.13 gives the following error: ``` Error: Failed to install providers Could not find required providers, but found possible alternatives: hashicorp/openstack -> terraform-provider-openstack/openstack ``` This patch fixes these errors. This fix was tested as follows: ``` rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` which gave no errors nor warnings for Terraform 0.13.5 and Terraform 0.14.3. Unfortunately, 0.12.x gives a harmless warning, but with 0.14.3 out the door, I guess we need to move on. * [terraform/packet] Fixes for Terraform >=0.13 This fix was tested as follows: ``` export PACKET_AUTH_TOKEN=blah-blah rm -rf .terraform && terraform0.12.26 init && terraform0.12.26 validate rm -rf .terraform && terraform0.13.5 init && terraform0.13.5 validate rm -rf .terraform && terraform0.14.3 init && terraform0.14.3 validate ``` Errors are gone, but warnings still remain. It is impossible to please all three versions of Terraform. * Add tests for Terraform >=0.13
3 years ago
  1. ---
  2. # Tests for contrib/terraform/
  3. .terraform_install:
  4. extends: .job
  5. before_script:
  6. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  7. - ./tests/scripts/rebase.sh
  8. - ./tests/scripts/testcases_prepare.sh
  9. - ./tests/scripts/terraform_install.sh
  10. # Set Ansible config
  11. - cp ansible.cfg ~/.ansible.cfg
  12. # Prepare inventory
  13. - cp contrib/terraform/$PROVIDER/sample-inventory/cluster.tfvars .
  14. - ln -s contrib/terraform/$PROVIDER/hosts
  15. - terraform -chdir="contrib/terraform/$PROVIDER" init
  16. # Copy SSH keypair
  17. - mkdir -p ~/.ssh
  18. - echo "$PACKET_PRIVATE_KEY" | base64 -d > ~/.ssh/id_rsa
  19. - chmod 400 ~/.ssh/id_rsa
  20. - echo "$PACKET_PUBLIC_KEY" | base64 -d > ~/.ssh/id_rsa.pub
  21. - mkdir -p contrib/terraform/$PROVIDER/group_vars
  22. # Random subnet to avoid routing conflicts
  23. - export TF_VAR_subnet_cidr="10.$(( $RANDOM % 256 )).$(( $RANDOM % 256 )).0/24"
  24. .terraform_validate:
  25. extends: .terraform_install
  26. stage: unit-tests
  27. tags: [light]
  28. only: ['master', /^pr-.*$/]
  29. script:
  30. - terraform -chdir="contrib/terraform/$PROVIDER" validate
  31. - terraform -chdir="contrib/terraform/$PROVIDER" fmt -check -diff
  32. .terraform_apply:
  33. extends: .terraform_install
  34. tags: [light]
  35. stage: deploy-part3
  36. when: manual
  37. only: [/^pr-.*$/]
  38. artifacts:
  39. when: always
  40. paths:
  41. - cluster-dump/
  42. variables:
  43. ANSIBLE_INVENTORY_UNPARSED_FAILED: "true"
  44. ANSIBLE_INVENTORY: hosts
  45. CI_PLATFORM: tf
  46. TF_VAR_ssh_user: $SSH_USER
  47. TF_VAR_cluster_name: $CI_JOB_ID
  48. script:
  49. - tests/scripts/testcases_run.sh
  50. after_script:
  51. # Cleanup regardless of exit code
  52. - chronic ./tests/scripts/testcases_cleanup.sh
  53. tf-validate-openstack:
  54. extends: .terraform_validate
  55. variables:
  56. TF_VERSION: $TERRAFORM_VERSION
  57. PROVIDER: openstack
  58. CLUSTER: $CI_COMMIT_REF_NAME
  59. tf-validate-equinix:
  60. extends: .terraform_validate
  61. variables:
  62. TF_VERSION: $TERRAFORM_VERSION
  63. PROVIDER: equinix
  64. CLUSTER: $CI_COMMIT_REF_NAME
  65. tf-validate-aws:
  66. extends: .terraform_validate
  67. variables:
  68. TF_VERSION: $TERRAFORM_VERSION
  69. PROVIDER: aws
  70. CLUSTER: $CI_COMMIT_REF_NAME
  71. tf-validate-exoscale:
  72. extends: .terraform_validate
  73. variables:
  74. TF_VERSION: $TERRAFORM_VERSION
  75. PROVIDER: exoscale
  76. tf-validate-hetzner:
  77. extends: .terraform_validate
  78. variables:
  79. TF_VERSION: $TERRAFORM_VERSION
  80. PROVIDER: hetzner
  81. tf-validate-vsphere:
  82. extends: .terraform_validate
  83. variables:
  84. TF_VERSION: $TERRAFORM_VERSION
  85. PROVIDER: vsphere
  86. CLUSTER: $CI_COMMIT_REF_NAME
  87. tf-validate-upcloud:
  88. extends: .terraform_validate
  89. variables:
  90. TF_VERSION: $TERRAFORM_VERSION
  91. PROVIDER: upcloud
  92. CLUSTER: $CI_COMMIT_REF_NAME
  93. tf-validate-nifcloud:
  94. extends: .terraform_validate
  95. variables:
  96. TF_VERSION: $TERRAFORM_VERSION
  97. PROVIDER: nifcloud
  98. # tf-packet-ubuntu20-default:
  99. # extends: .terraform_apply
  100. # variables:
  101. # TF_VERSION: $TERRAFORM_VERSION
  102. # PROVIDER: packet
  103. # CLUSTER: $CI_COMMIT_REF_NAME
  104. # TF_VAR_number_of_k8s_masters: "1"
  105. # TF_VAR_number_of_k8s_nodes: "1"
  106. # TF_VAR_plan_k8s_masters: t1.small.x86
  107. # TF_VAR_plan_k8s_nodes: t1.small.x86
  108. # TF_VAR_metro: am
  109. # TF_VAR_public_key_path: ""
  110. # TF_VAR_operating_system: ubuntu_20_04
  111. .ovh_variables: &ovh_variables
  112. OS_AUTH_URL: https://auth.cloud.ovh.net/v3
  113. OS_PROJECT_ID: 8d3cd5d737d74227ace462dee0b903fe
  114. OS_PROJECT_NAME: "9361447987648822"
  115. OS_USER_DOMAIN_NAME: Default
  116. OS_PROJECT_DOMAIN_ID: default
  117. OS_USERNAME: 8XuhBMfkKVrk
  118. OS_REGION_NAME: UK1
  119. OS_INTERFACE: public
  120. OS_IDENTITY_API_VERSION: "3"
  121. # Elastx is generously donating resources for Kubespray on Openstack CI
  122. # Contacts: @gix @bl0m1
  123. .elastx_variables: &elastx_variables
  124. OS_AUTH_URL: https://ops.elastx.cloud:5000
  125. OS_PROJECT_ID: 564c6b461c6b44b1bb19cdb9c2d928e4
  126. OS_PROJECT_NAME: kubespray_ci
  127. OS_USER_DOMAIN_NAME: Default
  128. OS_PROJECT_DOMAIN_ID: default
  129. OS_USERNAME: kubespray@root314.com
  130. OS_REGION_NAME: se-sto
  131. OS_INTERFACE: public
  132. OS_IDENTITY_API_VERSION: "3"
  133. TF_VAR_router_id: "ab95917c-41fb-4881-b507-3a6dfe9403df"
  134. tf-elastx_cleanup:
  135. stage: unit-tests
  136. tags: [light]
  137. image: python
  138. variables:
  139. <<: *elastx_variables
  140. before_script:
  141. - pip install -r scripts/openstack-cleanup/requirements.txt
  142. script:
  143. - ./scripts/openstack-cleanup/main.py
  144. tf-elastx_ubuntu20-calico:
  145. extends: .terraform_apply
  146. stage: deploy-part3
  147. when: on_success
  148. allow_failure: true
  149. variables:
  150. <<: *elastx_variables
  151. TF_VERSION: $TERRAFORM_VERSION
  152. PROVIDER: openstack
  153. CLUSTER: $CI_COMMIT_REF_NAME
  154. ANSIBLE_TIMEOUT: "60"
  155. SSH_USER: ubuntu
  156. TF_VAR_number_of_k8s_masters: "1"
  157. TF_VAR_number_of_k8s_masters_no_floating_ip: "0"
  158. TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
  159. TF_VAR_number_of_etcd: "0"
  160. TF_VAR_number_of_k8s_nodes: "1"
  161. TF_VAR_number_of_k8s_nodes_no_floating_ip: "0"
  162. TF_VAR_number_of_gfs_nodes_no_floating_ip: "0"
  163. TF_VAR_number_of_bastions: "0"
  164. TF_VAR_number_of_k8s_masters_no_etcd: "0"
  165. TF_VAR_floatingip_pool: "elx-public1"
  166. TF_VAR_dns_nameservers: '["1.1.1.1", "8.8.8.8", "8.8.4.4"]'
  167. TF_VAR_use_access_ip: "0"
  168. TF_VAR_external_net: "600b8501-78cb-4155-9c9f-23dfcba88828"
  169. TF_VAR_network_name: "ci-$CI_JOB_ID"
  170. TF_VAR_az_list: '["sto1"]'
  171. TF_VAR_az_list_node: '["sto1"]'
  172. TF_VAR_flavor_k8s_master: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
  173. TF_VAR_flavor_k8s_node: 3f73fc93-ec61-4808-88df-2580d94c1a9b # v1-standard-2
  174. TF_VAR_image: ubuntu-20.04-server-latest
  175. TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'
  176. # OVH voucher expired, commenting job until things are sorted out
  177. # tf-ovh_cleanup:
  178. # stage: unit-tests
  179. # tags: [light]
  180. # image: python
  181. # environment: ovh
  182. # variables:
  183. # <<: *ovh_variables
  184. # before_script:
  185. # - pip install -r scripts/openstack-cleanup/requirements.txt
  186. # script:
  187. # - ./scripts/openstack-cleanup/main.py
  188. # tf-ovh_ubuntu20-calico:
  189. # extends: .terraform_apply
  190. # when: on_success
  191. # environment: ovh
  192. # variables:
  193. # <<: *ovh_variables
  194. # TF_VERSION: $TERRAFORM_VERSION
  195. # PROVIDER: openstack
  196. # CLUSTER: $CI_COMMIT_REF_NAME
  197. # ANSIBLE_TIMEOUT: "60"
  198. # SSH_USER: ubuntu
  199. # TF_VAR_number_of_k8s_masters: "0"
  200. # TF_VAR_number_of_k8s_masters_no_floating_ip: "1"
  201. # TF_VAR_number_of_k8s_masters_no_floating_ip_no_etcd: "0"
  202. # TF_VAR_number_of_etcd: "0"
  203. # TF_VAR_number_of_k8s_nodes: "0"
  204. # TF_VAR_number_of_k8s_nodes_no_floating_ip: "1"
  205. # TF_VAR_number_of_gfs_nodes_no_floating_ip: "0"
  206. # TF_VAR_number_of_bastions: "0"
  207. # TF_VAR_number_of_k8s_masters_no_etcd: "0"
  208. # TF_VAR_use_neutron: "0"
  209. # TF_VAR_floatingip_pool: "Ext-Net"
  210. # TF_VAR_external_net: "6011fbc9-4cbf-46a4-8452-6890a340b60b"
  211. # TF_VAR_network_name: "Ext-Net"
  212. # TF_VAR_flavor_k8s_master: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
  213. # TF_VAR_flavor_k8s_node: "defa64c3-bd46-43b4-858a-d93bbae0a229" # s1-8
  214. # TF_VAR_image: "Ubuntu 20.04"
  215. # TF_VAR_k8s_allowed_remote_ips: '["0.0.0.0/0"]'