-
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.
Update readme.md build-on-dev (#2435)
- Loading branch information
1 parent
d69b95d
commit 1d95850
Showing
7 changed files
with
230 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -20,4 +20,5 @@ After the release is deployed on Prod | |
## Update frontend/package.json | ||
* version | ||
|
||
TBV | ||
|
||
|
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,14 @@ | ||
FROM artifacts.developer.gov.bc.ca/docker-remote/python:3.9.15 | ||
RUN apt-get update \ | ||
&& apt-get install -y git \ | ||
&& apt-get install -y supervisor | ||
WORKDIR /app/tfrs | ||
COPY . . | ||
COPY ./security-scan/scan-handler/celery.conf /etc/supervisor/conf.d | ||
RUN pip install --upgrade pip \ | ||
&& pip install -r backend/requirements.txt \ | ||
&& chgrp -R root /var/log/supervisor \ | ||
&& chmod -R g+w /var/log/supervisor \ | ||
&& chmod -R g+w /run || : \ | ||
&& chmod -R g+w /app | ||
CMD ["supervisord"] |
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,89 @@ | ||
--- | ||
kind: Template | ||
apiVersion: template.openshift.io/v1 | ||
metadata: | ||
name: celery-bc | ||
creationTimestamp: | ||
parameters: | ||
- name: NAME | ||
displayName: | ||
description: the module name entered when run yo bcdk:pipeline, which is tfrs | ||
required: true | ||
- name: SUFFIX | ||
displayName: | ||
description: sample is -pr-0 | ||
required: true | ||
- name: VERSION | ||
displayName: | ||
description: image tag name for output | ||
required: true | ||
- name: GIT_URL | ||
displayName: | ||
description: tfrs repo | ||
required: true | ||
- name: GIT_REF | ||
displayName: | ||
description: tfrs repo ref | ||
required: true | ||
objects: | ||
- apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
annotations: | ||
description: Keeps track of changes in the celery image | ||
labels: | ||
shared: "true" | ||
creationTimestamp: null | ||
name: ${NAME}-celery | ||
spec: | ||
lookupPolicy: | ||
local: false | ||
status: | ||
dockerImageRepository: "" | ||
- kind: BuildConfig | ||
apiVersion: build.openshift.io/v1 | ||
metadata: | ||
name: ${NAME}-celery${SUFFIX} | ||
creationTimestamp: | ||
spec: | ||
triggers: [] | ||
runPolicy: Serial | ||
source: | ||
git: | ||
uri: ${GIT_URL} | ||
ref: ${GIT_REF} | ||
type: Git | ||
strategy: | ||
type: Docker | ||
dockerStrategy: | ||
dockerfilePath: openshift-v4/templates/celery/Dockerfile | ||
noCache: true | ||
env: | ||
- name: ARTIFACTORY_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: artifacts-default-cgcynz | ||
key: username | ||
- name: ARTIFACTORY_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: artifacts-default-cgcynz | ||
key: password | ||
forcePull: true | ||
output: | ||
to: | ||
kind: ImageStreamTag | ||
name: ${NAME}-celery:${VERSION} | ||
resources: | ||
limits: | ||
cpu: 1500m | ||
memory: 1300Mi | ||
requests: | ||
cpu: 750m | ||
memory: 650Mi | ||
postCommit: {} | ||
nodeSelector: | ||
successfulBuildsHistoryLimit: 5 | ||
failedBuildsHistoryLimit: 5 | ||
status: | ||
lastVersion: 0 |
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,21 @@ | ||
[supervisord] | ||
nodaemon=true | ||
|
||
[group:server] | ||
programs=celerybeat,celeryworker | ||
|
||
[program:celerybeat] | ||
command=celery -A tfrs beat --loglevel=INFO | ||
startsecs=5 | ||
redirect_stderr=true | ||
stdout_logfile=/dev/fd/1 | ||
stdout_logfile_maxbytes=0 | ||
directory=/app/tfrs/backend | ||
|
||
[program:celeryworker] | ||
command=celery -A tfrs worker --loglevel=INFO -E | ||
startsecs=5 | ||
redirect_stderr=true | ||
stdout_logfile=/dev/fd/1 | ||
stdout_logfile_maxbytes=0 | ||
directory=/app/tfrs/backend |
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,14 @@ | ||
FROM artifacts.developer.gov.bc.ca/docker-remote/python:3.9.15 | ||
RUN apt-get update \ | ||
&& apt-get install -y git \ | ||
&& apt-get install -y supervisor | ||
WORKDIR /app/tfrs | ||
COPY . . | ||
COPY security-scan/scan-handler/scan-handler.conf /etc/supervisor/conf.d | ||
RUN pip install --upgrade pip \ | ||
&& pip install -r backend/requirements.txt \ | ||
&& chgrp -R root /var/log/supervisor \ | ||
&& chmod -R g+w /var/log/supervisor \ | ||
&& chmod -R g+w /run || : \ | ||
&& chmod -R g+w /app | ||
CMD ["supervisord"] |
89 changes: 89 additions & 0 deletions
89
openshift-v4/templates/scan-handler/scan-handler-bc-docker.yaml
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,89 @@ | ||
--- | ||
kind: Template | ||
apiVersion: template.openshift.io/v1 | ||
metadata: | ||
name: scan-handler-bc | ||
creationTimestamp: | ||
parameters: | ||
- name: NAME | ||
displayName: | ||
description: the module name entered when run yo bcdk:pipeline, which is tfrs | ||
required: true | ||
- name: SUFFIX | ||
displayName: | ||
description: sample is -pr-0 | ||
required: true | ||
- name: VERSION | ||
displayName: | ||
description: image tag name for output | ||
required: true | ||
- name: GIT_URL | ||
displayName: | ||
description: tfrs repo | ||
required: true | ||
- name: GIT_REF | ||
displayName: | ||
description: tfrs repo ref | ||
required: true | ||
objects: | ||
- apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
annotations: | ||
description: Keeps track of changes in the celery image | ||
labels: | ||
shared: "true" | ||
creationTimestamp: null | ||
name: ${NAME}-scan-handler | ||
spec: | ||
lookupPolicy: | ||
local: false | ||
status: | ||
dockerImageRepository: "" | ||
- kind: BuildConfig | ||
apiVersion: build.openshift.io/v1 | ||
metadata: | ||
name: ${NAME}-scan-handler${SUFFIX} | ||
creationTimestamp: | ||
spec: | ||
triggers: [] | ||
runPolicy: Serial | ||
source: | ||
type: Git | ||
git: | ||
uri: ${GIT_URL} | ||
ref: ${GIT_REF} | ||
strategy: | ||
type: Docker | ||
dockerStrategy: | ||
dockerfilePath: openshift-v4/templates/scan-handler/Dockerfile | ||
noCache: true | ||
env: | ||
- name: ARTIFACTORY_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: artifacts-default-cgcynz | ||
key: username | ||
- name: ARTIFACTORY_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: artifacts-default-cgcynz | ||
key: password | ||
forcePull: true | ||
output: | ||
to: | ||
kind: ImageStreamTag | ||
name: ${NAME}-scan-handler:${VERSION} | ||
resources: | ||
limits: | ||
cpu: 1500m | ||
memory: 1300Mi | ||
requests: | ||
cpu: 750m | ||
memory: 650Mi | ||
postCommit: {} | ||
nodeSelector: | ||
successfulBuildsHistoryLimit: 5 | ||
failedBuildsHistoryLimit: 5 | ||
status: | ||
lastVersion: 0 |