generated from nunchistudio/hashibox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·61 lines (52 loc) · 1.52 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.PHONY: up halt restart destroy init sync update ssh
export VAGRANT_EXPERIMENTAL="dependency_provisioners"
#
# up is a shortcut to start the Vagrant environment.
#
up:
vagrant up
#
# halt is a shortcut to stop the Vagrant environment.
#
halt:
vagrant halt
#
# restart is a shortcut to properly stop and restart the Vagrant environment.
#
restart: halt
vagrant up
#
# destroy is a shortcut to stop and force destroy the Vagrant environment.
#
destroy: halt
vagrant destroy -f
#
# init is a shortcut to initialize the `hashibox` environment for the first time.
#
init:
vagrant up --no-provision
./scripts/upload.sh
./scripts/install.sh
#
# sync is a shortcut to synchronize the local `upload` directory with the
# appropriate targeted nodes. It also applies some environment variables and
# then restarts the Consul, Nomad, and Vault services.
#
sync:
./scripts/upload.sh
./scripts/dotenv.sh
./scripts/restart.sh
#
# update is a shortcut to update Consul, Nomad, Vault, and Docker on every nodes.
#
update:
./scripts/update.sh
#
# ssh is a shortcut to ensure that the Nomad user's known hosts file is
# populated with GitHub and Bitbucket hosts, as described here:
# https://www.nomadproject.io/docs/job-specification/artifact#download-using-git
#
ssh:
bolt command run "sudo mkdir -p /root/.ssh" --targets=us --run-as root
bolt command run "ssh-keyscan github.com | sudo tee -a /root/.ssh/known_hosts" --targets=us --run-as root
bolt command run "ssh-keyscan bitbucket.org | sudo tee -a /root/.ssh/known_hosts" --targets=us --run-as root