Skip to content

Commit 8b279cd

Browse files
committed
feat(ci,cd): Improve operator process;
This improves the operator process for updating the backend target IP for the Azure Demo environment. This builds off the work done in #1413.
1 parent 6c677aa commit 8b279cd

2 files changed

Lines changed: 31 additions & 6 deletions

File tree

.justscripts/just/cloud.just

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,31 @@ alias help := _default
88
[group('azure')]
99
demo-db-url:
1010
az container show \
11-
--name dibbs-er-demo-aci \
12-
--resource-group dibbs-er-demo \
13-
--query "containers[0].environmentVariables[?name=='DB_URL'].value | [0]" \
14-
-o tsv
11+
--name dibbs-er-demo-aci \
12+
--resource-group dibbs-er-demo \
13+
--query "containers[0].environmentVariables[?name=='DB_URL'].value | [0]" \
14+
-o tsv
1515

1616
[doc('Retrieve a list of jurisdictions who have authored conditions in the demo application')]
1717
[group('azure')]
1818
demo-jurisdiction-authored:
1919
psql $(just cloud demo-db-url) -c "SELECT c.jurisdiction_id, c.name FROM configurations AS c ORDER BY c.jurisdiction_id;"
20+
21+
[doc('Retrieve the current backend address pool configuration for the Demo environment')]
22+
[group('azure')]
23+
demo-show-network-address-pool:
24+
az network application-gateway address-pool show \
25+
--subscription 6848426c-8ca8-4832-b493-fed851be1f95 \
26+
--resource-group dibbs-global-demo \
27+
--gateway-name hub-appgw \
28+
--name dibbs-global-demo-be-ecr-refiner
29+
30+
[doc('Update the current backend address pool configuration for the Demo environment')]
31+
[group('azure')]
32+
demo-update-network-address-pool ip_or_fqdn:
33+
az network application-gateway address-pool update \
34+
--subscription 6848426c-8ca8-4832-b493-fed851be1f95 \
35+
--resource-group dibbs-global-demo \
36+
--gateway-name hub-appgw --name \
37+
--name dibbs-global-demo-be-ecr-refiner \
38+
--servers {{ ip_or_fqdn }}

releases/DEMO_RELEASE.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ We have a [GitHub action](https://github.com/CDCgov/dibbs-ecr-refiner/actions/wo
1313

1414
1. Run the GitHub action with the desired branch / the "The event type to trigger the workflow." question set to `trigger-demo-deploy`. This will kick off the deploy action in [the Skylight infrastructure repo](https://github.com/skylight-hq/dibbs-tf-envs/actions/workflows/deploy_dibbs_services_azure_demo.yaml) that will do the deploy.
1515
1. Optionally, if you just want to run a plan and not kick off the full deploy, you can set the last value to `trigger-demo-plan`.
16-
1. Watch the action run and take note of the IP address outputted at the end of the deploy job in the Skylight repo. Save this for reference.
17-
1. Go to the [Azure backend pool blade](https://portal.azure.com/?l=en.en-us#view/Microsoft_Azure_HybridNetworking/ApplicationGatewayBackendPoolBladeV2/backendPoolId/%2Fsubscriptions%2F6848426c-8ca8-4832-b493-fed851be1f95%2FresourceGroups%2Fdibbs-global-demo%2Fproviders%2FMicrosoft.Network%2FapplicationGateways%2Fhub-appgw%2FbackendAddressPools%2Fdibbs-global-demo-be-ecr-refiner/applicationGatewayVnetId/%2Fsubscriptions%2F6848426c-8ca8-4832-b493-fed851be1f95%2FresourceGroups%2Fdibbs-global-demo%2Fproviders%2FMicrosoft.Network%2FvirtualNetworks%2Fdibbs-global-demo-hub-network/isEdit~/true/isTlsProxyAfecFlagEnabled~/false) and update the target IP address. **The demo site will return a 502 Bad Gateway error until this is updated manually, so only run the deploy job if the downtime won't cause trouble**
16+
1. Watch the action run and take note of the IP address outputted at the end of the deploy job in the Skylight repo. Save this to reference in the next step.
17+
1. Run `just cloud demo-show-network-address-pool` to verify the current IP address (optional)
18+
1. Run `just cloud demo-update-network-address-pool
19+
<ip_outputted_from_deploy_job>` to update the target IP address.
20+
21+
> [!WARNING]
22+
> **The demo site will return a 502 Bad Gateway error until this is updated
23+
> manually, so only run the deploy job if the downtime won't cause trouble**
1824
1925
The demo site should be updated from there! If you want to double check, the application commit hash is displayed at the bottom of the footer, which you can compare against the latest commit in main.

0 commit comments

Comments
 (0)