Skip to content

Commit df689e1

Browse files
author
synapticloop
committed
fixed docker and put into original folders
1 parent 988965b commit df689e1

54 files changed

Lines changed: 325 additions & 16 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/originals/README.md

Lines changed: 34 additions & 0 deletions

src/originals/docker/9/Dockerfile

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
FROM alpine:3.22.1
2+
3+
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
4+
# The TAG argument is the docker tag that will be used to build the docker
5+
# image and will be of the form:
6+
# synapticloop:${TAG}
7+
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
8+
ARG TAG
9+
10+
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
11+
# Update and upgrade alpine linux, then Install necessary packages:
12+
# lsof - for the Solr server to be able to determine the port number
13+
# that it was started on (so it can listen for startup)
14+
# bash - the preferred shell
15+
# procps - an updated ps command for the Solr server to determine the
16+
# PID so that it can gracefully shtdown the server
17+
# openjdk21 - The Open JDK to run the Solr and Panl servers
18+
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
19+
RUN apk update && apk upgrade
20+
RUN apk add lsof bash procps openjdk21
21+
22+
23+
# ~ ~ ~ ~ ~ ~ ~ ~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~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
44+
# 1. Set up the linking for the Solr and Panl installation
45+
# 2. Copy the Solr configuration files for the standalone Solr server
46+
# 3. Copy the override shell script so that Solr accepts all connections
47+
# 4. Copy over the Panl configuration for thge standalone connection
48+
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
49+
WORKDIR /java-servers/
50+
51+
RUN ln -s solr-9.9.0-slim solr
52+
RUN ln -s ${TAG} panl
53+
54+
RUN mkdir /java-servers/solr/mechanical-pencils/
55+
RUN mkdir /java-servers/solr/server/solr/mechanical-pencils/
56+
RUN cp -R /java-servers/panl/sample/solr/mechanical-pencils/* /java-servers/solr/server/solr/mechanical-pencils/
57+
58+
WORKDIR /
59+
COPY src/docker/solr.in.sh /java-servers/solr/bin/
60+
RUN chmod a+x /java-servers/solr/bin/solr.in.sh
61+
62+
COPY src/docker/panl.properties /java-servers/panl/sample/panl/mechanical-pencils/panl.properties
63+
64+
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
65+
# Copy over the indexer shell script and execute it - this will:
66+
# 1. Start the Solr server in standalone mode
67+
# 2. Create the mechanical-pencils collection
68+
# 3. Populate the Solr index with the mechanical pencils dataset
69+
# 4. Stop the Solr server
70+
# ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
71+
COPY src/docker/index-collection.sh /
72+
RUN chmod a+x /index-collection.sh
73+
RUN /index-collection.sh
74+
75+
# ~ ~ ~ ~ ~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solr/ && bin/solr post -c mechanical-pencils /java-servers/panl/sample/data/mechanical-pencils.json
6+
cd /java-servers/solr/ && bin/solr stop
7+
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
2+
# __ #
3+
# .-----.---.-.-----.| | #
4+
# | _ | _ | || | #
5+
# | __|___._|__|__||__| #
6+
# |__| ... .-.. #
7+
# #
8+
# ~ ~ ~ * ~ ~ ~ #
9+
# #
10+
# PANL/SOLR SERVER CONNECTION CONFIGURATION #
11+
# --------- ------ ---------- ------------- #
12+
# #
13+
# This is the Panl configuration file which configures the base functionality #
14+
# and defines how Panl will connect to the Solr server. #
15+
# #
16+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
17+
18+
# Which Solr Client To Use
19+
# ----- ---- ------ -- ---
20+
# Choose the correct SolrJ client for the Solr installation that you require,
21+
# by default, it is the CloudSolrClient.
22+
#
23+
# NOTE: What the solr.search.server.url will be will depend on the client that
24+
# you choose. The SolrJ client __MUST__ be one of
25+
#
26+
# - Http2SolrClient
27+
# - HttpJdkSolrClient
28+
# - LBHttp2SolrClient
29+
# - CloudSolrClient
30+
#
31+
# By default - we will be using the CloudSolrClient as it works with the
32+
# example instructions for spinning up a test solr instance
33+
#
34+
# ~ ~ ~ * ~ ~ ~
35+
36+
solrj.client=Http2SolrClient
37+
#solrj.client=HttpJdkSolrClient
38+
#solrj.client=LBHttp2SolrClient
39+
#solrj.client=CloudSolrClient
40+
41+
# Which Solr URLs To Connect To
42+
# ----- ---- ---- -- ------- --
43+
# Dependent on which Solr server installation you have, and consequently the
44+
# SolrJ Client that is configured, this will either be a single url, or a comma
45+
# separated list of URLs
46+
#
47+
# solr.search.server.url - the search server URL to connect to which must
48+
# NOT include the core that it is connecting to - this will be taken
49+
# care of by the Panl request mechanism.
50+
#
51+
# NOTE: that if you are using connector that has multiple URLs, then
52+
# they MUST be comma separated.
53+
#
54+
# NOTE: If you are using the CloudSolrClient as a connector and you wish to
55+
# use the zookeeper URLs, then you __MUST__ prefix the URLs with
56+
#
57+
# zookeeper:
58+
#
59+
# The below property would then become:
60+
#
61+
# solr.search.server.url=zookeeper:localhost:9983
62+
#
63+
# ~ ~ ~ * ~ ~ ~
64+
65+
solr.search.server.url=http://localhost:8983/solr
66+
67+
# Whether To Enable The Testing URLs
68+
# ------- -- ------ --- ------- ----
69+
# The Panl results viewer / explainer URLs, this is a simple web app which will
70+
# allow you to test and explain the collections and the URLs that are
71+
# generated, including fields, faceting, querying, sorting, and results.
72+
#
73+
# If this property does not exist, or if it is set to false, then no results
74+
# viewer /explainer will be available. You may wish to remove this property
75+
# for production (or perhaps just disallow access to it).
76+
#
77+
# The URI paths are __ALWAYS__
78+
# /panl-results-viewer/ - for testing the queries, facets, and results
79+
# /panl-results-explainer/ - for explaining LPSE encoded URIs and describing
80+
# the configuration for the Panl server.
81+
#
82+
# ~ ~ ~ * ~ ~ ~
83+
84+
panl.results.testing.urls=true
85+
86+
# Whether To Enable Verbose Error Messaging
87+
# ------- -- ------ ------- ----- ---------
88+
# Whether verbose messaging is turned on for the error (404 / 500) http status
89+
# messages. Verbose messaging for the 404 error will provide valid URI paths
90+
# to connect to. Verbose messaging for the 500 error will provide a
91+
# stacktrace.
92+
#
93+
# The recommendation is to set both of these properties to false to reduce the
94+
# possibility of information leakage.
95+
#
96+
# ~ ~ ~ * ~ ~ ~
97+
98+
panl.status.404.verbose=true
99+
panl.status.500.verbose=true
100+
101+
# Decimal Values Format
102+
# ------- ------ ------
103+
# Whether decimal values use a decimal point or a decimal comma. For example
104+
# The number
105+
#
106+
# 1,234,567.89
107+
#
108+
# uses the decimal point '.' as the separator between the integer and the
109+
# fractional part, whereas the number
110+
#
111+
# 1.234.567,89
112+
#
113+
# uses the decimal comma ',' as the separator between the integer and the
114+
# fractional part.
115+
#
116+
# The default for the Panl server is to use the decimal point, should you wish
117+
# to change this, set the property below to false to use the decimal comma
118+
# character for decimal values.
119+
#
120+
# ~ ~ ~ * ~ ~ ~
121+
122+
panl.decimal.point=true
123+
124+
125+
# Remove Un-needed JSON Keys
126+
# ------ --------- ---- ----
127+
# Set this property to true is you do not require information in the JSON
128+
# response object. This will remove the JSON keys from the response:
129+
#
130+
# - facet_counts
131+
# - responseHeader.params
132+
#
133+
# If you are starting from a fresh implementation without any legacy use of the
134+
# original Solr response object, then this is safe to set to 'true'
135+
#
136+
# ~ ~ ~ * ~ ~ ~
137+
138+
panl.remove.solr.json.keys=false
139+
140+
# Add 'extra' Information To Every Response
141+
# --- ------- ----------- -- ----- --------
142+
# This property __MUST__ be a valid JSON object and will be added to every
143+
# response from the Panl server. It will be added to the JSON response object
144+
# under the panl.extra JSON key.
145+
#
146+
# You may also add an 'extra' JSON object to each of the collections, with the
147+
# panl.extra JSON key which will override any keys in this JSON object.
148+
#
149+
# IMPORTANT:
150+
#
151+
# - If this is not a valid JSON object, then the server will error and fail
152+
# to start.
153+
# - These values may be overwritten by the panl.collection.extra property in
154+
# the individual <panl_collection_url>.panl.properties files
155+
# - You may remove this property or leave it blank and it will have no effect
156+
# and will not be included in the Panl JSON Response
157+
#
158+
# ~ ~ ~ * ~ ~ ~
159+
160+
panl.server.extra=
161+
162+
# Collection Property File Inclusion
163+
# ---------- -------- ---- ---------
164+
# Each property file defines a singular collection, with the associated
165+
# properties and configuration. The format of the property is:
166+
#
167+
# panl.collection.<solr_collection_name>=<properties_file_location>
168+
#
169+
# Where:
170+
# <solr_collection_name> is the collection to query on the Solr server
171+
# <properties_file_location> is the relative location __FROM__ this file
172+
# (i.e. the panl.properties file). The format of
173+
# the filename is:
174+
#
175+
# <panl_collection_uri>.panl.properties
176+
#
177+
# Where:
178+
# <panl_collection_uri> is the base URI path that the Panl server will
179+
# respond to, i.e. it will be bound to the Panl URL
180+
# of http://localhost:port/<panl_collection_uri>
181+
#
182+
# NOTE: You may have multiple <panl_collection_uri> values for each
183+
# <solr_collection_name> with different fieldset configurations
184+
#
185+
# ~ ~ ~ * ~ ~ ~
186+
187+
panl.collection.mechanical-pencils=mechanical-pencils.panl.properties

src/originals/docker/9/solr.in.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SOLR_JETTY_HOST="0.0.0.0"

src/originals/docker/9/startup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
cd /java-servers/solr/ && bin/solr start -force
4+
cd /java-servers/panl/ && bin/panl server -properties /java-servers/panl/sample/panl/mechanical-pencils/panl.properties
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)