summaryrefslogtreecommitdiff
path: root/roles/contexts/fretlink
diff options
context:
space:
mode:
Diffstat (limited to 'roles/contexts/fretlink')
-rw-r--r--roles/contexts/fretlink/templates/environment.j230
1 files changed, 29 insertions, 1 deletions
diff --git a/roles/contexts/fretlink/templates/environment.j2 b/roles/contexts/fretlink/templates/environment.j2
index 50dc75b..36e4bfd 100644
--- a/roles/contexts/fretlink/templates/environment.j2
+++ b/roles/contexts/fretlink/templates/environment.j2
@@ -72,12 +72,19 @@ FL_FREIGHT_PORT=8084
72FL_FREIGHT_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Freight subkey=Secret') }}" 72FL_FREIGHT_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Freight subkey=Secret') }}"
73 73
74FL_BOOKKEEPING_SECRET="dummy" 74FL_BOOKKEEPING_SECRET="dummy"
75FL_LANE_EXPLORER_SECRET="dummy"
75 76
76FL_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Host') }}" 77FL_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Host') }}"
77FL_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Port') }}" 78FL_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=Port') }}"
78FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}" 79FL_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local subkey=User') }}"
79FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}" 80FL_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Local') }}"
80 81
82FL_CARRIER_DIRECTORY_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Host') }}"
83FL_CARRIER_DIRECTORY_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Port') }}"
84FL_CARRIER_DIRECTORY_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=User') }}"
85FL_CARRIER_DIRECTORY_DEV_PSQL_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory') }}"
86FL_CARRIER_DIRECTORY_DEV_PSQL_DB="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/CarrierDirectory subkey=Database') }}"
87
81FL_GEODATA_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Host') }}" 88FL_GEODATA_DEV_PSQL_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Host') }}"
82FL_GEODATA_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Port') }}" 89FL_GEODATA_DEV_PSQL_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=Port') }}"
83FL_GEODATA_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=User') }}" 90FL_GEODATA_DEV_PSQL_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Psql/Dev/Geodata subkey=User') }}"
@@ -153,10 +160,22 @@ if [ "$APP" = "app" ]; then
153 160
154 # notifier 161 # notifier
155 export FRETLINK_NOTIFIER_API=$FL_NOTIFIER_URL 162 export FRETLINK_NOTIFIER_API=$FL_NOTIFIER_URL
156 export FRETLINK_NOTIFIER_ACCESS_KEY="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier messaging)" 163 export FRETLINK_NOTIFIER_ACCESS_KEY="$(build_macaroon $FL_NOTIFIER_SECRET notifier notifier messaging)"
157 export FRETLINK_NOTIFIER_TRANSPOREON_ACCESS_KEY="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)" 164 export FRETLINK_NOTIFIER_TRANSPOREON_ACCESS_KEY="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)"
158 export FRETLINK_NOTIFIER_TRANSPOREON_ENABLED="true" 165 export FRETLINK_NOTIFIER_TRANSPOREON_ENABLED="true"
159 166
167 export FRETLINK_NOTIFIER_ENABLED="true"
168 export FRETLINK_NOTIFIER_AMQP_ENABLED="true"
169 export FRETLINK_NOTIFIER_AMQP_TLS="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=TLS') }}"
170 export FRETLINK_NOTIFIER_AMQP_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=User') }}"
171 export FRETLINK_NOTIFIER_AMQP_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier') }}"
172 export FRETLINK_NOTIFIER_AMQP_HOSTS="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Hosts') }}"
173 export FRETLINK_NOTIFIER_AMQP_QUEUE="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Queue') }}"
174 export FRETLINK_NOTIFIER_AMQP_EXCHANGE="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Exchange') }}"
175 export FRETLINK_NOTIFIER_AMQP_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Port') }}"
176 export FRETLINK_NOTIFIER_AMQP_VHOST="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Vhost') }}"
177
178
160 # admin-root 179 # admin-root
161 export FRETLINK_ADMINROOT_URL=$FL_ADMIN_ROOT_URL 180 export FRETLINK_ADMINROOT_URL=$FL_ADMIN_ROOT_URL
162 export FRETLINK_ADMINROOT_ACCESS_KEY="$(build_macaroon $FL_ADMIN_ROOT_PRIVATE_KEY admin-root admin-root admin-root::token-delivery)" 181 export FRETLINK_ADMINROOT_ACCESS_KEY="$(build_macaroon $FL_ADMIN_ROOT_PRIVATE_KEY admin-root admin-root admin-root::token-delivery)"
@@ -175,6 +194,7 @@ if [ "$APP" = "admin-root" ]; then
175 export CARDIR_MACAROON_SECRET=$FL_CARRIER_DIRECTORY_SECRET 194 export CARDIR_MACAROON_SECRET=$FL_CARRIER_DIRECTORY_SECRET
176 export NOTIFIER_MACAROON_SECRET=$FL_NOTIFIER_SECRET 195 export NOTIFIER_MACAROON_SECRET=$FL_NOTIFIER_SECRET
177 export BOOKKEEPING_MACAROON_SECRET=$FL_BOOKKEEPING_SECRET 196 export BOOKKEEPING_MACAROON_SECRET=$FL_BOOKKEEPING_SECRET
197 export LANE_EXPLORER_MACAROON_SECRET=$FL_LANE_EXPLORER_SECRET
178fi 198fi
179 199
180if [ "$APP" = "carrier-directory" ]; then 200if [ "$APP" = "carrier-directory" ]; then
@@ -200,6 +220,14 @@ if [ "$APP" = "notifier" ]; then
200 # To push transporeon cargos to app 220 # To push transporeon cargos to app
201 export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo" 221 export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo"
202 export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)" 222 export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET notifier app app::transporeon-cargos-write)"
223
224 # AMQP
225 export AMQP_VHOST="notifier"
226 export AMQP_USER="notifier"
227 export AMQP_PASSWORD="notifier"
228 export AMQP_QUEUE="notifier"
229 export AMQP_SERVER="localhost"
230 export AMQP_TLS="false"
203fi 231fi
204 232
205if [ "$APP" = "pricer" ]; then 233if [ "$APP" = "pricer" ]; then