Skip to content

Commit

Permalink
migrate namespace / secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
clezag committed Nov 24, 2023
1 parent 0e406c4 commit bd86706
Show file tree
Hide file tree
Showing 13 changed files with 88 additions and 60 deletions.
6 changes: 3 additions & 3 deletions collectors/meteorology-eurac/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
RELEASETIME=`date +%s`
(cd ../lib/ingress-mq; mvn clean install) \
&& mvn clean install \
&& docker build -t ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac:0.0.0 . -f infrastructure/docker/Dockerfile \
&& docker image push ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac:0.0.0 \
&& helm upgrade --install dc-meteorology-eurac ../../helm/generic-collector --values infrastructure/helm/values.yaml --set-string podAnnotations.releaseTime=$RELEASETIME
&& docker build -t ghcr.io/noi-techpark/odh-v2-playground/dc-meteorology-eurac:0.0.0 . -f infrastructure/docker/Dockerfile \
&& docker image push ghcr.io/noi-techpark/odh-v2-playground/dc-meteorology-eurac:0.0.0 \
&& helm upgrade --namespace collector --install dc-meteorology-eurac ../../helm/generic-collector --values infrastructure/helm/values.yaml --set-string podAnnotations.releaseTime=$RELEASETIME
13 changes: 6 additions & 7 deletions collectors/meteorology-eurac/infrastructure/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ nameOverride: dc-meteorology-eurac
fullnameOverride: dc-meteorology-eurac

image:
repository: ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac-dc
repository: ghcr.io/noi-techpark/odh-v2-playground/dc-meteorology-eurac
pullPolicy: Always
tag: "0.0.0" # Set this when upgrading chart with --set-value

imagePullSecrets:
- name: ghcr-odh-v2-playground-readonly
- name: container-registry-r

env:
INGRESS_RABBITMQ_CLUSTER: rabbitmq-0.rabbitmq-headless.default.svc.cluster.local:5672
INGRESS_RABBITMQ_CLIENTNAME: meteorology-eurac-datacollector
CRON_STATIONS: "0 0 */1 * * ?"
CRON_MONTHLY: "0 */5 * * * ?"
CRON_DAILY: "0 0 */24 * * ?"
INGRESS_PROVIDER: meteorology/eurac


envSecret:
INGRESS_RABBITMQ_USER: guest
INGRESS_RABBITMQ_PASS: guest
envSecretRef:
- name: INGRESS_RABBITMQ_URI
secret: rabbitmq-svcbind
key: uri
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
management.health.probes.enabled=true
camel.springboot.main-run-controller=true

ingress.provider=${INGRESS_PROVIDER}
ingress.rabbitmq.cluster=${INGRESS_RABBITMQ_CLUSTER}
ingress.rabbitmq.user=${INGRESS_RABBITMQ_USER}
ingress.rabbitmq.pass=${INGRESS_RABBITMQ_PASS}
ingress.rabbitmq.uri=${INGRESS_RABBITMQ_URI}
ingress.rabbitmq.clientname=${INGRESS_RABBITMQ_CLIENTNAME}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ app_period=
spring.main.web-application-type=NONE

# Listen queue rabbitmq coordinates
mq.listen.host=${MQ_LISTEN_HOST}
mq.listen.port=${MQ_LISTEN_PORT}
mq.listen.username=${MQ_LISTEN_USERNAME}
mq.listen.password=${MQ_LISTEN_PASSWORD}
mq.listen.uri=${MQ_LISTEN_URI}
# Exchange to which the listen queue is bound. should always be "routed"
mq.listen.exchange=${MQ_LISTEN_EXCHANGE:routed}
# Routing key for listen queue. Should be db.collection as provided by the data collector
Expand Down
8 changes: 4 additions & 4 deletions transformers/google-spreadsheet/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
&& mvn clean compile package \
&& docker build -t ghcr.io/noi-techpark/odh-v2-playground/tr-google-spreadsheet:0.1.0 . -f infrastructure/docker/Dockerfile \
&& docker image push ghcr.io/noi-techpark/odh-v2-playground/tr-google-spreadsheet:0.1.0 \
&& helm upgrade --install tr-spreadsheet-google-sta-echarging ../../helm/generic-collector --values infrastructure/helm/sta_echarging.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
&& helm upgrade --install tr-spreadsheet-google-centro-trevi ../../helm/generic-collector --values infrastructure/helm/centro_trevi.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
&& helm upgrade --install tr-spreadsheet-google-creative-industries ../../helm/generic-collector --values infrastructure/helm/creative_industries.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
&& helm upgrade --install tr-spreadsheet-google-umadumm ../../helm/generic-collector --values infrastructure/helm/umadumm.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
&& helm upgrade --namespace collector --install tr-spreadsheet-google-sta-echarging ../../helm/generic-collector --values infrastructure/helm/sta_echarging.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
&& helm upgrade --namespace collector --install tr-spreadsheet-google-centro-trevi ../../helm/generic-collector --values infrastructure/helm/centro_trevi.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
&& helm upgrade --namespace collector --install tr-spreadsheet-google-creative-industries ../../helm/generic-collector --values infrastructure/helm/creative_industries.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
&& helm upgrade --namespace collector --install tr-spreadsheet-google-umadumm ../../helm/generic-collector --values infrastructure/helm/umadumm.yaml --set-string podAnnotations.releaseTime=$RELEASETIME \
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ env:
headers_metaDataId: event-id
headers_nameId: it:name

MQ_LISTEN_HOST: rabbitmq-headless.default.svc.cluster.local
MQ_LISTEN_PORT: 5672
MQ_LISTEN_KEY: spreadsheets.centro-trevi
MQ_LISTEN_QUEUE: spreadsheets.centro-trevi
MQ_LISTEN_ACKTIMEOUT: 300000

MONGO_CONNECTIONSTRING: mongodb://mongodb-headless.default.svc.cluster.local:27017

LOGGING_LEVEL_COM_OPENDATAHUB: INFO
LOG_STYLE: json

envSecret:
clientSecret: 7bd46f8f-c296-416d-a13d-dc81e68d0830
spreadsheetId: 1aJW6sEGo40hWeL_B2yK4N7CIGwRlmwVpAkwqxjF1ruA
MQ_LISTEN_USERNAME: guest
MQ_LISTEN_PASSWORD: guest

envSecretRef:
- name: MQ_LISTEN_URI
secret: rabbitmq-svcbind
key: uri
- name: MONGO_CONNECTIONSTRING
secret: mongodb-collector-svcbind
key: uri
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,21 @@ env:
headers_metaDataId: metadata-id
headers_nameId: name

MQ_LISTEN_HOST: rabbitmq-headless.default.svc.cluster.local
MQ_LISTEN_PORT: 5672
MQ_LISTEN_KEY: spreadsheets.creative-industries
MQ_LISTEN_QUEUE: spreadsheets.creative-industries
MQ_LISTEN_ACKTIMEOUT: 300000

MONGO_CONNECTIONSTRING: mongodb://mongodb-headless.default.svc.cluster.local:27017

LOGGING_LEVEL_COM_OPENDATAHUB: INFO
LOG_STYLE: json

envSecret:
clientSecret: 7bd46f8f-c296-416d-a13d-dc81e68d0830
spreadsheetId: 1I5Zj7JHprwLhzl9ktXJO-7v7x3rh1ysGbiblZgZYCXU
MQ_LISTEN_USERNAME: guest
MQ_LISTEN_PASSWORD: guest

envSecretRef:
- name: MQ_LISTEN_URI
secret: rabbitmq-svcbind
key: uri
- name: MONGO_CONNECTIONSTRING
secret: mongodb-collector-svcbind
key: uri
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,21 @@ env:
suportedLanguages: en,it,de
transformerImpl: sta-echarging

MQ_LISTEN_HOST: rabbitmq-headless.default.svc.cluster.local
MQ_LISTEN_PORT: 5672
MQ_LISTEN_KEY: spreadsheets.sta-echarging
MQ_LISTEN_QUEUE: spreadsheets.sta-echarging
MQ_LISTEN_ACKTIMEOUT: 300000

MONGO_CONNECTIONSTRING: mongodb://mongodb-headless.default.svc.cluster.local:27017

LOGGING_LEVEL_COM_OPENDATAHUB: INFO
LOG_STYLE: json

envSecret:
clientSecret: 7bd46f8f-c296-416d-a13d-dc81e68d0830
spreadsheetId: 1ucCQzAVGmvyRpeq-lIPffALQaWcG4LfPakc2mjt79fY
MQ_LISTEN_USERNAME: guest
MQ_LISTEN_PASSWORD: guest

envSecretRef:
- name: MQ_LISTEN_URI
secret: rabbitmq-svcbind
key: uri
- name: MONGO_CONNECTIONSTRING
secret: mongodb-collector-svcbind
key: uri
13 changes: 7 additions & 6 deletions transformers/google-spreadsheet/infrastructure/helm/umadumm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ env:
headers_metaDataId: event-id
headers_nameId: it:name

MQ_LISTEN_HOST: rabbitmq-headless.default.svc.cluster.local
MQ_LISTEN_PORT: 5672
MQ_LISTEN_KEY: spreadsheets.umadumm
MQ_LISTEN_QUEUE: spreadsheets.umadumm
MQ_LISTEN_ACKTIMEOUT: 300000

MONGO_CONNECTIONSTRING: mongodb://mongodb-headless.default.svc.cluster.local:27017

LOGGING_LEVEL_COM_OPENDATAHUB: INFO
LOG_STYLE: json

envSecret:
clientSecret: 7bd46f8f-c296-416d-a13d-dc81e68d0830
spreadsheetId: 1K49hBRbloKMtwxqBPHMf8yVFsu1xjFtUfk4CVtZhTMI
MQ_LISTEN_USERNAME: guest
MQ_LISTEN_PASSWORD: guest

envSecretRef:
- name: MQ_LISTEN_URI
secret: rabbitmq-svcbind
key: uri
- name: MONGO_CONNECTIONSTRING
secret: mongodb-collector-svcbind
key: uri
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# dc-interface configuration (Writer API endpoint)
bdp_host=
bdp_port=0
bdp_endpoint=

endpoint_host=
endpoint_port=
endpoint_ssl=yes
endpoint_path=
app_callerId=
app_dataOrigin=
app_period=

spring.main.web-application-type=NONE

# Listen queue rabbitmq coordinates
mq.listen.uri=${MQ_LISTEN_URI}
# Exchange to which the listen queue is bound. should always be "routed"
mq.listen.exchange=${MQ_LISTEN_EXCHANGE:routed}
# Routing key for listen queue. Should be db.collection as provided by the data collector
mq.listen.key=${MQ_LISTEN_KEY}
# Name of queue to listen on. Should be db.collection as provided by the data collector
mq.listen.queue=${MQ_LISTEN_QUEUE}
# Timeout for listen queue in ms. That is how much time do we have to consume the message and ACK/NACK it
mq.listen.acktimeout=${MQ_LISTEN_ACKTIMEOUT:300000}

mongo.connectionString=${MONGO_CONNECTIONSTRING}
6 changes: 3 additions & 3 deletions transformers/meteorology-eurac/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
#docker login ghcr.io
(cd ../lib/rabbit-mongo-listener; mvn clean install) \
&& mvn clean compile package \
&& docker build -t ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac:0.1.0 . -f infrastructure/docker/Dockerfile \
&& docker image push ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac:0.1.0 \
&& helm upgrade --install tr-meteorology-eurac ../../helm/generic-collector --values infrastructure/helm/values.yaml --set-string podAnnotations.releaseTime=$RELEASETIME
&& docker build -t ghcr.io/noi-techpark/odh-v2-playground/tr-meteorology-eurac:0.1.0 . -f infrastructure/docker/Dockerfile \
&& docker image push ghcr.io/noi-techpark/odh-v2-playground/tr-meteorology-eurac:0.1.0 \
&& helm upgrade --namespace collector --install tr-meteorology-eurac ../../helm/generic-collector --values infrastructure/helm/values.yaml --set-string podAnnotations.releaseTime=$RELEASETIME
18 changes: 10 additions & 8 deletions transformers/meteorology-eurac/infrastructure/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
nameOverride: tr-meteorology-eurac
fullnameOverride: tr-meteorology-eurac
image:
repository: ghcr.io/noi-techpark/odh-v2-playground/meteorology-eurac-tr
repository: ghcr.io/noi-techpark/odh-v2-playground/tr-meteorology-eurac
pullPolicy: Always
tag: "0.2.0"
tag: "0.1.0"

imagePullSecrets:
- name: ghcr-odh-v2-playground-readonly
- name: container-registry-r

env:
app_dataOrigin: EURAC
Expand All @@ -33,12 +33,14 @@ env:
LOG_LEVEL: debug
LOG_STYLE: text

MQ_LISTEN_HOST: rabbitmq-headless.default.svc.cluster.local
MQ_LISTEN_PORT: 5672
MQ_LISTEN_KEY: meteorology.eurac
MQ_LISTEN_USERNAME: guest
MQ_LISTEN_PASSWORD: guest
MQ_LISTEN_QUEUE: meteorology.eurac
MQ_LISTEN_ACKTIMEOUT: 300000

MONGO_CONNECTIONSTRING: mongodb://mongodb-headless.default.svc.cluster.local:27017
envSecretRef:
- name: MQ_LISTEN_URI
secret: rabbitmq-svcbind
key: uri
- name: MONGO_CONNECTIONSTRING
secret: mongodb-collector-svcbind
key: uri
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ odh_client.period.climateDaily=${ODH_CLIENT_PERIOD_CLIMATEDAILY:86400}
spring.main.web-application-type=NONE

# Listen queue rabbitmq coordinates
mq.listen.host=${MQ_LISTEN_HOST}
mq.listen.port=${MQ_LISTEN_PORT}
mq.listen.username=${MQ_LISTEN_USERNAME}
mq.listen.password=${MQ_LISTEN_PASSWORD}
mq.listen.uri=${MQ_LISTEN_URI}
# Exchange to which the listen queue is bound. should always be "routed"
mq.listen.exchange=${MQ_LISTEN_EXCHANGE:routed}
# Routing key for listen queue. Should be db.collection as provided by the data collector
Expand Down

0 comments on commit bd86706

Please sign in to comment.