docker-stack 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +4 -0
  4. data/.rubocop.yml +25 -0
  5. data/.rubocop_todo.yml +23 -0
  6. data/.travis.yml +12 -0
  7. data/Gemfile +44 -0
  8. data/LICENSE.txt +13 -0
  9. data/README.md +117 -0
  10. data/Rakefile +12 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/docker-stack.gemspec +36 -0
  14. data/lib/docker/stack.rb +8 -0
  15. data/lib/docker/stack/container.rb +45 -0
  16. data/lib/docker/stack/controller.rb +115 -0
  17. data/lib/docker/stack/rake_task.rb +63 -0
  18. data/lib/docker/stack/version.rb +5 -0
  19. data/lib/generators/docker/stack/install_generator.rb +48 -0
  20. data/lib/generators/docker/stack/service.rb +49 -0
  21. data/lib/generators/docker/stack/service/fedora_generator.rb +20 -0
  22. data/lib/generators/docker/stack/service/postgres_generator.rb +22 -0
  23. data/lib/generators/docker/stack/service/redis_generator.rb +20 -0
  24. data/lib/generators/docker/stack/service/solr_generator.rb +22 -0
  25. data/lib/generators/docker/stack/templates/config/database.yml +23 -0
  26. data/lib/generators/docker/stack/templates/config/fedora.yml +15 -0
  27. data/lib/generators/docker/stack/templates/config/redis.yml +9 -0
  28. data/lib/generators/docker/stack/templates/config/solr.yml +7 -0
  29. data/lib/generators/docker/stack/templates/docker.rake +25 -0
  30. data/lib/generators/docker/stack/templates/services/fedora.yml.erb +9 -0
  31. data/lib/generators/docker/stack/templates/services/postgres.yml.erb +13 -0
  32. data/lib/generators/docker/stack/templates/services/redis.yml.erb +10 -0
  33. data/lib/generators/docker/stack/templates/services/solr.yml.erb +20 -0
  34. data/lib/generators/docker/stack/templates/solr/conf/_rest_managed.json +3 -0
  35. data/lib/generators/docker/stack/templates/solr/conf/admin-extra.html +31 -0
  36. data/lib/generators/docker/stack/templates/solr/conf/elevate.xml +36 -0
  37. data/lib/generators/docker/stack/templates/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  38. data/lib/generators/docker/stack/templates/solr/conf/protwords.txt +21 -0
  39. data/lib/generators/docker/stack/templates/solr/conf/schema.xml +366 -0
  40. data/lib/generators/docker/stack/templates/solr/conf/scripts.conf +24 -0
  41. data/lib/generators/docker/stack/templates/solr/conf/solrconfig.xml +322 -0
  42. data/lib/generators/docker/stack/templates/solr/conf/spellings.txt +2 -0
  43. data/lib/generators/docker/stack/templates/solr/conf/stopwords.txt +58 -0
  44. data/lib/generators/docker/stack/templates/solr/conf/stopwords_en.txt +58 -0
  45. data/lib/generators/docker/stack/templates/solr/conf/synonyms.txt +31 -0
  46. data/lib/generators/docker/stack/templates/solr/conf/xslt/example.xsl +132 -0
  47. data/lib/generators/docker/stack/templates/solr/conf/xslt/example_atom.xsl +67 -0
  48. data/lib/generators/docker/stack/templates/solr/conf/xslt/example_rss.xsl +66 -0
  49. data/lib/generators/docker/stack/templates/solr/conf/xslt/luke.xsl +337 -0
  50. data/lib/generators/docker/stack/util.rb +38 -0
  51. metadata +261 -0
@@ -0,0 +1,24 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ user=
17
+ solr_hostname=localhost
18
+ solr_port=8983
19
+ rsyncd_port=18983
20
+ data_dir=
21
+ webapp_name=solr
22
+ master_host=
23
+ master_data_dir=
24
+ master_status_dir=
@@ -0,0 +1,322 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one or more
4
+ contributor license agreements. See the NOTICE file distributed with
5
+ this work for additional information regarding copyright ownership.
6
+ The ASF licenses this file to You under the Apache License, Version 2.0
7
+ (the "License"); you may not use this file except in compliance with
8
+ the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ -->
18
+
19
+ <!--
20
+ This is a stripped down config file used for a simple example...
21
+ It is *not* a good example to work from.
22
+ -->
23
+ <config>
24
+
25
+ <!-- Controls what version of Lucene various components of Solr
26
+ adhere to. Generally, you want to use the latest version to
27
+ get all bug fixes and improvements. It is highly recommended
28
+ that you fully re-index after changing this setting as it can
29
+ affect both how text is indexed and queried.
30
+ -->
31
+ <luceneMatchVersion>5.0.0</luceneMatchVersion>
32
+
33
+ <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
34
+ <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
35
+ <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
36
+ <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
37
+
38
+ <directoryFactory name="DirectoryFactory"
39
+ class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
40
+ </directoryFactory>
41
+
42
+ <codecFactory class="solr.SchemaCodecFactory"/>
43
+
44
+ <schemaFactory class="ClassicIndexSchemaFactory"/>
45
+
46
+
47
+ <dataDir>${solr.blacklight-core.data.dir:}</dataDir>
48
+
49
+ <requestDispatcher handleSelect="true" >
50
+ <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048000" />
51
+ </requestDispatcher>
52
+
53
+ <requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
54
+
55
+ <!-- config for the admin interface -->
56
+ <admin>
57
+ <defaultQuery>*:*</defaultQuery>
58
+ </admin>
59
+
60
+ <updateHandler class="solr.DirectUpdateHandler2">
61
+ <updateLog>
62
+ <str name="dir">${solr.ulog.dir:}</str>
63
+ </updateLog>
64
+
65
+ <autoCommit>
66
+ <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
67
+ <openSearcher>false</openSearcher>
68
+ </autoCommit>
69
+
70
+ <autoSoftCommit>
71
+ <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
72
+ </autoSoftCommit>
73
+ </updateHandler>
74
+
75
+ <!-- SearchHandler
76
+
77
+ http://wiki.apache.org/solr/SearchHandler
78
+
79
+ For processing Search Queries, the primary Request Handler
80
+ provided with Solr is "SearchHandler" It delegates to a sequent
81
+ of SearchComponents (see below) and supports distributed
82
+ queries across multiple shards
83
+ -->
84
+ <requestHandler name="search" class="solr.SearchHandler" default="true">
85
+ <!-- default values for query parameters can be specified, these
86
+ will be overridden by parameters in the request
87
+ -->
88
+ <lst name="defaults">
89
+ <str name="defType">edismax</str>
90
+ <str name="echoParams">explicit</str>
91
+ <str name="q.alt">*:*</str>
92
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
93
+ <int name="qs">1</int>
94
+ <int name="ps">2</int>
95
+ <float name="tie">0.01</float>
96
+ <!-- this qf and pf are used by default, if not otherwise specified by
97
+ client. The default blacklight_config will use these for the
98
+ "keywords" search. See the author_qf/author_pf, title_qf, etc
99
+ below, which the default blacklight_config will specify for
100
+ those searches. You may also be interested in:
101
+ http://wiki.apache.org/solr/LocalParams
102
+ -->
103
+ <str name="qf">
104
+ id
105
+ title_tesim
106
+ author_tesim
107
+ subject_tesim
108
+ </str>
109
+ <str name="pf">
110
+ all_text_timv^10
111
+ </str>
112
+
113
+ <str name="author_qf">
114
+ author_tesim
115
+ </str>
116
+ <str name="author_pf">
117
+ </str>
118
+ <str name="title_qf">
119
+ title_tesim
120
+ </str>
121
+ <str name="title_pf">
122
+ </str>
123
+ <str name="subject_qf">
124
+ subject_tesim
125
+ </str>
126
+ <str name="subject_pf">
127
+ </str>
128
+
129
+ <str name="fl">
130
+ *,
131
+ score
132
+ </str>
133
+
134
+ <str name="facet">true</str>
135
+ <str name="facet.mincount">1</str>
136
+
137
+ <str name="spellcheck">true</str>
138
+ <str name="spellcheck.dictionary">default</str>
139
+ <str name="spellcheck.onlyMorePopular">true</str>
140
+ <str name="spellcheck.extendedResults">true</str>
141
+ <str name="spellcheck.collate">false</str>
142
+ <str name="spellcheck.count">5</str>
143
+
144
+ </lst>
145
+ <arr name="last-components">
146
+ <str>spellcheck</str>
147
+ </arr>
148
+ </requestHandler>
149
+
150
+ <requestHandler name="permissions" class="solr.SearchHandler" >
151
+ <lst name="defaults">
152
+ <str name="facet">off</str>
153
+ <str name="echoParams">all</str>
154
+ <str name="rows">1</str>
155
+ <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
156
+ <str name="fl">
157
+ id,
158
+ access_ssim,
159
+ discover_access_group_ssim,discover_access_person_ssim,
160
+ read_access_group_ssim,read_access_person_ssim,
161
+ edit_access_group_ssim,edit_access_person_ssim,
162
+ depositor_ti,
163
+ embargo_release_date_dtsi
164
+ inheritable_access_ssim,
165
+ inheritable_discover_access_group_ssim,inheritable_discover_access_person_ssim,
166
+ inheritable_read_access_group_ssim,inheritable_read_access_person_ssim,
167
+ inheritable_edit_access_group_ssim,inheritable_edit_access_person_ssim,
168
+ inheritable_embargo_release_date_dtsi
169
+ </str>
170
+ </lst>
171
+ </requestHandler>
172
+
173
+ <requestHandler name="standard" class="solr.SearchHandler">
174
+ <lst name="defaults">
175
+ <str name="echoParams">explicit</str>
176
+ <str name="defType">lucene</str>
177
+ </lst>
178
+ </requestHandler>
179
+
180
+ <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
181
+ <requestHandler name="document" class="solr.SearchHandler" >
182
+ <lst name="defaults">
183
+ <str name="echoParams">all</str>
184
+ <str name="fl">*</str>
185
+ <str name="rows">1</str>
186
+ <str name="q">{!term f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
187
+ </lst>
188
+ </requestHandler>
189
+
190
+ <searchComponent name="termsComponent" class="solr.TermsComponent" />
191
+
192
+ <requestHandler name="/terms" class="solr.SearchHandler">
193
+ <lst name="defaults">
194
+ <bool name="terms">true</bool>
195
+ </lst>
196
+ <arr name="components">
197
+ <str>termsComponent</str>
198
+ </arr>
199
+ </requestHandler>
200
+
201
+ <!-- Spell Check
202
+
203
+ The spell check component can return a list of alternative spelling
204
+ suggestions.
205
+
206
+ http://wiki.apache.org/solr/SpellCheckComponent
207
+ -->
208
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
209
+
210
+ <str name="queryAnalyzerFieldType">textSpell</str>
211
+
212
+ <!-- Multiple "Spell Checkers" can be declared and used by this
213
+ component
214
+ -->
215
+
216
+ <!-- a spellchecker built from a field of the main index, and
217
+ written to disk
218
+ -->
219
+ <lst name="spellchecker">
220
+ <str name="name">default</str>
221
+ <str name="field">spell</str>
222
+ <str name="spellcheckIndexDir">./spell</str>
223
+ <str name="buildOnOptimize">true</str>
224
+ </lst>
225
+ <lst name="spellchecker">
226
+ <str name="name">author</str>
227
+ <str name="field">author_spell</str>
228
+ <str name="spellcheckIndexDir">./spell_author</str>
229
+ <str name="accuracy">0.7</str>
230
+ <str name="buildOnOptimize">true</str>
231
+ </lst>
232
+ <lst name="spellchecker">
233
+ <str name="name">subject</str>
234
+ <str name="field">subject_spell</str>
235
+ <str name="spellcheckIndexDir">./spell_subject</str>
236
+ <str name="accuracy">0.7</str>
237
+ <str name="buildOnOptimize">true</str>
238
+ </lst>
239
+ <lst name="spellchecker">
240
+ <str name="name">title</str>
241
+ <str name="field">title_spell</str>
242
+ <str name="spellcheckIndexDir">./spell_title</str>
243
+ <str name="accuracy">0.7</str>
244
+ <str name="buildOnOptimize">true</str>
245
+ </lst>
246
+
247
+ <!-- a spellchecker that uses a different distance measure -->
248
+ <!--
249
+ <lst name="spellchecker">
250
+ <str name="name">jarowinkler</str>
251
+ <str name="field">spell</str>
252
+ <str name="distanceMeasure">
253
+ org.apache.lucene.search.spell.JaroWinklerDistance
254
+ </str>
255
+ <str name="spellcheckIndexDir">spellcheckerJaro</str>
256
+ </lst>
257
+ -->
258
+
259
+ <!-- a spellchecker that use an alternate comparator
260
+
261
+ comparatorClass be one of:
262
+ 1. score (default)
263
+ 2. freq (Frequency first, then score)
264
+ 3. A fully qualified class name
265
+ -->
266
+ <!--
267
+ <lst name="spellchecker">
268
+ <str name="name">freq</str>
269
+ <str name="field">lowerfilt</str>
270
+ <str name="spellcheckIndexDir">spellcheckerFreq</str>
271
+ <str name="comparatorClass">freq</str>
272
+ <str name="buildOnCommit">true</str>
273
+ -->
274
+
275
+ <!-- A spellchecker that reads the list of words from a file -->
276
+ <!--
277
+ <lst name="spellchecker">
278
+ <str name="classname">solr.FileBasedSpellChecker</str>
279
+ <str name="name">file</str>
280
+ <str name="sourceLocation">spellings.txt</str>
281
+ <str name="characterEncoding">UTF-8</str>
282
+ <str name="spellcheckIndexDir">spellcheckerFile</str>
283
+ </lst>
284
+ -->
285
+ </searchComponent>
286
+
287
+ <searchComponent name="suggest" class="solr.SuggestComponent">
288
+ <lst name="suggester">
289
+ <str name="name">mySuggester</str>
290
+ <str name="lookupImpl">FuzzyLookupFactory</str>
291
+ <str name="suggestAnalyzerFieldType">textSuggest</str>
292
+ <str name="buildOnCommit">true</str>
293
+ <str name="field">suggest</str>
294
+ </lst>
295
+ </searchComponent>
296
+
297
+ <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
298
+ <lst name="defaults">
299
+ <str name="suggest">true</str>
300
+ <str name="suggest.count">5</str>
301
+ <str name="suggest.dictionary">mySuggester</str>
302
+ </lst>
303
+ <arr name="components">
304
+ <str>suggest</str>
305
+ </arr>
306
+ </requestHandler>
307
+
308
+ <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler">
309
+ <lst name="defaults">
310
+ <str name="fmap.Last-Modified">last_modified</str>
311
+ <str name="uprefix">ignored_</str>
312
+ </lst>
313
+ <!--Optional. Specify a path to a tika configuration file. See the Tika docs for details.-->
314
+ <!-- <str name="tika.config">/my/path/to/tika.config</str> -->
315
+ <!-- Optional. Specify one or more date formats to parse. See DateUtil.DEFAULT_DATE_FORMATS
316
+ for default date formats -->
317
+ <!-- <lst name="date.formats"> -->
318
+ <!-- <str>yyyy&#45;MM&#45;dd</str> -->
319
+ <!-- </lst> -->
320
+ </requestHandler>
321
+ </config>
322
+
@@ -0,0 +1,58 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ #-----------------------------------------------------------------------
17
+ # a couple of test stopwords to test that the words are really being
18
+ # configured from this file:
19
+ stopworda
20
+ stopwordb
21
+
22
+ #Standard english stop words taken from Lucene's StopAnalyzer
23
+ a
24
+ an
25
+ and
26
+ are
27
+ as
28
+ at
29
+ be
30
+ but
31
+ by
32
+ for
33
+ if
34
+ in
35
+ into
36
+ is
37
+ it
38
+ no
39
+ not
40
+ of
41
+ on
42
+ or
43
+ s
44
+ such
45
+ t
46
+ that
47
+ the
48
+ their
49
+ then
50
+ there
51
+ these
52
+ they
53
+ this
54
+ to
55
+ was
56
+ will
57
+ with
58
+
@@ -0,0 +1,58 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ #-----------------------------------------------------------------------
17
+ # a couple of test stopwords to test that the words are really being
18
+ # configured from this file:
19
+ stopworda
20
+ stopwordb
21
+
22
+ #Standard english stop words taken from Lucene's StopAnalyzer
23
+ a
24
+ an
25
+ and
26
+ are
27
+ as
28
+ at
29
+ be
30
+ but
31
+ by
32
+ for
33
+ if
34
+ in
35
+ into
36
+ is
37
+ it
38
+ no
39
+ not
40
+ of
41
+ on
42
+ or
43
+ s
44
+ such
45
+ t
46
+ that
47
+ the
48
+ their
49
+ then
50
+ there
51
+ these
52
+ they
53
+ this
54
+ to
55
+ was
56
+ will
57
+ with
58
+