From f211f539ca836ef62b01751dc67f5740390e7632 Mon Sep 17 00:00:00 2001 From: Rosie-Brigham Date: Thu, 5 Sep 2024 17:38:51 +0100 Subject: [PATCH 1/7] add demo build task to circle ci config --- .circleci/config.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 314eb43a1..4ad483992 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,6 +95,7 @@ workflows: branches: only: - main + - demo* - hmpps/deploy_env: name: deploy_dev @@ -136,6 +137,27 @@ workflows: requires: - request-test-approval + - request-demo-approval: + type: approval + requires: + - helm_lint + - build_docker + filters: + branches: + only: + -demo* + + - hmpps/deploy_env: + name: deploy_demo_preview + env: "demo" + context: hmpps-common-vars + requires: + - request-demo-approval + filters: + branches: + only: + -demo* + - request-preprod-approval: type: approval requires: From 5ba2bed7a603a0759466584906bd7c90a1efaae5 Mon Sep 17 00:00:00 2001 From: Rosie-Brigham Date: Fri, 27 Sep 2024 12:37:53 +0100 Subject: [PATCH 2/7] updates config --- .circleci/config.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ad483992..622f2b66e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -87,6 +87,15 @@ workflows: version: 2 build-test-and-deploy: jobs: + - request-demo-build-approval: + type: approval + requires: + - helm_lint + filters: + branches: + only: + - /demo-.*/ + - hmpps/helm_lint: name: helm_lint - hmpps/build_docker: @@ -95,7 +104,14 @@ workflows: branches: only: - main - - demo* + - hmpps/build_docker: + name: build_docker_for_demo + filters: + branches: + only: + - /demo-.*/ + requires: + - request-demo-build-approval - hmpps/deploy_env: name: deploy_dev @@ -141,22 +157,24 @@ workflows: type: approval requires: - helm_lint - - build_docker + - build_docker_for_demo filters: branches: only: - -demo* + - /demo-.*/ - hmpps/deploy_env: name: deploy_demo_preview env: "demo" - context: hmpps-common-vars + context: + - hmpps-common-vars + - hmpps-temporary-accommodation-ui-demo requires: - request-demo-approval filters: branches: only: - -demo* + - /demo-.*/ - request-preprod-approval: type: approval From 11d48a534c1787c60726b3ef02699fc09f4df9e3 Mon Sep 17 00:00:00 2001 From: Rosie-Brigham Date: Fri, 27 Sep 2024 12:38:12 +0100 Subject: [PATCH 3/7] Adds demo values --- helm_deploy/values-demo.yaml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 helm_deploy/values-demo.yaml diff --git a/helm_deploy/values-demo.yaml b/helm_deploy/values-demo.yaml new file mode 100644 index 000000000..fe1c08b80 --- /dev/null +++ b/helm_deploy/values-demo.yaml @@ -0,0 +1,36 @@ +--- +# Per environment values which override defaults in hmpps-temporary-accommodation-ui/values.yaml + +generic-service: + replicaCount: 2 + + ingress: + hosts: + - temporary-accommodation-demo.hmpps.service.justice.gov.uk + - transitional-accommodation-demo.hmpps.service.justice.gov.uk + contextColour: green + tlsSecretName: hmpps-temporary-accommodation-dev-cert + + env: + ENVIRONMENT: demo + APPROVED_PREMISES_API_URL: 'https://approved-premises-api-demo.hmpps.service.justice.gov.uk' + FIRST_INGRESS_URL: 'https://temporary-accommodation-demp.hmpps.service.justice.gov.uk' + SECOND_INGRESS_URL: 'https://transitional-accommodation-demo.hmpps.service.justice.gov.uk' + HMPPS_AUTH_URL: 'https://sign-in-dev.hmpps.service.justice.gov.uk/auth' + TOKEN_VERIFICATION_API_URL: 'https://token-verification-api-dev.prison.service.justice.gov.uk' + AUDIT_LOG_ERRORS: 'true' + COMMUNITY_ACCOMMODATION_API_TIMEOUT_RESPONSE: 30000 + COMMUNITY_ACCOMMODATION_API_TIMEOUT_DEADLINE: 30000 + PAGINATION_ASSESSMENTS_DEFAULT_PAGE_SIZE: 100 + DOMAIN_EVENTS_EMIT_ENABLED: 'personArrived,personDeparted' + REDIS_ENABLED: 'false' + + namespace_secrets: + sqs-hmpps-audit-secret: + AUDIT_SQS_QUEUE_URL: "sqs_queue_url" + AUDIT_SQS_QUEUE_NAME: "sqs_queue_name" + + allowlist: null + +generic-prometheus-alerts: + alertSeverity: digital-prison-service-dev From 5f9ca982e63809d3c59d3443d59d8bd67a44a9fb Mon Sep 17 00:00:00 2001 From: Rosie-Brigham Date: Fri, 27 Sep 2024 16:20:12 +0100 Subject: [PATCH 4/7] specify secrets - incase there is some config not sharing them --- helm_deploy/values-demo.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helm_deploy/values-demo.yaml b/helm_deploy/values-demo.yaml index fe1c08b80..496f311c4 100644 --- a/helm_deploy/values-demo.yaml +++ b/helm_deploy/values-demo.yaml @@ -29,6 +29,14 @@ generic-service: sqs-hmpps-audit-secret: AUDIT_SQS_QUEUE_URL: "sqs_queue_url" AUDIT_SQS_QUEUE_NAME: "sqs_queue_name" + hmpps-temporary-accommodation-ui: + APPINSIGHTS_INSTRUMENTATIONKEY: 'APPINSIGHTS_INSTRUMENTATIONKEY' + API_CLIENT_ID: 'API_CLIENT_ID' + API_CLIENT_SECRET: 'API_CLIENT_SECRET' + SYSTEM_CLIENT_ID: 'SYSTEM_CLIENT_ID' + SYSTEM_CLIENT_SECRET: 'SYSTEM_CLIENT_SECRET' + SESSION_SECRET: 'SESSION_SECRET' + SENTRY_DSN: 'SENTRY_DSN' allowlist: null From f736f42a250def8c016f0dd13719d5f506e1014f Mon Sep 17 00:00:00 2001 From: Rosie-Brigham Date: Fri, 27 Sep 2024 16:57:45 +0100 Subject: [PATCH 5/7] change config - remove the second approval --- .circleci/config.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 622f2b66e..2e7afe334 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,14 +104,7 @@ workflows: branches: only: - main - - hmpps/build_docker: - name: build_docker_for_demo - filters: - branches: - only: - - /demo-.*/ - requires: - - request-demo-build-approval + - hmpps/deploy_env: name: deploy_dev @@ -153,16 +146,24 @@ workflows: requires: - request-test-approval - - request-demo-approval: + - request-demo-build-and-deploy-approval: type: approval requires: - helm_lint - - build_docker_for_demo filters: branches: only: - /demo-.*/ + - hmpps/build_docker: + name: build_docker_for_demo + filters: + branches: + only: + - /demo-.*/ + requires: + - request-demo-build-and-deploy-approval + - hmpps/deploy_env: name: deploy_demo_preview env: "demo" @@ -170,7 +171,7 @@ workflows: - hmpps-common-vars - hmpps-temporary-accommodation-ui-demo requires: - - request-demo-approval + - build_docker_for_demo filters: branches: only: From f636a53f72526bbad72a4dcad68fd66ffd899911 Mon Sep 17 00:00:00 2001 From: Rosie-Brigham Date: Thu, 31 Oct 2024 09:42:04 +0000 Subject: [PATCH 6/7] Update values-demo.yaml --- helm_deploy/values-demo.yaml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/helm_deploy/values-demo.yaml b/helm_deploy/values-demo.yaml index 496f311c4..930b8edd8 100644 --- a/helm_deploy/values-demo.yaml +++ b/helm_deploy/values-demo.yaml @@ -9,12 +9,12 @@ generic-service: - temporary-accommodation-demo.hmpps.service.justice.gov.uk - transitional-accommodation-demo.hmpps.service.justice.gov.uk contextColour: green - tlsSecretName: hmpps-temporary-accommodation-dev-cert + tlsSecretName: hmpps-temporary-accommodation-demo-cert env: ENVIRONMENT: demo APPROVED_PREMISES_API_URL: 'https://approved-premises-api-demo.hmpps.service.justice.gov.uk' - FIRST_INGRESS_URL: 'https://temporary-accommodation-demp.hmpps.service.justice.gov.uk' + FIRST_INGRESS_URL: 'https://temporary-accommodation-demo.hmpps.service.justice.gov.uk' SECOND_INGRESS_URL: 'https://transitional-accommodation-demo.hmpps.service.justice.gov.uk' HMPPS_AUTH_URL: 'https://sign-in-dev.hmpps.service.justice.gov.uk/auth' TOKEN_VERIFICATION_API_URL: 'https://token-verification-api-dev.prison.service.justice.gov.uk' @@ -23,22 +23,13 @@ generic-service: COMMUNITY_ACCOMMODATION_API_TIMEOUT_DEADLINE: 30000 PAGINATION_ASSESSMENTS_DEFAULT_PAGE_SIZE: 100 DOMAIN_EVENTS_EMIT_ENABLED: 'personArrived,personDeparted' - REDIS_ENABLED: 'false' namespace_secrets: sqs-hmpps-audit-secret: AUDIT_SQS_QUEUE_URL: "sqs_queue_url" AUDIT_SQS_QUEUE_NAME: "sqs_queue_name" - hmpps-temporary-accommodation-ui: - APPINSIGHTS_INSTRUMENTATIONKEY: 'APPINSIGHTS_INSTRUMENTATIONKEY' - API_CLIENT_ID: 'API_CLIENT_ID' - API_CLIENT_SECRET: 'API_CLIENT_SECRET' - SYSTEM_CLIENT_ID: 'SYSTEM_CLIENT_ID' - SYSTEM_CLIENT_SECRET: 'SYSTEM_CLIENT_SECRET' - SESSION_SECRET: 'SESSION_SECRET' - SENTRY_DSN: 'SENTRY_DSN' allowlist: null generic-prometheus-alerts: - alertSeverity: digital-prison-service-dev + alertSeverity: digital-prison-service-demo From 01cbb07d7e134cf617ccb8a8ab4c3ad90dc4c5a2 Mon Sep 17 00:00:00 2001 From: Rosie-Brigham Date: Thu, 31 Oct 2024 11:15:41 +0000 Subject: [PATCH 7/7] remove audit secrets (for now) --- helm_deploy/values-demo.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/helm_deploy/values-demo.yaml b/helm_deploy/values-demo.yaml index 930b8edd8..6578b67ef 100644 --- a/helm_deploy/values-demo.yaml +++ b/helm_deploy/values-demo.yaml @@ -24,11 +24,6 @@ generic-service: PAGINATION_ASSESSMENTS_DEFAULT_PAGE_SIZE: 100 DOMAIN_EVENTS_EMIT_ENABLED: 'personArrived,personDeparted' - namespace_secrets: - sqs-hmpps-audit-secret: - AUDIT_SQS_QUEUE_URL: "sqs_queue_url" - AUDIT_SQS_QUEUE_NAME: "sqs_queue_name" - allowlist: null generic-prometheus-alerts: