Skip to content

Commit

Permalink
Update readme (#117)
Browse files Browse the repository at this point in the history
* fix: matrix env typo (#110)

* chore: add awscli to utils container (#111)

* correct values for preprod

* move to config map as source of truth

* create config map with correct values in it and update size limit

---------

Co-authored-by: Andrew Moore <[email protected]>
  • Loading branch information
georgepstaylor and andrewmooreio authored Dec 5, 2024
1 parent 4491bcb commit 098625d
Show file tree
Hide file tree
Showing 28 changed files with 166 additions and 115 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/opensearch-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- test
- stage
- preprod
- prod

jobs:
backup:
Expand All @@ -24,7 +25,7 @@ jobs:

strategy:
matrix:
environment: ${{ github.event_name == 'schedule' && fromJson('["poc," "dev", "test", "stage"]') || fromJson(format('["{0}"]', github.event.inputs.environment)) }}
environment: ${{ github.event_name == 'schedule' && fromJson('["poc", "dev", "test", "stage"]') || fromJson(format('["{0}"]', github.event.inputs.environment)) }}

environment: ${{ matrix.environment }}-preapproved

Expand Down
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ tasks:
simple_reindex:
cmds:
- |
helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromId=52000000" --set "toId=53000000" --namespace {{.NAMESPACE}}
helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromId=150000000" --set "toId=200000000" --namespace {{.NAMESPACE}}
reindex_list:
cmds:
Expand Down Expand Up @@ -193,7 +193,7 @@ tasks:
simple_reindex_date:
cmds:
- |
helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex_date --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromTime=201711280001" --set "toTime=201712280001" --namespace {{.NAMESPACE}}
helm install "reindex-default-$(openssl rand -hex 4)" ./jobs/reindex_date --set "global.elasticsearch.host={{.OPENSEARCH_HOST}}" --set "fromTime=201707030001" --set "toTime=201707121301" --namespace {{.NAMESPACE}}
simple_reindex_date_metadata-only:
cmds:
Expand Down
2 changes: 1 addition & 1 deletion jobs/reindex-list/templates/reindexing-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data:
ELASTICSEARCH_INDEXNAME: "{{ .Values.indexName }}"
{{ template "alfresco-search-enterprise.config.spring" . }}
ALFRESCO_SHAREDFILESTORE_BASEURL: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file/
ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://alfresco-content-services-alfresco-router/transform/config
ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://alfresco-content-services-transform-router/transform/config
ALFRESCO_REINDEX_PATHINDEXINGENABLED: {{ .Values.pathIndexingEnabled | quote }}
SPRING_DATASOURCE_URL: {{ .Values.postgresql.url }}
{{- if .Values.environment }}
Expand Down
2 changes: 1 addition & 1 deletion jobs/reindex_date/templates/reindexing-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data:
ELASTICSEARCH_INDEXNAME: "{{ .Values.indexName }}"
{{ template "alfresco-search-enterprise.config.spring" . }}
ALFRESCO_SHAREDFILESTORE_BASEURL: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file/
ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://alfresco-content-services-alfresco-router/transform/config
ALFRESCO_ACCEPTEDCONTENTMEDIATYPESCACHE_BASEURL: http://alfresco-content-services-transform-router/transform/config
ALFRESCO_REINDEX_PATHINDEXINGENABLED: {{ .Values.pathIndexingEnabled | quote }}
SPRING_DATASOURCE_URL: {{ .Values.postgresql.url }}
{{- if .Values.environment }}
Expand Down
11 changes: 8 additions & 3 deletions kustomize/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ resources:
patches:
- path: patch-ingress-repository.yaml
- path: patch-ingress-share.yaml
- path: patch-live-path-indexing.yaml
- path: patch-live-metadata-indexing.yaml
- path: patch-live-content-indexing.yaml
- path: patch-live-indexing-path.yaml
- path: patch-live-indexing-metadata.yaml
- path: patch-live-indexing-mediation.yaml
- path: patch-live-indexing-content.yaml
- path: patch-router.yaml
- path: patch-tika.yaml
- path: patch-transform-misc.yaml
- path: patch-transform-libreoffice.yaml
- path: patch-transform-imagemagick.yaml
5 changes: 5 additions & 0 deletions kustomize/base/patch-delete-reindexing-config-map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$patch: delete
apiVersion: v1
kind: ConfigMap
metadata:
name: alfresco-content-services-alfresco-search-enterprise-reindexing-configmap
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
value: "60000" # 60 seconds expiry timeout
- name: JAVA_OPTS
value: "-Dspring.activemq.packages.trustAll=true"
# - name: INPUT_ALFRESCO_CONTENT_BATCH_EVENT_CHANNEL
# value: sjms-batch:contentstore.event?completionTimeout=1000&completionSize=10&aggregationStrategy=#eventAggregator&?consumerCount=20
- name: ALFRESCO_SHAREDFILESTORE_BASEURL
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ metadata:
name: alfresco-search-enterprise-mediation
spec:
serviceName: alfresco-search-enterprise-mediation
selector:
matchLabels:
app: alfresco-search-enterprise-mediation
strategy:
type: Recreate
template:
Expand All @@ -24,5 +21,8 @@ spec:
value: "60000" # 60 seconds expiry timeout
- name: JAVA_OPTS
value: "-Dspring.activemq.packages.trustAll=true"
# - name: INPUT_ALFRESCO_MEDIATION_BATCH_EVENT_CHANNEL
# value: sjms-batch:mediation.event?completionTimeout=1000&completionSize=10&aggregationStrategy=#eventAggregator&consumerCount=20
- name: ALFRESCO_SHAREDFILESTORE_BASEURL
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ spec:
value: "60000" # 60 seconds expiry timeout
- name: JAVA_OPTS
value: "-Dspring.activemq.packages.trustAll=true"
# - name: INPUT_ALFRESCO_METADATA_BATCH_EVENT_CHANNEL
# value: sjms-batch:metadata.event?completionTimeout=1000&completionSize=10&aggregationStrategy=#eventAggregator&?consumerCount=20
- name: ALFRESCO_SHAREDFILESTORE_BASEURL
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@ spec:
containers:
- name: alfresco-search-enterprise-path
env:
- name: JAVA_OPTS
value: "-Dspring.activemq.packages.trustAll=true"
- name: ALFRESCO_SHAREDFILESTORE_BASEURL
value: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file/
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API
22 changes: 0 additions & 22 deletions kustomize/base/patch-live-path-indexing.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions kustomize/base/patch-router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ spec:
value: "30000" # 30 seconds idle timeout
- name: SPRING_ACTIVEMQ_POOL_EXPIRY_TIMEOUT
value: "60000" # 60 seconds expiry timeout
- name: FILE_STORE_URL
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ spec:
- name: alfresco-transform-service
env:
- name: FILE_STORE_URL
value: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ spec:
- name: alfresco-transform-service
env:
- name: FILE_STORE_URL
value: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API

Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ spec:
- name: alfresco-transform-service
env:
- name: FILE_STORE_URL
value: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ spec:
- name: alfresco-transform-service
env:
- name: FILE_STORE_URL
value: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file
valueFrom:
configMapKeyRef:
name: alfresco-infrastructure
key: SFS_URL_API
4 changes: 2 additions & 2 deletions kustomize/base/values703.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ alfresco-repository:
# image: set by environment values file
configuration:
repository:
existingConfigMap: repository
existingConfigMap: alf-prop-config-map
existingSecrets:
- name: alfresco-license
key: Alfresco-ent73-NOMSNationalOffenderManagementService-Expires10.03.2025.lic
Expand Down Expand Up @@ -181,7 +181,7 @@ alfresco-repository:
persistence:
# -- Persist repository data
enabled: false
baseSize: 20Gi
baseSize: 100Gi
# -- Specify a storageClass for dynamic provisioning
accessModes:
- ReadWriteOnce
Expand Down
80 changes: 80 additions & 0 deletions kustomize/preprod/alf-prop-config-map.yaml
Original file line number Diff line number Diff line change
@@ -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
10 changes: 1 addition & 9 deletions kustomize/preprod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ kind: Kustomization

resources:
- ../base
- alf-prop-config-map.yaml

patches:
- path: patch-ingress-repository.yaml
- path: patch-ingress-share.yaml
# - path: patch-live-indexing-path.yaml
# - path: patch-live-indexing-content.yaml
# - path: patch-live-indexing-mediation.yaml
# - path: patch-live-indexing-metadata.yaml
- path: patch-router.yaml
- path: patch-tika.yaml
- path: patch-transform-misc.yaml
- path: patch-transform-libreoffice.yaml
- path: patch-transform-imagemagick.yaml
- path: patch-infra-config-map.yaml

3 changes: 2 additions & 1 deletion kustomize/preprod/patch-infra-config-map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: ConfigMap
metadata:
name: alfresco-infrastructure
data:
SFS_URL: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file/
SFS_URL: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/
SFS_URL_API: https://alf-sfs.preprod.delius-core.hmpps-preproduction.modernisation-platform.service.justice.gov.uk/alfresco/api/-default-/private/sfs/versions/1/file/
2 changes: 1 addition & 1 deletion kustomize/preprod/patch-ingress-repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: alfresco-content-services-alfresco-repository
annotations:
external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-alfresco-repository-hmpps-delius-alfresco-preprod-green
nginx.ingress.kubernetes.io/whitelist-source-range: "placeholder"
nginx.ingress.kubernetes.io/whitelist-source-range: "3.10.104.193,3.11.26.150,18.130.189.137,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"
spec:
rules:
- host: hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk
Expand Down
2 changes: 1 addition & 1 deletion kustomize/preprod/patch-ingress-share.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: alfresco-content-services-share
annotations:
external-dns.alpha.kubernetes.io/set-identifier: alfresco-content-services-share-hmpps-delius-alfresco-preprod-green
nginx.ingress.kubernetes.io/whitelist-source-range: "placeholder"
nginx.ingress.kubernetes.io/whitelist-source-range: "3.10.104.193,3.11.26.150,18.130.189.137,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"
spec:
rules:
- host: share.hmpps-delius-alfresco-preprod.apps.live.cloud-platform.service.justice.gov.uk
Expand Down
12 changes: 0 additions & 12 deletions kustomize/preprod/patch-live-indexing-content.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions kustomize/preprod/patch-live-indexing-mediation.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions kustomize/preprod/patch-live-indexing-metadata.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions kustomize/preprod/patch-router.yaml

This file was deleted.

Loading

0 comments on commit 098625d

Please sign in to comment.