Skip to content

Commit f80e965

Browse files
committed
fix(Makefile): enable targets to work for non-Vagrant
Adds DEIS_HOSTS, which is set automatically or can be overridden for non-Vagrant platforms. This is used by ssh_all to determine which hosts to SSH into - previously, we used `vagrant ssh`, which obviously only works on Vagrant. This also updates all the Makefiles to use fleet as appropriate, and to pull / build / etc. on all DEIS_HOSTS. TESTING: try the various make commands on Vagrant and Rackspace/EC2 replaces #998 closes #811
1 parent 839d9d6 commit f80e965

1 file changed

Lines changed: 16 additions & 17 deletions

File tree

Makefile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
1+
include ../includes.mk
2+
13
.PHONY: all test logs
24

35
all: build run
46

57
build:
6-
vagrant ssh -c 'cd share/controller && sudo docker build -t deis/controller .'
7-
8-
install:
9-
vagrant ssh -c 'sudo systemctl enable /home/core/share/controller/systemd/*'
8+
$(call ssh_all,'cd share/controller && sudo docker build -t deis/controller .')
109

11-
uninstall: stop
12-
vagrant ssh -c 'sudo systemctl disable /home/core/share/controller/systemd/*'
10+
install: check-fleet
11+
$(FLEETCTL) load systemd/*
1312

14-
start:
15-
vagrant ssh -c 'sudo systemctl start deis-controller.service'
13+
uninstall: check-fleet stop
14+
$(FLEETCTL) unload systemd/*
15+
$(FLEETCTL) destroy systemd/*
1616

17-
stop:
18-
vagrant ssh -c 'sudo systemctl stop deis-controller.service'
17+
start: check-fleet
18+
$(FLEETCTL) start -no-block systemd/*
1919

20-
restart:
21-
vagrant ssh -c 'sudo systemctl restart deis-controller.service'
20+
stop: check-fleet
21+
$(FLEETCTL) stop -block-attempts=600 systemd/*
2222

23-
logs:
24-
vagrant ssh -c 'sudo journalctl -f -u deis-controller.service'
23+
restart: stop start
2524

26-
run: install restart logs
25+
run: install start
2726

2827
clean: uninstall
29-
vagrant ssh -c 'sudo docker rm -f deis-controller'
28+
$(call ssh_all,'sudo docker rm -f deis-controller')
3029

3130
full-clean: clean
32-
vagrant ssh -c 'sudo docker rmi deis/controller'
31+
$(call ssh_all,'sudo docker rmi deis/controller')
3332

3433
test:
3534
python manage.py test --noinput api web

0 commit comments

Comments
 (0)