mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Merge branch 'feature/PassACSTag' into 'master'
Update generator to allow passing ACS tag. See merge request search_discovery/SearchAnalyticsE2ETest!66
This commit is contained in:
@@ -13,7 +13,7 @@ This project generates a collection of Docker Compose Templates to test Reposito
|
||||
Following templates are provided.
|
||||
|
||||
```
|
||||
$ tree generators/app/templates/6.1
|
||||
$ tree generators/app/templates/latest
|
||||
├── .env
|
||||
├── alfresco
|
||||
│ ├── Dockerfile
|
||||
@@ -66,7 +66,7 @@ When using Community, some different options can be combined:
|
||||
* Use SOLR Replication in Master/Slave mode (only when using http)
|
||||
|
||||
```
|
||||
? Which Alfresco version do you want to use? 6.1
|
||||
? Which Alfresco version do you want to use? latest
|
||||
? 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
|
||||
@@ -90,7 +90,7 @@ When using Enterprise, some options can be added to Community configuration:
|
||||
|
||||
## 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.
|
||||
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
|
||||
|
||||
@@ -109,19 +109,19 @@ Custom content model is deployed to provide a property, named `shard:shardId`, h
|
||||
| enterprise | https | x | true | false | (*) | (*) |
|
||||
| enterprise | https | x | true | true | (*) | (*) |
|
||||
|
||||
Both `community` and `enterprise` ACS deployments can be used with the same options, but `enterprise` may also use Insight Engine (replacing Search Services) and Insight Zeppelin services.
|
||||
Both `community` and `enterprise` ACS deployments can be used with the same options, but `enterprise` 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.
|
||||
|
||||
```
|
||||
$ yo alfresco-docker-compose --acsVersion=6.1 --alfrescoVersion=community --httpMode=http --clustering=true
|
||||
$ yo alfresco-docker-compose --acsVersion=latest --alfrescoVersion=community --httpMode=http --clustering=true
|
||||
```
|
||||
|
||||
**Parameter names reference**
|
||||
|
||||
`--acsVersion`: currently only accepting 6.1
|
||||
`--acsVersion`: default latest, but could be set to e.g. 6.1.0.5
|
||||
`--alfrescoVersion`: community or enterprise
|
||||
`--httpMode`: http or https
|
||||
`--clustering`: true or false
|
||||
|
||||
@@ -25,7 +25,7 @@ module.exports = class extends Generator {
|
||||
type: 'input',
|
||||
name: 'acsVersion',
|
||||
message: 'Which Alfresco version do you want to use?',
|
||||
default: '6.1'
|
||||
default: 'latest'
|
||||
},
|
||||
{
|
||||
type: 'list',
|
||||
@@ -104,42 +104,38 @@ module.exports = class extends Generator {
|
||||
// Generate boilerplate from "templates" folder
|
||||
writing() {
|
||||
|
||||
// TODO: Add support for other versions of ACS.
|
||||
// e.g. Using something like:
|
||||
// if (this.props.acsVersion.startsWith('6.0')) {
|
||||
var templateDirectory = 'latest';
|
||||
|
||||
// Docker Compose environment variables values
|
||||
this.fs.copy(
|
||||
this.templatePath(this.props.acsVersion + '/.env'),
|
||||
this.fs.copyTpl(
|
||||
this.templatePath(templateDirectory + '/.env'),
|
||||
this.destinationPath('.env'),
|
||||
{
|
||||
acsTag: this.props.acsVersion
|
||||
}
|
||||
)
|
||||
|
||||
// Base Docker Compose Template
|
||||
const dockerComposeTemplate =
|
||||
(this.props.alfrescoVersion == 'community' ?
|
||||
this.props.acsVersion + '/docker-compose-ce.yml' :
|
||||
this.props.acsVersion + '/docker-compose-ee.yml');
|
||||
templateDirectory + '/docker-compose-ce.yml' :
|
||||
templateDirectory + '/docker-compose-ee.yml');
|
||||
|
||||
// Repository Docker Image tag
|
||||
const acsImageTag =
|
||||
// Repository Docker Image name
|
||||
const acsImageName =
|
||||
(this.props.alfrescoVersion == 'community' ?
|
||||
'alfresco/alfresco-content-repository-community' :
|
||||
'alfresco/alfresco-content-repository');
|
||||
|
||||
// Repository Docker Image version (from environmen variable)
|
||||
const acsEnvTag =
|
||||
(this.props.alfrescoVersion == 'community' ?
|
||||
'ALFRESCO_CE_TAG' :
|
||||
'ALFRESCO_TAG');
|
||||
|
||||
// Search Docker Image tag
|
||||
const searchImageTag =
|
||||
// Search Docker Image
|
||||
const searchImageName =
|
||||
(this.props.insightEngine ?
|
||||
'quay.io/alfresco/insight-engine' :
|
||||
'quay.io/alfresco/search-services');
|
||||
|
||||
// Search Docker Image version (from environmen variable)
|
||||
const searchEnvTag =
|
||||
(this.props.insightEngine ?
|
||||
'SEARCH_TAG' :
|
||||
'SEARCH_CE_TAG');
|
||||
|
||||
// Search Docker Image installation base path
|
||||
const searchBasePath =
|
||||
(this.props.insightEngine ?
|
||||
@@ -150,13 +146,12 @@ module.exports = class extends Generator {
|
||||
this.fs.copyTpl(
|
||||
this.templatePath(dockerComposeTemplate),
|
||||
this.destinationPath('docker-compose.yml'),
|
||||
{ httpMode: this.props.httpMode,
|
||||
{
|
||||
httpMode: this.props.httpMode,
|
||||
secureComms: (this.props.httpMode == 'http' ? 'none' : 'https'),
|
||||
acsTag: acsEnvTag,
|
||||
alfrescoPort: (this.props.httpMode == 'http' ? '8080' : '8443'),
|
||||
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"),
|
||||
@@ -166,27 +161,26 @@ module.exports = class extends Generator {
|
||||
|
||||
// Copy Docker Image for Repository applying configuration
|
||||
this.fs.copyTpl(
|
||||
this.templatePath(this.props.acsVersion + '/alfresco/Dockerfile'),
|
||||
this.templatePath(templateDirectory + '/alfresco/Dockerfile'),
|
||||
this.destinationPath('alfresco/Dockerfile'),
|
||||
{
|
||||
acsImage: acsImageTag,
|
||||
acsImage: acsImageName,
|
||||
sharding: (this.props.sharding ? "true" : "false")
|
||||
}
|
||||
);
|
||||
if (this.props.sharding) {
|
||||
this.fs.copy(
|
||||
this.templatePath(this.props.acsVersion + '/alfresco/model'),
|
||||
this.templatePath(templateDirectory + '/alfresco/model'),
|
||||
this.destinationPath('alfresco/model')
|
||||
)
|
||||
}
|
||||
|
||||
// Copy Docker Image for Search applying configuration
|
||||
this.fs.copyTpl(
|
||||
this.templatePath(this.props.acsVersion + '/search'),
|
||||
this.templatePath(templateDirectory + '/search'),
|
||||
this.destinationPath('search'),
|
||||
{
|
||||
searchImage: searchImageTag,
|
||||
searchTag: searchEnvTag,
|
||||
searchImage: searchImageName,
|
||||
searchPath: searchBasePath
|
||||
}
|
||||
);
|
||||
@@ -194,7 +188,7 @@ module.exports = class extends Generator {
|
||||
// Copy Docker Image for Zeppelin applying configuration
|
||||
if (this.props.zeppelin) {
|
||||
this.fs.copy(
|
||||
this.templatePath(this.props.acsVersion + '/zeppelin'),
|
||||
this.templatePath(templateDirectory + '/zeppelin'),
|
||||
this.destinationPath('zeppelin')
|
||||
);
|
||||
}
|
||||
|
||||
+1
-6
@@ -1,9 +1,4 @@
|
||||
# Community
|
||||
ALFRESCO_CE_TAG=latest
|
||||
SEARCH_CE_TAG=latest
|
||||
|
||||
# Enterprise
|
||||
ALFRESCO_TAG=latest
|
||||
ALFRESCO_TAG=<%=acsTag%>
|
||||
SHARE_TAG=6.1.0
|
||||
POSTGRES_TAG=10.1
|
||||
TRANSFORM_ROUTER_TAG=1.0.1
|
||||
+11
-11
@@ -3,11 +3,11 @@ version: "2"
|
||||
|
||||
services:
|
||||
|
||||
alfresco:
|
||||
alfresco:
|
||||
build:
|
||||
context: ./alfresco
|
||||
args:
|
||||
ALFRESCO_TAG: ${<%=acsTag%>}
|
||||
ALFRESCO_TAG: ${ALFRESCO_TAG}
|
||||
SOLR_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
TRUSTSTORE_TYPE: JCEKS
|
||||
TRUSTSTORE_PASS: kT9X6oe68t
|
||||
@@ -21,7 +21,7 @@ services:
|
||||
-Ddb.password=alfresco
|
||||
-Ddb.url=jdbc:postgresql://postgres:5432/alfresco
|
||||
-Dsolr.host=<%=searchSolrHost%>
|
||||
-Dsolr.port.ssl=8983
|
||||
-Dsolr.port.ssl=8983
|
||||
-Dsolr.secureComms=<%=secureComms%>
|
||||
-Dsolr.base.url=/solr
|
||||
-Dindex.subsystem.name=solr6
|
||||
@@ -35,7 +35,7 @@ services:
|
||||
-Xms1500m -Xmx1500m
|
||||
"
|
||||
ports:
|
||||
- 8082:8080 <% if (httpMode == 'https') { %>
|
||||
- 8082:8080 <% if (httpMode == 'https') { %>
|
||||
- 8443:8443
|
||||
volumes:
|
||||
- ./keystores/alfresco:/usr/local/tomcat/alf_data/keystore <% } %>
|
||||
@@ -44,15 +44,15 @@ services:
|
||||
build:
|
||||
context: ./search
|
||||
args:
|
||||
SEARCH_TAG: ${<%=searchTag%>}
|
||||
SEARCH_TAG: ${SEARCH_TAG}
|
||||
SOLR_HOSTNAME: solr6
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
TRUSTSTORE_TYPE: JCEKS
|
||||
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
|
||||
ENABLE_MASTER: "true"
|
||||
ENABLE_SLAVE: "false" <% } %>
|
||||
mem_limit: 1200m
|
||||
mem_limit: 1200m
|
||||
environment:
|
||||
#Solr needs to know how to register itself with Alfresco
|
||||
SOLR_ALFRESCO_HOST: "alfresco"
|
||||
@@ -84,10 +84,10 @@ services:
|
||||
build:
|
||||
context: ./search
|
||||
args:
|
||||
SEARCH_TAG: ${SEARCH_CE_TAG}
|
||||
SEARCH_TAG: ${SEARCH_TAG}
|
||||
SOLR_HOSTNAME: solr6secondary
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
TRUSTSTORE_TYPE: JCEKS
|
||||
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
|
||||
ENABLE_MASTER: "true"
|
||||
+10
-10
@@ -2,11 +2,11 @@
|
||||
version: "2"
|
||||
|
||||
services:
|
||||
alfresco:
|
||||
alfresco:
|
||||
build:
|
||||
context: ./alfresco
|
||||
args:
|
||||
ALFRESCO_TAG: ${<%=acsTag%>}
|
||||
ALFRESCO_TAG: ${ALFRESCO_TAG}
|
||||
SOLR_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
TRUSTSTORE_TYPE: JCEKS
|
||||
TRUSTSTORE_PASS: kT9X6oe68t
|
||||
@@ -52,10 +52,10 @@ services:
|
||||
build:
|
||||
context: ./search
|
||||
args:
|
||||
SEARCH_TAG: ${<%=searchTag%>}
|
||||
SEARCH_TAG: ${SEARCH_TAG}
|
||||
SOLR_HOSTNAME: solr6
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
TRUSTSTORE_TYPE: JCEKS
|
||||
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
|
||||
ENABLE_MASTER: "true"
|
||||
@@ -64,7 +64,7 @@ services:
|
||||
NUM_SHARDS: "2"
|
||||
SHARD_ID: "0" <% } %> <% if (explicitRouting == 'true') { %>
|
||||
EXPLICIT_ROUTING_SHARDING: "true" <% } %>
|
||||
mem_limit: 1200m
|
||||
mem_limit: 1200m
|
||||
environment:
|
||||
#Solr needs to know how to register itself with Alfresco
|
||||
SOLR_ALFRESCO_HOST: "alfresco"
|
||||
@@ -102,10 +102,10 @@ services:
|
||||
build:
|
||||
context: ./search
|
||||
args:
|
||||
SEARCH_TAG: ${SEARCH_CE_TAG}
|
||||
SEARCH_TAG: ${SEARCH_TAG}
|
||||
SOLR_HOSTNAME: solr6secondary
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
ALFRESCO_HOSTNAME: alfresco
|
||||
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
|
||||
TRUSTSTORE_TYPE: JCEKS
|
||||
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
|
||||
ENABLE_MASTER: "true"
|
||||
@@ -150,7 +150,7 @@ services:
|
||||
<% } %>
|
||||
|
||||
<% if (zeppelin == 'true') { %>
|
||||
zeppelin:
|
||||
zeppelin:
|
||||
build:
|
||||
context: ./zeppelin
|
||||
args:
|
||||
Reference in New Issue
Block a user