-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
254 lines (234 loc) · 7.87 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
version: '3.7'
services:
# UKWA Heritrix
heritrix:
build:
context: .
args:
http_proxy: ${HTTP_PROXY}
https_proxy: ${HTTPS_PROXY}
hostname: "h3w" # Set the hostname so the persistent files are in consistent locations
ports:
- "8443:8443"
- "9101:9101" # JMX port
- "9119:9118" # Metrics for Prometheus
environment:
- "JAVA_OPTS=-Xmx2g -javaagent:/jmx_prometheus_javaagent-0.3.1.jar=9101:/jmx-config.yml"
- "CRAWL_NAME=npld-fc"
- "MAX_TOE_THREADS=10"
- "LAUNCH_AUTOMATICALLY=true"
- "PAUSE_AT_START=false"
- "WARC_PREFIX=BL-NPLD-TEST"
- "WEBRENDER_WARC_PREFIX=BL-NPLD-WEBRENDER"
- "SCOPE_LOG_ENABLED=false"
- "SCOPE_FILE_RELOAD_INTERVAL=5"
- "RECORD_DECIDING_RULE=true"
- "KAFKA_BOOTSTRAP_SERVERS=kafka:9092"
- "KAFKA_TOCRAWL_TOPIC=fc.tocrawl"
- "KAFKA_CANDIDATES_LOG_ENABLED=false"
- "KAFKA_CANDIDATES_TOPIC=fc.tocrawl"
- "KAFKA_CANDIDATES_IN_SCOPE_ONLY=true"
- "KAFKA_INSCOPE_TOPIC=fc.inscope"
- "KAFKA_DISCARDED_FEED_ENABLED=true"
- "KAFKA_DISCARDED_TOPIC=fc.discarded"
- "KAFKA_CRAWLED_TOPIC=fc.crawled"
- "KAFKA_NUM_MESSAGE_THREADS=2"
- "KAFKA_SEEK_TO_BEGINNING=false"
- "CDXSERVER_ENDPOINT=http://cdxserver:8080/fc"
- "WEBRENDER_ENABLED=true"
- "WEBRENDER_ENDPOINT=http://webrender:8010/render"
- "CLAMD_ENABLED=true"
- "CLAMD_HOST=clamd"
#- "SURTS_SOURCE_FILE=domain-surts.txt" # Use the domain SURT scope
- "SURTS_SOURCE_FILE=/shared/surts.txt"
# This can be used to test quota enforcement/resetting:
#- "QUOTA_SERVER_MAX_SUCCESS_KB=1"
- "FRONTIER_JE_CLEANER_THREADS=2"
# Needs to be false when using a Bloom filter.
- "URI_FORGETTING_ENABLED=true"
# Override the frontier implementation:
#- "FRONTIER_BEANS_XML=frontier-redis.xml"
#- "REDIS_ENDPOINT=redis://redis:6666"
# Override the uriUniqFilter implementation:
- "URIUNIQFILTER_BEANS_XML=uriuniqfilter-rocksdb.xml"
depends_on:
- clamd
- kafka
- webrender
- cdxserver
- redis
- acid.matkelly.com
- crawl-test-site.webarchive.org.uk
volumes:
- ./docker/jmx_prometheus_javaagent-0.3.1.jar:/jmx_prometheus_javaagent-0.3.1.jar
- ./docker/heritrix-jmx-config.yml:/jmx-config.yml
- ./docker/shared:/shared
- ./target/integration-test-volumes/output:/heritrix/output
- ./target/integration-test-volumes/scratch:/heritrix/scratch
- ./target/integration-test-volumes/state:/heritrix/state
# Clamd virus scanning Service
clamd:
image: ukwa/clamd:1.0.1
ports:
- "3310:3310"
# Kafka
kafka:
image: wurstmeister/kafka:1.1.0
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_LISTENERS: PLAINTEXT://:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_NUM_RECOVERY_THREADS_PER_DATA_DIR: 10
LOG_RETENTION_HOURS: -1
LOG_RETENTION_BYTES: -1
NUM_PARTITIONS: 16
KAFKA_CREATE_TOPICS: "fc.candidates:16:1 --config=compression.type=snappy,fc.tocrawl:16:1 --config=compression.type=snappy,fc.crawled:16:1 --config=compression.type=snappy,fc.discarded:16:1 --config=compression.type=snappy,fc.inscope:16:1 --config=compression.type=snappy"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'
LOG4J_LOGGER_KAFKA: WARN
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- zookeeper
# Needs a Zookeeper too
# ----
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
#healthcheck:
# test: ["CMD-SHELL", "echo ruok | nc -w 2 zookeeper 4444"]
# interval: 5s
# timeout: 10s
# retries: 3
# Kafka UI
kafka-ui:
image: ukwa/docker-trifecta
ports:
- "9000:9000"
environment:
- "ZK_HOST=zookeeper:2181"
depends_on:
- zookeeper
- kafka
# Web page rendering service
webrender:
image: ukwa/webrender-puppeteer:2.1.0
environment:
- "PORT=8010"
- "HTTP_PROXY=http://warcprox:8000/"
- "LC_ALL=en_US.utf8"
- "NODE_ENV=production"
- "WARCPROX_PROXY=true"
- "PUPPETEER_CLUSTER_SIZE=2"
- "WARC_OUTPUT_PATH=/heritrix/wren"
- "WARC_PREFIX=BL-WEBRENDERED"
- "USER_AGENT_ADDITIONAL=bl.uk_lddc_renderbot/@VERSION@ (+https://www.bl.uk/legal-deposit-web-archiving)"
ports:
- "8010:8010"
depends_on:
- warcprox
volumes:
- ./target/integration-test-volumes/wren:/heritrix/wren
# WARC Proxy, with de-duplication disabled and a rapid rollover:
warcprox:
image: ukwa/warcprox:2.4.17.1
command: "warcprox -b 0.0.0.0 -d /heritrix/wren --base32 --gzip --rollover-idle-time 600 --dedup-db-file /dev/null --stats-db-file /dev/null --cacert /heritrix/wren/warcprox-ca.pem --certs-dir /heritrix/wren/warcprox-ca-certs --quiet --plugin warcprox-plugins.listeners.KafkaCaptureFeed --plugin warcprox-plugins.listeners.UpdateOutbackCDX"
environment:
- "LC_ALL=en_US.utf8"
- "TMP=/tmp/warcprox"
- "KAFKA_BOOTSTRAP_SERVERS=kafka:9092"
- "KAFKA_CRAWLED_TOPIC=fc.crawled"
- "KAFKA_CRAWLED_ACKS=1"
- "CDXSERVER_ENDPOINT=http://cdxserver:8080/fc"
ports:
- "8000:8000"
depends_on:
- kafka
- cdxserver
- acid.matkelly.com
- crawl-test-site.webarchive.org.uk
ulimits:
nproc: 2000 # See https://github.com/internetarchive/warcprox/blob/2.x/warcprox/warcproxy.py#L413
volumes:
- ./target/integration-test-volumes/wren:/heritrix/wren
# tinycdxserver
cdxserver:
image: nlagovau/outbackcdx:0.10.0
# Verbose form logs submissions:
command: "java -Xmx2g -jar outbackcdx.jar -u -d /cdx-data -p 8080 -b 0.0.0.0 -t 1000"
ports:
- "9090:8080"
volumes:
- ./target/integration-test-volumes/cdx:/cdx-data
# Redis for the external frontier
redis:
# Redis compatible disk-backed store based on RocksBD:
image: kvrocks/kvrocks
ports:
- "6379:6666"
volumes:
- ./target/integration-test-volumes/kvrocks:/tmp/kvrocks
#image: redis:6
#command: "redis-server --appendonly yes"
#ports:
# - "6379:6379"
#volumes:
# - ./target/integration-test-volumes/redis:/data
# Redis Browser
redis-commander:
image: rediscommander/redis-commander:latest
restart: always
environment:
#- REDIS_HOSTS=redis:redis:6379
- REDIS_HOSTS=redis:redis:6666
ports:
- "8081:8081"
depends_on:
- redis
# ----------------------------------------------
# Wayback Access
# ----------------------------------------------
warc-server:
image: ukwa/warc-server
ports:
- 8001:8000
environment:
- "WARC_PATHS=/heritrix/output,/heritrix/wren"
volumes:
- ./target/integration-test-volumes/wren:/heritrix/wren
- ./target/integration-test-volumes/output:/heritrix/output
# ----------
# Test sites and test runner
# ----------
# Local version of the Archival Acid Test: http://acid.matkelly.com
acid.matkelly.com:
image: ukwa/archival-acid-test:master
ports:
- "180:80"
networks:
default:
aliases:
- www.cs.odu.edu # Emulating the remote host via a simple alias.
# Local version of the UKWA test site: http://data.webarchive.org.uk/crawl-test-site/
crawl-test-site.webarchive.org.uk:
image: ukwa/crawl-test-site:with-robots-txt
ports:
- "280:80"
# This runs the integration tests
robot:
build:
context: integration-test/robot
args:
http_proxy: ${HTTP_PROXY}
https_proxy: ${HTTPS_PROXY}
command: --outputdir /out /tests
volumes:
- ./integration-test/robot/tests:/tests:ro
- ./integration-test/results:/out:rw
depends_on:
- kafka
- cdxserver
- heritrix