Responsible for retrieving updates from various flavours of river gauges and providing a consistent stream of these through Google Pub/Sub and presenting out a gauge API.
/cmd/ea
, daily batch reconciliation via /cmd/eaday
@id
of the data URL, RLOIid
and wiskiID
also availableThe EA Hydrology API provides access to quality checked historical data. This is not used yet.
/cmd/nrw
RLOIid
This is an authenticated API and requires an API key (from your profile) to be stored in k8s:
kubectl create secret generic -n default nrw-apikey \
--from-literal=key=<your API Key>
/cmd/sepa
Deployed onto k8s (GKE), with a continuous deliovery pipeline via Google Cloud Build.
gauge
for the snapshot updatescloudbuild.yaml
and the _APP
subsitution variable.deployment.yaml
Following [this process to allow access to pub/sub from the deamons](https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform.
Pub/Sub Editor
and Cloud Datastore User
roles.kubectl create secret generic service-accn-key --from-file=key.json=<filename>.json
The k8s cluster needs the Honeycomb API key in a secrets store:
kubectl create secret generic -n default honeycomb-writekey \
--from-literal=key=<your API Key>
Daemons will post events to Honeycomb alongside JSON structured logs to Stdout.
The firestore
daemon persists the river state infomation to Algolia SAAS search service
and this requires algolia credentials:
kubectl create secret generic -n default algolia-writekey \
--from-literal=id=<app ID> --from-literal=key=<admin API key>
The service is designed to be deployed to a Google Cloud k8s cluster.
# setup kubectl access
gcloud config set project rainchasers
gcloud config set compute/zone europe-west2-b
gcloud container clusters get-credentials prod
# create the deployments
kubectl apply -f ./cmd/ea/deployment.yaml
kubectl apply -f ./cmd/nrw/deployment.yaml
kubectl apply -f ./cmd/sepa/deployment.yaml
kubectl apply -f ./cmd/store/deployment.yaml
kubectl apply -f ./cmd/web/deployment.yaml
kubectl apply -f ./cmd/web/service.yaml
# view the web IP
kubectl get service com-rainchasers --output yaml