From eaf90694f18e50e00cab88cc665498a7498b7635 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Tue, 7 Jan 2025 20:35:37 +0000 Subject: [PATCH] chore: add dev --- Taskfile.yml | 10 +-- .../base/{values.yaml => values.yaml.old} | 0 kustomize/dev/alf-prop-config-map.yaml | 80 +++++++++++++++++++ kustomize/dev/kustomization.yaml | 2 + kustomize/dev/patch-infra-config-map.yaml | 7 ++ kustomize/dev/patch-ingress-repository.yaml | 10 +-- kustomize/dev/patch-ingress-share.yaml | 10 +-- kustomize/dev/values.yaml | 10 ++- kustomize/preprod/alf-prop-config-map.yaml | 16 ++-- 9 files changed, 117 insertions(+), 28 deletions(-) rename kustomize/base/{values.yaml => values.yaml.old} (100%) create mode 100644 kustomize/dev/alf-prop-config-map.yaml create mode 100644 kustomize/dev/patch-infra-config-map.yaml diff --git a/Taskfile.yml b/Taskfile.yml index dcc5c09..1821cd6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -2,10 +2,8 @@ version: "3" vars: ENV: "{{.ENV}}" - FROM_ID: "{{.FROM_ID}}" - TO_ID: "{{.TO_ID}}" - FROM_DATE: "{{.FROM_DATE}}" - TO_DATE: "{{.TO_DATE}}" + FROM: "{{.FROM}}" + TO: "{{.TO}}" NAMESPACE: sh: if [ "{{.ENV}}" = "poc" ]; then echo "hmpps-delius-alfrsco-{{.ENV}}"; else echo "hmpps-delius-alfresco-{{.ENV}}"; fi BUCKET_NAME: @@ -120,14 +118,14 @@ tasks: reindex_by_id: cmds: - | - helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromId={{.FROM_ID}}" --set "toId={{.TO_ID}}" --namespace {{.NAMESPACE}} + helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromId={{.FROM}}" --set "toId={{.TO}}" --namespace {{.NAMESPACE}} # reindexes by date from the FROM_DATE to the TO_DATE # DATE FORMAT: YYYYMMDDHHMM reindex_by_date: cmds: - | - helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex_date --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromTime={{.FROM_DATE}}" --set "toTime={{.TO_DATE}}" --namespace {{.NAMESPACE}} + helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex_date --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromTime={{.FROM}}" --set "toTime={{.TO}}" --namespace {{.NAMESPACE}} # reindex_by_date_metadata-only: # cmds: diff --git a/kustomize/base/values.yaml b/kustomize/base/values.yaml.old similarity index 100% rename from kustomize/base/values.yaml rename to kustomize/base/values.yaml.old diff --git a/kustomize/dev/alf-prop-config-map.yaml b/kustomize/dev/alf-prop-config-map.yaml new file mode 100644 index 0000000..8e9a9e6 --- /dev/null +++ b/kustomize/dev/alf-prop-config-map.yaml @@ -0,0 +1,80 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: alf-prop-config-map +data: + alfresco-global.properties: | + deployment.method=HELM_CHART + alfresco.cluster.enabled=true + alfresco.host=hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk + alfresco.protocol=https + alfresco.port=443 + aos.baseUrlOverwrite=https://hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk/alfresco/aos + csrf.filter.origin=https://hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk + csrf.filter.referer=https://hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk/.* + share.protocol=https + share.host=hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk + share.port=443 + local.transform.service.enabled=true + transform.service.enabled=false + localTransform.core-aio.url= + localTransform.pdfrenderer.url=http://alfresco-content-services-pdfrenderer + localTransform.imagemagick.url=http://alfresco-content-services-imagemagick + localTransform.libreoffice.url=http://alfresco-content-services-libreoffice + localTransform.tika.url=http://alfresco-content-services-tika + localTransform.misc.url=http://alfresco-content-services-transform-misc + events.subsystem.autoStart=false + + #Zaizi additions + zaizi.noms.root.folder=NOMS + zaizi.noms.crn.pattern=([A-Z])([0-9]{3})([0-9]{3}) + zaizi.noms.invalidCharacters=\\/:*\"\"<>|?!$#%^& + + spg.ndelius.users=N00 + spg.crc.users=C01,C02,C03,C04,C05,C06,C07,C08,C09,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 + + # The User to Schema Cache + cache.spgUserToSchemaVersionCache.tx.maxItems=100 + cache.spgUserToSchemaVersionCache.tx.statsEnabled=${caches.tx.statsEnabled} + cache.spgUserToSchemaVersionCache.maxItems=500 + cache.spgUserToSchemaVersionCache.timeToLiveSeconds=0 + cache.spgUserToSchemaVersionCache.maxIdleSeconds=0 + cache.spgUserToSchemaVersionCache.cluster.type=local + cache.spgUserToSchemaVersionCache.backup-count=1 + cache.spgUserToSchemaVersionCache.eviction-policy=LRU + cache.spgUserToSchemaVersionCache.eviction-percentage=25 + cache.spgUserToSchemaVersionCache.merge-policy=hz.ADD_NEW_ENTRY + cache.spgUserToSchemaVersionCache.readBackupData=false + cache.spgUserToSchemaVersionCache.cluster.type=invalidating + + # Notify when a messaging to be sent to MPX taking morethan specified time. Value is in milliseconds. + message.mpx.log.messageSendingTakenMorethan=1000 + + zaizi.noms.mpx.schema.version=0-9-9 + zaizi.noms.mpx.schema.date=2016-09-05 + messaging.events.nspg.schema=classpath:SPG-XML_Message_Root-V0-9-9.xsd + + zaizi.noms.mpx.schema2.version=0-9-10 + zaizi.noms.mpx.schema2.date=2017-03-30 + messaging.events.nspg2.schema=classpath:SPG-XML_Message_Root-V0-9-10-2.xsd + + zaizi.noms.mpx.schema.911.version=0-9-11 + zaizi.noms.mpx.schema.911.date=2017-09-04 + messaging.events.nspg.911.schema=classpath:SPG-XML_Message_Root-V0-9-11.xsd + + zaizi.noms.mpx.schema.912.version=0-9-12 + zaizi.noms.mpx.schema.912.date=2017-12-05 + messaging.events.nspg.912.schema=classpath:SPG-XML_Message_Root-V0-9-12.xsd + + zaizi.noms.mpx.schema.913.version=0-9-13 + zaizi.noms.mpx.schema.913.date=2018-02-08 + messaging.events.nspg.913.schema=classpath:SPG-XML_Message_Root-V0-9-13.xsd + + zaizi.noms.mpx.schema.914.version=0-9-14 + zaizi.noms.mpx.schema.914.date=2019-10-21 + messaging.events.nspg.914.schema=classpath:SPG-XML_Message_Root-V0-9-14.xsd + + # NSPG Administration Groups Patch + patch.nspg.administration.deferred=false + patch.nspg.administration.roles.cronExpression=0 0 0 ? 1 1 2030 + patch.nspg.administration.roles.startDelay=0 diff --git a/kustomize/dev/kustomization.yaml b/kustomize/dev/kustomization.yaml index eaf31f0..4ed2cda 100644 --- a/kustomize/dev/kustomization.yaml +++ b/kustomize/dev/kustomization.yaml @@ -3,7 +3,9 @@ kind: Kustomization resources: - ../base + - alf-prop-config-map.yaml patches: - path: patch-ingress-repository.yaml - path: patch-ingress-share.yaml + - path: patch-infra-config-map.yaml diff --git a/kustomize/dev/patch-infra-config-map.yaml b/kustomize/dev/patch-infra-config-map.yaml new file mode 100644 index 0000000..1188ce2 --- /dev/null +++ b/kustomize/dev/patch-infra-config-map.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: alfresco-infrastructure +data: + SFS_URL: https://alf-sfs.dev.delius-core.hmpps-development.modernisation-platform.service.justice.gov.uk/ + SFS_URL_API: https://alf-sfs.dev.delius-core.hmpps-development.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file/ diff --git a/kustomize/dev/patch-ingress-repository.yaml b/kustomize/dev/patch-ingress-repository.yaml index bacc9c7..c27bd06 100644 --- a/kustomize/dev/patch-ingress-repository.yaml +++ b/kustomize/dev/patch-ingress-repository.yaml @@ -1,10 +1,10 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: alfresco-content-services-alfresco-cs-repository + name: alfresco-content-services-alfresco-repository annotations: - external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-repository-hmpps-delius-alfresco-dev-green - nginx.ingress.kubernetes.io/whitelist-source-range: "3.11.29.246,18.130.165.209,35.178.35.115,35.178.209.113,3.8.51.207,35.177.252.54,35.176.93.186/32,35.177.125.252/32,35.177.137.160/32,81.134.202.29/32,51.149.250.0/24,51.149.251.0/24,213.121.161.112/28,217.33.148.210/32,13.43.9.198/32,13.42.163.245/32,18.132.208.127/32,51.149.249.0/29,51.149.249.32/29,194.33.192.0/25,194.33.193.0/25,194.33.196.0/25,194.33.197.0/25,195.59.75.0/24,194.33.248.0/29,194.33.249.0/29,62.25.106.209/32,195.92.40.49/32,62.25.109.197/32,195.92.38.16/28,212.137.36.230/32,78.33.10.50/31,78.33.10.52/30,78.33.10.56/30,78.33.10.60/32,78.33.32.99/32,78.33.32.100/30,78.33.32.104/30,78.33.32.108/32,83.98.63.176/29,194.75.210.216/29,217.138.45.109/32,217.138.45.110/32,34.241.149.106/32,52.210.79.20/32,54.228.134.38/32" + external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-repository-hmpps-delius-alfresco-dev-green + nginx.ingress.kubernetes.io/whitelist-source-range: "placeholder" spec: rules: - host: hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk @@ -12,14 +12,14 @@ spec: paths: - backend: service: - name: alfresco-content-services-alfresco-cs-repository + name: alfresco-content-services-alfresco-repository port: number: 80 path: / pathType: Prefix - backend: service: - name: alfresco-content-services-alfresco-cs-repository + name: alfresco-content-services-alfresco-repository port: number: 80 path: /api-explorer diff --git a/kustomize/dev/patch-ingress-share.yaml b/kustomize/dev/patch-ingress-share.yaml index 7cf0e58..c91c49e 100644 --- a/kustomize/dev/patch-ingress-share.yaml +++ b/kustomize/dev/patch-ingress-share.yaml @@ -1,10 +1,10 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: alfresco-content-services-alfresco-cs-share + name: alfresco-content-services-share annotations: - external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-cs-share-hmpps-delius-alfresco-dev-green - nginx.ingress.kubernetes.io/whitelist-source-range: "3.11.29.246,18.130.165.209,35.178.35.115,35.178.209.113,3.8.51.207,35.177.252.54,35.176.93.186/32,35.177.125.252/32,35.177.137.160/32,81.134.202.29/32,51.149.250.0/24,51.149.251.0/24,213.121.161.112/28,217.33.148.210/32,13.43.9.198/32,13.42.163.245/32,18.132.208.127/32,51.149.249.0/29,51.149.249.32/29,194.33.192.0/25,194.33.193.0/25,194.33.196.0/25,194.33.197.0/25,195.59.75.0/24,194.33.248.0/29,194.33.249.0/29,62.25.106.209/32,195.92.40.49/32,62.25.109.197/32,195.92.38.16/28,212.137.36.230/32,78.33.10.50/31,78.33.10.52/30,78.33.10.56/30,78.33.10.60/32,78.33.32.99/32,78.33.32.100/30,78.33.32.104/30,78.33.32.108/32,83.98.63.176/29,194.75.210.216/29,217.138.45.109/32,217.138.45.110/32,34.241.149.106/32,52.210.79.20/32,54.228.134.38/32" + external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-share-hmpps-delius-alfresco-dev-green + nginx.ingress.kubernetes.io/whitelist-source-range: "placeholder" spec: rules: - host: share.hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk @@ -12,14 +12,14 @@ spec: paths: - backend: service: - name: alfresco-content-services-alfresco-cs-share + name: alfresco-content-service-share port: number: 80 path: / pathType: Prefix - backend: service: - name: alfresco-content-services-alfresco-cs-share + name: alfresco-content-services-share port: number: 80 path: /share/page/ diff --git a/kustomize/dev/values.yaml b/kustomize/dev/values.yaml index b777203..451a2ae 100644 --- a/kustomize/dev/values.yaml +++ b/kustomize/dev/values.yaml @@ -2,14 +2,16 @@ alfresco-repository: replicaCount: 2 image: + repository: 754256621582.dkr.ecr.eu-west-2.amazonaws.com/hmpps-migration/alfresco-content-repository tag: release_7.3.2_elasticsearch-r5.0.2-content-latest share: replicaCount: 1 image: - tag: release_7.3.2_elasticsearch-r5.0.2-share-latest + repository: 754256621582.dkr.ecr.eu-west-2.amazonaws.com/hmpps-migration/alfresco-share + tag: release_7.3.2_elasticsearch-r5.0.2-chart-7.0.3-share-latest externalPort: 443 global: known_urls: - - https://hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk - - https://share.hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk - - https://alf-sfs.dev.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk + - https://hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk + - https://share.hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk + - https://alf-sfs.dev.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk diff --git a/kustomize/preprod/alf-prop-config-map.yaml b/kustomize/preprod/alf-prop-config-map.yaml index 8e9a9e6..c7a1c01 100644 --- a/kustomize/preprod/alf-prop-config-map.yaml +++ b/kustomize/preprod/alf-prop-config-map.yaml @@ -2,18 +2,18 @@ apiVersion: v1 kind: ConfigMap metadata: name: alf-prop-config-map -data: - alfresco-global.properties: | +data: + alfresco-global.properties: | deployment.method=HELM_CHART alfresco.cluster.enabled=true - alfresco.host=hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk + alfresco.host=hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk alfresco.protocol=https alfresco.port=443 - aos.baseUrlOverwrite=https://hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk/alfresco/aos - csrf.filter.origin=https://hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk - csrf.filter.referer=https://hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk/.* + aos.baseUrlOverwrite=https://hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk/alfresco/aos + csrf.filter.origin=https://hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk + csrf.filter.referer=https://hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk/.* share.protocol=https - share.host=hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk + share.host=hmpps-delius-alfresco-dev.apps.live.cloud-platform.service.justice.gov.uk share.port=443 local.transform.service.enabled=true transform.service.enabled=false @@ -24,7 +24,7 @@ data: localTransform.tika.url=http://alfresco-content-services-tika localTransform.misc.url=http://alfresco-content-services-transform-misc events.subsystem.autoStart=false - + #Zaizi additions zaizi.noms.root.folder=NOMS zaizi.noms.crn.pattern=([A-Z])([0-9]{3})([0-9]{3})