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.

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