Support for Explicit Routing Sharding.

Updating documentation.
This commit is contained in:
Angel Borroy
2019-06-17 09:25:21 +02:00
parent 1cd7d6e444
commit 212dad684f
9 changed files with 214 additions and 74 deletions

View File

@@ -5,7 +5,7 @@ This project generates a collection of Docker Compose Templates to test Reposito
* Plain HTTP communications
* TLS/SSL Mutual Authentication communications
* Sharding (dynamic)
* Sharding (dynamic) with DB_ID or Explicit Routing
* Replication (master/slave)
## Project structure
@@ -16,12 +16,15 @@ Following templates are provided.
$ tree generators/app/templates/6.1
├── .env
├── alfresco
│   ── Dockerfile
│   ── Dockerfile
│   └── model
│   ├── sharding-content-model-context.xml
│   └── sharding-content-model.xml
├── docker-compose-ce.yml
├── docker-compose-ee.yml
├── search
│   └── Dockerfile
── zeppelin
── zeppelin
| └── Dockerfile
└── keystores
├── alfresco
@@ -33,6 +36,7 @@ $ tree generators/app/templates/6.1
* `docker-compose-ce.yml` is the base Docker Compose Template for Alfresco Community deployment
* `docker-compose-ee.yml` is the base Docker Compose Template for Alfresco Enterprise deployment
* `alfresco` includes a Dockerfile template to start Alfresco Repository
* Default content model for Sharding Explicit Routing is included in folder `model`
* `search` includes a Dockerfile template to start Search Services and Insight Engine
* `zeppelin` includes a Dockerfile template to start Zeppelin with SSL
* `keystores` includes every truststore and keystore required for SSL configuration
@@ -56,37 +60,59 @@ $ yo alfresco-docker-compose
## Community
When using Community, Plain HTTP or TLS/SSL Mutual Auth can be selected.
When using Community, some different options can be combined:
Additionally, if Plain HTTP is selected, SOLR Replication can be added.
* Plain HTTP (http) or TLS/SSL Mutual Authentication (https)
* Use SOLR Replication in Master/Slave mode (only when using http)
* Use dynamic Sharding with 2 SOLR nodes pre-configured (only when not using SOLR Replication)
* Use Explicit Routing for Shards instead of DB_ID (only when using Sharding)
```
? Which Alfresco version do you want to use? 6.1
? Would you like to use Alfresco enterprise or community? community
? Would you like to use http or https? http
? Would you like to use a SOLR Replication (2 nodes in master-slave)? Yes
? Would you like to use dynamic Sharding (2 SOLR nodes)? Yes
? Would you like to use SOLR Explicit Routing instead of DB_ID for the Shards? Yes
```
## Enterprise
When using Enterprise, some different options can be combined:
When using Enterprise, some options can be added to Community configuration:
* Plain HTTP (http) or TLS/SSL Mutual Auth (https)
* Use SOLR Replication in Master/Slave mode (only for http)
* Insight Engine, as Search Services is selected by default
* Deploy Zeppelin app to use JDBC Connector to SOLR
* Use dynamic Sharding with 2 SOLR nodes pre-configured (only when not using SOLR Replication)
```
? Which Alfresco version do you want to use? 6.1
? Would you like to use Alfresco enterprise or community? enterprise
? Would you like to use http or https? https
? Would you like to use Insight Engine instead of Search Services? Yes
? Would you like to deploy Zeppelin? Yes
? Would you like to use dynamic Sharding (2 SOLR nodes)? Yes
? Would you like to use a SOLR Replication (2 nodes in master-slave)? Yes
```
## Using Explicit Routing feature
Custom content model is deployed to provide a property, named `shard:shardId`, holding the Shard Number (0, 1) where the content is indexed.
## Configuration catalog
| Version | Comms | Replication | Sharding | Explicit | Insight | Zeppelin |
| - | - | - | - | - | - | - |
| community | http | - | - | - | x | x |
| community | http | true | x | x | x | x |
| community | http | false | true | false | x | x |
| community | http | false | true | true | x | x |
| community | https | x | - | - | x | x |
| community | https | x | true | false | x | x |
| community | https | x | true | true | x | x |
| enterprise | http | - | - | - | (*) | (*) |
| enterprise | http | true | x | x | (*) | (*) |
| enterprise | http | false | true | false | (*) | (*) |
| enterprise | http | false | true | true | (*) | (*) |
| enterprise | https | x | - | - | (*) | (*) |
| enterprise | https | x | true | false | (*) | (*) |
| enterprise | https | x | true | true | (*) | (*) |
Both `community` and `enterprise` ACS deployments can be used with the same options, but `enteprise` may also use Insight Engine (replacing Search Services) and Insight Zeppelin services.
## Passing parameters from command line
Default values for options can be specified in the command line, using a `--name=value` pattern. When an options is specified in the command line, the question is not prompted to the user, so you can generate a Docker Compose template with no user interaction.
@@ -104,6 +130,7 @@ $ yo alfresco-docker-compose --acsVersion=6.1 --alfrescoVersion=community --http
`--insightEngine`: true or false
`--zeppelin`: true or false
`--sharding`: true or false
`--explicitRouting`: true or false
## Using Docker Compose
@@ -122,7 +149,7 @@ $ docker-compose down
**Community URLs**
HTTP
*HTTP*
http://localhost:8080/share
@@ -130,12 +157,12 @@ http://localhost:8082/alfresco
http://localhost:8083/solr
When using SOLR Replication, additionally
When using SOLR Replication or Sharding, additionally
http://localhost:8084/solr
SSL
*SSL*
http://localhost:8080/share
@@ -145,9 +172,14 @@ https://localhost:8443/alfresco
https://localhost:8083/solr
When using SOLR Sharding, additionally
https://localhost:8084/solr
**Enterprise URLs**
HTTP
*HTTP*
http://localhost:8080/share
@@ -157,12 +189,12 @@ http://localhost:8083/solr
http://localhost:9090/zeppelin
When using SOLR Replication, additionally
When using SOLR Replication or Sharding, additionally
http://localhost:8084/solr
SSL
*SSL*
http://localhost:8080/share
@@ -174,7 +206,6 @@ https://localhost:8083/solr
http://localhost:9090/zeppelin
When using SOLR Sharding, additionally
## License
LGPL-3.0 © [Angel Borroy]()
https://localhost:8084/solr

