The listener process monitors for available data. When the data is available it will trigger a github action that will:
- download the data from the federal government hpfx server.
- process the data into the t1.. t4... and p1.. p4 files.
- upload the raw data and the processed data to object storage.
In order to triger the github action the listener process requires an api key. Currently the only way to enable this functionality is with a personal access token. The personal access tokens are set to expire on a regular basis. This document describes the how to go about cycling that token so that the pipeline continues to function correctly.
Unfortunately at the time of writing this, there is no way to auto cycle a github personal access token.
Login to github and either create or find the personal access token.
If you are creating a brand new token, follow these instructions.
Login to github and go to your profile settings:
- On the left hand menu find
developer settings
- select
Tokens (classic)
- Then on the top of the screen click
Generate Token
The steps here are very similar to those for generating a new token, only you select the token that you want to regenerate and regenerate it.
steps:
- go to
Tokens (classic)
- Select the token that you want to regenerate
- Select the option
regenerate
- Copy the token and save it somewhere temporarily as it will be used in the next step.
- go to the the CMC copy repository, ie this one!!
- go to the repo settings->Environments
- select the
prod
environment - select the edit icon for the token 'CMC_TOKEN'
- and paste the token that was created in either the
Creating new token
or theCycle the token
steps.
- login to openshift
- run the following command where TOKEN env var is set to the new token
TOKEN=<token goes here>
oc patch secret messagesubscriber-prod-listener-ghs \
--patch="{\"data\": {\"gh-access-token\": \"$(base64 <<< $TOKEN)\", \"gh-org\": \"$(base64 <<< bcgov)\", \"gh-repo\": \"$(base64 <<< nr-rfc-grib-copy)\"}}"