Skip to content

Commit

Permalink
Merge pull request #26 from d3b-center/feature/add-include-bastion
Browse files Browse the repository at this point in the history
  • Loading branch information
devbyaccident authored Jan 24, 2022
2 parents 9cd73fb + 9264afc commit 8953007
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions d3b_cli_igor/utils/scripts/dev-env-tunnel
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,18 @@ fi
if [ "$account_id" == "684194535433" ]; then
echo "Running in AWS account: $account_id"
export ORG='d3b-d3b'
else
export domain="d3b.io"
export jenkins_url="aws-infra-jenkins-service.d3b.io"
elif [ "$account_id" == "232196027141" ]; then
echo "Running in AWS account: $account_id"
export ORG='aws'
export domain="kf-strides.org"
export jenkins_url="aws-infra-jenkins-service.kf-strides.org"
elif [ "$account_id" == "373997854230" ]; then
echo "Running in AWS account: $account_id"
export ORG='aws'
export domain="includedcc.org"
export jenkins_url="aws-infra-jenkins-service.373997854230.d3b.io"
fi


Expand Down Expand Up @@ -90,7 +99,7 @@ echo "ssm-ssh"
ssm-ssh --region us-east-1 $INSTANCE_ID -L $port:$INSTANCE_IP:22 -fN
sed '/localhost/d' ~/.ssh/known_hosts > ~/.ssh/known_hosts_new
cp ~/.ssh/known_hosts_new ~/.ssh/known_hosts
jenkins_ips=$(nslookup aws-infra-jenkins-service.kf-strides.org | grep Address | tail -4 | awk '{ print $2"/32" }' | tr '\n' ' ')
jenkins_ips=$(nslookup $jenkins_url | grep Address | tail -2 | awk '{ print $2"/32" }' | tr '\n' ' ')
echo "Running sshuttle"
sshuttle -vvv --daemon --dns -r localhost:$port $cidr $jenkins_ips $2
echo "#############################"
Expand Down

0 comments on commit 8953007

Please sign in to comment.