Skip to content

Commit 43a8563

Browse files
committed
feat: add westeurope to Azure deployments
1 parent 394ebc0 commit 43a8563

File tree

15 files changed

+99
-24
lines changed

15 files changed

+99
-24
lines changed

terraform/azure/aro/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ else
1717
endif
1818

1919

20-
ENV := dev-northeurope-shared1
20+
ENV := dev-westeurope-shared1
2121

2222
init: init-tf-backend
2323
cd stage/$(ENV) && terragrunt run -- init -upgrade=true

terraform/azure/aro/module/aro.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ resource "azurerm_redhat_openshift_cluster" "aro" {
5353
main_profile {
5454
# https://learn.microsoft.com/en-us/azure/openshift/support-policies-v4#control-plane-nodes
5555
# az vm list-skus --location northeurope --size Standard_D --all --output table
56-
vm_size = "Standard_D8s_v5" # smallest possible node type work ARO control plane node
56+
vm_size = "Standard_D8s_v6" # smallest possible node type work ARO control plane node
5757
subnet_id = data.azurerm_subnet.main-subnet.id
5858
}
5959

@@ -68,7 +68,7 @@ resource "azurerm_redhat_openshift_cluster" "aro" {
6868
worker_profile {
6969
# https://learn.microsoft.com/en-us/azure/openshift/support-policies-v4#general-purpose
7070
# az vm list-skus --location northeurope --size Standard_D --all --output table
71-
vm_size = "Standard_D4s_v5" # smallest possible node type work ARO worker node
71+
vm_size = "Standard_D4s_v6" # smallest possible node type work ARO worker node
7272
disk_size_gb = 128
7373
# The maximum number of worker nodes definable at creation time is 50.
7474
# Maxi is 250 nodes after the cluster is created.

terraform/azure/aro/stage/dev-northeurope-shared1/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ inputs = {
2727

2828
rh_pull_secret = local.rh_pull_secret
2929

30-
# public = false
30+
public = false
3131

3232
pagerduty_integration_key = local.pagerduty_integration_key
3333

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
include "root" {
2+
path = find_in_parent_folders("root.hcl")
3+
}
4+
5+
locals {
6+
env = "dev"
7+
region = "westeurope"
8+
zone = "westeurope-az1"
9+
rh_pull_secret = try(get_env("RH_PULL_SECRET"), file("~/.docker/config.json"))
10+
pagerduty_integration_key = try(get_env("PAGERDUTY_INTEGRATION_KEY"), "")
11+
}
12+
13+
terraform {
14+
# https://github.com/gruntwork-io/terragrunt/issues/1675
15+
source = "${find_in_parent_folders("module")}///"
16+
}
17+
18+
19+
inputs = {
20+
env = local.env
21+
cluster_name = "shared1"
22+
region = local.region
23+
zone = local.zone
24+
25+
master_subnet_suffix = "aro-shared1-master-nodes"
26+
worker_subnet_suffix = "aro-shared1-worker-nodes"
27+
28+
rh_pull_secret = local.rh_pull_secret
29+
30+
public = false
31+
32+
pagerduty_integration_key = local.pagerduty_integration_key
33+
34+
oidc = {
35+
oidc_name = "id"
36+
issuer_url = "https://id.matihost.pl/realms/id"
37+
client_id = "aro"
38+
client_secret = get_env("OIDC_CLIENT_SECRET")
39+
username_claim = "preferred_username"
40+
groups_claim = "groups"
41+
}
42+
43+
namespaces = [
44+
{
45+
name = "learning"
46+
quota = {
47+
limits = {
48+
cpu = "12"
49+
memory = "16Gi"
50+
}
51+
requests = {
52+
cpu = "12"
53+
memory = "16Gi"
54+
}
55+
}
56+
},
57+
{
58+
name = "test"
59+
quota = {
60+
limits = {
61+
cpu = "8"
62+
memory = "16Gi"
63+
}
64+
requests = {
65+
cpu = "8"
66+
memory = "16Gi"
67+
}
68+
}
69+
}]
70+
}

terraform/azure/azure-instance/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ else
1717
endif
1818

1919

20-
ENV := dev-northeurope
20+
ENV := dev-westeurope
2121

2222
init: init-tf-backend prepare
2323
cd stage/$(ENV) && terragrunt init -upgrade=true --backend-bootstrap --non-interactive
@@ -55,7 +55,7 @@ expose-jump-box-ssh-locally:
5555
--target-resource-id $(shell cd stage/$(ENV) && terragrunt output vm_id) \
5656
--resource-port 22 \
5757
--port 2022 & \
58-
sleep 2 # workaround for az tunnel delay when run in background
58+
sleep 5 # workaround for az tunnel delay when run in background
5959

6060

6161
expose-proxy-via-ssh-locally: expose-jump-box-ssh-locally ## expose TinyProxy locally to access resource inside VNet - uses ssh tunneling (done via az tunnel), needs 2 ports, but more resilient

terraform/azure/azure-instance/module/vm.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ resource "azurerm_linux_virtual_machine" "linux" {
7777

7878
os_disk {
7979
caching = "ReadWrite"
80-
storage_account_type = "Standard_LRS"
80+
storage_account_type = "StandardSSD_LRS"
8181
}
8282

8383
source_image_reference {

terraform/azure/azure-instance/stage/dev-northeurope/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ terraform {
1818

1919

2020
inputs = {
21-
name = "vm"
21+
name = "jump"
2222
env = "dev"
2323
region = local.region
2424
zone = local.zone

terraform/azure/azure-instance/stage/dev-westeurope/terragrunt.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ terraform {
1818

1919

2020
inputs = {
21-
name = "vm"
21+
name = "jump"
2222
env = "dev"
2323
region = local.region
2424
zone = local.zone

terraform/azure/azure-instance/stage/dev-westeurope/vm.cloud-init.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ repo_update: true
77
repo_upgrade: all
88

99
packages:
10+
- net-tools
1011
- nginx
1112
- tinyproxy
1213
- plocate

terraform/azure/azure-instance/stage/root.hcl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ remote_state {
1919
storage_account_name = local.state_storage_account
2020
container_name = local.state_container
2121
key = "${basename(abspath("${get_parent_terragrunt_dir()}/.."))}/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/terraform.tfstate"
22-
tenant_id = local.tenant_id
23-
subscription_id = local.subscription_id
22+
# providing both tenant_id and subscription_id
23+
# ends with error:
24+
# error listing access keys on the storage account: AzureCLICredential: ERROR: Please specify only one of subscription and tenant, not both
25+
#
26+
# tenant_id = local.tenant_id
27+
subscription_id = local.subscription_id
2428
}
2529
}
2630

0 commit comments

Comments
 (0)