From 0e93beb7e7928d8670e8ead01bc37a0f491003c7 Mon Sep 17 00:00:00 2001 From: Angel Borroy Date: Wed, 31 Jul 2019 13:40:40 +0200 Subject: [PATCH] Moving from "latest" to "6.2" to identify the current ACS version. Created "images" folder to store Docker Images for Alfresco, Search and Zeppelin Skipping "shard.count" setting for DB_ID_RANGE and EXPLICIT_ID_FALLBACK_LRIS --- .../README.md | 14 +++++------ .../generators/app/index.js | 25 ++++++++----------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/e2e-test/generator-alfresco-docker-compose/README.md b/e2e-test/generator-alfresco-docker-compose/README.md index 4bc6a677c..e66375e43 100644 --- a/e2e-test/generator-alfresco-docker-compose/README.md +++ b/e2e-test/generator-alfresco-docker-compose/README.md @@ -23,7 +23,7 @@ generators/app/templates/ │   ├── client │   ├── solr │   └── zeppelin -└── latest +└── 6.2 ├── alfresco │   ├── Dockerfile │   └── model @@ -38,8 +38,8 @@ generators/app/templates/ ``` * `.env` includes default values for Docker Compose environment variables -* `docker-compose-ce.yml` is the base Docker Compose Template for Alfresco Community deployment (for latest and ACS 6.1) -* `docker-compose-ee.yml` is the base Docker Compose Template for Alfresco Enterprise deployment (for latest and ACS 6.1) +* `docker-compose-ce.yml` is the base Docker Compose Template for Alfresco Community deployment (for ACS 6.2 and ACS 6.1) +* `docker-compose-ee.yml` is the base Docker Compose Template for Alfresco Enterprise deployment (for ACS 6.2 and ACS 6.1) * `alfresco` includes a Dockerfile template to start Alfresco Repository * `model` includes a default content model for Sharding Explicit Routing * `search` includes a Dockerfile template to start Search Services and Insight Engine @@ -65,13 +65,13 @@ $ yo alfresco-docker-compose ## ACS Version -Currently supported ACS Version are `latest` and `6.1` +Currently supported ACS Version are `6.2` and `6.1` This is the first choice to be selected when the generator is executed. ``` ? Which ACS version do you want to use? 6.1 -❯ latest +❯ 6.2 ``` ## Community @@ -149,12 +149,12 @@ Both `community` and `enterprise` ACS deployments can be used with the same opti 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=latest --alfrescoVersion=community --httpMode=http --clustering=true +$ yo alfresco-docker-compose --acsVersion=6.2 --alfrescoVersion=community --httpMode=http --clustering=true ``` **Parameter names reference** -`--acsVersion`: default latest, but could be set to 6.1 +`--acsVersion`: default 6.2, but could be set to 6.1 `--alfrescoVersion`: community or enterprise `--httpMode`: http or https `--clustering`: true or false diff --git a/e2e-test/generator-alfresco-docker-compose/generators/app/index.js b/e2e-test/generator-alfresco-docker-compose/generators/app/index.js index 29b85cc5a..d8c9d6007 100644 --- a/e2e-test/generator-alfresco-docker-compose/generators/app/index.js +++ b/e2e-test/generator-alfresco-docker-compose/generators/app/index.js @@ -25,8 +25,8 @@ module.exports = class extends Generator { type: 'list', name: 'acsVersion', message: 'Which ACS version do you want to use?', - choices: [ "6.1", "latest" ], - default: 'latest' + choices: [ "6.1", "6.2" ], + default: '6.2' }, { type: 'list', @@ -116,20 +116,15 @@ module.exports = class extends Generator { // Generate boilerplate from "templates" folder writing() { - var templateDirectory = 'latest'; - - var dockerComposeTemplateDirectory = 'latest'; + var dockerComposeTemplateDirectory = '6.2'; if (this.props.acsVersion.startsWith('6.1')) { dockerComposeTemplateDirectory = '6.1'; } // Docker Compose environment variables values - this.fs.copyTpl( + this.fs.copy( this.templatePath(dockerComposeTemplateDirectory + '/.env'), - this.destinationPath('.env'), - { - acsTag: this.props.acsVersion - } + this.destinationPath('.env') ) // Base Docker Compose Template @@ -173,9 +168,11 @@ module.exports = class extends Generator { } ); + var imagesDirectory = 'images'; + // Copy Docker Image for Repository applying configuration this.fs.copyTpl( - this.templatePath(templateDirectory + '/alfresco/Dockerfile'), + this.templatePath(imagesDirectory + '/alfresco/Dockerfile'), this.destinationPath('alfresco/Dockerfile'), { acsImage: acsImageName, @@ -184,14 +181,14 @@ module.exports = class extends Generator { ); if (this.props.sharding) { this.fs.copy( - this.templatePath(templateDirectory + '/alfresco/model'), + this.templatePath(imagesDirectory + '/alfresco/model'), this.destinationPath('alfresco/model') ) } // Copy Docker Image for Search applying configuration this.fs.copyTpl( - this.templatePath(templateDirectory + '/search'), + this.templatePath(imagesDirectory + '/search'), this.destinationPath('search'), { searchImage: searchImageName, @@ -202,7 +199,7 @@ module.exports = class extends Generator { // Copy Docker Image for Zeppelin applying configuration if (this.props.zeppelin) { this.fs.copy( - this.templatePath(templateDirectory + '/zeppelin'), + this.templatePath(imagesDirectory + '/zeppelin'), this.destinationPath('zeppelin') ); }