From 55285738158711133e077c9187abd4cddb6acc6e Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Thu, 3 Dec 2020 13:48:23 -0800 Subject: [PATCH 01/13] To trigger SB build in Dev --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 66110fefd..7f8f39d53 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Schoolbus Inspection Tracking System +# Schoolbus Inspection Tracking System 2.0 ## Introduction From 6840435b30e435ada928134fe00b80aa56107a95 Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Tue, 16 Feb 2021 13:20:16 -0800 Subject: [PATCH 02/13] OCP4 migration --- .jenkins/.pipeline/lib/build.js | 82 ++++++++++------- .jenkins/.pipeline/lib/clean.js | 33 ++++--- .jenkins/.pipeline/lib/config.js | 6 +- .jenkins/.pipeline/lib/deploy.js | 102 +++++++++++++--------- .jenkins/openshift/build-master.yaml | 4 +- .jenkins/openshift/deploy-master.yaml | 2 +- .pipeline/lib/config.js | 40 ++++----- .pipeline/package-lock.json | 32 ++----- .pipeline/package.json | 2 +- .yo-rc.json | 20 ++--- README.md | 2 +- client/Dockerfile | 4 +- client/package-lock.json | 6 +- openshift/README.md | 2 +- openshift/backup-deploy-config.yaml | 2 +- openshift/configmaps/api-appsettings.yaml | 2 +- openshift/postgresql-deploy-config.yaml | 4 +- 17 files changed, 189 insertions(+), 156 deletions(-) diff --git a/.jenkins/.pipeline/lib/build.js b/.jenkins/.pipeline/lib/build.js index afedb5956..6aeae569c 100644 --- a/.jenkins/.pipeline/lib/build.js +++ b/.jenkins/.pipeline/lib/build.js @@ -1,36 +1,56 @@ -'use strict'; -const {OpenShiftClientX} = require('@bcgov/pipeline-cli') -const path = require('path'); +"use strict"; +const { OpenShiftClientX } = require("@bcgov/pipeline-cli"); +const path = require("path"); -module.exports = (settings)=>{ - const phases=settings.phases - const options = settings.options - const oc=new OpenShiftClientX(Object.assign({'namespace':phases.build.namespace}, options)); - const phase='build' - var objects = [] +module.exports = (settings) => { + const phases = settings.phases; + const options = settings.options; + const oc = new OpenShiftClientX( + Object.assign({ namespace: phases.build.namespace }, options) + ); + const phase = "build"; + var objects = []; - const templatesLocalBaseUrl =oc.toFileUrl(path.resolve(__dirname, '../../openshift')) + const templatesLocalBaseUrl = oc.toFileUrl( + path.resolve(__dirname, "../../openshift") + ); - objects.push(...oc.processDeploymentTemplate(`${templatesLocalBaseUrl}/build-master.yaml`, { - 'param':{ - 'NAME': phases[phase].name, - 'SUFFIX': phases[phase].suffix, - 'VERSION': phases[phase].tag, - 'SOURCE_REPOSITORY_URL': oc.git.http_url, - 'SOURCE_REPOSITORY_REF': oc.git.ref - } - })); + objects.push( + ...oc.processDeploymentTemplate( + `${templatesLocalBaseUrl}/build-master.yaml`, + { + param: { + NAME: phases[phase].name, + SUFFIX: phases[phase].suffix, + VERSION: phases[phase].tag, + SOURCE_REPOSITORY_URL: oc.git.http_url, + SOURCE_REPOSITORY_REF: oc.git.ref, + }, + } + ) + ); - objects.push(...oc.processDeploymentTemplate(`${templatesLocalBaseUrl}/build-slave.yaml`, { - 'param':{ - 'NAME': phases[phase].name, - 'SUFFIX': phases[phase].suffix, - 'VERSION': phases[phase].tag, - 'SOURCE_IMAGE_STREAM_TAG': `${phases[phase].name}:${phases[phase].tag}`, - 'SLAVE_NAME':'main' - } - })); + objects.push( + ...oc.processDeploymentTemplate( + `${templatesLocalBaseUrl}/build-slave.yaml`, + { + param: { + NAME: phases[phase].name, + SUFFIX: phases[phase].suffix, + VERSION: phases[phase].tag, + SOURCE_IMAGE_STREAM_TAG: `${phases[phase].name}:${phases[phase].tag}`, + SLAVE_NAME: "main", + }, + } + ) + ); - oc.applyRecommendedLabels(objects, phases[phase].name, phase, phases[phase].changeId, phases[phase].instance) - oc.applyAndBuild(objects) -} \ No newline at end of file + oc.applyRecommendedLabels( + objects, + phases[phase].name, + phase, + phases[phase].changeId, + phases[phase].instance + ); + oc.applyAndBuild(objects); +}; diff --git a/.jenkins/.pipeline/lib/clean.js b/.jenkins/.pipeline/lib/clean.js index 4dcff16f6..990583838 100644 --- a/.jenkins/.pipeline/lib/clean.js +++ b/.jenkins/.pipeline/lib/clean.js @@ -15,13 +15,15 @@ const getTargetPhases = (env, phases) => { return target_phase; }; -module.exports = settings => { +module.exports = (settings) => { const phases = settings.phases; const options = settings.options; - const oc = new OpenShiftClientX(Object.assign({ namespace: phases.build.namespace }, options)); + const oc = new OpenShiftClientX( + Object.assign({ namespace: phases.build.namespace }, options) + ); const target_phases = getTargetPhases(options.env, phases); - target_phases.forEach(k => { + target_phases.forEach((k) => { if (phases.hasOwnProperty(k)) { const phase = phases[k]; @@ -29,7 +31,7 @@ module.exports = settings => { selector: `app=${phase.instance},env-id=${phase.changeId},!shared,github-repo=${oc.git.repository},github-owner=${oc.git.owner}`, namespace: phase.namespace, }); - buildConfigs.forEach(bc => { + buildConfigs.forEach((bc) => { if (bc.spec.output.to.kind == "ImageStreamTag") { oc.delete([`ImageStreamTag/${bc.spec.output.to.name}`], { "ignore-not-found": "true", @@ -43,17 +45,20 @@ module.exports = settings => { selector: `app=${phase.instance},env-id=${phase.changeId},env-name=${k},!shared,github-repo=${oc.git.repository},github-owner=${oc.git.owner}`, namespace: phase.namespace, }); - deploymentConfigs.forEach(dc => { - dc.spec.triggers.forEach(trigger => { + deploymentConfigs.forEach((dc) => { + dc.spec.triggers.forEach((trigger) => { if ( trigger.type == "ImageChange" && trigger.imageChangeParams.from.kind == "ImageStreamTag" ) { - oc.delete([`ImageStreamTag/${trigger.imageChangeParams.from.name}`], { - "ignore-not-found": "true", - wait: "true", - namespace: phase.namespace, - }); + oc.delete( + [`ImageStreamTag/${trigger.imageChangeParams.from.name}`], + { + "ignore-not-found": "true", + wait: "true", + namespace: phase.namespace, + } + ); } }); }); @@ -65,12 +70,14 @@ module.exports = settings => { }); oc.raw( "delete", - ["pvc,Secret,configmap,endpoints,RoleBinding,role,ServiceAccount,Endpoints"], + [ + "pvc,Secret,configmap,endpoints,RoleBinding,role,ServiceAccount,Endpoints", + ], { selector: `app=${phase.instance},env-id=${phase.changeId},!shared,github-repo=${oc.git.repository},github-owner=${oc.git.owner}`, wait: "true", namespace: phase.namespace, - }, + } ); } }); diff --git a/.jenkins/.pipeline/lib/config.js b/.jenkins/.pipeline/lib/config.js index 56e43f0b7..8d0d29f76 100644 --- a/.jenkins/.pipeline/lib/config.js +++ b/.jenkins/.pipeline/lib/config.js @@ -6,7 +6,7 @@ const name = "jenkins"; const phases = { build: { - namespace: "tran-schoolbus-tools", + namespace: "e82e9a-tools", name: `${name}`, phase: "build", changeId: changeId, @@ -16,7 +16,7 @@ const phases = { tag: `build-${version}-${changeId}`, }, dev: { - namespace: "tran-schoolbus-tools", + namespace: "e82e9a-tools", name: `${name}`, phase: "dev", changeId: changeId, @@ -26,7 +26,7 @@ const phases = { tag: `dev-${version}-${changeId}`, }, prod: { - namespace: "tran-schoolbus-tools", + namespace: "e82e9a-tools", name: `${name}`, phase: "prod", changeId: changeId, diff --git a/.jenkins/.pipeline/lib/deploy.js b/.jenkins/.pipeline/lib/deploy.js index d7f0c022b..6d066a651 100644 --- a/.jenkins/.pipeline/lib/deploy.js +++ b/.jenkins/.pipeline/lib/deploy.js @@ -1,44 +1,68 @@ -'use strict'; -const {OpenShiftClientX} = require('@bcgov/pipeline-cli') -const path = require('path'); +"use strict"; +const { OpenShiftClientX } = require("@bcgov/pipeline-cli"); +const path = require("path"); -module.exports = (settings)=>{ - const phases = settings.phases - const options = settings.options - const phase=options.env - const changeId = phases[phase].changeId - const oc=new OpenShiftClientX(Object.assign({'namespace':phases[phase].namespace}, options)); - var objects = [] +module.exports = (settings) => { + const phases = settings.phases; + const options = settings.options; + const phase = options.env; + const changeId = phases[phase].changeId; + const oc = new OpenShiftClientX( + Object.assign({ namespace: phases[phase].namespace }, options) + ); + var objects = []; - const templatesLocalBaseUrl =oc.toFileUrl(path.resolve(__dirname, '../../openshift')) + const templatesLocalBaseUrl = oc.toFileUrl( + path.resolve(__dirname, "../../openshift") + ); - objects.push(...oc.processDeploymentTemplate(`${templatesLocalBaseUrl}/deploy-master.yaml`, { - 'param':{ - 'NAME': phases[phase].name, - 'SUFFIX': phases[phase].suffix, - 'VERSION': phases[phase].tag, - 'ENV_NAME': phases[phase].phase, - 'ROUTE_HOST': `${phases[phase].name}${phases[phase].suffix}-${phases[phase].namespace}.pathfinder.gov.bc.ca` - } - })) + objects.push( + ...oc.processDeploymentTemplate( + `${templatesLocalBaseUrl}/deploy-master.yaml`, + { + param: { + NAME: phases[phase].name, + SUFFIX: phases[phase].suffix, + VERSION: phases[phase].tag, + ENV_NAME: phases[phase].phase, + ROUTE_HOST: `${phases[phase].name}${phases[phase].suffix}-${phases[phase].namespace}.apps.silver.devops.gov.bc.ca`, + }, + } + ) + ); - objects.push(...oc.processDeploymentTemplate(`${templatesLocalBaseUrl}/deploy-slave.yaml`, { - 'param':{ - 'NAME': phases[phase].name, - 'SUFFIX': phases[phase].suffix, - 'VERSION': phases[phase].tag, - 'SLAVE_NAME': 'build', - 'SLAVE_LABELS': 'build deploy test ui-test', - 'SLAVE_EXECUTORS': '3', - 'CPU_REQUEST': '300m', - 'CPU_LIMIT': '500m', - 'MEMORY_REQUEST': '2Gi', - 'MEMORY_LIMIT': '2Gi' - } - })) + objects.push( + ...oc.processDeploymentTemplate( + `${templatesLocalBaseUrl}/deploy-slave.yaml`, + { + param: { + NAME: phases[phase].name, + SUFFIX: phases[phase].suffix, + VERSION: phases[phase].tag, + SLAVE_NAME: "build", + SLAVE_LABELS: "build deploy test ui-test", + SLAVE_EXECUTORS: "3", + CPU_REQUEST: "300m", + CPU_LIMIT: "500m", + MEMORY_REQUEST: "2Gi", + MEMORY_LIMIT: "2Gi", + }, + } + ) + ); - oc.applyRecommendedLabels(objects, phases[phase].name, phase, `${changeId}`, phases[phase].instance) - oc.importImageStreams(objects, phases[phase].tag, phases.build.namespace, phases.build.tag) - oc.applyAndDeploy(objects, phases[phase].instance) - -} \ No newline at end of file + oc.applyRecommendedLabels( + objects, + phases[phase].name, + phase, + `${changeId}`, + phases[phase].instance + ); + oc.importImageStreams( + objects, + phases[phase].tag, + phases.build.namespace, + phases.build.tag + ); + oc.applyAndDeploy(objects, phases[phase].instance); +}; diff --git a/.jenkins/openshift/build-master.yaml b/.jenkins/openshift/build-master.yaml index 83ee1e4ce..8f2ca0613 100644 --- a/.jenkins/openshift/build-master.yaml +++ b/.jenkins/openshift/build-master.yaml @@ -70,10 +70,10 @@ parameters: value: v1.0.0 - name: SOURCE_IMAGE_STREAM_NAMESPACE required: true - value: bcgov + value: e82e9a-tools - name: SOURCE_IMAGE_STREAM_TAG required: true - value: jenkins-basic:v2-latest + value: jenkins-basic:55 - name: SOURCE_REPOSITORY_URL required: true - name: SOURCE_REPOSITORY_REF diff --git a/.jenkins/openshift/deploy-master.yaml b/.jenkins/openshift/deploy-master.yaml index 07046e994..02876929e 100644 --- a/.jenkins/openshift/deploy-master.yaml +++ b/.jenkins/openshift/deploy-master.yaml @@ -143,7 +143,7 @@ objects: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - - mountPath: /var/lib/jenkins/jobs + - mountPath: /var/jenkins-data name: jenkins-jobs readOnly: false - mountPath: /var/run/pod diff --git a/.pipeline/lib/config.js b/.pipeline/lib/config.js index 46af82feb..5d9b3842b 100644 --- a/.pipeline/lib/config.js +++ b/.pipeline/lib/config.js @@ -2,12 +2,12 @@ const options = require("@bcgov/pipeline-cli").Util.parseArguments(); const changeId = options.pr; //aka pull-request -const version = "1.4.0"; +const version = "2.0.0"; const name = "sbi"; //project name prefix const phases = { build: { - namespace: "tran-schoolbus-tools", + namespace: "e82e9a-tools", name: `${name}`, phase: "build", changeId: changeId, @@ -18,7 +18,7 @@ const phases = { transient: true, }, dev: { - namespace: "tran-schoolbus-dev", + namespace: "e82e9a-dev", name: `${name}`, phase: "dev", changeId: changeId, @@ -26,17 +26,17 @@ const phases = { instance: `${name}-dev-${changeId}`, version: `${version}-${changeId}`, tag: `dev-${version}-${changeId}`, - host: `cerberus-${changeId}-tran-schoolbus-dev.pathfinder.gov.bc.ca`, + host: `sbi-${changeId}-e82e9a-dev.apps.silver.devops.gov.bc.ca`, dotnet_env: "Development", dbUser: "userUXN", - dbSize: "1Gi", + dbSize: "5Gi", transient: true, - backupVolume: "bk-tran-schoolbus-dev-1unden2n8ik4", - backupVolumeSize: "1Gi", - verificationVolumeSize: "1Gi", + backupVolume: "pvc-56371d6d-44e5-440d-905e-6e8c1f9e0271", + backupVolumeSize: "5Gi", + verificationVolumeSize: "5Gi", }, test: { - namespace: "tran-schoolbus-test", + namespace: "e82e9a-test", name: `${name}`, phase: "test", changeId: changeId, @@ -44,16 +44,16 @@ const phases = { instance: `${name}-test`, version: `${version}`, tag: `test-${version}`, - host: `cerberus-tran-schoolbus-tst.pathfinder.gov.bc.ca`, + host: `sbi-e82e9a-test.apps.silver.devops.gov.bc.ca`, dbUser: "user7KU", - dbSize: "1Gi", + dbSize: "5Gi", dotnet_env: "Staging", - backupVolume: "bk-tran-schoolbus-test-wrpk9cgnxdxu", - backupVolumeSize: "1Gi", - verificationVolumeSize: "1Gi", + backupVolume: "pvc-f3aeceba-1c76-44c0-8f24-041fd244e704", + backupVolumeSize: "5Gi", + verificationVolumeSize: "5Gi", }, prod: { - namespace: "tran-schoolbus-prod", + namespace: "e82e9a-prod", name: `${name}`, phase: "prod", changeId: changeId, @@ -61,13 +61,13 @@ const phases = { instance: `${name}-prod`, version: `${version}`, tag: `prod-${version}`, - host: `cerberus-tran-schoolbus-prd.pathfinder.gov.bc.ca`, + host: `sbi-e82e9a-prod.apps.silver.devops.gov.bc.ca`, dbUser: "userKIX", - dbSize: "50Gi", + dbSize: "25Gi", dotnet_env: "Production", - backupVolume: "bk-tran-schoolbus-prod-ak9opru2trr6", - backupVolumeSize: "5Gi", - verificationVolumeSize: "50Gi", + backupVolume: "pvc-c97e77b7-98fb-4666-821c-afeb7d098764", + backupVolumeSize: "25Gi", + verificationVolumeSize: "25Gi", }, }; diff --git a/.pipeline/package-lock.json b/.pipeline/package-lock.json index e92aa5ed4..7ad1e2f08 100644 --- a/.pipeline/package-lock.json +++ b/.pipeline/package-lock.json @@ -18,11 +18,11 @@ } }, "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { - "follow-redirects": "1.5.10" + "follow-redirects": "^1.10.0" } }, "debug": { @@ -34,27 +34,9 @@ } }, "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", + "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==" }, "lodash": { "version": "4.17.19", diff --git a/.pipeline/package.json b/.pipeline/package.json index 72368d87f..1cf85353b 100644 --- a/.pipeline/package.json +++ b/.pipeline/package.json @@ -19,7 +19,7 @@ "license": "Apache-2.0", "dependencies": { "@bcgov/pipeline-cli": "^1.0.1-0", - "axios": "^0.19.2", + "axios": "^0.21.1", "lodash": "^4.17.19" } } diff --git a/.yo-rc.json b/.yo-rc.json index 285b367fd..136973f8c 100644 --- a/.yo-rc.json +++ b/.yo-rc.json @@ -5,17 +5,17 @@ "jenkins": { "path": ".jenkins", "name": "jenkins", - "namespace": "tran-schoolbus-tools", + "namespace": "e82e9a-tools", "version": "1.0.0", "environments": { "build": { - "namespace": "tran-schoolbus-tools" + "namespace": "e82e9a-tools" }, "dev": { - "namespace": "tran-schoolbus-tools" + "namespace": "e82e9a-tools" }, "prod": { - "namespace": "tran-schoolbus-tools" + "namespace": "e82e9a-tools" } }, "jenkinsJobName": "_jenkins", @@ -30,21 +30,21 @@ "path": ".", "environments": { "build": { - "namespace": "tran-schoolbus-tools" + "namespace": "e82e9a-tools" }, "dev": { - "namespace": "tran-schoolbus-dev" + "namespace": "e82e9a-dev" }, "test": { - "namespace": "tran-schoolbus-test" + "namespace": "e82e9a-test" }, "prod": { - "namespace": "tran-schoolbus-prod" + "namespace": "e82e9a-prod" } } }, ".": { - "jenkinsJobName": "sb", + "jenkinsJobName": "sbi", "github_owner": "bcgov", "github_repo": "schoolbus", "jenkinsFilePath": "Jenkinsfile", @@ -53,4 +53,4 @@ } } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 7f8f39d53..35b1b191f 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Use the following steps to configure the local development environment # use port value from step 3 REACT_APP_API_HOST=http://localhost: - REACT_APP_SSO_HOST=https://sso-dev.pathfinder.gov.bc.ca/auth + REACT_APP_SSO_HOST=https://dev.oidc.gov.bc.ca/auth REACT_APP_SSO_CLIENT= REACT_APP_SSO_REALM= diff --git a/client/Dockerfile b/client/Dockerfile index 50b4662a8..786bec6bd 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,4 +1,4 @@ -FROM node:13.7-alpine3.11 AS builder +FROM docker.io/node:13.7-alpine3.11 AS builder LABEL maintainer="neal.li@gov.bc.ca" COPY . ./src @@ -7,7 +7,7 @@ RUN cd ./src && npm ci && \ npm run build -FROM docker-registry.default.svc:5000/tran-schoolbus-tools/nginx-116-rhel8:1 +FROM image-registry.openshift-image-registry.svc:5000/e82e9a-tools/nginx-116-rhel8:1 COPY --from=builder /src/build/. /tmp/src COPY --from=builder /src/nginx-start/. /tmp/src/nginx-start diff --git a/client/package-lock.json b/client/package-lock.json index 8f31c4858..e33417ce6 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -7163,9 +7163,9 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "inquirer": { "version": "7.3.3", diff --git a/openshift/README.md b/openshift/README.md index 2c7b4f6f2..5eab140e8 100644 --- a/openshift/README.md +++ b/openshift/README.md @@ -73,7 +73,7 @@ type: Opaque ### Configure Pipeline-cli -The `.jenkins` and `.pipeline` directories contain the scripts genereated by the BCDK tool in order to use pipeline-cli against your OpenShift namespaces. The scripts in the `.jenkins` and `.pipeline` directories in this repository are configured to run against the official SBI OpenShift namespaces (`tran-schoolbus-`). +The `.jenkins` and `.pipeline` directories contain the scripts genereated by the BCDK tool in order to use pipeline-cli against your OpenShift namespaces. The scripts in the `.jenkins` and `.pipeline` directories in this repository are configured to run against the official SBI OpenShift namespaces (`e82e9a-`). You will need to configure the scripts in the `.jenkins` and `.pipeline` directories to work with your OpenShift namespaces. There are two ways to do this: diff --git a/openshift/backup-deploy-config.yaml b/openshift/backup-deploy-config.yaml index fd605ae8b..89c71854a 100644 --- a/openshift/backup-deploy-config.yaml +++ b/openshift/backup-deploy-config.yaml @@ -69,7 +69,7 @@ objects: path: "${CONFIG_FILE_NAME}" containers: - name: "backup" - image: docker-registry.default.svc:5000/tran-schoolbus-tools/${NAME}:latest + image: image-registry.openshift-image-registry.svc:5000/e82e9a-tools/${NAME}:latest ports: [] env: - name: BACKUP_STRATEGY diff --git a/openshift/configmaps/api-appsettings.yaml b/openshift/configmaps/api-appsettings.yaml index a7ced909c..5b958da0e 100644 --- a/openshift/configmaps/api-appsettings.yaml +++ b/openshift/configmaps/api-appsettings.yaml @@ -46,7 +46,7 @@ objects: "Schoolbus": "Host=localhost;Username=test1;Password=test1;Database=test1" }, "JWT": { - "Authority": "https://sso-dev.pathfinder.gov.bc.ca/auth/realms/", + "Authority": "https://dev.oidc.gov.bc.ca/auth/realms/", "Audience": "" }, "CCW_USER_ID": "user", diff --git a/openshift/postgresql-deploy-config.yaml b/openshift/postgresql-deploy-config.yaml index 3949eca3d..3b7788a6a 100644 --- a/openshift/postgresql-deploy-config.yaml +++ b/openshift/postgresql-deploy-config.yaml @@ -26,7 +26,7 @@ objects: deploymentconfig: ${NAME}-${ENV} spec: containers: - - image: docker-registry.default.svc:5000/tran-schoolbus-tools/${IMAGE_STREAM_TAG} + - image: image-registry.openshift-image-registry.svc:5000/e82e9a-tools/${IMAGE_STREAM_TAG} imagePullPolicy: IfNotPresent name: ${NAME}-${ENV} env: @@ -102,7 +102,7 @@ objects: from: kind: ImageStreamTag name: ${IMAGE_STREAM_TAG} - namespace: tran-schoolbus-tools + namespace: e82e9a-tools type: ImageChange - kind: PersistentVolumeClaim apiVersion: v1 From 24a540719884d465964118cc79447ffded595d97 Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Wed, 17 Feb 2021 07:55:30 -0800 Subject: [PATCH 03/13] keycloak-service-account --- .pipeline/lib/keycloak.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pipeline/lib/keycloak.js b/.pipeline/lib/keycloak.js index 4151f0b90..7d4710dec 100644 --- a/.pipeline/lib/keycloak.js +++ b/.pipeline/lib/keycloak.js @@ -32,7 +32,7 @@ module.exports = class KeyCloakClient { const secret = util.getSecret( this.oc, this.phases.build.namespace, - "keycloak-service-client" + "keycloak-service-account" ); this.clientId = Buffer.from(secret.clientId, "base64").toString(); From af749280642dfcf07d8a5c886375b5453c6320cb Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Wed, 17 Feb 2021 08:33:33 -0800 Subject: [PATCH 04/13] node image from tools space --- client/Dockerfile | 4 ++-- openshift/client-build-config.yaml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/client/Dockerfile b/client/Dockerfile index 786bec6bd..0cc939e1b 100644 --- a/client/Dockerfile +++ b/client/Dockerfile @@ -1,5 +1,5 @@ -FROM docker.io/node:13.7-alpine3.11 AS builder -LABEL maintainer="neal.li@gov.bc.ca" +FROM image-registry.openshift-image-registry.svc:5000/e82e9a-tools/node:1 AS builder +LABEL maintainer="young-jin.chung@gov.bc.ca" COPY . ./src diff --git a/openshift/client-build-config.yaml b/openshift/client-build-config.yaml index 61b171744..f4f2dc088 100644 --- a/openshift/client-build-config.yaml +++ b/openshift/client-build-config.yaml @@ -6,6 +6,21 @@ metadata: labels: template: client-build objects: + - apiVersion: "v1" + kind: ImageStream + metadata: + name: node + spec: + lookupPolicy: + local: false + tags: + - annotations: null + from: + kind: DockerImage + name: docker.io/node:13.7-alpine3.11 + name: "1" + referencePolicy: + type: Local - apiVersion: "v1" kind: ImageStream metadata: From 0873560aa075227848797bdf764be14a01a8c797 Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Wed, 17 Feb 2021 10:25:44 -0800 Subject: [PATCH 05/13] node for PDF --- openshift/pdf-build-config.yaml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/openshift/pdf-build-config.yaml b/openshift/pdf-build-config.yaml index 8d6a05048..d6212fb37 100644 --- a/openshift/pdf-build-config.yaml +++ b/openshift/pdf-build-config.yaml @@ -6,23 +6,6 @@ metadata: labels: template: pdf-build objects: - - apiVersion: v1 - kind: ImageStream - metadata: - name: nodejs-10-rhel7 - labels: - shared: "true" - spec: - lookupPolicy: - local: false - tags: - - annotations: null - from: - kind: DockerImage - name: registry.redhat.io/rhscl/nodejs-10-rhel7 - name: "1-47" - referencePolicy: - type: Local - apiVersion: v1 kind: BuildConfig metadata: @@ -56,7 +39,10 @@ objects: sourceStrategy: from: kind: ImageStreamTag - name: "nodejs-10-rhel7:1-47" + name: docker.io/node:13.7-alpine3.11 + name: "1" + referencePolicy: + type: Local parameters: - description: Name of the project (SCHOOLBUS) displayName: PROJECT_NAME From eb2c357e38eb646ee3cacda993c501bcfd89e846 Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Wed, 17 Feb 2021 12:09:49 -0800 Subject: [PATCH 06/13] OCP4 build sucess --- .pipeline/lib/build.js | 10 +++++----- openshift/client-build-config.yaml | 5 ----- openshift/pdf-build-config.yaml | 32 ++++++++++++++++++++++++++---- 3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/.pipeline/lib/build.js b/.pipeline/lib/build.js index d82f10e17..c9dc36e47 100644 --- a/.pipeline/lib/build.js +++ b/.pipeline/lib/build.js @@ -45,11 +45,10 @@ module.exports = (settings) => { objects.push( ...oc.processDeploymentTemplate( - `${templatesLocalBaseUrl}/pdf-build-config.yaml`, + `${templatesLocalBaseUrl}/client-build-config.yaml`, { param: { - PROJECT_NAME: `${phases[phase].name}`, - NAME: `${settings.phases[phase].name}-pdf`, + NAME: `${settings.phases[phase].name}-client`, SUFFIX: settings.phases[phase].suffix, VERSION: settings.phases[phase].tag, SOURCE_REPOSITORY_URL: `${oc.git.uri}`, @@ -61,10 +60,11 @@ module.exports = (settings) => { objects.push( ...oc.processDeploymentTemplate( - `${templatesLocalBaseUrl}/client-build-config.yaml`, + `${templatesLocalBaseUrl}/pdf-build-config.yaml`, { param: { - NAME: `${settings.phases[phase].name}-client`, + PROJECT_NAME: `${phases[phase].name}`, + NAME: `${settings.phases[phase].name}-pdf`, SUFFIX: settings.phases[phase].suffix, VERSION: settings.phases[phase].tag, SOURCE_REPOSITORY_URL: `${oc.git.uri}`, diff --git a/openshift/client-build-config.yaml b/openshift/client-build-config.yaml index f4f2dc088..5507b035f 100644 --- a/openshift/client-build-config.yaml +++ b/openshift/client-build-config.yaml @@ -68,11 +68,6 @@ objects: cpu: 1 memory: 2Gi postCommit: {} - resources: - requests: - cpu: 1 - limits: - cpu: 2 source: git: uri: ${SOURCE_REPOSITORY_URL} diff --git a/openshift/pdf-build-config.yaml b/openshift/pdf-build-config.yaml index d6212fb37..7f21ca91c 100644 --- a/openshift/pdf-build-config.yaml +++ b/openshift/pdf-build-config.yaml @@ -6,6 +6,33 @@ metadata: labels: template: pdf-build objects: + - apiVersion: v1 + kind: ImageStream + metadata: + creationTimestamp: null + labels: + shared: "true" + name: ${NAME} + spec: + lookupPolicy: + local: false + - apiVersion: "v1" + kind: ImageStream + metadata: + name: nodejs-10-rhel7 + labels: + shared: "true" + spec: + lookupPolicy: + local: false + tags: + - annotations: null + from: + kind: DockerImage + name: registry.redhat.io/rhscl/nodejs-10-rhel7 + name: "1-47" + referencePolicy: + type: Local - apiVersion: v1 kind: BuildConfig metadata: @@ -39,10 +66,7 @@ objects: sourceStrategy: from: kind: ImageStreamTag - name: docker.io/node:13.7-alpine3.11 - name: "1" - referencePolicy: - type: Local + name: "nodejs-10-rhel7:1-47" parameters: - description: Name of the project (SCHOOLBUS) displayName: PROJECT_NAME From 011b5b28875516f1ef916f11782ed7bf33e24c62 Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Wed, 17 Feb 2021 14:46:32 -0800 Subject: [PATCH 07/13] db backup config --- .pipeline/lib/config.js | 6 +- openshift/backup-build-config.json | Bin 0 -> 4768 bytes openshift/backup-build-config.yaml | 86 ---------------------------- openshift/backup-deploy-config.yaml | 26 +++++++-- 4 files changed, 24 insertions(+), 94 deletions(-) create mode 100644 openshift/backup-build-config.json delete mode 100644 openshift/backup-build-config.yaml diff --git a/.pipeline/lib/config.js b/.pipeline/lib/config.js index 5d9b3842b..261a6e815 100644 --- a/.pipeline/lib/config.js +++ b/.pipeline/lib/config.js @@ -31,7 +31,7 @@ const phases = { dbUser: "userUXN", dbSize: "5Gi", transient: true, - backupVolume: "pvc-56371d6d-44e5-440d-905e-6e8c1f9e0271", + backupVolume: "schoolbus", backupVolumeSize: "5Gi", verificationVolumeSize: "5Gi", }, @@ -48,7 +48,7 @@ const phases = { dbUser: "user7KU", dbSize: "5Gi", dotnet_env: "Staging", - backupVolume: "pvc-f3aeceba-1c76-44c0-8f24-041fd244e704", + backupVolume: "schoolbus", backupVolumeSize: "5Gi", verificationVolumeSize: "5Gi", }, @@ -65,7 +65,7 @@ const phases = { dbUser: "userKIX", dbSize: "25Gi", dotnet_env: "Production", - backupVolume: "pvc-c97e77b7-98fb-4666-821c-afeb7d098764", + backupVolume: "schoolbus", backupVolumeSize: "25Gi", verificationVolumeSize: "25Gi", }, diff --git a/openshift/backup-build-config.json b/openshift/backup-build-config.json new file mode 100644 index 0000000000000000000000000000000000000000..d74e1c6f611027873a1da073c12508e16dcdace6 GIT binary patch literal 4768 zcmeHLOK;Oa5S}v<{{iipG;LH-=&?jXNJvy_#RYM2Op{nm>@<%GRQ0a|-?!_@`W0s# zaze;T#<6GT`OVC3e*b!sm-0eh<(H9rNhFo;V&oFfjC{iHm8^01y22UB0`I=aoh-qT zNQQN~>QT-bR?NY>mI%@#OC9%O?W)_GhpE*nVQ7ZsJF z)a1xmSi6W4#oP#X#=!3ep7vnz2L8`1l0)KG#h~h|QUjbYnqKb;x)Q6=>o<*fRayIV zF=9kyock6QZ)PgPj0s?@$e z#64#$t3Sp44L;=KRM&a>Mow{s<$)b9!&)banquh6(7#=lyUvpgRkKEaTmw#Fe`RcC$Gy z?!q)fyLxj~o3V3#1qmD6#nvyC(KZq4a)@7NgQB(@PE;bRglKbC3<6QFtChO0J%?Y* z?L;+lE+1fJ*Q|x*!)xXa@&O(=j2tr>XGe|3;Gk%PpduW7MdTfZJJ%~&kw1X{A@Zx8 z&PX49Faw_M@s>}!W^z)hsSwW<1xj6gjdL^;m65I4L+tS~S*ygcJM&H9H#_tSzx%kH z)l(pFgp-k*Ieoc8pWv){l+Tv8kGFmY+_QWs&Bq`&msgPYOT_+IqbQ+c8y{Tc*fu!?Aju4y2W@gAIj4;8{AoyE2k(mEH>@2XntFM K`pxFRJ^KTtX7mXF literal 0 HcmV?d00001 diff --git a/openshift/backup-build-config.yaml b/openshift/backup-build-config.yaml deleted file mode 100644 index 8d15605f9..000000000 --- a/openshift/backup-build-config.yaml +++ /dev/null @@ -1,86 +0,0 @@ -apiVersion: v1 -kind: Template -metadata: - creationTimestamp: null - name: ${NAME}-build-template -labels: - template: backup-build -objects: - - apiVersion: v1 - kind: ImageStream - metadata: - creationTimestamp: null - labels: - shared: "true" - name: ${NAME} - spec: - lookupPolicy: - local: false - - apiVersion: v1 - kind: BuildConfig - metadata: - creationTimestamp: null - labels: - build: ${NAME}${SUFFIX} - name: ${NAME}${SUFFIX} - spec: - nodeSelector: null - completionDeadlineSeconds: 600 - output: - to: - kind: ImageStreamTag - name: ${NAME}:${VERSION} - resources: - limits: - cpu: 2 - memory: 4Gi - requests: - cpu: 1 - memory: 2Gi - postCommit: {} - source: - git: - uri: ${SOURCE_REPOSITORY_URL} - ref: ${SOURCE_REPOSITORY_REF} - type: Git - contextDir: ${SOURCE_CONTEXT_DIR} - strategy: - dockerStrategy: - dockerfilePath: ${DOCKER_FILE_PATH} - type: "Docker" -parameters: - - description: A name used for all objects - displayName: Name - name: NAME - required: false - value: "sbi-backup" - - description: A name suffix used for all objects - displayName: Suffix - name: SUFFIX - required: false - value: "-dev" - - description: A version used for the image tags - displayName: version - name: VERSION - required: false - value: "latest" - - description: SOURCE_REPOSITORY_URL - displayName: SOURCE_REPOSITORY_URL - name: SOURCE_REPOSITORY_URL - required: false - value: "https://github.com/BCDevOps/backup-container.git" - - description: SOURCE_REPOSITORY_REF - displayName: SOURCE_REPOSITORY_REF - name: SOURCE_REPOSITORY_REF - required: false - value: "" - - description: SOURCE_CONTEXT_DIR - displayName: SOURCE_CONTEXT_DIR - name: SOURCE_CONTEXT_DIR - required: false - value: "docker" - - description: DOCKER_FILE_PATH - displayName: DOCKER_FILE_PATH - name: DOCKER_FILE_PATH - required: true - value: "Dockerfile" diff --git a/openshift/backup-deploy-config.yaml b/openshift/backup-deploy-config.yaml index 89c71854a..65fb3edbf 100644 --- a/openshift/backup-deploy-config.yaml +++ b/openshift/backup-deploy-config.yaml @@ -9,6 +9,22 @@ objects: name: ${CONFIG_MAP_NAME}-${ENV} data: "${CONFIG_FILE_NAME}": "${PROJECT_NAME}-${DB_NAME}-${ENV}/${DATABASE_NAME}\n0 23 * * * default ./backup.sh -s" + - kind: PersistentVolumeClaim + apiVersion: v1 + metadata: + name: "${NAME}-${BACKUP_VOLUME_NAME}" + labels: + app: "${NAME}-persistent" + template: "${NAME}-persistent-template" + labels: + shared: "true" + spec: + storageClassName: "${BACKUP_VOLUME_CLASS}" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: "${BACKUP_VOLUME_SIZE}" - kind: PersistentVolumeClaim apiVersion: v1 metadata: @@ -55,9 +71,9 @@ objects: name: "${NAME}-${ENV}" spec: volumes: - - name: "${BACKUP_VOLUME_NAME}" + - name: "${NAME}-${BACKUP_VOLUME_NAME}" persistentVolumeClaim: - claimName: "${BACKUP_VOLUME_NAME}" + claimName: "${NAME}-${BACKUP_VOLUME_NAME}" - name: "${NAME}-${VERIFICATION_VOLUME_NAME}" persistentVolumeClaim: claimName: "${NAME}-${VERIFICATION_VOLUME_NAME}" @@ -133,7 +149,7 @@ objects: cpu: "${CPU_LIMIT}" memory: "${MEMORY_LIMIT}" volumeMounts: - - name: "${BACKUP_VOLUME_NAME}" + - name: "${NAME}-${BACKUP_VOLUME_NAME}" mountPath: "${BACKUP_DIR}" - name: "${NAME}-${VERIFICATION_VOLUME_NAME}" mountPath: "${VERIFICATION_VOLUME_MOUNT_PATH}" @@ -359,7 +375,7 @@ parameters: MUST be taken from the manually provisioned claim; nfs-backup storage MUST be provisioned manually. required: true - value: backup + value: sbi-backup-schoolbus - name: BACKUP_VOLUME_SIZE displayName: Backup Volume Size description: @@ -377,7 +393,7 @@ parameters: via the 'BC Gov NFS Storage' template. nfs-backup storage CANNOT be automatically provisioned by this template. required: true - value: nfs-backup + value: netapp-file-backup - name: VERIFICATION_VOLUME_NAME displayName: Verification Volume Name description: From bec1e9f1aa1862cc8b6c9e33c0c384b3b6189ffd Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Wed, 17 Feb 2021 15:46:25 -0800 Subject: [PATCH 08/13] OCP4 migration - DC success --- openshift/api-deploy-config.yaml | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/openshift/api-deploy-config.yaml b/openshift/api-deploy-config.yaml index 978c32f18..2448581b6 100644 --- a/openshift/api-deploy-config.yaml +++ b/openshift/api-deploy-config.yaml @@ -16,18 +16,6 @@ objects: spec: lookupPolicy: local: false - - apiVersion: v1 #pvc: api-docs-pvc - kind: PersistentVolumeClaim - metadata: - name: ${NAME}-${ENV}-docs-pvc - labels: - shared: "true" - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: "${DOCUMENT_VOLUME_CAPACITY}" - apiVersion: v1 #dc: api kind: DeploymentConfig metadata: @@ -135,8 +123,6 @@ objects: - name: ASPNETCORE_ENVIRONMENT value: ${ASPNETCORE_ENVIRONMENT} volumeMounts: - - name: server-docs - mountPath: "/uploads" - name: secret-volume mountPath: "/secrets" readOnly: true @@ -144,9 +130,6 @@ objects: mountPath: /opt/app-root/configmap readOnly: true volumes: - - name: server-docs - persistentVolumeClaim: - claimName: ${NAME}-${ENV}-docs-pvc - name: secret-volume secret: secretName: schoolbus-secret @@ -239,9 +222,4 @@ parameters: The name assigned to all of the CCW microservice objects defined in this template. required: true - value: ccw - - name: DOCUMENT_VOLUME_CAPACITY - displayName: Document Volume Capacity - description: Volume space available for Document uploads, e.g. 512Mi, 2Gi. - value: 1Gi - required: true + value: ccw \ No newline at end of file From 1fee49676aef71b34e79ccfad8c1d40eb56ba3e5 Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Thu, 18 Feb 2021 08:15:26 -0800 Subject: [PATCH 09/13] DB size --- .pipeline/lib/config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipeline/lib/config.js b/.pipeline/lib/config.js index 261a6e815..5aefba3ae 100644 --- a/.pipeline/lib/config.js +++ b/.pipeline/lib/config.js @@ -63,11 +63,11 @@ const phases = { tag: `prod-${version}`, host: `sbi-e82e9a-prod.apps.silver.devops.gov.bc.ca`, dbUser: "userKIX", - dbSize: "25Gi", + dbSize: "10Gi", dotnet_env: "Production", backupVolume: "schoolbus", - backupVolumeSize: "25Gi", - verificationVolumeSize: "25Gi", + backupVolumeSize: "10Gi", + verificationVolumeSize: "10Gi", }, }; From e159f0ac077b6460c490375dec5be07a9fcbb4bc Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Thu, 18 Feb 2021 08:27:09 -0800 Subject: [PATCH 10/13] DB size fix --- .pipeline/lib/config.js | 6 +++--- Jenkinsfile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.pipeline/lib/config.js b/.pipeline/lib/config.js index 5aefba3ae..d07f5c917 100644 --- a/.pipeline/lib/config.js +++ b/.pipeline/lib/config.js @@ -63,11 +63,11 @@ const phases = { tag: `prod-${version}`, host: `sbi-e82e9a-prod.apps.silver.devops.gov.bc.ca`, dbUser: "userKIX", - dbSize: "10Gi", + dbSize: "25Gi", dotnet_env: "Production", backupVolume: "schoolbus", - backupVolumeSize: "10Gi", - verificationVolumeSize: "10Gi", + backupVolumeSize: "25Gi", + verificationVolumeSize: "5Gi", }, }; diff --git a/Jenkinsfile b/Jenkinsfile index 3e1994fd9..c80fdd1a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -53,7 +53,7 @@ pipeline { beforeInput true } input { - message "Should we continue with deployment to TEST?" + message "Should we continue with deployment to PROD?" ok "Yes!" } steps { From d71fe1f7e54858d31e9b5b72948cf3445e6ea8b5 Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Thu, 18 Feb 2021 08:50:08 -0800 Subject: [PATCH 11/13] persistant storage less than 50G --- .pipeline/lib/config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pipeline/lib/config.js b/.pipeline/lib/config.js index d07f5c917..5aefba3ae 100644 --- a/.pipeline/lib/config.js +++ b/.pipeline/lib/config.js @@ -63,11 +63,11 @@ const phases = { tag: `prod-${version}`, host: `sbi-e82e9a-prod.apps.silver.devops.gov.bc.ca`, dbUser: "userKIX", - dbSize: "25Gi", + dbSize: "10Gi", dotnet_env: "Production", backupVolume: "schoolbus", - backupVolumeSize: "25Gi", - verificationVolumeSize: "5Gi", + backupVolumeSize: "10Gi", + verificationVolumeSize: "10Gi", }, }; From 8cdccbf9586bd07bada906118689e22eab48ebbd Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Fri, 12 Mar 2021 14:59:58 -0800 Subject: [PATCH 12/13] db backup volume name fix --- openshift/backup-deploy-config.yaml | 8 ++++---- openshift/secrets/db-postgresql-secrets.yaml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openshift/backup-deploy-config.yaml b/openshift/backup-deploy-config.yaml index 65fb3edbf..ade918a03 100644 --- a/openshift/backup-deploy-config.yaml +++ b/openshift/backup-deploy-config.yaml @@ -12,7 +12,7 @@ objects: - kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: "${NAME}-${BACKUP_VOLUME_NAME}" + name: "${NAME}-${BACKUP_VOLUME_NAME}-${ENV}" labels: app: "${NAME}-persistent" template: "${NAME}-persistent-template" @@ -28,7 +28,7 @@ objects: - kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: "${NAME}-${VERIFICATION_VOLUME_NAME}" + name: "${NAME}-${VERIFICATION_VOLUME_NAME}-${ENV}" labels: app: "${NAME}-persistent" template: "${NAME}-persistent-template" @@ -73,10 +73,10 @@ objects: volumes: - name: "${NAME}-${BACKUP_VOLUME_NAME}" persistentVolumeClaim: - claimName: "${NAME}-${BACKUP_VOLUME_NAME}" + claimName: "${NAME}-${BACKUP_VOLUME_NAME}-${ENV}" - name: "${NAME}-${VERIFICATION_VOLUME_NAME}" persistentVolumeClaim: - claimName: "${NAME}-${VERIFICATION_VOLUME_NAME}" + claimName: "${NAME}-${VERIFICATION_VOLUME_NAME}-${ENV}" - name: "${NAME}-config-volume" configMap: name: "${CONFIG_MAP_NAME}-${ENV}" diff --git a/openshift/secrets/db-postgresql-secrets.yaml b/openshift/secrets/db-postgresql-secrets.yaml index b438cfcfd..30420f950 100644 --- a/openshift/secrets/db-postgresql-secrets.yaml +++ b/openshift/secrets/db-postgresql-secrets.yaml @@ -7,14 +7,14 @@ objects: - kind: Secret apiVersion: v1 metadata: - name: ${NAME}${SUFFIX} + name: ${NAME}-${ENV} selector: - deploymentconfig: ${NAME}${SUFFIX} + deploymentconfig: ${NAME}-${ENV} stringData: admin-password: "${POSTGRESQL_ADMIN_PASSWORD}" database-password: "${POSTGRESQL_PASSWORD}" database-user: "${POSTGRESQL_USER}" - connection-string: "User ID=${POSTGRESQL_USER};Password=${POSTGRESQL_PASSWORD};Host=${NAME}${SUFFIX};Port=5432;Database=${POSTGRESQL_DATABASE_NAME}" + connection-string: "User ID=${POSTGRESQL_USER};Password=${POSTGRESQL_PASSWORD};Host=${NAME}-${ENV};Port=5432;Database=${POSTGRESQL_DATABASE_NAME}" type: Opaque parameters: - description: Name of the project (SCHOOLBUS) From 003d49fe57215ac1a4b7efd90fdd8a55e6a5cf2f Mon Sep 17 00:00:00 2001 From: Young-Jin Chung Date: Fri, 9 Apr 2021 10:45:18 -0700 Subject: [PATCH 13/13] npm audit fix --- client/package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index e33417ce6..a4e19f0cf 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -4926,23 +4926,23 @@ "integrity": "sha512-0nCJ7cSqnkMC+kUuPs0YgklFHraWGl/xHqtZWWtOeVtyi+YqkoAOMGuZQad43DscXCQI/yizcTa3u6B5r+BLww==" }, "elliptic": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", - "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", + "bn.js": "^4.11.9", + "brorand": "^1.1.0", "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" }, "dependencies": { "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, @@ -15220,9 +15220,9 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" }, "yallist": { "version": "4.0.0",