forked from ukwa/ukwa-heritrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
215 lines (200 loc) · 7.03 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
version: '3.8'
services:
# UKWA Heritrix
heritrix:
build: .
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=2"
- "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"
#- "QUOTA_SERVER_MAX_SUCCESS_KB=1"
- "URI_FORGETTING_ENABLED=false"
links:
- clamd
- kafka
- webrender
- cdxserver
- 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
# Override to use a different uriUniqFilter:
- ./jobs/frequent/uriuniqfilter-bloom.xml:/jobs/frequent/uriuniqfilter.xml
#- ./docker/shared:/shared
- dvc:/heritrix/output
- dvc:/heritrix/state
- dvc:/heritrix/wren
# - ./jobs:/jobs
# Clamd virus scanning Service
clamd:
image: ukwa/clamd
ports:
- "3310:3310"
# Kafka
kafka:
image: wurstmeister/kafka
depends_on:
- zookeeper
ports:
- "9092:9092" # kafka:9092 used inside containerized environment
- "29092:29092" # localhost:29092 used outside containerized environment
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL://localhost:29092
KAFKA_LISTENERS: INTERNAL://:9092,EXTERNAL://:29092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
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: 'true'
LOG4J_LOGGER_KAFKA: WARN
#volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# Needs a Zookeeper too
# ----
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
# Kafka UI
kafka-ui:
image: ukwa/docker-trifecta
ports:
- "9000:9000"
environment:
- "ZK_HOST=zookeeper:2181"
# Web page rendering service
webrender:
image: ukwa/webrender-api:1.0.10
environment: # DOCKER_HOST could be used to run rendering on a dedicated service.
- "WARCPROX=warcprox:8000"
- "DOCKER_NETWORK=ukwa-heritrix_default" # warcprox network, to attach renderer containers to
- "LC_ALL=en_US.utf8"
- "WEB_RENDER_TMP=/tmp/webrender" # Has to match the _host_ folder mounted below.
ports:
- "8010:8010"
links:
- warcprox
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Needs to connect to Docker to launch render container
- /tmp/webrender:/tmp/webrender # Host mount must match internal mount at present!
# WARC Proxy, with de-duplication disabled and a rapid rollover:
warcprox:
image: ukwa/warcprox:2.3.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 --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"
links:
- 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:
- dvc:/heritrix/output
- dvc:/heritrix/state
- dvc:/heritrix/wren
# tinycdxserver
cdxserver:
image: nlagovau/outbackcdx:0.6.1
# Verbose form logs submissions:
#command: "java -jar outbackcdx.jar -v -d /cdx-data -p 8080 -b 0.0.0.0"
ports:
- "9090:8080"
# volumes:
# - ./testing/cdx:/cdx-data
# ----------------------------------------------
# Wayback Access
# ----------------------------------------------
warc-server:
image: ukwa/warc-server
ports:
- 8001:8000
environment:
- "WARC_PATHS=/heritrix/output,/heritrix/wren"
volumes:
- dvc:/heritrix/output:ro
#- dvc:/heritrix/state:ro
- dvc:/heritrix/wren:ro
# OpenWayback for playback
openwayback:
image: ukwa/waybacks
ports:
- "8080:8080"
- "8090:8090"
environment:
- "UKWA_OWB_VERSION=qa"
- "WAYBACK_URL_PORT=8080"
- "WAYBACK_PROXY_PORT=8090"
- "CDX_WHITELIST="
- "WAYBACK_EXCLUDE_FILE=/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/exclude.txt"
- "WAYBACK_EMBARGO=0"
- "WAYBACK_HTTPFS_PREFIX=http://warc-server:8000/by-filename/"
- "CDX_INDEX_SERVER=http://cdxserver:8080/fc"
- "WAYBACK_URL_PREFIX=http://localhost:8080"
- "WAYBACK_URL_HOST=localhost"
# ----------
# Test sites and test runner
# ----------
# Local version of the Archival Acid Test: http://acid.matkelly.com
acid.matkelly.com:
image: ukwa/archival-acid-test
ports:
- "180:80"
# 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: integration-test/robot
depends_on:
- kafka
- cdxserver
command: --outputdir /out /tests
volumes:
- ./integration-test/robot/tests:/tests:ro
- ./integration-test/results:/out:rw
volumes:
dvc: