Skip to content

Commit 2613862

Browse files
authored
Merge pull request #536 from bcgov/yj
Yj
2 parents 5a03c27 + 12d7a25 commit 2613862

File tree

11 files changed

+58
-55
lines changed

11 files changed

+58
-55
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# House-Policy-STRDSS
2+
23
Short Term Rental Data Sharing System (STRDSS)
34

45
## Create Release Tag Procedure

backup-container/README.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,10 @@ Short Term Rental Data Sharing System (STRDSS) is using an customized version of
66

77
### 1. [Dockerfile](./src/docker/Dockerfile)
88

9-
Installed postgis extension
9+
Docker image to postgresql-16:16
1010

1111
```docker
12-
RUN dnf install -y curl util-linux postgis && \
13-
curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/bin/mc && \
14-
chmod +x /usr/bin/mc /usr/bin/go-crond && \
15-
dnf clean all && \
16-
rm -rf /var/cache/dnf && \
17-
echo $TZ > /etc/timezone
12+
FROM --platform=linux/amd64 quay.io/fedora/postgresql-16:16
1813
```
1914

2015
### 2. [backup.postgres.plugin](./src/docker/backup.postgres.plugin)
@@ -36,17 +31,6 @@ Set owner
3631
fi
3732
```
3833

39-
Added POSTGRESQL_EXTENSIONS for verification
40-
41-
```sh
42-
# Start a local PostgreSql instance
43-
POSTGRESQL_DATABASE=$(getDatabaseName "${_databaseSpec}") \
44-
POSTGRESQL_USER=$(getDatabaseName "${_databaseSpec}") \
45-
POSTGRESQL_PASSWORD=$(getPassword "${_databaseSpec}") \
46-
POSTGRESQL_EXTENSIONS=postgis \
47-
run-postgresql >/dev/null 2>&1 &
48-
```
49-
5034
## Docker build and push to the Artifactory
5135

5236
cd into [docker](./src/docker/)

backup-container/helm/backup-storage/values.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
image:
66
repository: artifacts.developer.gov.bc.ca/sf4a-strdss/backup-container
77
pullPolicy: Always
8-
tag: latest
8+
tag: 16
99

1010
imagePullSecrets:
1111
- name: jf-rg-secret
@@ -16,7 +16,6 @@ backupConfig: |
1616
postgres=patroni-postgresql-gw:5432/gw
1717
1818
0 1 * * * default ./backup.sh -s
19-
0 4 * * * default ./backup.sh -s -v all
2019
2120
config:
2221
[]
@@ -32,12 +31,6 @@ persistence:
3231
mountPath: /backups/
3332
storageClassName: netapp-block-standard
3433
storageAccessMode: ReadWriteOnce
35-
verification:
36-
size: 2Gi
37-
mountPath: /var/lib/pgsql/data
38-
storageClassName: netapp-block-standard
39-
storageAccessMode: ReadWriteOnce
40-
4134
db:
4235
secretName: "patroni"
4336
usernameKey: "username-superuser"

backup-container/helm/dev-values.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,23 @@ global:
99
nameOverride: strdssdev-backup
1010
fullnameOverride: strdssdev-backup
1111

12+
dbService: strdssdev
13+
1214
backupConfig: |
1315
postgres=strdssdev:5432/strdssdev
1416
1517
0 1 * * * default ./backup.sh -s
16-
0 4 * * * default ./backup.sh -s -v all
1718
1819
db:
1920
secretName: strdssdev
2021
passwordKey: postgres-password
2122

2223
persistence:
2324
backup:
24-
size: 700Mi
25+
size: 1Gi
2526
mountPath: /backups/
2627
storageClassName: netapp-file-backup
2728
storageAccessMode: ReadWriteOnce
28-
verification:
29-
size: 512Mi
30-
mountPath: /var/lib/pgsql/data
31-
storageClassName: netapp-block-standard
32-
storageAccessMode: ReadWriteOnce
3329

3430
env:
3531
DATABASE_SERVICE_NAME:
@@ -40,4 +36,4 @@ env:
4036
value: "dev"
4137
backup-storage:
4238
labels:
43-
DataClass: "Medium"
39+
DataClass: "Medium"

backup-container/helm/prod-values.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,23 @@ global:
99
nameOverride: strdssprod-backup
1010
fullnameOverride: strdssprod-backup
1111

12+
dbService: strdssprod
13+
1214
backupConfig: |
1315
postgres=strdssprod:5432/strdssprod
1416
1517
0 1 * * * default ./backup.sh -s
16-
0 4 * * * default ./backup.sh -s -v all
1718
1819
db:
1920
secretName: strdssprod
2021
passwordKey: postgres-password
2122

2223
persistence:
2324
backup:
24-
size: 700Mi
25+
size: 1Gi
2526
mountPath: /backups/
2627
storageClassName: netapp-file-backup
2728
storageAccessMode: ReadWriteOnce
28-
verification:
29-
size: 512Mi
30-
mountPath: /var/lib/pgsql/data
31-
storageClassName: netapp-block-standard
32-
storageAccessMode: ReadWriteOnce
3329

3430
env:
3531
DATABASE_SERVICE_NAME:

backup-container/helm/uat-values.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,23 @@ global:
99
nameOverride: strdssuat-backup
1010
fullnameOverride: strdssuat-backup
1111

12+
dbService: strdssuat
13+
1214
backupConfig: |
1315
postgres=strdssuat:5432/strdssuat
1416
1517
0 1 * * * default ./backup.sh -s
16-
0 4 * * * default ./backup.sh -s -v all
1718
1819
db:
1920
secretName: strdssuat
2021
passwordKey: postgres-password
2122

2223
persistence:
2324
backup:
24-
size: 700Mi
25+
size: 1Gi
2526
mountPath: /backups/
2627
storageClassName: netapp-file-backup
2728
storageAccessMode: ReadWriteOnce
28-
verification:
29-
size: 512Mi
30-
mountPath: /var/lib/pgsql/data
31-
storageClassName: netapp-block-standard
32-
storageAccessMode: ReadWriteOnce
3329

3430
env:
3531
DATABASE_SERVICE_NAME:

backup-container/src/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This image provides a postgres installation from which to run backups
2-
FROM --platform=linux/amd64 quay.io/fedora/postgresql-15:15
2+
FROM --platform=linux/amd64 quay.io/fedora/postgresql-16:16
33

44
# Change timezone to PST for convenience
55
ENV TZ=America/Los_Angeles
@@ -22,7 +22,7 @@ ADD https://github.com/$SOURCE_REPO/go-crond/releases/download/$GOCROND_VERSION/
2222

2323
USER root
2424

25-
RUN dnf install -y curl util-linux postgis && \
25+
RUN dnf install -y curl util-linux && \
2626
curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/bin/mc && \
2727
chmod +x /usr/bin/mc /usr/bin/go-crond && \
2828
dnf clean all && \

backup-container/src/docker/backup.postgres.plugin

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ function onStartServer(){
143143
POSTGRESQL_DATABASE=$(getDatabaseName "${_databaseSpec}") \
144144
POSTGRESQL_USER=$(getDatabaseName "${_databaseSpec}") \
145145
POSTGRESQL_PASSWORD=$(getPassword "${_databaseSpec}") \
146-
POSTGRESQL_EXTENSIONS=postgis \
147146
run-postgresql >/dev/null 2>&1 &
148147
)
149148
}

postgres/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
# Postgres
22

3-
Short Term Rental Data Sharing System (STRDSS) is using bitnami/postgresql with chart version 12.12.10
3+
Short Term Rental Data Sharing System (STRDSS) is using bitnami/postgresql with chart version 15.5.20
44

55
## List Helm Chart Versions
66

77
```sh
88
helm search repo bitnami/postgresql --versions
9-
helm show values bitnami/postgresql --version 12.12.10
9+
helm show values bitnami/postgresql --version 15.5.20
1010
```
1111

1212
## Get Image Version
1313

1414
```sh
15-
helm show values bitnami/postgresql --version 12.12.10 | yq eval '.image' -
15+
helm show values bitnami/postgresql --version 15.5.20 | yq eval '.image' -
1616
```
1717

1818
## Helm deploy
1919

2020
```sh
21-
helm upgrade --install strdssdev bitnami/postgresql -f values-dev.yaml --version 12.12.10
21+
helm upgrade --install strdssdev bitnami/postgresql -f values-dev.yaml --version 15.5.20
2222
```
2323

2424
## Database Setup

server/StrDss.Service/Bceid/BceidApi.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ private void RefreshCache(object source, ElapsedEventArgs e)
9494

9595
request.onlineServiceId = _client.Osid;
9696

97+
_client.Endpoint.EndpointBehaviors.Add(new LoggingEndpointBehavior());
98+
9799
_logger.LogInformation($"[Egress] Calling BCeID web service: {_client.Endpoint.Address}");
98100

99101
var response = await _client.getAccountDetailAsync(request);

0 commit comments

Comments
 (0)