You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2020/09/30 21:29:11 UTC

[sling-org-apache-sling-app-cms] branch master updated (0e0a9e7 -> 3edbcbb)

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git.


    from 0e0a9e7  Adding config titles / descriptions and updating the pub config to use dropdowns
     new 6a53945  Updating the Oak version
     new 3edbcbb  Updating to build the author/renderer as a part of the docker compose

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docker/cms/Dockerfile               | 16 +++++++++++-----
 docker/cms/download-dependencies.sh | 26 ++++++++++++++++++++------
 docker/cms/setup-composite.sh       |  9 ++++++---
 docker/docker-compose.yml           | 21 +++++++++++++++++----
 docker/webcache/cms.conf            |  4 ++--
 docker/webcache/site.conf           |  8 ++++----
 feature/pom.xml                     |  4 ++--
 7 files changed, 62 insertions(+), 26 deletions(-)


[sling-org-apache-sling-app-cms] 01/02: Updating the Oak version

Posted by dk...@apache.org.
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 6a539452b2213d22aa9ad6f539ac3efb1f23dfa2
Author: Dan Klco <dk...@apache.org>
AuthorDate: Wed Sep 30 17:27:10 2020 -0400

    Updating the Oak version
---
 feature/pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/feature/pom.xml b/feature/pom.xml
index adc97c5..d85ff8f 100644
--- a/feature/pom.xml
+++ b/feature/pom.xml
@@ -29,7 +29,7 @@
         <composum.version>1.12.0</composum.version>
         <jackrabbit.version>2.20.0</jackrabbit.version>
         <jackson.version>2.11.1</jackson.version>
-        <oak.version>1.26.0</oak.version>
+        <oak.version>1.32.0</oak.version>
         <slf4j.version>1.7.25</slf4j.version>
         <bnd.baseline.skip>true</bnd.baseline.skip>
     </properties>
@@ -101,7 +101,7 @@
                         <aggregate>
                             <classifier>slingcms-composite-seed</classifier>
                             <filesInclude>**/*.json</filesInclude>
-                            <filesExclude>oak/node-store/composite-seed.json</filesExclude>
+                            <filesExclude>oak/node-store/composite-runtime.json</filesExclude>
                             <filesExclude>oak/node-store/segment.json</filesExclude>
                             <filesExclude>runmodes/*.json</filesExclude>
                             <title>Sling CMS - Composite Node Store Seed</title>


[sling-org-apache-sling-app-cms] 02/02: Updating to build the author/renderer as a part of the docker compose

Posted by dk...@apache.org.
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 3edbcbb24923038c95bb9290c7d59a1862167ade
Author: Dan Klco <dk...@apache.org>
AuthorDate: Wed Sep 30 17:28:06 2020 -0400

    Updating to build the author/renderer as a part of the docker compose
---
 docker/cms/Dockerfile               | 16 +++++++++++-----
 docker/cms/download-dependencies.sh | 26 ++++++++++++++++++++------
 docker/cms/setup-composite.sh       |  9 ++++++---
 docker/docker-compose.yml           | 21 +++++++++++++++++----
 docker/webcache/cms.conf            |  4 ++--
 docker/webcache/site.conf           |  8 ++++----
 6 files changed, 60 insertions(+), 24 deletions(-)

diff --git a/docker/cms/Dockerfile b/docker/cms/Dockerfile
index 067f067..ee53fce 100644
--- a/docker/cms/Dockerfile
+++ b/docker/cms/Dockerfile
@@ -14,12 +14,17 @@
 # Pull base image.
 FROM adoptopenjdk:11-jre-openj9
 
-ARG FM_GROUP_ID=org.apache.sling
-ARG FM_ARTIFACT_ID=org.apache.sling.cms.feature
-ARG FM_VERSION=0.16.3-SNAPSHOT
+ARG ADDITIONAL_FEATURE_COORDINATE=
+ARG CMS_GROUP_ID=org.apache.sling
+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 FM_RUNTIME_CLASSIFIER=slingcms-composite-runtime
-ENV FM_ARTIFACT_ID=${FM_ARTIFACT_ID}
+ENV ADDITIONAL_FEATURE_COORDINATE=${ADDITIONAL_FEATURE_COORDINATE}
+ENV CMS_ARTIFACT_ID=${CMS_ARTIFACT_ID}
+ENV FM_RUNMODE_CLASSIFIER=${FM_RUNMODE_CLASSIFIER}
 ENV FM_RUNTIME_CLASSIFIER=${FM_RUNTIME_CLASSIFIER}
 
 # Configure directories
@@ -40,4 +45,5 @@ EXPOSE 8080
 
 # Start Sling CMS
 CMD exec java -jar org.apache.sling.feature.launcher.jar \
-    -f ${FM_ARTIFACT_ID}-${FM_RUNTIME_CLASSIFIER}.slingosgifeature
+    -f *.slingosgifeature  \
+    -f features/*.slingosgifeature 
diff --git a/docker/cms/download-dependencies.sh b/docker/cms/download-dependencies.sh
index 9705148..ae5ec91 100644
--- a/docker/cms/download-dependencies.sh
+++ b/docker/cms/download-dependencies.sh
@@ -11,24 +11,38 @@
 #        and limitations under the License.
 #
 
-mkdir -p /opt/slingcms
+mkdir -p /opt/slingcms/features
 cd /opt/slingcms
 
 echo "Downloading Feature Launcher..."
 mvn -q org.apache.maven.plugins:maven-dependency-plugin:copy \
-    -Dartifact=org.apache.sling:org.apache.sling.feature.launcher:1.1.4:jar \
+    -Dartifact=org.apache.sling:org.apache.sling.feature.launcher:${LAUNCHER_VERSION}:jar \
     -DoutputDirectory=/opt/slingcms \
     -Dmdep.stripVersion=true \
-    || { echo 'Failed to download Feature Launcher' ; exit 1; }
+    || { echo 'Failed to download Feature Launcher' ; exit 1; } 
  
 echo "Downloading Feature Models..."
 mvn -q org.apache.maven.plugins:maven-dependency-plugin:copy \
-    -Dartifact=${FM_GROUP_ID}:${FM_ARTIFACT_ID}:${FM_VERSION}:slingosgifeature:${FM_SEED_CLASSIFIER} \
+    -Dartifact=${CMS_GROUP_ID}:${CMS_ARTIFACT_ID}:${CMS_VERSION}:slingosgifeature:${FM_SEED_CLASSIFIER} \
     -DoutputDirectory=/opt/slingcms/setup \
     -Dmdep.stripVersion=true \
     || { echo 'Failed to download composite seed' ; exit 1; }
 mvn -q org.apache.maven.plugins:maven-dependency-plugin:copy \
-    -Dartifact=${FM_GROUP_ID}:${FM_ARTIFACT_ID}:${FM_VERSION}:slingosgifeature:${FM_RUNTIME_CLASSIFIER} \
+    -Dartifact=${CMS_GROUP_ID}:${CMS_ARTIFACT_ID}:${CMS_VERSION}:slingosgifeature:${FM_RUNTIME_CLASSIFIER} \
     -DoutputDirectory=/opt/slingcms \
     -Dmdep.stripVersion=true \
-    || { echo 'Failed to download composite runtime' ; exit 1; }
\ No newline at end of file
+    || { 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} \
+    -DoutputDirectory=/opt/slingcms/features \
+    -Dmdep.stripVersion=true \
+    || { echo 'Failed to download author feature' ; exit 1; }
+
+if [[ ! -z ${ADDITIONAL_FEATURE_COORDINATE} ]]; then
+    echo "Downloading Additional Feature ${ADDITIONAL_FEATURE_COORDINATE}"
+    mvn -q org.apache.maven.plugins:maven-dependency-plugin:copy \
+        -Dartifact=${ADDITIONAL_FEATURE_COORDINATE} \
+        -DoutputDirectory=/opt/slingcms/features \
+        -Dmdep.stripVersion=true \
+        || { echo "Failed to download feature ${ADDITIONAL_FEATURE_COORDINATE}" ; exit 1; }
+fi
\ No newline at end of file
diff --git a/docker/cms/setup-composite.sh b/docker/cms/setup-composite.sh
index fec1a03..bec941d 100644
--- a/docker/cms/setup-composite.sh
+++ b/docker/cms/setup-composite.sh
@@ -16,14 +16,15 @@ SLING_PASSWORD="${SLING_PASSWORD:-admin}"
 
 echo "Creating composite seed..."
 java -jar org.apache.sling.feature.launcher.jar \
-    -f /opt/slingcms/setup/${FM_ARTIFACT_ID}-${FM_SEED_CLASSIFIER}.slingosgifeature &
+    -f /opt/slingcms/setup/${CMS_ARTIFACT_ID}-${FM_SEED_CLASSIFIER}.slingosgifeature \
+    -f /opt/slingcms/features/*.slingosgifeature &
 SLING_PID=$!
 echo "Sling PID: ${SLING_PID}"
 
 sleep 30s
 STARTED=1
-for i in {1..10}; do
-    echo "Checking to see if started with username: ${SLING_USERNAME}..."
+for i in {1..20}; do
+    echo "[${i}/20]: Checking to see if started with username: ${SLING_USERNAME}..."
     STATUS=$(curl -4 -s -o /dev/null -w "%{http_code}" -u${SLING_USERNAME}:${SLING_PASSWORD} "http://localhost:8080/system/health.txt?tags=systemalive")
     echo "Retrieved status: ${STATUS}"
     if [ $STATUS -eq 200 ]; then
@@ -34,6 +35,8 @@ for i in {1..10}; do
 done
 sleep 30s
 kill $SLING_PID
+echo "Waiting for instance to stop..."
+sleep 30s
 
 if [ $STARTED -eq 1 ]; then
     echo "Failed to seed sling repository!"
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index 27856bb..cc3df4f 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -11,15 +11,28 @@
 #
 version: '3.4'
 services:
-  cms:
-    build: cms
+  author:
+    build: 
+      context: cms
+      args:
+        FM_RUNMODE_CLASSIFIER: runmode-author
     ports:
       - "8080:8080"
     volumes:
-      - sling-repository:/opt/slingcms/sling/composite/repository-global
+      - sling-author:/opt/slingcms/sling/composite/repository-global
+  renderer:
+    build: 
+      context: cms
+      args:
+        FM_RUNMODE_CLASSIFIER: runmode-renderer
+    ports:
+      - "8090:8080"
+    volumes:
+      - sling-renderer:/opt/slingcms/sling/composite/repository-global
   webcache:
     build: webcache
     ports:
       - "80:80"
 volumes:
-  sling-repository:
+  sling-author:
+  sling-renderer:
diff --git a/docker/webcache/cms.conf b/docker/webcache/cms.conf
index 47fa459..6c9ce63 100644
--- a/docker/webcache/cms.conf
+++ b/docker/webcache/cms.conf
@@ -17,6 +17,6 @@
    TransferLog /var/log/apache2/sling-cms-access.log
 
    ProxyPass /.well-known !
-   ProxyPass / http://cms:8080/
-   ProxyPassReverse / http://cms:8080/
+   ProxyPass / http://author:8080/
+   ProxyPassReverse / http://author:8080/
 </VirtualHost>
diff --git a/docker/webcache/site.conf b/docker/webcache/site.conf
index 57ae148..811b3bb 100644
--- a/docker/webcache/site.conf
+++ b/docker/webcache/site.conf
@@ -38,10 +38,10 @@
    # Configure Proxy
    ProxyPass /.well-known !
    ProxyPass /ERROR !
-   ProxyPass /static/clientlibs/reference/ http://cms:8080/static/clientlibs/reference/ connectiontimeout=10 timeout=60 retry=0
-   ProxyPassReverse /static/clientlibs/reference/ http://cms:8080/static/clientlibs/reference/
-   ProxyPass / http://cms:8080/content/apache/sling-apache-org/ connectiontimeout=10 timeout=60 retry=0
-   ProxyPassReverse /content/apache/sling-apache-org/ http://cms:8080/content/apache/sling-apache-org/
+   ProxyPass /static/clientlibs/reference/ http://renderer:8080/static/clientlibs/reference/ connectiontimeout=10 timeout=60 retry=0
+   ProxyPassReverse /static/clientlibs/reference/ http://renderer:8080/static/clientlibs/reference/
+   ProxyPass / http://renderer:8080/content/apache/sling-apache-org/ connectiontimeout=10 timeout=60 retry=0
+   ProxyPassReverse /content/apache/sling-apache-org/ http://renderer:8080/content/apache/sling-apache-org/
 
    # Security / Hardening
    AllowEncodedSlashes on