View File

@@ -9,7 +9,7 @@ var banner = require('./banner')
* - Plain HTTP communications
* - TLS/SSL Mutual Authentication communications
* - Sharding (dynamic)
* - Clustering (master-slave)
* - Replication (master-slave)
*/
module.exports = class extends Generator {
@@ -46,10 +46,29 @@ module.exports = class extends Generator {
return response.httpMode == 'http' || commandProps['httpMode'] == 'http';
},
type: 'confirm',
name: 'clustering',
name: 'replication',
message: 'Would you like to use SOLR Replication (2 nodes in master-slave)?',
default: false
},
,
{
when: function (response) {
return !response.replication && !commandProps['replication'];
},
type: 'confirm',
name: 'sharding',
message: 'Would you like to use dynamic Sharding (2 SOLR nodes)?',
default: false
},
{
when: function (response) {
return response.sharding;
},
type: 'confirm',
name: 'explicitRouting',
message: 'Would you like to use SOLR Explicit Routing instead of DB_ID for the Shards?',
default: false
},
// Enterprise only options
{
when: function (response) {
@@ -69,16 +88,6 @@ module.exports = class extends Generator {
name: 'zeppelin',
message: 'Would you like to deploy Zeppelin?',
default: false
},
{
when: function (response) {
return (response.alfrescoVersion == 'enterprise' || commandProps['alfrescoVersion'] == 'enterprise') &&
(!response.clustering && !commandProps['clustering']);
},
type: 'confirm',
name: 'sharding',
message: 'Would you like to use dynamic Sharding (2 SOLR nodes)?',
default: false
}
];
@@ -155,13 +164,13 @@ module.exports = class extends Generator {
secureComms: (this.props.httpMode == 'http' ? 'none' : 'https'),
acsTag: acsEnvTag,
alfrescoPort: (this.props.httpMode == 'http' ? '8080' : '8443'),
clustering: (this.props.clustering ? "true" : "false"),
searchSolrHost: (this.props.clustering ? "solr6secondary" : "solr6"),
replication: (this.props.replication ? "true" : "false"),
searchSolrHost: (this.props.replication ? "solr6secondary" : "solr6"),
searchTag: searchEnvTag,
searchPath: searchBasePath,
zeppelin: (this.props.zeppelin ? "true" : "false"),
sharding: (this.props.sharding ? "true" : "false"),
clustering: (this.props.clustering ? "true" : "false"),
explicitRouting: (this.props.explicitRouting ? "true" : "false")
}
);

View File

@@ -3,7 +3,7 @@ ALFRESCO_CE_TAG=6.1.2-ga
SEARCH_CE_TAG=latest
# Enterprise
ALFRESCO_TAG=6.1.0.3
ALFRESCO_TAG=6.1.0.4
SHARE_TAG=6.1.0
POSTGRES_TAG=10.1
TRANSFORM_ROUTER_TAG=1.0.1

View File

@@ -32,7 +32,7 @@ RUN if [ "$SOLR_COMMS" == "https" ] ; then \
" >> ${TOMCAT_DIR}/shared/classes/alfresco-global.properties; \
fi
### Enable SSL by adding the proper Connector to server.xml
# Enable SSL by adding the proper Connector to server.xml
RUN if [ "$SOLR_COMMS" == "https" ] ; then \
sed -i "s/\
[[:space:]]\+<\/Engine>/\n\
@@ -45,3 +45,6 @@ RUN if [ "$SOLR_COMMS" == "https" ] ; then \
truststorePass=\"${TRUSTSTORE_PASS}\" truststoreType=\"${TRUSTSTORE_TYPE}\" clientAuth=\"want\" sslProtocol=\"TLS\">\n\
<\/Connector>/g" ${TOMCAT_DIR}/conf/server.xml; \
fi
# Explicit Routing Sharding content model (useless when not using this feature)
COPY model/sharding-content-model*.xml $TOMCAT_DIR/shared/classes/alfresco/extension/

View File

@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="org.alfresco.sharding-content-model.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/sharding-content-model.xml</value>
</list>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="shard:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Explicit Routing for Sharding Sample Model</description>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/sharding/1.0" prefix="shard"/>
</namespaces>
<aspects>
<aspect name="shard:sharding">
<properties>
<!-- Shard number to index this content -->
<property name="shard:shardId">
<type>d:text</type>
</property>
</properties>
</aspect>
</aspects>
</model>

View File

