You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2020/04/01 13:53:21 UTC

[sling-org-apache-sling-starter] branch feature/composite-node-store created (now 7d9ba76)

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

rombert pushed a change to branch feature/composite-node-store
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git.


      at 7d9ba76  Added README and script

This branch includes the following new commits:

     new 9f7d3ba  [WIP] SLING-8803 - Update to Oak 1.26.0
     new b6dd37b  Add oak_composite_seed runmode
     new 10db77f  Add oak_composite_run runmode
     new 7d9ba76  Added README and script

The 4 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.



[sling-org-apache-sling-starter] 03/04: Add oak_composite_run runmode

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/composite-node-store
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git

commit 10db77f154554bb173ebe51328314fa1efadf60f
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Apr 1 13:17:55 2020 +0200

    Add oak_composite_run runmode
---
 src/main/provisioning/boot.txt |  2 +-
 src/main/provisioning/oak.txt  | 49 +++++++++++++++++++++++++++++++++++++-----
 2 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/src/main/provisioning/boot.txt b/src/main/provisioning/boot.txt
index 471f6c0..1947b0c 100644
--- a/src/main/provisioning/boot.txt
+++ b/src/main/provisioning/boot.txt
@@ -25,7 +25,7 @@
 # oak_tar and oak_mongo run modes are mutually exclusive,
 # and cannot be changed after the first startup
 [settings]
-    sling.run.mode.install.options=oak_tar,oak_mongo,oak_composite_seed
+    sling.run.mode.install.options=oak_tar,oak_mongo,oak_composite_seed,oak_composite_run
     repository.home=${sling.home}/repository
     localIndexDir=${sling.home}/repository/index
 
diff --git a/src/main/provisioning/oak.txt b/src/main/provisioning/oak.txt
index c45340d..90fed68 100644
--- a/src/main/provisioning/oak.txt
+++ b/src/main/provisioning/oak.txt
@@ -51,6 +51,9 @@
 [artifacts startLevel=15 runModes=oak_composite_seed]
     org.apache.jackrabbit/oak-segment-tar/${oak.version}
 
+[artifacts startLevel=15 runModes=oak_composite_run]
+    org.apache.jackrabbit/oak-segment-tar/${oak.version}
+
 [artifacts startLevel=15 runModes=oak_mongo]
     org.mongodb/mongo-java-driver/3.8.2
     com.h2database/h2-mvstore/1.4.194
@@ -101,6 +104,10 @@
     name="Default\ NodeStore"
 
 [configurations runModes=oak_composite_seed]
+  org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
+    name="Default\ NodeStore"
+    repository.home="sling/sling-seed/repository-libs"
+
   org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider
     failOnDetection=B"true"
 
@@ -110,11 +117,43 @@
     pathsSupportingFragments=[]
     mountedPaths=["/libs","/apps"]
 
-  org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
-    service.ranking=I"100"
-    name="Oak-Segment-Tar"
-    repository.home="${sling.home}/repository-libs"
-    host="localhost"
+[configurations runModes=oak_composite_run]
+    org.apache.jackrabbit.oak.composite.CompositeNodeStoreService
+      seedMount="libs"
+      enabled=B"true"
+      enableChecks=B"false"
+      partialReadOnly=B"true"
+
+    org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider
+      failOnDetection=B"true"
+
+    org.apache.jackrabbit.oak.composite.MountInfoProviderService
+      mountName="libs"
+      readOnlyMount=B"true"
+      pathsSupportingFragments=["/oak:index/*$"]
+      mountedPaths=["/libs", "/apps", "/jcr:system/rep:permissionStore/oak:mount-libs-default"]
+
+    org.apache.jackrabbit.oak.composite.checks.NodeTypeMountedNodeStoreChecker~referenceable
+      errorLabel="referenceable node"
+      invalidNodeType="mix:referenceable"
+      excludedNodeTypes=["nt:resource"]
+
+    org.apache.jackrabbit.oak.composite.checks.NodeTypeMountedNodeStoreChecker~versionable
+      errorLabel="versionable node"
+      invalidNodeType="mix:versionable"
+
+    org.apache.jackrabbit.oak.segment.SegmentNodeStoreFactory~libs
+      role="composite-mount-libs"
+      customBlobStore=B"false"
+      nodeDeduplicationCache.size=I"0"
+      repository.home="sling/sling-composite/repository-libs"
+
+    org.apache.jackrabbit.oak.segment.SegmentNodeStoreFactory~global
+      service.ranking=I"100"
+      role="composite-global"
+      registerDescriptors=B"true"
+      dispatchChanges=B"true"
+      repository.home="sling/sling-composite/repository" # for clarity
 
 [configurations runModes=oak_mongo]
   org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService


[sling-org-apache-sling-starter] 02/04: Add oak_composite_seed runmode

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/composite-node-store
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git

commit b6dd37bdf28372d0e1f1dd093f795ec9b114139e
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Mar 31 20:26:52 2020 +0200

    Add oak_composite_seed runmode
---
 src/main/provisioning/boot.txt |  2 +-
 src/main/provisioning/oak.txt  | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/main/provisioning/boot.txt b/src/main/provisioning/boot.txt
index fc0b8a8..471f6c0 100644
--- a/src/main/provisioning/boot.txt
+++ b/src/main/provisioning/boot.txt
@@ -25,7 +25,7 @@
 # oak_tar and oak_mongo run modes are mutually exclusive,
 # and cannot be changed after the first startup
 [settings]
-    sling.run.mode.install.options=oak_tar,oak_mongo
+    sling.run.mode.install.options=oak_tar,oak_mongo,oak_composite_seed
     repository.home=${sling.home}/repository
     localIndexDir=${sling.home}/repository/index
 
diff --git a/src/main/provisioning/oak.txt b/src/main/provisioning/oak.txt
index d3532f3..c45340d 100644
--- a/src/main/provisioning/oak.txt
+++ b/src/main/provisioning/oak.txt
@@ -21,6 +21,7 @@
 
 [variables]
     oak.version=1.26.0
+    sling.home=""
 
 # The segment node store is used via a configuration
 [artifacts startLevel=10]
@@ -47,6 +48,9 @@
 [artifacts startLevel=15 runModes=oak_tar]
     org.apache.jackrabbit/oak-segment-tar/${oak.version}
 
+[artifacts startLevel=15 runModes=oak_composite_seed]
+    org.apache.jackrabbit/oak-segment-tar/${oak.version}
+
 [artifacts startLevel=15 runModes=oak_mongo]
     org.mongodb/mongo-java-driver/3.8.2
     com.h2database/h2-mvstore/1.4.194
@@ -96,6 +100,22 @@
   org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
     name="Default\ NodeStore"
 
+[configurations runModes=oak_composite_seed]
+  org.apache.jackrabbit.oak.composite.CrossMountReferenceValidatorProvider
+    failOnDetection=B"true"
+
+  org.apache.jackrabbit.oak.composite.MountInfoProviderService
+    mountName="libs"
+    readOnlyMount=B"false"
+    pathsSupportingFragments=[]
+    mountedPaths=["/libs","/apps"]
+
+  org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
+    service.ranking=I"100"
+    name="Oak-Segment-Tar"
+    repository.home="${sling.home}/repository-libs"
+    host="localhost"
+
 [configurations runModes=oak_mongo]
   org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService
     mongouri="mongodb://localhost:27017"


[sling-org-apache-sling-starter] 01/04: [WIP] SLING-8803 - Update to Oak 1.26.0

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/composite-node-store
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git

commit 9f7d3ba7145a65e6593e5d6e95d6f3e7db2d0a43
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Apr 1 12:27:05 2020 +0200

    [WIP] SLING-8803 - Update to Oak 1.26.0
---
 src/main/provisioning/oak.txt   | 5 +++--
 src/main/provisioning/sling.txt | 9 ++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main/provisioning/oak.txt b/src/main/provisioning/oak.txt
index 2f4b9ce..d3532f3 100644
--- a/src/main/provisioning/oak.txt
+++ b/src/main/provisioning/oak.txt
@@ -20,7 +20,7 @@
 [feature name=oak]
 
 [variables]
-    oak.version=1.16.0
+    oak.version=1.26.0
 
 # The segment node store is used via a configuration
 [artifacts startLevel=10]
@@ -28,6 +28,7 @@
 
 [artifacts startLevel=15]
     org.apache.jackrabbit/oak-api/${oak.version}
+    org.apache.jackrabbit/oak-jackrabbit-api/${oak.version}
     org.apache.jackrabbit/oak-blob/${oak.version}
     org.apache.jackrabbit/oak-blob-plugins/${oak.version}
     org.apache.jackrabbit/oak-commons/${oak.version}
@@ -53,7 +54,7 @@
 # start the Oak server instance after all components have been configured
 # and started to avoid restarting that component ( see SLING-4556 )
 [artifacts startLevel=16]
-    org.apache.sling/org.apache.sling.jcr.oak.server/1.2.2
+    org.apache.sling/org.apache.sling.jcr.oak.server/1.2.4
 
 [configurations]
   org.apache.felix.jaas.Configuration.factory-GuestLoginModule
diff --git a/src/main/provisioning/sling.txt b/src/main/provisioning/sling.txt
index 44bc516..a9efd61 100644
--- a/src/main/provisioning/sling.txt
+++ b/src/main/provisioning/sling.txt
@@ -20,7 +20,7 @@
 [feature name=sling]
 
 [variables]
-    jackrabbit.version=2.18.2
+    jackrabbit.version=2.20.0
 
 [artifacts startLevel=4]
     org.apache.felix/org.apache.felix.scr/2.1.16
@@ -55,15 +55,14 @@
     org.apache.pdfbox/pdfbox/2.0.17
     org.apache.pdfbox/fontbox/2.0.17
     org.apache.pdfbox/jempbox/1.8.16
-    org.apache.tika/tika-core/1.22
-    org.apache.tika/tika-parsers/1.22
+    org.apache.tika/tika-core/1.24
+    org.apache.tika/tika-parsers/1.24
 
 [artifacts startLevel=15]
     org.apache.sling/org.apache.sling.jcr.jcr-wrapper/2.0.0
     org.apache.sling/org.apache.sling.jcr.api/2.4.0
     org.apache.sling/org.apache.sling.jcr.base/3.1.0
     org.apache.sling/org.apache.sling.jcr.registration/1.0.6
-    org.apache.jackrabbit/jackrabbit-api/${jackrabbit.version}
     org.apache.jackrabbit/jackrabbit-jcr-commons/${jackrabbit.version}
     org.apache.jackrabbit/jackrabbit-spi/${jackrabbit.version}
     org.apache.jackrabbit/jackrabbit-spi-commons/${jackrabbit.version}
@@ -88,7 +87,7 @@
     org.apache.sling/org.apache.sling.starter.content/1.0.8
     commons-collections/commons-collections/3.2.2
     org.apache.commons/commons-collections4/4.4
-    commons-codec/commons-codec/1.13
+    commons-codec/commons-codec/1.14
     org.apache.commons/commons-math/2.2
     org.apache.httpcomponents/httpcore-osgi/4.4.12
     org.apache.httpcomponents/httpclient-osgi/4.5.10


[sling-org-apache-sling-starter] 04/04: Added README and script

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/composite-node-store
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git

commit 7d9ba764b4db06123b248055aaf39322dbc557f0
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Apr 1 15:52:58 2020 +0200

    Added README and script
---
 README-composite.md  | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 create_seed.sh       | 12 +++++++++++
 explore_repo.sh      | 21 +++++++++++++++++++
 prepare_composite.sh |  5 +++++
 run_composite.sh     |  3 +++
 5 files changed, 99 insertions(+)

