Skip to content

Commit 8674666

Browse files
committed
mark
1 parent 95aa744 commit 8674666

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.bashrc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,9 +1056,24 @@ 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+
10591073
function uvault() {
10601074
uat && \
10611075
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}') && \
10621077
ssh -M -S my-vault-tunnel -fnNT -L "1234:vault.$(aws-environment).grandrounds.com:443" "$GR_USERNAME@$HOST" && \
10631078
ssh -S my-vault-tunnel -O check "$GR_USERNAME@$HOST" && \
10641079
sleep 5 && \
@@ -1070,6 +1085,7 @@ function uvault() {
10701085
}
10711086

10721087
function kvault() {
1088+
echo "💀 Killing my-vault-tunnel tunnel at $GR_USERNAME@$HOST"
10731089
ssh -S my-vault-tunnel -O exit "$GR_USERNAME@$HOST"
10741090
}
10751091

0 commit comments

Comments
 (0)