Open cmrockwell opened 4 years ago
@cmrockwell I am wondering if we want to push 2) to github instead - it could make sense to have these files on https://github.com/peregrine-cms with a repo to build and publish the latest version to decouple this headwire dependency
@reusr1 That sounds like a great idea
Another thing to think about is how start and stop scripts will work without support for sling.properties and without a Starter jar that takes 'start', 'stop' , 'status', or 'threads'
we may want to consider the sling kickstarter for peregrine instead of launching a feature model directly. After all that's what it was written for
https://sling.apache.org/documentation/feature-model/howtos/kickstart.html
Kickstart is either not working or I'm doing it wrong. I'm testing it with the script below, and have some issues:
-c
or --slingHome
doesn't matter. Either way results in two homes "launcher" and "sling."
ls launcher
shows folders: framework logs repository resourcesls sling
shows folders: conf repository127.0.0.1:50500
is specified control port. Using this to check status, doesn't work
Ideas?
#!/bin/bash
KICKSTART_VER=0.0.2
HTTP_PORT=8080
RUNMODES=author,notshared,oak_tar_fds
CONTROL_ADDR=127.0.0.1:50500
PATH_TO_KICKSTART_FILES=/Users/cris/sling-instances
MAIN_FEATURE_FILE=feature-oak_tar_fds.json
JAVA_OPTS="
-Djava.awt.headless=true \
-Duser.timezone=America/Detroit \
-Dnashorn.args=--no-deprecation-warning
"
# options:
# author,publish,local,live
# notshared,notshared
# oak_tar,mongo
# author control addr 127.0.0.1:50500
# publish control addr 127.0.0.1:50501
KICKSTART_OPTS="
-c sling \
--port=$HTTP_PORT \
--mainFeature=$PATH_TO_KICKSTART_FILES/$MAIN_FEATURE_FILE \
--control=$CONTROL_ADDR \
-Dsling.runmodes=$RUNMODES
"
java $JAVA_OPTS -jar $PATH_TO_KICKSTART_FILES/org.apache.sling.kickstart-$KICKSTART_VER.jar start $KICKSTART_OPTS &
In the short run, my project start.sh will probably look more like this one. which is basically the same way as @GastonGonzalez 's DockerFile setup. This avoids certain issues mentioned above, and matches the way I've been running and testing locally. Though I could see switching to Kickstart after the initial merge.
#!/bin/bash
LAUNCHER_PATH=/Users/cris/sling-instances
LAUNCHER_JAR=org.apache.sling.feature.launcher.jar
HTTP_PORT=8080
RUNMODES=author,notshared,oak_tar_fds
MAIN_FEATURE_FILE=feature-oak_tar_fds.json
JAVA_OPTS="
-Djava.awt.headless=true \
-Duser.timezone=America/Detroit \
-Dnashorn.args=--no-deprecation-warning
"
APP_OPTS="
-f $LAUNCHER_PATH/$MAIN_FEATURE_FILE \
-D sling.runmodes=$RUNMODES \
-D org.osgi.service.http.port=$HTTP_PORT \
-p sling
"
java $JAVA_OPTS -jar $LAUNCHER_PATH/$LAUNCHER_JAR start $APP_OPTS &
I created this issue to add support for the Kickstarter. Once this ticket is resolved, I'll take this ticket.
Corresponding to a Sling 12 based launcher, percli needs a few changes.
--sling
or-s
is the sling version. There needs to be an option for 12 https://github.com/headwirecom/percli/blob/master/bin/percli-server-install#L42Sling 12 needs a launcher (org.apache.sling.feature.launcher.jar) and feature aggregate (feature-oak_tar.json). I presume those need to be hosted on headwire's vagrant. and referenced in https://github.com/cmrockwell/peregrine-cms/blob/upgrade/sling12-PM-Java11/docker/scripts/start.sh
Run modes and TCP port previously set in sling/sling.properties need to be set using launcher framework properties -D properties. For example:
java -jar org.apache.sling.feature.launcher.jar -f feature-oak_tar_fds.json -D sling.runmodes=author,notshared,oak_tar,fds -p sling