|
239 | 239 | # project.
|
240 | 240 | #
|
241 | 241 | echo "Checking for required secrets"
|
242 |
| -if pulumi config get prometheus:adminpass -C "${script_dir}"/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
243 |
| - echo "Configuration value found" |
| 242 | + |
| 243 | +# Sirius Accounts Database |
| 244 | +if pulumi config get sirius:accounts_pwd -C ${script_dir}/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
| 245 | + true |
244 | 246 | else
|
245 |
| - echo "Please enter a password for grafana" |
246 |
| - pulumi config set prometheus:adminpass --secret -C pulumi/python/kubernetes/secrets |
| 247 | + ACCOUNTS_PW=$(createpw) |
| 248 | + pulumi config set --secret sirius:accounts_pwd -C ${script_dir}/../pulumi/python/kubernetes/secrets $ACCOUNTS_PW |
247 | 249 | fi
|
248 | 250 |
|
249 |
| -if pulumi config get sirius:accounts_pwd -C "${script_dir}"/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
250 |
| - echo "Configuration value found" |
| 251 | +# Sirius Ledger Database |
| 252 | +if pulumi config get sirius:ledger_pwd -C ${script_dir}/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
| 253 | + true |
251 | 254 | else
|
252 |
| - echo "Please enter a password for the sirius accountsdb" |
253 |
| - pulumi config set sirius:accounts_pwd --secret -C pulumi/python/kubernetes/secrets |
| 255 | + LEDGER_PW=$(createpw) |
| 256 | + pulumi config set --secret sirius:ledger_pwd -C ${script_dir}/../pulumi/python/kubernetes/secrets $LEDGER_PW |
254 | 257 | fi
|
255 | 258 |
|
256 |
| -if pulumi config get sirius:demo_login_pwd -C "${script_dir}"/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
257 |
| - echo "Configuration value found" |
| 259 | +if pulumi config get sirius:ledger_pwd -C ${script_dir}/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
| 260 | + true |
258 | 261 | else
|
259 |
| - echo "Please enter a password for the sirius ledgerdb" |
260 |
| - pulumi config set sirius:demo_login_pwd --secret -C pulumi/python/kubernetes/secrets |
| 262 | + LEDGER_PW=$(createpw) |
| 263 | + pulumi config set --secret sirius:ledger_pwd -C ${script_dir}/../pulumi/python/kubernetes/secrets $LEDGER_PW |
261 | 264 | fi
|
262 | 265 |
|
263 |
| -if pulumi config get sirius:demo_login_user -C "${script_dir}"/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
264 |
| - echo "Configuration value found" |
| 266 | +# Admin password for grafana (see note in __main__.py in prometheus project as to why not encrypted) |
| 267 | +# This is for the deployment that is setup as part of the the prometheus operator driven prometheus-kube-stack. |
| 268 | +# |
| 269 | +if pulumi config get prometheus:adminpass -C ${script_dir}/../pulumi/python/config >/dev/null 2>&1; then |
| 270 | + echo "Existing password found for grafana admin user" |
| 271 | +else |
| 272 | + echo "Create a password for the grafana admin user; this password will be used to access the Grafana dashboard" |
| 273 | + echo "This should be an alphanumeric string without any shell special characters; it is presented in plain text" |
| 274 | + echo "due to current limitations with Pulumi secrets. You will need this password to access the Grafana dashboard." |
| 275 | + pulumi config set prometheus:adminpass -C ${script_dir}/../pulumi/python/config |
| 276 | +fi |
| 277 | + |
| 278 | +# |
| 279 | +# The demo account defaults to testuser/password for credentials; this needs to be fixed in the BoS to allow |
| 280 | +# other passwords to be used. Once that is done we can adjust this section. |
| 281 | +# |
| 282 | +if pulumi config get sirius:demo_login_pwd -C "${script_dir}"/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
| 283 | + echo "Existing demo user login found" |
265 | 284 | else
|
266 |
| - echo "Please enter a username for the BoS" |
267 |
| - pulumi config set sirius:demo_login_user --secret -C pulumi/python/kubernetes/secrets |
| 285 | + pulumi config set sirius:demo_login_pwd --secret -C pulumi/python/kubernetes/secrets "password" |
268 | 286 | fi
|
269 | 287 |
|
270 |
| -if pulumi config get sirius:ledger_pwd -C "${script_dir}"/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
271 |
| - echo "Configuration value found" |
| 288 | +if pulumi config get sirius:demo_login_user -C "${script_dir}"/../pulumi/python/kubernetes/secrets >/dev/null 2>&1; then |
| 289 | + echo "Existing demo user password found" |
272 | 290 | else
|
273 |
| - echo "Please enter a password for the BoS user account" |
274 |
| - pulumi config set sirius:ledger_pwd --secret -C pulumi/python/kubernetes/secrets |
| 291 | + pulumi config set sirius:demo_login_user --secret -C pulumi/python/kubernetes/secrets "testuser" |
275 | 292 | fi
|
276 | 293 |
|
| 294 | + |
277 | 295 | #
|
278 | 296 | # The default helm timeout for all the projects is set at the default of 300 seconds (5 minutes)
|
279 | 297 | # However, since this code path is most commonly going to be used to deploy locally we need to bump
|
|
0 commit comments