Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform minor upgrade research #2851

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ARG USER_GID=$USER_UID
ARG HELM_VERSION=3.3.1
ARG KUBECTL_VERSION=1.22.4
ARG ISTIOCTL_VERSION=1.8.1
ARG TERRAFORM_VERSION=0.12.31

RUN : INSTALL APT REQUIREMENTS \
&& export DEBIAN_FRONTEND=noninteractive \
Expand Down Expand Up @@ -37,7 +38,12 @@ RUN : INSTALL HELM BINARY \
&& curl -fsSLO https://github.com/istio/istio/releases/download/${ISTIOCTL_VERSION}/istioctl-${ISTIOCTL_VERSION}-linux-amd64.tar.gz \
&& tar -xzof istioctl-${ISTIOCTL_VERSION}-linux-amd64.tar.gz -C /usr/local/bin istioctl \
&& rm istioctl-${ISTIOCTL_VERSION}-linux-amd64.tar.gz \
&& chmod +x /usr/local/bin/istioctl
&& chmod +x /usr/local/bin/istioctl \
&& : INSTALL TERRAFORM BINARY \
&& curl -fsSLO https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin \
&& rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& terraform version

RUN : INSTALL GEM REQUIREMENTS \
&& gem install \
Expand Down
20 changes: 8 additions & 12 deletions .devcontainer/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .devcontainer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ boto3 = "*"
jsonschema = "*"
python-json-logger = "*"
ansible = "==2.10.7"
terraform-bin = "*"
"ruamel.yaml" = "*"
azure-cli = "2.29.0"

Expand Down
1 change: 0 additions & 1 deletion .devcontainer/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ semver==2.13.0; python_full_version >= "3.6.0"
six==1.16.0; python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.6"
sshtunnel==0.1.5; python_full_version >= "3.6.0"
tabulate==0.8.9; python_full_version >= "3.6.0"
terraform-bin==1.0.1
typing-extensions==4.0.0; python_version < "3.8" and python_version >= "3.7"
urllib3==1.26.7; python_full_version >= "3.6.0" and python_version < "4" and python_version >= "3.6"
vsts==0.1.25; python_full_version >= "3.6.0"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

Reference for actual cluster component versions can be found [here](docs/home/COMPONENTS.md)

- [CHANGELOG-2.0.x](./docs/changelogs/CHANGELOG-2.0.md)
- [CHANGELOG-1.3.x](./docs/changelogs/CHANGELOG-1.3.md)
- [CHANGELOG-1.2.x](./docs/changelogs/CHANGELOG-1.2.md)
- [CHANGELOG-1.1.x](./docs/changelogs/CHANGELOG-1.1.md)
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ARG USER_GID=$USER_UID
ARG HELM_VERSION=3.3.1
ARG KUBECTL_VERSION=1.22.4
ARG ISTIOCTL_VERSION=1.8.1
ARG TERRAFORM_VERSION=0.12.31

ENV EPICLI_DOCKER_SHARED_DIR=/shared

Expand All @@ -32,6 +33,11 @@ RUN : INSTALL APT REQUIREMENTS \
&& tar -xzof istioctl-${ISTIOCTL_VERSION}-linux-amd64.tar.gz -C /usr/local/bin istioctl \
&& rm istioctl-${ISTIOCTL_VERSION}-linux-amd64.tar.gz \
&& chmod +x /usr/local/bin/istioctl \
&& : INSTALL TERRAFORM BINARY \
&& curl -fsSLO https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin \
&& rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
&& terraform version \
\
&& : INSTALL GEM REQUIREMENTS \
&& gem install \
Expand Down
16 changes: 4 additions & 12 deletions cli/licenses.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cli/version.txt.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.0dev
2.0.0dev
28 changes: 28 additions & 0 deletions docs/changelogs/CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Changelog 2.0

## [2.0.0] YYYY-MM-DD

### Added


### Fixed


### Updated

