Add an executable README that sets gc-executor up Add an executable README to serve as an example for building, locally installing and starting the gc-executor. Includes generating gc.config. The script also copies the available postgresql jar to test site's /lib. The gc-conductor plugin still has to be installed within that site, along with a running and provisioned postgresql database. The sibling documentation should readily explain how to do that. Change-Id: I210dd1c60f2373aa68ce69e15831f6f953289a4e
diff --git a/src/main/resources/Documentation/README b/src/main/resources/Documentation/README new file mode 100755 index 0000000..94dafed --- /dev/null +++ b/src/main/resources/Documentation/README
@@ -0,0 +1,28 @@ +#!/bin/bash +# +# Example usage only- +# ./README site $HOME /usr/lib/jvm/java-8-openjdk-amd64 + +if [ $# -lt 3 ]; then + exit +fi +site=$1 +path=$2/$site +jdk=$3 + +jar=gc-executor +deployed="$jar"_deploy +underscored=${jar/-/_} + +cd ../../../.. +bazel build $deployed.jar \ + && cp bazel-bin/$deployed.jar $jar.jar \ + && chmod +w $jar.jar \ + && cp bazel-out/k8-fastbuild/bin/$jar.runfiles/$underscored/external/postgresql/jar/postgresql-42.2.5.jar \ + "$path"/lib/ \ + && printf "[jvm]\n javaHome = %s\n" "$jdk" > gc.config \ + && printf "\n[evaluation]\n repositoriesPath = %s/git\n" "$path" >> gc.config \ + && ./bin/gc_ctl restart \ + && ./bin/gc_ctl status \ + && ./bin/gc_ctl +tail -f startup.log