This is an automated email from the ASF dual-hosted git repository. dklco pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit a316c7e55b3e0c82e9aaa2fcf327848a265270cf Author: Dan Klco <[email protected]> AuthorDate: Fri Oct 16 14:26:46 2020 -0400 Updated docker / feature configuration to setup a working pair of instances automatically --- docker/cms/Dockerfile | 10 ++-- docker/cms/config-author.json | 56 ++++++++++++++++++++++ .../cms/config-renderer.json | 16 +------ docker/cms/config-standalone.json | 3 ++ docker/cms/download-dependencies.sh | 2 +- docker/docker-compose.yml | 6 +-- feature/pom.xml | 10 ---- feature/src/main/assembly/author.xml | 56 ---------------------- feature/src/main/assembly/renderer.xml | 56 ---------------------- .../features/oak/node-store/composite-runtime.json | 10 ++++ .../src/main/features/oak/node-store/segment.json | 10 ++++ feature/src/main/features/oak/oak_base.json | 2 +- feature/src/main/features/runmodes/author.json | 8 ++-- feature/src/main/features/runmodes/renderer.json | 36 ++++---------- 14 files changed, 103 insertions(+), 178 deletions(-) diff --git a/docker/cms/Dockerfile b/docker/cms/Dockerfile index ee53fce..615c107 100644 --- a/docker/cms/Dockerfile +++ b/docker/cms/Dockerfile @@ -20,11 +20,11 @@ ARG CMS_ARTIFACT_ID=org.apache.sling.cms.feature ARG CMS_VERSION=0.16.3-SNAPSHOT ARG LAUNCHER_VERSION=1.1.6 ARG FM_SEED_CLASSIFIER=slingcms-composite-seed -ARG FM_RUNMODE_CLASSIFIER=runmode-standalone +ARG RUNMODE=standalone ARG FM_RUNTIME_CLASSIFIER=slingcms-composite-runtime ENV ADDITIONAL_FEATURE_COORDINATE=${ADDITIONAL_FEATURE_COORDINATE} ENV CMS_ARTIFACT_ID=${CMS_ARTIFACT_ID} -ENV FM_RUNMODE_CLASSIFIER=${FM_RUNMODE_CLASSIFIER} +ENV RUNMODE=${RUNMODE} ENV FM_RUNTIME_CLASSIFIER=${FM_RUNTIME_CLASSIFIER} # Configure directories @@ -39,11 +39,13 @@ COPY download-dependencies.sh /opt/slingcms/setup/ RUN /bin/bash /opt/slingcms/setup/download-dependencies.sh COPY setup-composite.sh /opt/slingcms/setup/ RUN /bin/bash /opt/slingcms/setup/setup-composite.sh +COPY config-${RUNMODE}.json /opt/slingcms/features # Expose endpoints EXPOSE 8080 # Start Sling CMS CMD exec java -jar org.apache.sling.feature.launcher.jar \ - -f *.slingosgifeature \ - -f features/*.slingosgifeature + -f *.slingosgifeature \ + -f features/*.slingosgifeature \ + -f features/*.json diff --git a/docker/cms/config-author.json b/docker/cms/config-author.json new file mode 100644 index 0000000..651a160 --- /dev/null +++ b/docker/cms/config-author.json @@ -0,0 +1,56 @@ +{ + "id": "org.apache.sling:org.apache.sling.cms.docker:slingfeature:author:1.0.0", + "configurations": { + "org.apache.sling.distribution.agent.impl.ForwardDistributionAgentFactory~default": { + "allowed.roots": [], + "async.delivery": false, + "details": "", + "enabled": true, + "http.conn.timeout": 10, + "log.level": "info", + "name": "default", + "packageBuilder.target": "(name=default)", + "packageImporter.endpoints": [], + "passiveQueues": [], + "priorityQueues": [], + "queue.processing.enabled": true, + "queue.provider": "jobs", + "requestAuthorizationStrategy.target": "(name=default)", + "retry.attempts": 100, + "retry.strategy": "none", + "title": "Default", + "transportSecretProvider.target": "(name=default)", + "triggers.target": "(name=)" + }, + "org.apache.sling.distribution.transport.impl.UserCredentialsDistributionTransportSecretProvider~default": { + "name": "default", + "username": "admin", + "password": "admin" + }, + "org.apache.sling.discovery.oak.Config": { + "invertLeaderElectionPrefixOrder": false, + "enableSyncToken": true, + "hmacEnabled": false, + "soTimeout": 10, + "connectorPingTimeout": 120, + "enableEncryption": false, + "gzipConnectorRequestsEnabled": false, + "backoffStandbyFactor": "", + "topologyConnectorUrls": [], + "hmacSharedKeyTTL": 14400000, + "leaderElectionPrefix": 1, + "discoveryLiteCheckInterval": 2, + "connectorPingInterval": 30, + "clusterSyncServiceInterval": 2, + "socketConnectTimeout": 10, + "clusterSyncServiceTimeout": 120, + "minEventDelay": 3, + "autoStopLocalLoopEnabled": false, + "backoffStableFactor": "", + "topologyConnectorWhitelist": [ + "*" + ], + "sharedKey": "" + } + } +} \ No newline at end of file diff --git a/feature/src/main/features/runmodes/renderer.json b/docker/cms/config-renderer.json similarity index 57% copy from feature/src/main/features/runmodes/renderer.json copy to docker/cms/config-renderer.json index 8e78caa..60dc575 100644 --- a/feature/src/main/features/runmodes/renderer.json +++ b/docker/cms/config-renderer.json @@ -1,18 +1,6 @@ { - "id": "org.apache.sling:org.apache.sling.cms.feature:slingfeature:runmode-renderer:${cms.version}", + "id": "org.apache.sling:org.apache.sling.cms.docker:slingfeature:renderer:1.0.0", "configurations": { - "org.apache.sling.cms.core.publication.PublicationManagerFactoryImpl": { - "instanceType": "RENDERER", - "publicationMode": "CONTENT_DISTRIBUTION", - "agents": [] - }, - "org.apache.sling.cms.core.publication.PublicationPropertyProvider": { - "endpointPath": "/libs/sling/distribution/services/importers/default" - }, - "org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory~default": { - "packageBuilder.target": "(name=default)", - "name": "default" - }, "org.apache.sling.discovery.oak.Config": { "invertLeaderElectionPrefixOrder": false, "enableSyncToken": true, @@ -23,7 +11,7 @@ "gzipConnectorRequestsEnabled": false, "backoffStandbyFactor": "", "topologyConnectorUrls": [ - "http://localhost:8080/libs/sling/topology/connector" + "http://author:8080/libs/sling/topology/connector" ], "hmacSharedKeyTTL": 14400000, "leaderElectionPrefix": 1, diff --git a/docker/cms/config-standalone.json b/docker/cms/config-standalone.json new file mode 100644 index 0000000..1e31eeb --- /dev/null +++ b/docker/cms/config-standalone.json @@ -0,0 +1,3 @@ +{ + "id": "org.apache.sling:org.apache.sling.cms.docker:slingfeature:standalone:1.0.0" +} \ No newline at end of file diff --git a/docker/cms/download-dependencies.sh b/docker/cms/download-dependencies.sh index ae5ec91..21907ed 100644 --- a/docker/cms/download-dependencies.sh +++ b/docker/cms/download-dependencies.sh @@ -33,7 +33,7 @@ mvn -q org.apache.maven.plugins:maven-dependency-plugin:copy \ -Dmdep.stripVersion=true \ || { echo 'Failed to download composite runtime' ; exit 1; } mvn -q org.apache.maven.plugins:maven-dependency-plugin:copy \ - -Dartifact=${CMS_GROUP_ID}:${CMS_ARTIFACT_ID}:${CMS_VERSION}:slingosgifeature:${FM_RUNMODE_CLASSIFIER} \ + -Dartifact=${CMS_GROUP_ID}:${CMS_ARTIFACT_ID}:${CMS_VERSION}:slingosgifeature:runmode-${RUNMODE} \ -DoutputDirectory=/opt/slingcms/features \ -Dmdep.stripVersion=true \ || { echo 'Failed to download author feature' ; exit 1; } diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index cc3df4f..2441c5f 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -15,7 +15,7 @@ services: build: context: cms args: - FM_RUNMODE_CLASSIFIER: runmode-author + RUNMODE: author ports: - "8080:8080" volumes: @@ -24,7 +24,7 @@ services: build: context: cms args: - FM_RUNMODE_CLASSIFIER: runmode-renderer + RUNMODE: renderer ports: - "8090:8080" volumes: @@ -35,4 +35,4 @@ services: - "80:80" volumes: sling-author: - sling-renderer: + sling-renderer: \ No newline at end of file diff --git a/feature/pom.xml b/feature/pom.xml index d85ff8f..b71bd51 100644 --- a/feature/pom.xml +++ b/feature/pom.xml @@ -137,14 +137,6 @@ <classifier>slingcms_standalone_far</classifier> <includeClassifier>slingcms-standalone</includeClassifier> </archive> - <archive> - <classifier>slingcms_author_far</classifier> - <includeClassifier>slingcms-author</includeClassifier> - </archive> - <archive> - <classifier>slingcms_renderer_far</classifier> - <includeClassifier>slingcms-renderer</includeClassifier> - </archive> </archives> </configuration> <executions> @@ -185,8 +177,6 @@ </archive> <descriptors> <descriptor>src/main/assembly/standalone.xml</descriptor> - <descriptor>src/main/assembly/author.xml</descriptor> - <descriptor>src/main/assembly/renderer.xml</descriptor> </descriptors> </configuration> </plugin> diff --git a/feature/src/main/assembly/author.xml b/feature/src/main/assembly/author.xml deleted file mode 100644 index 4dff857..0000000 --- a/feature/src/main/assembly/author.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more contributor license - agreements. See the NOTICE file distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file to you under the Apache License, - Version 2.0 (the "License"); you may not use this file except in compliance with the - License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions - and limitations under the License. - --> -<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> - - <id>author</id> - <includeBaseDirectory>false</includeBaseDirectory> - <formats> - <format>jar</format> - </formats> - - <dependencySets> - <dependencySet> - <includes> - <include>org.apache.sling:org.apache.sling.feature.launcher</include> - </includes> - <outputDirectory>/</outputDirectory> - <useProjectArtifact>true</useProjectArtifact> - <unpack>true</unpack> - </dependencySet> - </dependencySets> - - <files> - <file> - <source>${basedir}/target/org.apache.sling.cms.feature-${project.version}-slingcms_author_far.far</source> - <outputDirectory>lib</outputDirectory> - <destName>slingcms.far</destName> - </file> - <file> - <source>target/classes/org/apache/sling/cms/feature/Main.class</source> - <outputDirectory>org/apache/sling/cms/feature</outputDirectory> - </file> - <file> - <source>src/main/resources/slingcms.properties</source> - <filtered>true</filtered> - </file> - <file> - <source>target/classes/META-INF/NOTICE</source> - <outputDirectory>META-INF</outputDirectory> - </file> - <file> - <source>target/classes/META-INF/LICENSE</source> - <outputDirectory>META-INF</outputDirectory> - </file> - </files> - -</assembly> \ No newline at end of file diff --git a/feature/src/main/assembly/renderer.xml b/feature/src/main/assembly/renderer.xml deleted file mode 100644 index 455ce7d..0000000 --- a/feature/src/main/assembly/renderer.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one or more contributor license - agreements. See the NOTICE file distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file to you under the Apache License, - Version 2.0 (the "License"); you may not use this file except in compliance with the - License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software distributed under the - License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, - either express or implied. See the License for the specific language governing permissions - and limitations under the License. - --> -<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> - - <id>renderer</id> - <includeBaseDirectory>false</includeBaseDirectory> - <formats> - <format>jar</format> - </formats> - - <dependencySets> - <dependencySet> - <includes> - <include>org.apache.sling:org.apache.sling.feature.launcher</include> - </includes> - <outputDirectory>/</outputDirectory> - <useProjectArtifact>true</useProjectArtifact> - <unpack>true</unpack> - </dependencySet> - </dependencySets> - - <files> - <file> - <source>${basedir}/target/org.apache.sling.cms.feature-${project.version}-slingcms_renderer_far.far</source> - <outputDirectory>lib</outputDirectory> - <destName>slingcms.far</destName> - </file> - <file> - <source>target/classes/org/apache/sling/cms/feature/Main.class</source> - <outputDirectory>org/apache/sling/cms/feature</outputDirectory> - </file> - <file> - <source>src/main/resources/slingcms.properties</source> - <filtered>true</filtered> - </file> - <file> - <source>target/classes/META-INF/NOTICE</source> - <outputDirectory>META-INF</outputDirectory> - </file> - <file> - <source>target/classes/META-INF/LICENSE</source> - <outputDirectory>META-INF</outputDirectory> - </file> - </files> - -</assembly> \ No newline at end of file diff --git a/feature/src/main/features/oak/node-store/composite-runtime.json b/feature/src/main/features/oak/node-store/composite-runtime.json index 0a5b220..2107456 100644 --- a/feature/src/main/features/oak/node-store/composite-runtime.json +++ b/feature/src/main/features/oak/node-store/composite-runtime.json @@ -1,4 +1,14 @@ { + "bundles":[ + { + "id":"org.apache.sling:org.apache.sling.cms.reference-content:${cms.version}", + "start-order":"10" + }, + { + "id":"org.apache.sling:org.apache.sling.cms.ui-content:${cms.version}", + "start-order":"5" + } + ], "configurations": { "org.apache.jackrabbit.oak.segment.SegmentNodeStoreService": { "name": "Default NodeStore", diff --git a/feature/src/main/features/oak/node-store/segment.json b/feature/src/main/features/oak/node-store/segment.json index a7e4eda..c3a9370 100644 --- a/feature/src/main/features/oak/node-store/segment.json +++ b/feature/src/main/features/oak/node-store/segment.json @@ -1,4 +1,14 @@ { + "bundles": [ + { + "id": "org.apache.sling:org.apache.sling.cms.reference-content:${cms.version}", + "start-order": "10" + }, + { + "id": "org.apache.sling:org.apache.sling.cms.ui-content:${cms.version}", + "start-order": "5" + } + ], "configurations": { "org.apache.jackrabbit.oak.segment.SegmentNodeStoreService": { "name": "Default NodeStore", diff --git a/feature/src/main/features/oak/oak_base.json b/feature/src/main/features/oak/oak_base.json index 0f43759..464ec6f 100644 --- a/feature/src/main/features/oak/oak_base.json +++ b/feature/src/main/features/oak/oak_base.json @@ -122,7 +122,7 @@ "start-order":"15" }, { - "id":"org.apache.sling:org.apache.sling.jcr.oak.server:1.2.4", + "id":"org.apache.sling:org.apache.sling.jcr.oak.server:1.2.6", "start-order":"20" }, { diff --git a/feature/src/main/features/runmodes/author.json b/feature/src/main/features/runmodes/author.json index 61d9996..f312b10 100644 --- a/feature/src/main/features/runmodes/author.json +++ b/feature/src/main/features/runmodes/author.json @@ -7,11 +7,9 @@ "org.apache.sling.cms.core.publication.PublicationManagerFactoryImpl": { "instanceType": "AUTHOR", "publicationMode": "CONTENT_DISTRIBUTION", - "agents": [] - }, - "org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory~default": { - "packageBuilder.target": "(name=default)", - "name": "default" + "agents": [ + "default" + ] }, "org.apache.sling.distribution.serialization.impl.vlt.VaultDistributionPackageBuilderFactory~default": { "fileThreshold": 1, diff --git a/feature/src/main/features/runmodes/renderer.json b/feature/src/main/features/runmodes/renderer.json index 8e78caa..751add7 100644 --- a/feature/src/main/features/runmodes/renderer.json +++ b/feature/src/main/features/runmodes/renderer.json @@ -7,39 +7,19 @@ "agents": [] }, "org.apache.sling.cms.core.publication.PublicationPropertyProvider": { - "endpointPath": "/libs/sling/distribution/services/importers/default" + "endpointPath": "libs/sling/distribution/services/importer/default" }, "org.apache.sling.distribution.packaging.impl.importer.LocalDistributionPackageImporterFactory~default": { "packageBuilder.target": "(name=default)", "name": "default" }, - "org.apache.sling.discovery.oak.Config": { - "invertLeaderElectionPrefixOrder": false, - "enableSyncToken": true, - "hmacEnabled": false, - "soTimeout": 10, - "connectorPingTimeout": 120, - "enableEncryption": false, - "gzipConnectorRequestsEnabled": false, - "backoffStandbyFactor": "", - "topologyConnectorUrls": [ - "http://localhost:8080/libs/sling/topology/connector" - ], - "hmacSharedKeyTTL": 14400000, - "leaderElectionPrefix": 1, - "discoveryLiteCheckInterval": 2, - "connectorPingInterval": 30, - "clusterSyncServiceInterval": 2, - "socketConnectTimeout": 10, - "clusterSyncServiceTimeout": 120, - "minEventDelay": 3, - "autoStopLocalLoopEnabled": false, - "backoffStableFactor": "", - "topologyConnectorWhitelist": [ - "localhost", - "127.0.0.1" - ], - "sharedKey": "" + "org.apache.sling.distribution.serialization.impl.vlt.VaultDistributionPackageBuilderFactory~default": { + "aclHandling": "IGNORE", + "cugHandling": "OVERWRITE", + "importMode": "REPLACE", + "name": "default", + "package.filters": ["/home/users|-.*/.tokens", "/home/users|-.*/rep:cache"], + "type": "jcrvlt" } } } \ No newline at end of file
