forked from telstra/open-kilda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
125 lines (99 loc) · 3.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# 'make' will build the latest and try to run it.
default: build-latest run-dev
build-base:
base/hacks/kilda-bins.download.sh
base/hacks/shorm.requirements.download.sh
rsync -au kilda-bins/zookeeper* services/zookeeper/tar/
rsync -au kilda-bins/hbase* services/hbase/tar/
rsync -au kilda-bins/kafka* services/kafka/tar/
rsync -au kilda-bins/apache-storm* services/storm/tar/
docker build -t kilda/base-ubuntu:latest base/kilda-base-ubuntu/
docker build -t kilda/zookeeper:latest services/zookeeper
docker build -t kilda/kafka:latest services/kafka
docker build -t kilda/hbase:latest services/hbase
docker build -t kilda/storm:latest services/storm
docker build -t kilda/neo4j:latest services/neo4j
docker build -t kilda/opentsdb:latest services/opentsdb
docker build -t kilda/logstash:latest services/logstash
build-latest: build-base compile
docker-compose build
run-dev:
docker-compose up
up-test-mode:
@echo ~~
@echo ~~ Starting KILDA, and will print the status of Storm Topology deployments
@echo ~~ Once the topology deployments are done, it should be safe to test
@echo ~~
@echo
OK_TESTS="DISABLE_LOGIN" docker-compose up -d
docker-compose logs -f wfm
up-log-mode: up-test-mode
docker-compose logs -f
# keeping run-test for backwards compatibility (documentation) .. should depracate
run-test: up-log-mode
clean-sources:
$(MAKE) -C services/src clean
$(MAKE) -C services/mininet clean
mvn -f services/wfm/pom.xml clean
update-parent:
mvn --non-recursive -f services/src/pom.xml install -DskipTests
update-pce:
mvn -f services/src/pce/pom.xml install -DskipTests
update-msg:
mvn -f services/src/messaging/pom.xml install -DskipTests
update: update-parent update-msg update-pce
compile:
$(MAKE) -C services/src
$(MAKE) -C services/wfm all-in-one
$(MAKE) -C services/mininet
.PHONY: unit unit-java-common unit-java-storm unit-py-te
unit: unit-java-common unit-java-storm unit-py-te
unit-java-common: build-base
$(MAKE) -C services/src
unit-java-storm: avoid-port-conflicts
mvn -B -f services/wfm/pom.xml test
unit-py-te:
$(MAKE) -C services/topology-engine ARTIFACTS=../../artifact/topology-engine test
.PHONY: avoid-port-conflicts
avoid-port-conflicts:
docker-compose stop
clean-test:
docker-compose down
docker-compose rm -fv
docker volume list -q | grep kilda | xargs docker volume rm
update-props:
ansible-playbook -D -s config.yml
update-props-dryrun:
ansible-playbook -D -C -v -s config.yml
# NB: To override the default (localhost) kilda location, you can make a call like this:
# cd services/src/atdd && \
# mvn "-Dtest=org.bitbucket.openkilda.atdd.*" \
# -DargLine="-Dkilda.host=127.0.0.1" \
# test
#
# NB: Adjust the default tags as ATDD tests are created and validated.
# Regarding syntax .. @A,@B is logical OR .. --tags @A --tags @B is logical AND
#
# (crimi) - 2018.03.25 .. these tags seem to be the right tags for ATDD
# tags := @TOPO,@FCRUD,@NB,@FPATH,@FREINSTALL,@PCE --tags @MVP1
#
tags := @TOPO,@FCRUD,@FREINSTALL --tags @MVP1
kilda := 127.0.0.1
# EXAMPLES:
# ( @NB OR @STATS ) AND @MVP1
# --tags @NB,@STATS --tags @MVP1
# make atdd kilda=127.0.0.1 tags=@
# mvn -f services/src/atdd/pom.xml -Patdd test -Dkilda.host="127.0.0.1" -Dcucumber.options="--tags @CRUD_UPDATE"
# mvn -f services/src/atdd/pom.xml -Patdd test -Dkilda.host="127.0.0.1" -Dsurefire.useFile=false -Dcucumber.options="--tags @CRUD_UPDATE"
atdd: update
mvn -f services/src/atdd/pom.xml -P$@ test -Dkilda.host="$(kilda)" -Dcucumber.options="--tags $(tags)"
smoke: update
mvn -f services/src/atdd/pom.xml -P$@ test -Dkilda.host="$(kilda)"
perf: update
mvn -f services/src/atdd/pom.xml -P$@ test -Dkilda.host="$(kilda)"
sec: update
mvn -f services/src/atdd/pom.xml -P$@ test -Dkilda.host="$(kilda)"
.PHONY: default run-dev build-latest build-base
.PHONY: up-test-mode up-log-mode run-test clean-test
.PHONY: atdd smoke perf sec
.PHONY: clean-sources unit update