Last active
January 17, 2020 02:04
-
-
Save stevegt/07ab45b148e6a3e44cf91062960ccd0c to your computer and use it in GitHub Desktop.
the hack
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
#!/bin/bash -ex | |
# any setup bits go here -- set env variables, etc. | |
makefile=$PWD/Makefile | |
mkdir -p /var/is/stamps | |
cd /var/is/stamps | |
make -f $makefile $(hostname) |
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
# these are hostnames | |
kirk: d4-0 | |
scotty: d4-2 | |
spock: d4-1 vim | |
# could also use pattern-matching for hostnames | |
%.dev.example.com: d4-2 | |
# d4-x are image names, where x is the image version | |
d4-0: docker-18.09.7 nfs-client | |
d4-1: d4-0 consul-1.6.0 jq | |
d4-2: d4-1 vim rsync netcat autossh autofs sshfs tcpdump socat dnsutils screen mosh | |
# other variations: make use of env and per-target vars, VPATH, etc. | |
docker-18.09.7: | |
apt install -y docker.io | |
touch $@ | |
nfs-client: | |
apt-get install -y nfs-common | |
apt-get install -y autofs | |
mkdir /net | |
touch $@ | |
consul-1.6.0: | |
cp -a images/consul_1.6.0_linux_amd64 /usr/bin/consul | |
consul version | |
touch $@ | |
jq vim rsync netcat autossh autofs sshfs tcpdump socat dnsutils screen mosh: | |
apt-get install -y $@ | |
touch $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment