-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathdocker-compose.yml
133 lines (125 loc) · 3.77 KB
/
docker-compose.yml
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
126
127
128
129
130
131
132
133
# This compose file will start up Netflix OSS Tracker and load it with a days worth of data
#
# You need to export a variable before running it with your github key
# export github_oauth=YOUR_KEY_HERE
# export github_org=YOUR_ORG_HERE
#
version: '3'
services:
cassandra:
container_name: osstracker-cassandra
image: cassandra:latest
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
restart: always
volumes:
- ./cassandra_data:/var/lib/cassandra
elasticsearch:
container_name: osstracker-elasticsearch
image: elasticsearch:5.6.4
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ports:
- "9200:9200"
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
restart: always
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./es_data:/usr/share/elasticsearch/data
kibana:
container_name: osstracker-kibana
image: kibana:5.6.4
ports:
- "5601:5601"
restart: always
osstracker-console:
container_name: osstracker-console
image: netflixoss/osstracker-console:latest
ports:
- "3000:3000"
environment:
CASS_HOST: cassandra
CASS_PORT: 9042
ES_HOST: elasticsearch
ES_PORT: 9200
restart: always
depends_on:
- cassandra
- elasticsearch
cassandra-load-keyspace:
container_name: osstracker-cassandra-load-keyspace
image: cassandra:latest
depends_on:
- cassandra
volumes:
- ./osstracker-ddl/osstracker.cql:/osstracker.cql
command: /bin/bash -c "sleep 60 && echo loading cassandra keyspace && cqlsh cassandra -f /osstracker.cql"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
elasticsearch-configure-index-1:
container_name: osstracker-elasticsearch-configure-index-1
image: tutum/curl
depends_on:
- elasticsearch
command: /bin/bash -c "sleep 60 && echo adding index && curl -X PUT elasticsearch:9200/osstracker"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
elasticsearch-configure-index-2:
container_name: osstracker-elasticsearch-configure-index-2
image: tutum/curl
depends_on:
- elasticsearch
volumes:
- ./osstracker-ddl/elasticsearch-mappings.json:/elasticsearch-mappings.json
command: /bin/bash -c "sleep 80 && echo adding index && curl -X PUT -d @/elasticsearch-mappings.json elasticsearch:9200/osstracker/repo_stats/_mapping"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
osstracker-scraper-cassandra:
container_name: osstracker-scraper-cassandra
image: netflixoss/osstracker-scraper:latest
depends_on:
- cassandra
- elasticsearch
environment:
CASS_HOST: cassandra
CASS_PORT: 9042
ES_HOST: elasticsearch
ES_PORT: 9200
github_oauth: ${github_oauth}
github_org: ${github_org}
restart: always
command: /bin/sh -c "sleep 100 && java -cp /osstracker-scraperapp-all.jar com.netflix.oss.tools.osstrackerscraper.app.RunGithubScraper --action updatecassandra"
osstracker-scraper-elasticsearch:
container_name: osstracker-scraper-elasticsearch
image: netflixoss/osstracker-scraper:latest
depends_on:
- cassandra
- elasticsearch
environment:
CASS_HOST: cassandra
CASS_PORT: 9042
ES_HOST: elasticsearch
ES_PORT: 9200
github_oauth: ${github_oauth}
github_org: ${github_org}
restart: always
command: /bin/sh -c "sleep 160 && java -cp /osstracker-scraperapp-all.jar com.netflix.oss.tools.osstrackerscraper.app.RunGithubScraper --action updateelasticsearch"