-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (36 loc) · 1.21 KB
/
Makefile
File metadata and controls
51 lines (36 loc) · 1.21 KB
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
#
# Deis Makefile
#
ifndef $(DEIS_NUM_INSTANCES)
DEIS_NUM_INSTANCES = 3
endif
define ssh_all
i=1 ; while [[ $$i -le $(DEIS_NUM_INSTANCES) ]] ; do \
vagrant ssh deis-$$i -c $(1) ; \
((i = i + 1)) ; \
done
endef
# ordered list of deis components
COMPONENTS=registry logger database cache controller builder router
all: build run
test_client:
python -m unittest discover client.tests
pull:
$(call ssh_all,'for c in $(COMPONENTS); do docker pull deis/$$c; done')
build:
$(call ssh_all,'cd share && for c in $(COMPONENTS); do cd $$c && docker build -t deis/$$c . && cd ..; done')
install:
for c in $(COMPONENTS); do fleetctl enable ../../$$c/systemd/*; done
uninstall: stop
for c in $(COMPONENTS); do fleetctl disable ../../$$c/systemd/*; done
start:
for c in $(COMPONENTS); do fleetctl start ../../$$c/systemd/*; done
stop:
for c in $(COMPONENTS); do fleetctl stop ../../$$c/systemd/*; done
restart:
for c in $(COMPONENTS); do fleetctl restart ../../$$c/systemd/*; done
run: install restart
clean: uninstall
$(call ssh_all,'cd share && for c in $(COMPONENTS); do docker rm -f deis-$$c; done')
full-clean: clean
$(call ssh_all,'cd share && for c in $(COMPONENTS); do docker rmi deis-$$c; done')