summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2022-03-03 15:16:33 -0800
committerMike Crute <mike@crute.us>2022-03-03 15:16:55 -0800
commite95acb79adca2fdcc650ef449ad78c639ea6c3bf (patch)
treef58db04b8add4acd1f680c424bd0960654cc4c99 /bin
parentcecd9361379d4c04480468cf42c0859dec1708a1 (diff)
downloaddotfiles-e95acb79adca2fdcc650ef449ad78c639ea6c3bf.tar.bz2
dotfiles-e95acb79adca2fdcc650ef449ad78c639ea6c3bf.tar.xz
dotfiles-e95acb79adca2fdcc650ef449ad78c639ea6c3bf.zip
Add mongo helper scripts
Diffstat (limited to 'bin')
-rwxr-xr-xbin/prod-mongo.sh7
-rwxr-xr-xbin/vault.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/bin/prod-mongo.sh b/bin/prod-mongo.sh
new file mode 100755
index 0000000..5b8fc73
--- /dev/null
+++ b/bin/prod-mongo.sh
@@ -0,0 +1,7 @@
1#!/bin/bash
2
3mongosh \
4 mongodb.sea4.crute.me \
5 --username=root \
6 --authenticationDatabase=admin \
7 --password="$(vault.sh read --format=json database/static-creds/mongodb-root | jq -r .data.password)"
diff --git a/bin/vault.sh b/bin/vault.sh
new file mode 100755
index 0000000..9d5cbd8
--- /dev/null
+++ b/bin/vault.sh
@@ -0,0 +1,7 @@
1#!/bin/bash
2
3export VAULT_ADDR="https://vault.sea4.crute.me:8200"
4export VAULT_SKIP_VERIFY=true
5export VAULT_TOKEN="$(pass Pomona/Vault_Root_Token | head -n1)"
6
7vault "$@"