diff --git a/README-composite.md b/README-composite.md
new file mode 100644
index 0000000..420978d
--- /dev/null
+++ b/README-composite.md
@@ -0,0 +1,58 @@
+# Experimental CompositeNodeStore setup
+
+This setup is an example of how the CompositeNodeStore can be used with
+Apache Sling. It is intended as an example that passes a smoke test, and not
+as something that is robust or supported.
+
+## High-level flow
+
+The process used to setup the CompositeNodeStore is the following
+
+1. Create a _composite-seed_ instance that is used to populate the `/libs` and
+   `/apps` mounts
+1. Copy the resulting segmentstore under a well-known location for the
+   _composite-run_ instance so that it can be used as a read-only mount
+1. Launch the _composite-run_ instance, which picks up the mount repository and
+   uses the Oak `InitialContentMigrator` to populate the default mount as well
+
+## Steps to launch a composite setup
+
+Note 1: all work is done under the `sling` directory, and the `oak.txt` provisioning model
+file has some hardcoded paths. These could be removed with some effort.
+
+Note 2: as of 2020-04-01, this depends on the unreleased `org.apache.sling.jcr.oak.server`
+bundle at version 1.2.4. You can rebuild it from the tag or download it from
+the staging repository at https://repository.apache.org/content/groups/staging/org/apache/sling/org.apache.sling.jcr.oak.server/1.2.4/ .
+
+Prepare the _composite-seed_ instance
+
+```
+$ ./create-seed.sh
+```
+
+Once Sling has started, shut it down.
+
+Prepare the _composite-run_ directory structure
+
+```
+$ ./prepare_composite.sh
+```
+
+Launch the composite instance
+
+```
+$ ./run_composite.sh
+```
+
+You should be running a CompositeNodeStore-backed instance at this point. You can validate this by
+accessing Composum and trying to create a node under `/libs` - it will fail.
+
+## Troubleshooting
+
+In addition to verifying the logs, the `explore_repo.sh` script will allow you to inspect the content
+of a local SegmentNodeStore. Usage
+
+```
+$ ./explore_repo.sh segment_store_dir
+# example: ./explore_repo.sh sling/sling-composite/repository-libs/segmentstore-composite-mount-libs/
+```
\ No newline at end of file
diff --git a/create_seed.sh b/create_seed.sh
new file mode 100755
index 0000000..c2717a9
--- /dev/null
+++ b/create_seed.sh
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+echo "-----------------------------------"
+echo "| PLEASE SHUTDOWN SLING MANUALLY  |"
+echo "| AFTER STARTUP IS COMPLETE       |"
+echo "-----------------------------------"
+
+set +x
+sleep 3
+
+rm -rf sling/sling-seed
+java -jar target/org.apache.sling.starter-12-SNAPSHOT.jar -Dsling.run.modes=oak_composite_seed -c sling/sling-seed
diff --git a/explore_repo.sh b/explore_repo.sh
new file mode 100755
index 0000000..0cbec3b
--- /dev/null
+++ b/explore_repo.sh
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+if [ $# -ne 1 ]; then
+    echo "Usage: $0 repo_dir"
+    exit 1
+fi
+
+repo_dir=$1
+
+if [ ! -d $repo_dir ]; then
+    echo "${repo_dir} is not a directory"
+    exit 2
+fi
+
+oak_version=1.26.0
+oak_run_jar=$HOME/.m2/repository/org/apache/jackrabbit/oak-run/${oak_version}/oak-run-${oak_version}.jar
+if [ ! -f ${oak_run_jar} ]; then
+    mvn dependency:get -Dartifact=org.apache.jackrabbit:oak-run:${oak_version}
+fi
+
+java -jar ${oak_run_jar} explore ${repo_dir}
diff --git a/prepare_composite.sh b/prepare_composite.sh
new file mode 100755
index 0000000..f8df3c6
--- /dev/null
+++ b/prepare_composite.sh
@@ -0,0 +1,5 @@
+#!/bin/sh -ex
+composite_libs_mount=sling/sling-composite/repository-libs/segmentstore-composite-mount-libs
+rm -rf sling/sling-composite
+mkdir -p ${composite_libs_mount}
+cp -R sling/sling-seed/repository-libs/segmentstore/* ${composite_libs_mount}
diff --git a/run_composite.sh b/run_composite.sh
new file mode 100755
index 0000000..a4bb430
--- /dev/null
+++ b/run_composite.sh
@@ -0,0 +1,3 @@
+#!/bin/sh -ex
+java -jar target/org.apache.sling.starter-12-SNAPSHOT.jar -Dsling.run.modes=oak_composite_run -c sling/sling-composite
+