-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (38 loc) · 1 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
CONFIG_DIRS := config
BIN := bin
SRC := $(PWD)
.PHONY: all clean bootstrap master slave flush consul info frak repo
all: bootstrap
bootstrap:
echo "Setup Repository..."
bash $(BIN)/bootstrap
yum install -y docker-engine
systemctl stop docker
systemctl disable docker
cp $(CONFIG_DIRS)/docker-swarm-am.service /lib/systemd/system
chmod 644 /lib/systemd/system/docker-swarm-am.service
systemctl enable docker-swarm-am
systemctl start docker-swarm-am
master:
bash $(BIN)/master $(SRC)
slave:
bash $(BIN)/slave $(SRC)
consul:
docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap
flush:
bash $(BIN)/docker-flush
info:
docker -H :4000 info
frak:
bash $(BIN)/frak $(IP)
clean:
yum remove -y docker-engine docker-engine-selinux
systemctl disable docker-swarm-am
systemctl stop docker-swarm-am
rm -rf /lib/systemd/system/docker-swarm-am.service
repo:
echo "Setup Repository..."
bash $(BIN)/bootstrap
yum install -y docker-engine
systemctl enable docker
systemctl start docker