generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
169 lines (162 loc) · 7.08 KB
/
.deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: .Deploys
on:
workflow_call:
inputs:
environment:
description: GitHub environment; e.g. PR number (omit), TEST or PROD
required: false
type: string
tag:
description: Image tag; e.g. PR number or latest
default: ${{ github.event.number }}
required: false
type: string
target:
description: Deployment target; e.g. PR number (omit), test or prod
default: ${{ github.event.number }}
required: false
type: string
jobs:
# init:
# name: Initialize
# runs-on: ubuntu-latest
# steps:
# - name: Initialize
# uses: bcgov-nr/[email protected]
# with:
# oc_namespace: ${{ vars.OC_NAMESPACE }}
# oc_server: ${{ vars.OC_SERVER }}
# oc_token: ${{ secrets.OC_TOKEN }}
# oc_version: "4.14.37"
# file: common/openshift.init.yml
# overwrite: true
# parameters:
# -p NAME_SUFFIX=-dev-${{ github.event.number }}
# -p POSTGRESQL_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}
# -p FDW_DATABASE_PASSWORD=${{ secrets.FDW_DATABASE_PASSWORD }}
# -p DJANGO_ADMIN_PASSWORD=${{ secrets.DJANGO_ADMIN_PASSWORD }}
# -p DJANGO_ADMIN_URL=${{ secrets.DJANGO_ADMIN_URL }}
# -p DJANGO_ADMIN_USER=${{ secrets.DJANGO_ADMIN_USER }}
# -p DJANGO_SECRET_KEY=${{ secrets.DJANGO_SECRET_KEY }}
# -p E_LICENSING_AUTH_USERNAME=${{ secrets.E_LICENSING_AUTH_USERNAME }}
# -p E_LICENSING_AUTH_PASSWORD=${{ secrets.E_LICENSING_AUTH_PASSWORD }}
# -p PG_MODE=${{ vars.PG_MODE }}
# -p PG_PRIMARY_PASSWORD=${{ secrets.PG_PRIMARY_PASSWORD }}
# -p PG_PRIMARY_USER=${{ secrets.PG_PRIMARY_USER }}
# -p PG_ROOT_PASSWORD=${{ secrets.PG_ROOT_PASSWORD }}
# # -p S3_PUBLIC_ACCESS_KEY=${{ secrets.S3_PUBLIC_ACCESS_KEY }}
# # -p S3_PUBLIC_SECRET_KEY=${{ secrets.S3_PUBLIC_SECRET_KEY }}
# # -p S3_HOST=${{ secrets.S3_HOST }}
# # -p S3_ROOT_BUCKET=${{ secrets.S3_ROOT_BUCKET }}
# # -p MINIO_ACCESS_KEY=${{ secrets.MINIO_ACCESS_KEY }}
# # -p MINIO_SECRET_KEY=${{ secrets.MINIO_SECRET_KEY }}
# database:
# name: Database
# needs: init
# # environment: ${{ inputs.environment }}
# runs-on: ubuntu-latest
# steps:
# - name: Database
# uses: bcgov-nr/[email protected]
# with:
# oc_namespace: ${{ vars.OC_NAMESPACE }}
# oc_server: ${{ vars.OC_SERVER }}
# oc_token: ${{ secrets.OC_TOKEN }}
# oc_version: "4.14.37"
# file: database/openshift.deploy.yml
# overwrite: true
# parameters:
# -p DATABASE_SERVICE_NAME=gwells-pg12-dev-${{ github.event.number }}
# -p IMAGE_STREAM_NAMESPACE=${{ vars.OC_NAMESPACE }}
# -p IMAGE_STREAM_NAME=crunchy-postgres-gis
# -p IMAGE_TAG=${{ github.event.number }}
# -p NAME_SUFFIX=-dev-${{ github.event.number }}
# -p VOLUME_CAPACITY=512Mi
# -p STORAGE_CLASS=netapp-file-standard
# -p REQUEST_CPU=200m
# -p REQUEST_MEMORY=512Mi
# -p LIMIT_CPU=500m
# -p LIMIT_MEMORY=1Gi
# backend:
# name: Backend
# needs: [ init, database ]
# # environment: ${{ inputs.environment }}
# runs-on: ubuntu-latest
# steps:
# - name: Deploy Backend
# uses: bcgov-nr/[email protected]
# with:
# oc_namespace: ${{ vars.OC_NAMESPACE }}
# oc_server: ${{ vars.OC_SERVER }}
# oc_token: ${{ secrets.OC_TOKEN }}
# oc_version: "4.14.37"
# file: backend/openshift.deploy.yml
# parameters:
# -p NAME_SUFFIX=-dev-${{ github.event.number }}
# -p IMAGE_TAG=${{ github.event.number }}
# -p ENV_NAME=dev
# -p E_LICENSING_URL=${{ vars.E_LICENSING_URL }}
# -p DB_REPLICATE=${{ vars.DB_REPLICATE }}
# -p DJANGO_DEBUG=${{ vars.DJANGO_DEBUG }}
# -p ENABLE_ADDITIONAL_DOCUMENTS=${{ vars.ENABLE_ADDITIONAL_DOCUMENTS }}
# -p S3_PRIVATE_BUCKET=${{ vars.S3_PRIVATE_BUCKET }}
# -p S3_PRIVATE_HOST=${{ vars.S3_PRIVATE_HOST }}
# -p S3_WELL_EXPORT_BUCKET=${{ vars.S3_WELL_EXPORT_BUCKET }}
# -p SSO_AUDIENCE=${{ vars.SSO_AUDIENCE }}
# -p SSO_AUTH_HOST=${{ vars.SSO_AUTH_HOST }}
# -p SSO_CLIENT=${{ vars.SSO_CLIENT }}
# -p SSO_IDP_HINT=${{ vars.SSO_IDP_HINT }}
# -p SSO_PORT=${{ vars.SSO_PORT }}
# -p SSO_PUBKEY=${{ vars.SSO_PUBKEY }}
# -p SSO_REALM=${{ vars.SSO_REALM }}
# -p SSO_TEST_AUDIENCE=${{ vars.SSO_TEST_AUDIENCE }}
# -p SSO_TEST_CLIENT=${{ vars.SSO_TEST_CLIENT }}
# -p GDAL_LIBRARY_PATH=${{ vars.GDAL_LIBRARY_PATH }}
# -p GEOS_LIBRARY_PATH=${{ vars.GEOS_LIBRARY_PATH }}
# -p S3_AQUIFER_BUCKET=${{ vars.S3_AQUIFER_BUCKET }}
# -p S3_REGISTRANT_BUCKET=${{ vars.S3_REGISTRANT_BUCKET }}
# -p S3_PRIVATE_ROOT_BUCKET=${{ vars.S3_PRIVATE_ROOT_BUCKET }}
# -p S3_PRIVATE_AQUIFER_BUCKET=${{ vars.S3_PRIVATE_AQUIFER_BUCKET }}
# -p S3_PRIVATE_REGISTRANT_BUCKET=${{ vars.S3_PRIVATE_REGISTRANT_BUCKET }}
# -p S3_PRIVATE_WELL_BUCKET=${{ vars.S3_PRIVATE_WELL_BUCKET }}
# -p ENABLE_AQUIFERS_SEARCH=${{ vars.ENABLE_AQUIFERS_SEARCH }}
# -p EMAIL_NOTIFICATION_RECIPIENT=${{ vars.EMAIL_NOTIFICATION_RECIPIENT }}
# -p GEOCODER_ADDRESS_API_BASE=${{ vars.GEOCODER_ADDRESS_API_BASE }}
# frontend:
# name: Frontend
# needs: [ init, database, backend ]
# # environment: ${{ inputs.environment }}
# runs-on: ubuntu-latest
# steps:
# - name: Deploy Frontend
# uses: bcgov-nr/[email protected]
# with:
# oc_namespace: ${{ vars.OC_NAMESPACE }}
# oc_server: ${{ vars.OC_SERVER }}
# oc_token: ${{ secrets.OC_TOKEN }}
# oc_version: "4.14.37"
# file: frontend/openshift.deploy.yml
# parameters:
# -p NAME_SUFFIX=-dev-${{ github.event.number }}
# -p IMAGE_TAG=${{ github.event.number }}
# -p ENV_NAME=dev
minio:
name: Minio
#needs: [ init, database, backend, frontend ]
runs-on: ubuntu-latest
steps:
- name: Deploy Minio
uses: bcgov-nr/[email protected]
with:
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
oc_version: "4.14.37"
file: minio/openshift.deploy.yml
parameters:
# -p NAME_SUFFIX=-dev-${{ github.event.number }}
-p IMAGE_TAG=${{ github.event.number }}
# -p ENV_NAME=dev
-p MINIO_ACCESS_KEY=${{ secrets.MINIO_ACCESS_KEY }}
-p MINIO_SECRET_KEY=${{ secrets.MINIO_SECRET_KEY }}
-p MINIO_DATA_DIR=/data