@@ -1056,6 +1056,39 @@ function releaseCommits() {
10561056 echo " https://github.com/ConsultingMD/jarvis/compare/${lastReleaseBranchWithoutRemote} ...${currentReleaseBranchWithoutRemote} "
10571057}
10581058
1059+ function pvault() {
1060+ production && \
1061+ echo ' 🌐 Opening SSH tunnel named "my-vault-tunnel" in background...' && \
1062+ HOST=$( ec2-find -l stone-worker 2> /dev/null | tail -1 | awk ' {print $1}' ) && \
1063+ ssh -M -S my-vault-tunnel -fnNT -L " 1234:vault.grandrounds.com:443" " $GR_USERNAME @$HOST " && \
1064+ ssh -S my-vault-tunnel -O check " $GR_USERNAME @$HOST " && \
1065+ sleep 5 && \
1066+ echo ' 🔐 Use this token to log in:' && \
1067+ (aws-environment infra-production developer && \
1068+ VAULT_ADDR=https://localhost:1234 vault login -tls-skip-verify -token-only -method=aws role=developer) && \
1069+ open ' https://localhost:1234/ui/vault/auth?with=token' && \
1070+ echo ' ✅ Run kvault this command to close the tunnel'
1071+ }
1072+
1073+ function uvault() {
1074+ uat && \
1075+ echo ' 🌐 Opening SSH tunnel named "my-vault-tunnel" in background...' && \
1076+ HOST=$( ec2-find -l stone-worker 2> /dev/null | tail -1 | awk ' {print $1}' ) && \
1077+ ssh -M -S my-vault-tunnel -fnNT -L " 1234:vault.$( aws-environment) .grandrounds.com:443" " $GR_USERNAME @$HOST " && \
1078+ ssh -S my-vault-tunnel -O check " $GR_USERNAME @$HOST " && \
1079+ sleep 5 && \
1080+ echo ' 🔐 Use this token to log in:' && \
1081+ (aws-environment infra-uat developer && \
1082+ VAULT_ADDR=https://localhost:1234 vault login -tls-skip-verify -token-only -method=aws role=developer) && \
1083+ open ' https://localhost:1234/ui/vault/auth?with=token' && \
1084+ echo ' ✅ Run kvault this command to close the tunnel'
1085+ }
1086+
1087+ function kvault() {
1088+ echo " 💀 Killing my-vault-tunnel tunnel at $GR_USERNAME @$HOST "
1089+ ssh -S my-vault-tunnel -O exit " $GR_USERNAME @$HOST "
1090+ }
1091+
10591092function jgrep() {
10601093 # bundle exec rake routes > ~/dev/rake-routes
10611094 cat ~ /dev/rake-routes | grep " $1 "
0 commit comments