- [#2825](https://github.com/epiphany-platform/epiphany/issues/2825) - Research upgrade for Terraform
- Terraform 0.12.6 to 0.12.31
- Azurerm provider 1.38.0 to 1.44
- AWS provider 2.26 to 2.71.0

### Removed


### Deprecated


### Breaking changes


### Known issues

7 changes: 3 additions & 4 deletions docs/home/COMPONENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Note that versions are default versions and can be changed in certain cases thro

| Component | Version | Repo/Website | License |
| ------------------------- | ------- | ----------------------------------------------------- | ----------------------------------------------------------------- |
| Terraform | 0.12.6 | https://www.terraform.io/ | [Mozilla Public License 2.0](https://github.com/hashicorp/terraform/blob/master/LICENSE) |
| Terraform AzureRM provider | 1.38.0 | https://github.com/terraform-providers/terraform-provider-azurerm | [Mozilla Public License 2.0](https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/LICENSE) |
| Terraform AWS provider | 2.26 | https://github.com/terraform-providers/terraform-provider-aws | [Mozilla Public License 2.0](https://github.com/terraform-providers/terraform-provider-aws/blob/master/LICENSE) |
| Terraform | 0.12.31 | https://www.terraform.io/ | [Mozilla Public License 2.0](https://github.com/hashicorp/terraform/blob/master/LICENSE) |
| Terraform AzureRM provider | 1.44.0 | https://github.com/terraform-providers/terraform-provider-azurerm | [Mozilla Public License 2.0](https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/LICENSE) |
| Terraform AWS provider | 2.71 | https://github.com/terraform-providers/terraform-provider-aws | [Mozilla Public License 2.0](https://github.com/terraform-providers/terraform-provider-aws/blob/master/LICENSE) |
| Crane | 0.4.1 | https://github.com/google/go-containerregistry/tree/main/cmd/crane | [Apache License 2.0](https://github.com/google/go-containerregistry/blob/main/LICENSE) |

## Epicli Python dependencies
Expand Down Expand Up @@ -214,7 +214,6 @@ Note that versions are default versions and can be changed in certain cases thro
| six | 1.16.0 | https://github.com/benjaminp/six | [MIT License](https://api.github.com/repos/benjaminp/six/license) |
| sshtunnel | 0.1.5 | https://github.com/pahaz/sshtunnel | [MIT License](https://api.github.com/repos/pahaz/sshtunnel/license) |
| tabulate | 0.8.9 | https://github.com/astanin/python-tabulate | [MIT License](https://api.github.com/repos/astanin/python-tabulate/license) |
| terraform-bin | 1.0.1 | https://github.com/epiphany-platform/terraform-bin | [Apache License 2.0](https://api.github.com/repos/epiphany-platform/terraform-bin/license) |
| typing_extensions | 4.0.0 | https://github.com/python/typing/blob/master/typing_extensions | [Other](https://github.com/python/typing/blob/master/typing_extensions/LICENSE) |
| urllib3 | 1.26.7 | https://urllib3.readthedocs.io/ | MIT |
| vsts | 0.1.25 | https://github.com/Microsoft/vsts-python-api | [MIT License](https://api.github.com/repos/microsoft/vsts-python-api/license) |
Expand Down
2 changes: 1 addition & 1 deletion schema/azure/defaults/infrastructure/virtual-machine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ specification:
version: "18.04.202109130" # Never put latest on anything! Need to always pin the version number but testing we can get away with it
storage_os_disk:
delete_on_termination: false
managed: false
managed: true
caching: ReadWrite
create_option: FromImage
disk_size_gb: 32
Expand Down
2 changes: 1 addition & 1 deletion terraform/aws/epiphany-cluster.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#####################################################

provider "aws" {
version = "=2.26"
version = "=2.70.1"
access_key = "{{ specification.cloud.credentials.key }}"
secret_key = "{{ specification.cloud.credentials.secret }}"
region = "{{ specification.cloud.region }}"
Expand Down
2 changes: 1 addition & 1 deletion terraform/azure/epiphany-cluster.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
#####################################################

provider "azurerm" {
version = "=1.38"
version = "=1.44"
}
4 changes: 2 additions & 2 deletions terraform/azure/infrastructure/virtual-machine.j2
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resource "azurerm_virtual_machine" "{{ specification.name }}" {
# windows specific stuff here maybe... hopefully never.
{%- endif %}

{%- if specification.storage_os_disk.managed != true %}
{%- if specification.storage_os_disk.managed %}
delete_os_disk_on_termination = "{{ specification.storage_os_disk.delete_on_termination | lower }}"
{%- endif %}

Expand All @@ -58,7 +58,7 @@ resource "azurerm_virtual_machine" "{{ specification.name }}" {
caching = "{{ specification.storage_os_disk.caching }}"
create_option = "{{ specification.storage_os_disk.create_option }}"
disk_size_gb = "{{ specification.storage_os_disk.disk_size_gb }}"
{%- if specification.storage_os_disk.managed != true %}
{%- if specification.storage_os_disk.managed %}
managed_disk_type = "{{ specification.storage_os_disk.managed_disk_type | lower }}"
{%- else %}
#TODO: Container storage
Expand Down