forked from bcgov/common-hosted-form-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add event stream config notes, add to deployment
Signed-off-by: Jason Sherman <[email protected]>
- Loading branch information
1 parent
e228db2
commit 3c83278
Showing
6 changed files
with
146 additions
and
3 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
This file was deleted.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
event-stream-service/charts/event-stream-service/README.md
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,55 @@ | ||
# Event Stream Service Installation | ||
|
||
This current documentation will be very simple and make assumptions: | ||
|
||
- you are installing on BC Gov Openshift. | ||
- you have installed `oc` command line tools on your workstation that work on BC Gov Openshift. | ||
- you know how to get your Openshift token for running your `oc` command line tools. | ||
- you have installed [helm](https://helm.sh) on your workstation. | ||
- you have a basic understanding of helm and values files overrides. | ||
- you have access/permissions in your Openshift namespace to run `helm` and `oc` commands. | ||
|
||
**September 3, 2024** - we are using the `a191b5` namespaces to host the proof of concepts. These spaces have minimal resources (we can request more as we learn about the requirements). | ||
|
||
## Basic Instructions | ||
|
||
1. get your Openshift token | ||
2. use oc login to your namespace | ||
3. navigate to the <repo>/event-stream-service | ||
4. run the `helm` install / upgrade command | ||
|
||
``` | ||
oc login --token=sha256~yk5BCjn0syJV0qXEyPk12s09v-RIdmTeLVdQmQrQEBc --server=https://api.silver.devops.gov.bc.ca:6443 | ||
helm upgrade --install event-stream-service ./charts/event-stream-service -f ./charts/event-stream-service/values.yaml | ||
helm uninstall event-stream-service | ||
oc delete pvc -l 'app.kubernetes.io/instance=event-stream-service' | ||
``` | ||
|
||
To set up a CHEFS instance to use this installation of Event Stream Service, you will need to know the server name and you will need the generated secret for the `chefs` account. | ||
|
||
Find the `ess-nginx-route` and note the location. The Event Stream Service server will the host (so no `https://` and no path). | ||
Find the `ess-nats-auth` and copy the value for `chefs_pwd`. | ||
|
||
### To remove | ||
|
||
1. get your Openshift token | ||
2. use oc login to your namespace | ||
3. run the `helm` uninstall command | ||
4. if permanently deleting, then run the `oc delete pvc` command to remove the persistent storage | ||
|
||
``` | ||
oc login --token=sha256~yk5BCjn0syJV0qXEyPk12s09v-RIdmTeLVdQmQrQEBc --server=https://api.silver.devops.gov.bc.ca:6443 | ||
helm uninstall event-stream-service | ||
oc delete pvc -l 'app.kubernetes.io/instance=event-stream-service' | ||
``` | ||
|
||
## Future | ||
|
||
We will need to create different param override (values) files for each instance. Each namespace and instance will have different resource allocation that we need to tune. | ||
You can specify the '--values'/'-f' flag multiple times. The priority will be given to the last (right-most) file specified. | ||
|
||
``` | ||
helm upgrade --install event-stream-service ./charts/event-stream-service -f ./charts/event-stream-service/values.yaml -f ./charts/event-stream-service/values-prod.yaml | ||
``` | ||
|
||
This would apply our default values file (`values.yaml`) with any overrides found in `values-prod.yaml` taking priority. |
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,51 @@ | ||
--- | ||
apiVersion: template.openshift.io/v1 | ||
kind: Template | ||
labels: | ||
app.kubernetes.io/component: app | ||
app.kubernetes.io/instance: "${APP_NAME}-${JOB_NAME}" | ||
app.kubernetes.io/managed-by: github | ||
app.kubernetes.io/name: nodejs | ||
app.kubernetes.io/part-of: "${APP_NAME}-${JOB_NAME}" | ||
app: "${APP_NAME}-${JOB_NAME}" | ||
template: "chefs-app-event-stream-service-template" | ||
metadata: | ||
name: "chefs-app-event-stream-service" | ||
objects: | ||
- apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: "${APP_NAME}-${JOB_NAME}-event-stream-service" | ||
data: | ||
FEATURES_EVENTSTREAMSERVICE: ${FEATURE} | ||
EVENTSTREAMSERVICE_STREAMNAME: ${STREAMNAME} | ||
EVENTSTREAMSERVICE_SOURCE: ${SOURCE} | ||
EVENTSTREAMSERVICE_DOMAIN: ${DOMAIN} | ||
parameters: | ||
- name: APP_NAME | ||
description: Application name | ||
displayName: Application name | ||
required: true | ||
- name: JOB_NAME | ||
description: Job identifier (i.e. 'pr-5' OR 'master') | ||
displayName: Job Branch Name | ||
required: true | ||
- name: FEATURE | ||
description: Enable Event Stream Service Feature | ||
displayName: Enable feature | ||
required: true | ||
value: true | ||
- name: STREAMNAME | ||
description: Name of the CHEFS Event Stream | ||
displayName: CHEFS Event Stream name | ||
required: true | ||
value: CHEFS | ||
- name: DOMAIN | ||
description: Domain of the CHEFS Event Stream | ||
displayName: CHEFS Event Stream domain | ||
required: true | ||
value: forms | ||
- name: SOURCE | ||
description: Source of CHEFS Event Stream | ||
displayName: CHEFS Event Stream source | ||
required: true |