-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tracking pull request to bring release-1.6.23 to master (#1709)
* udpate to KNP (#1705) * Update nagios for rabbitmq (#1706) * Maintenance page (#1707) * Fixing the minio issue by removing the headers for keycloak when uploading (#1708) * Changed the fix to use transformrequest instead (#1710) * Upload Fix (#1711) * Changed the fix to use transformrequest instead * Fixed upload not uploading anything * pipeline updates
- Loading branch information
1 parent
7026e46
commit ed39730
Showing
33 changed files
with
1,340 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
'use strict'; | ||
const settings = require('./lib/config.js') | ||
const task = require('./lib/clean-nsps.js') | ||
const task = require('./lib/clean-knps.js') | ||
|
||
task(Object.assign(settings, { phase: settings.options.env})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
'use strict'; | ||
const settings = require('./lib/config.js') | ||
const task = require('./lib/deploy-nsps.js') | ||
const task = require('./lib/deploy-db.js') | ||
|
||
task(Object.assign(settings, { phase: settings.options.env})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
'use strict'; | ||
const settings = require('./lib/config.js') | ||
const task = require('./lib/deploy-knps.js') | ||
|
||
task(Object.assign(settings, { phase: settings.options.env})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
"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)); | ||
|
||
const templatesLocalBaseUrl = oc.toFileUrl(path.resolve(__dirname, "../../openshift-v4")); | ||
var objects = []; | ||
|
||
//The deployment of your cool app goes here ▼▼▼ | ||
|
||
if(phases[phase].phase === 'dev') { | ||
|
||
//deploy Patroni | ||
objects = objects.concat(oc.processDeploymentTemplate(`${templatesLocalBaseUrl}/templates/patroni/deployment-prereq.yaml`, { | ||
'param': { | ||
'NAME': 'patroni', | ||
'SUFFIX': phases[phase].suffix | ||
} | ||
})) | ||
objects = objects.concat(oc.processDeploymentTemplate(`${templatesLocalBaseUrl}/templates/patroni/deployment.yaml`, { | ||
'param': { | ||
'NAME': 'patroni', | ||
'ENV_NAME': phases[phase].phase, | ||
'SUFFIX': phases[phase].suffix, | ||
'CPU_REQUEST': phases[phase].patroniCpuRequest, | ||
'CPU_LIMIT': phases[phase].patroniCpuLimit, | ||
'MEMORY_REQUEST': phases[phase].patroniMemoryRequest, | ||
'MEMORY_LIMIT': phases[phase].patroniMemoryLimit, | ||
'IMAGE_REGISTRY': 'image-registry.openshift-image-registry.svc:5000', | ||
'IMAGE_STREAM_NAMESPACE': phases[phase].namespace, | ||
'IMAGE_STREAM_TAG': 'patroni:v10-stable', | ||
'REPLICA': phases[phase].patroniReplica, | ||
'PVC_SIZE': phases[phase].patroniPvcSize, | ||
'STORAGE_CLASS': phases[phase].storageClass | ||
} | ||
})) | ||
|
||
//deploy rabbitmq, use docker image directly | ||
//POST_START_SLEEP is harded coded in the rabbitmq template, replacement was not successful | ||
objects = objects.concat(oc.processDeploymentTemplate(`${templatesLocalBaseUrl}/templates/rabbitmq/rabbitmq-cluster-dc.yaml`, { | ||
'param': { | ||
'NAME': phases[phase].name, | ||
'ENV_NAME': phases[phase].phase, | ||
'SUFFIX': phases[phase].suffix, | ||
'NAMESPACE': phases[phase].namespace, | ||
'CLUSTER_NAME': 'rabbitmq-cluster', | ||
'ISTAG': 'rabbitmq:3.8.3-management', | ||
'SERVICE_ACCOUNT': 'rabbitmq-discovery', | ||
'VOLUME_SIZE': phases[phase].rabbitmqPvcSize, | ||
'CPU_REQUEST': phases[phase].rabbitmqCpuRequest, | ||
'CPU_LIMIT': phases[phase].rabbitmqCpuLimit, | ||
'MEMORY_REQUEST': phases[phase].rabbitmqMemoryRequest, | ||
'MEMORY_LIMIT': phases[phase].rabbitmqMemoryLimit, | ||
'REPLICA': phases[phase].rabbitmqReplica, | ||
'POST_START_SLEEP': phases[phase].rabbitmqPostStartSleep, | ||
'STORAGE_CLASS': phases[phase].storageClass | ||
} | ||
})) | ||
} | ||
|
||
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); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
## Create tracking PR | ||
* Create release branch from master and make it as the default branch | ||
* Create a Tracking PR to bring the release branch to master | ||
* All other PRs target the release PR | ||
* Only deploy the Tracking PR to Dev, test and Prod, not any other single PR | ||
|
||
## Build tracking PR | ||
* Update .pipeline/config.js releaseBranch to be the release branch | ||
* Under .pipeline, npm run build -- --pr= --env=build | ||
|
||
## Deploy tracking PR | ||
|
||
### deploy database for the PR on Dev | ||
* Create knps for the PR | ||
npm run deploy-knps -- --pr= --env=dev | ||
* Deploy the patroni | ||
npm run deploy-db -- --pr= --env=dev | ||
* Update user and restore the backup to database | ||
Refer to the last section of openshift-v4/templates/patroni/README.md, remember to verify the Dev database user | ||
* Add tfrs user and /tfrs vhost to rabbitmq | ||
Refer to the last section of penshift-v4/templates/rabbitmq | ||
* Deploy PR | ||
npm run deploy -- --pr= --env=dev | ||
|
||
### deploy database for the PR on Test or Prod | ||
* Only need to deploy compiled components, nothing else as all others are already there | ||
npm run deploy -- --pr= --env=test | ||
npm run deploy -- --pr= --env=prod | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.