Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add solr image with cloud mode for tugboat. #82

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
service: [node]
service:
- node
- solr
steps:
- name: Checkout code
uses: actions/[email protected]
Expand Down
65 changes: 65 additions & 0 deletions services/solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
ARG SOLR_VERSION=9.6
FROM tugboatqa/solr:${SOLR_VERSION}
ENV COMPOSER_DISCARD_CHANGES=true
ENV COMPOSER_NO_INTERACTION=true
ENV COMPOSER_ALLOW_SUPERUSER=true
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need these COMPOSER env vars since there is no code checkout on this service.


ENV SOLR_OPTS="-Djute.maxbuffer=50000000"
ENV SOLR_AUTH_TYPE=basic
ENV SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
ENV SOLR_MODE=solrcloud

COPY <<EOF /etc/default/solr.in.sh
SOLR_OPTS="-Djute.maxbuffer=50000000"
SOLR_AUTH_TYPE=basic
SOLR_AUTHENTICATION_OPTS="-Dbasicauth=solr:SolrRocks"
SOLR_MODE=solrcloud
EOF

COPY <<EOF /var/solr/data/security.json
{
"#ddev-generated":true,
"authentication":{
"class":"solr.BasicAuthPlugin",
"credentials":{
"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="
},
"blockUnknown":false
},
"authorization":{
"class":"solr.RuleBasedAuthorizationPlugin",
"permissions":[
{
"name":"admin-ui",
"path":"/admin/*",
"role":"admin"
},
{
"name":"read",
"role":null
},
{
"name":"update",
"role":null
},
{
"name":"all",
"role":"admin"
}
],
"user-role":{
"solr":"admin"
}
}
}
EOF

COPY <<EOF docker/scripts/zkauth.sh
#!/bin/sh
echo "set zoo keeper auth"
solr zk cp file:/var/solr/data/security.json zk:/security.json -z localhost:9983
EOF

RUN chown -R solr:solr /var/solr/data && \
chmod +x docker/scripts/zkauth.sh && \
sed -i '/<!-- Uncomment to enable handling of X-Forwarded- style headers/,/-->/c\ <Call name="addCustomizer"><Arg><New class="org.eclipse.jetty.server.ForwardedRequestCustomizer"/></Arg></Call>' /opt/solr/server/etc/jetty.xml
Loading