@@ -13,7 +13,7 @@ services:
TRUSTSTORE_PASS: kT9X6oe68t
KEYSTORE_TYPE: JCEKS
KEYSTORE_PASS: kT9X6oe68t <% } %>
mem_limit: 1500m
mem_limit: 1800m
environment:
JAVA_OPTS : "
-Ddb.driver=org.postgresql.Driver
@@ -23,7 +23,8 @@ services:
-Dsolr.host=<%=searchSolrHost%>
-Dsolr.port.ssl=8983
-Dsolr.secureComms=<%=secureComms%>
-Dsolr.base.url=/solr
-Dsolr.base.url=/solr <% if (sharding == 'true') { %>
-Dsolr.useDynamicShardRegistration=true <% } %>
-Dindex.subsystem.name=solr6
-Dshare.host=localhost
-Dalfresco.port=8082
@@ -32,7 +33,7 @@ services:
-Ddeployment.method=DOCKER_COMPOSE
-Dcsrf.filter.enabled=false
-Dalfresco.restApi.basicAuthScheme=true
-Xms1g -Xmx1g
-Xms1500m -Xmx1500m
"
ports:
- 8082:8080 <% if (httpMode == 'https') { %>
@@ -49,10 +50,14 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (clustering == 'true') { %>
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %>
mem_limit: 2500m
ENABLE_SLAVE: "false" <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
NUM_SHARDS: "2"
SHARD_ID: "0" <% } %> <% if (explicitRouting == 'true') { %>
EXPLICIT_ROUTING_SHARDING: "true" <% } %>
mem_limit: 1200m
environment:
#Solr needs to know how to register itself with Alfresco
SOLR_ALFRESCO_HOST: "alfresco"
@@ -62,14 +67,20 @@ services:
SOLR_SOLR_PORT: "8983"
#Create the default alfresco and archive cores
SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive"
SOLR_JAVA_MEM: "-Xms2g -Xmx2g" <% if (httpMode == 'https') { %>
SOLR_SSL_TRUST_STORE: "/opt/alfresco-search-services/keystore/ssl.repo.client.truststore"
SOLR_JAVA_MEM: "-Xms1g -Xmx1g" <% if (httpMode == 'https') { %>
SOLR_SSL_TRUST_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.truststore"
SOLR_SSL_TRUST_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_TRUST_STORE_TYPE: "JCEKS"
SOLR_SSL_KEY_STORE: "/opt/alfresco-search-services/keystore/ssl.repo.client.keystore"
SOLR_SSL_KEY_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_KEY_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_KEY_STORE_TYPE: "JCEKS"
SOLR_SSL_NEED_CLIENT_AUTH: "true"
SOLR_SSL_NEED_CLIENT_AUTH: "true" <% if (sharding == 'true') { %>
SOLR_SSL_CLIENT_KEY_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_CLIENT_KEY_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_CLIENT_KEY_STORE_TYPE: "JCEKS"
SOLR_SSL_CLIENT_TRUST_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_CLIENT_TRUST_STORE_TYPE: "JCEKS" <% } %>
SOLR_OPTS: "
-Dsolr.ssl.checkPeerName=false
-Dsolr.allow.unsafe.resourceloading=true
@@ -79,7 +90,7 @@ services:
volumes:
- ./keystores/solr:/opt/<%=searchPath%>/keystore <% } %>
<% if (clustering == 'true') { %>
<% if (sharding == 'true' || replication == 'true') { %>
solr6secondary:
build:
context: ./search
@@ -87,11 +98,17 @@ services:
SEARCH_TAG: ${SEARCH_CE_TAG}
SOLR_HOSTNAME: solr6secondary
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%>
ENABLE_MASTER: "false"
ENABLE_SLAVE: "true"
MASTER_HOST: solr6
mem_limit: 2g
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false"
MASTER_HOST: solr6 <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
NUM_SHARDS: "2"
SHARD_ID: "1" <% } %> <% if (explicitRouting == 'true') { %>
EXPLICIT_ROUTING_SHARDING: "true" <% } %>
mem_limit: 1200m
environment:
#Solr needs to know how to register itself with Alfresco
SOLR_ALFRESCO_HOST: "alfresco"
@@ -101,24 +118,50 @@ services:
SOLR_SOLR_PORT: "8983"
#Create the default alfresco and archive cores
SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive"
SOLR_JAVA_MEM: "-Xms2g -Xmx2g"
SOLR_JAVA_MEM: "-Xms1g -Xmx1g" <% if (httpMode == 'https') { %>
SOLR_SSL_TRUST_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.truststore"
SOLR_SSL_TRUST_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_TRUST_STORE_TYPE: "JCEKS"
SOLR_SSL_KEY_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_KEY_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_KEY_STORE_TYPE: "JCEKS"
SOLR_SSL_NEED_CLIENT_AUTH: "true" <% if (sharding == 'true') { %>
SOLR_SSL_CLIENT_KEY_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_CLIENT_KEY_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_CLIENT_KEY_STORE_TYPE: "JCEKS"
SOLR_SSL_CLIENT_TRUST_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_CLIENT_TRUST_STORE_TYPE: "JCEKS" <% } %>
SOLR_OPTS: "
-Dsolr.ssl.checkPeerName=false
-Dsolr.allow.unsafe.resourceloading=true
" <% } %>
ports:
- 8084:8983
- 8084:8983 <% if (httpMode == 'https') { %>
volumes:
- ./keystores/solr:/opt/<%=searchPath%>/keystore <% } %>
<% } %>
share:
image: alfresco/alfresco-share:${SHARE_TAG}
mem_limit: 1g
environment:
- REPO_HOST=alfresco
- REPO_PORT=8080
- "CATALINA_OPTS= -Xms500m -Xmx500m"
REPO_HOST: "alfresco"
REPO_PORT: "8080"
JAVA_OPTS: "
-Xms500m
-Xmx500m
-Dalfresco.host=localhost
-Dalfresco.port=8080
-Dalfresco.context=alfresco
-Dalfresco.protocol=http
"
ports:
- 8080:8080
postgres:
image: postgres:${POSTGRES_TAG}
mem_limit: 1500m
mem_limit: 512m
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
@@ -129,7 +172,7 @@ services:
activemq:
image: alfresco/alfresco-activemq:${ACTIVE_MQ_TAG}
mem_limit: 2048m
mem_limit: 512m
ports:
- 8161:8161 # Web Console
- 5672:5672 # AMQP

View File

@@ -57,12 +57,13 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (clustering == 'true') { %>
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
NUM_SHARDS: "2"
SHARD_ID: "0" <% } %>
SHARD_ID: "0" <% } %> <% if (explicitRouting == 'true') { %>
EXPLICIT_ROUTING_SHARDING: "true" <% } %>
mem_limit: 1200m
environment:
#Solr needs to know how to register itself with Alfresco
@@ -96,23 +97,24 @@ services:
volumes:
- ./keystores/solr:/opt/<%=searchPath%>/keystore <% } %>
<% if (sharding == 'true' || clustering == 'true') { %>
<% if (sharding == 'true' || replication == 'true') { %>
solr6secondary:
build:
context: ./search
args:
SEARCH_TAG: ${<%=searchTag%>}
SEARCH_TAG: ${SEARCH_CE_TAG}
SOLR_HOSTNAME: solr6secondary
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (clustering == 'true') { %>
MASTER_HOST: "solr6"
ENABLE_MASTER: "false"
ENABLE_SLAVE: "true" <% } %> <% if (sharding == 'true') { %>
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false"
MASTER_HOST: solr6 <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
NUM_SHARDS: "2"
SHARD_ID: "1" <% } %>
SHARD_ID: "1" <% } %> <% if (explicitRouting == 'true') { %>
EXPLICIT_ROUTING_SHARDING: "true" <% } %>
mem_limit: 1200m
environment:
#Solr needs to know how to register itself with Alfresco
@@ -130,13 +132,13 @@ services:
SOLR_SSL_KEY_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_KEY_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_KEY_STORE_TYPE: "JCEKS"
SOLR_SSL_NEED_CLIENT_AUTH: "true"
SOLR_SSL_NEED_CLIENT_AUTH: "true" <% if (sharding == 'true') { %>
SOLR_SSL_CLIENT_KEY_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_CLIENT_KEY_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_CLIENT_KEY_STORE_TYPE: "JCEKS"
SOLR_SSL_CLIENT_TRUST_STORE: "/opt/<%=searchPath%>/keystore/ssl.repo.client.keystore"
SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD: "kT9X6oe68t"
SOLR_SSL_CLIENT_TRUST_STORE_TYPE: "JCEKS"
SOLR_SSL_CLIENT_TRUST_STORE_TYPE: "JCEKS" <% } %>
SOLR_OPTS: "
-Dsolr.ssl.checkPeerName=false
-Dsolr.allow.unsafe.resourceloading=true

View File

@@ -89,6 +89,18 @@ RUN if [ "$ENABLE_SHARDING" == "true" ] ; then \
${DIST_DIR}/solr/bin/search_config_setup.sh; \
fi
# EXPLICIT ROUTING SHARDING
ARG EXPLICIT_ROUTING_SHARDING
ENV EXPLICIT_ROUTING_SHARDING $EXPLICIT_ROUTING_SHARDING
# Set Shard Method and Shard Key property name
RUN if [ "$EXPLICIT_ROUTING_SHARDING" == "true" ] ; then \
sed -i '/^bash.*/i sed -i "'"s/shard.method=DB_ID/shard.method=EXPLICIT_ID_FALLBACK_DBID/g"'" ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\n' \
${DIST_DIR}/solr/bin/search_config_setup.sh && \
sed -i '/^bash.*/i echo "\nshard.key=shard:shardId\n" >> ${DIST_DIR}/solrhome/templates/rerank/conf/solrcore.properties\n' \
${DIST_DIR}/solr/bin/search_config_setup.sh; \
fi
# Useless for 'none'/'http' communications with Alfresco
RUN mkdir ${DIST_DIR}/keystore \
&& chown -R solr:solr ${DIST_DIR}/keystore