-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from jmarhee/jmarhee/teardown
Adds Makefile for smoothing ops, adds better teardown behavior native…
- Loading branch information
Showing
5 changed files
with
44 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.SILENT: | ||
tag-release: | ||
if [[ $(TAG) == v?.?.? ]]; then echo "Tagging $(TAG)"; elif [[ $(TAG) == v?.?.?? ]]; then echo "Tagging $(TAG)"; else echo "Bad Tag Format: $(TAG)"; exit 1; fi && git tag -a $(TAG) -m "Releasing $(TAG)" ; read -p "Push tag: $(TAG)? " push_tag ; if [ "${push_tag}"="yes" ]; then git push self $(TAG); fi | ||
|
||
proxy-up: | ||
terraform apply -auto-approve | ||
|
||
proxy-down: | ||
terraform destroy -auto-approve | ||
|
||
proxy-test: | ||
curl http://ipinfo.io/json | ||
|
||
mac-proxy-down: | ||
networksetup -setsocksfirewallproxystate wi-fi off | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
#!/bin/bash | ||
|
||
proxy_status () { | ||
|
||
while true; do \ | ||
if [ "$(ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q ${USER}@${HOST} exit ; echo $?)" = "0" ]; then \ | ||
sleep 5; continue | ||
else | ||
networksetup -setsocksfirewallproxystate wi-fi off | ||
break | ||
fi | ||
done | ||
|
||
connect_loop () { | ||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -q ${USER}@${HOST} "while true; do sleep 30; done" ; networksetup -setsocksfirewallproxy wi-fi 127.0.0.1 8888 | ||
} | ||
|
||
networksetup -setsocksfirewallproxy wi-fi 127.0.0.1 8888 | ||
export -f proxy_status | ||
nohup USER=${USER} HOST=${HOST} proxy_status &>/dev/null & | ||
export -f connect_loop | ||
nohup USER=${USER} HOST=${HOST} connect_loop &>/dev/null & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
terraform { | ||
required_providers { | ||
linode = { | ||
source = "terraform-providers/linode" | ||
} | ||
null = { | ||
source = "hashicorp/null" | ||
} | ||
random = { | ||
source = "hashicorp/random" | ||
} | ||
} | ||
required_version = ">= 0.13" | ||
} |