|
147 | 147 | A browser window should launch, directing you to the application's frontend. |
148 | 148 |
|
149 | 149 | ## GKE Instructions |
| 150 | +<!-- https://cert-manager.io/docs/tutorials/getting-started-with-cert-manager-on-google-kubernetes-engine-using-lets-encrypt-for-ingress-ssl/ --> |
| 151 | +
|
| 152 | +### Setup |
150 | 153 |
|
151 | 154 | 1. Authenticate or ensure you are added as a user to the Google Cloud Project: |
152 | 155 |
|
|
209 | 212 | 7. If you haven't already, visit the GCloud console -> 'Cloud Domains' and verify that a domain name has been created. |
210 | 213 |
|
211 | 214 | - We currently have one as `peerprep-g16.net`. |
| 215 | + - This can be created under 'Cloud Domains' -> 'Register Domain' in the GCloud console. |
212 | 216 | - We also associate a GCloud Global Web IP `web-ip` to this DNS record as an 'A' record. |
| 217 | + - To set an IP DNS 'A' record, follow these steps: |
| 218 | + 1. Create an IP: |
| 219 | + |
| 220 | + ```sh |
| 221 | + gcloud compute addresses create web-ip --global |
| 222 | + ``` |
| 223 | + |
| 224 | + 2. Verify that it exists: |
| 225 | + |
| 226 | + ```sh |
| 227 | + gcloud compute addresses list |
| 228 | + ``` |
| 229 | + |
| 230 | + 3. Grab the IP address: |
| 231 | + |
| 232 | + ```sh |
| 233 | + gcloud compute addresses describe web-ip --format='value(address)' --global |
| 234 | + ``` |
| 235 | + |
| 236 | + 4. Associate it via the console: |
| 237 | + - Cloud DNS -> 'Zone Name': peerprep-g16.net -> 'Add standard' |
| 238 | + - Paste the IP address |
| 239 | + - 'Create' |
213 | 240 |
|
214 | 241 | 8. Install the `cert-manager` plugin: |
215 | 242 |
|
|
226 | 253 | - After 15 minutes, you should be able to access the UI over HTTPS at this link: |
227 | 254 | - `https://peerprep-g16.net` |
228 | 255 |
|
229 | | -10. Setup the following in Github Actions by: |
230 | | - |
231 | | - - heading to the 'Settings' -> 'Secrets and variables' -> 'Actions' -> 'New repository secret' |
232 | | - - Adding the following keys: |
233 | | - |
234 | | - ```txt |
235 | | - GKE_SA_KEY: <redacted (get from the cloud console page)> |
236 | | - GKE_PROJECT: cs3219-g16 |
237 | | - GKE_CLUSTER: cs3219-g16 |
238 | | - GKE_ZONE: asia-southeast1-c |
239 | | -
|
240 | | - ``` |
241 | | - |
242 | | -11. Merge a PR to `main` and verify that the cluster is redeployed with the latest images: |
243 | | - |
244 | | - ```sh |
245 | | - kubectl -n peerprep get deployment |
246 | | - ``` |
247 | | - |
248 | | -12. Cleanup: |
| 256 | +10. Cleanup: |
249 | 257 |
|
250 | 258 | - Delete the cluster: |
251 | 259 |
|
|
260 | 268 |
|
261 | 269 | gcloud compute addresses delete web-ip --global |
262 | 270 | ``` |
263 | | -<!-- https://cert-manager.io/docs/tutorials/getting-started-with-cert-manager-on-google-kubernetes-engine-using-lets-encrypt-for-ingress-ssl/ --> |
| 271 | + |
| 272 | +### CD (Continuous Delivery via Github Actions) |
| 273 | + |
| 274 | +1. Setup the following in Github Actions by: |
| 275 | + |
| 276 | + - heading to the 'Settings' -> 'Secrets and variables' -> 'Actions' -> 'New repository secret' |
| 277 | + - Adding the following keys: |
| 278 | + |
| 279 | + ```txt |
| 280 | + GKE_SA_KEY: <redacted (get from the cloud console IAM -> 'Service Accounts' page)> |
| 281 | + GKE_PROJECT: cs3219-g16 |
| 282 | + GKE_CLUSTER: cs3219-g16 |
| 283 | + GKE_ZONE: asia-southeast1-c |
| 284 | + ``` |
| 285 | + |
| 286 | + - If the `GKE_SA_KEY` is needed, contact us. |
| 287 | + |
| 288 | +2. Merge a PR to `main`. The following will happend: |
| 289 | + |
| 290 | + 1. An action will run under the 'actions' tab in Github. |
| 291 | + |
| 292 | + 2. This will build and push the service images and verify that the cluster is redeployed with the latest images: |
| 293 | + |
| 294 | + ```sh |
| 295 | + kubectl -n peerprep get deployment |
| 296 | + ``` |
0 commit comments