Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new docker and new knetmaps legend pull #328

Merged
merged 23 commits into from
Aug 29, 2019
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c0e9b35
Aligning with master.
marco-brandizi Aug 2, 2019
f5272fd
New Docker scripts prepared. Tested outside Docker, to be tested inside
marco-brandizi Aug 2, 2019
6a9a330
Reviewing Dockerfile(s).
marco-brandizi Aug 5, 2019
f29def8
Reviewing Dockerfile(s).
marco-brandizi Aug 5, 2019
9668e7c
Reviewing Dockerfile(s).
marco-brandizi Aug 5, 2019
577b03a
New version of docker-run.sh that has CLI arguments.
marco-brandizi Aug 5, 2019
2c4319c
Building --help option for docker-run.sh
marco-brandizi Aug 5, 2019
ef3a613
Fixing --help option.
marco-brandizi Aug 5, 2019
f2f4429
Fixing --help option.
marco-brandizi Aug 5, 2019
78eb44d
Updating new Docker docs.
marco-brandizi Aug 6, 2019
fc67da9
Adding options to docker-run.sh, fixing Docker defaults.
marco-brandizi Aug 6, 2019
2a71f84
Very minor change in comment.
marco-brandizi Aug 6, 2019
cd6b4b1
Fixing runtime-helper.sh --deploy-only
marco-brandizi Aug 6, 2019
98ab25d
Merging from master/
marco-brandizi Aug 7, 2019
889fedd
Aligning from master branch. Making test locations in aratiny coherent
marco-brandizi Aug 7, 2019
ef3c128
docker-run.sh, stopping upon bad --option.
marco-brandizi Aug 8, 2019
e450350
Aligning 201908_new_docker_review to master.
marco-brandizi Aug 8, 2019
87ac4b8
Aligning 201908_new_docker_review to master.
marco-brandizi Aug 8, 2019
5590394
Grand merge from '201908_new_docker_review'
marco-brandizi Aug 13, 2019
6e31bbe
Updated legend text
josephhearnshaw Aug 16, 2019
ac24d2f
Updated text layout for icon text (below icon)
josephhearnshaw Aug 16, 2019
dd0e4b6
Updated Gene component
josephhearnshaw Aug 27, 2019
6360831
Merge pull request #408 from josephhearnshaw/master
AjitPS Aug 28, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding options to docker-run.sh, fixing Docker defaults.
  • Loading branch information
marco-brandizi committed Aug 6, 2019
commit fc67da945c2f22a91b5e986d5542c73fa7b633a4
32 changes: 19 additions & 13 deletions common/quickstart/docker-run.sh
Original file line number Diff line number Diff line change
@@ -28,6 +28,16 @@ do
#--: The host port to which the container HTTP port is mapped.
--host-port)
host_port="$2"; shift 2;;
#--: Passed to Docker, as --name, useful to manage running containers.
--container-name)
container_name="$2"; shift 2;;
#--: Passed to Docker as --memory (eg, container_memory 12G).
--container-memory)
container_memory="$2"; shift 2;;
#--: Docker is invoked with --detach, ie, container is run in background and this script ends immediately
#--: (it's useful to use it with --container-name)
--detach)
is_container_detach=true; shift;;
#--: Enable Neo4j mode (see the documentation for details).
--with-neo4j)
is_neo4j=true; shift;;
@@ -40,12 +50,6 @@ do
#--: Neo4j password.
--neo4j-pwd)
neo4j_pwd="$2"; shift 2;;
#--: Passed to Docker, as --name, useful to manage running containers.
--container-name)
container_name="$2"; shift 2;;
#--: Passed to Docker as --memory (eg, container_memory 12G).
--container-memory)
container_memory="$2"; shift 2;;
#--: Identifies the Docker image version you want to use (eg, --image-version test,
#--: will pick knetminer/knetminer:test). Default is 'latest' (which corresponds to '').
--image-version)
@@ -71,6 +75,9 @@ do
DOCKER_OPTS: custom options to be passed to 'docker run' (in addition to the ones implied by other variables above.
If you don't set this, the default is '-it'.

JAVA_TOOL_OPTIONS: custom JVM options. The default for this tells the JVM in the container to use all the available
RAM (see my source for details).

EOT
exit 1;;
*)
@@ -82,6 +89,7 @@ done
## Build up the docker command
#
[ "$DOCKER_OPTS" == "" ] && DOCKER_OPTS="-it"
[ "$is_container_detach" == '' ] || DOCKER_OPTS="$DOCKER_OPTS --detach"
DOCKER_OPTS="$DOCKER_OPTS -p $host_port:8080"
[ "$container_name" == "" ] || DOCKER_OPTS="$DOCKER_OPTS --name $container_name"
[ "$container_memory" == "" ] || DOCKER_OPTS="$DOCKER_OPTS --memory $container_memory"
@@ -92,9 +100,8 @@ else
DOCKER_OPTS="$DOCKER_OPTS --volume $dataset_dir:/root/knetminer-dataset"
fi

[ "$MAVEN_ARGS" == "" ] && MAVEN_ARGS="-Pdocker"

if [ "$is_neo4j" != "" ]; then
if [ "$is_neo4j" != '' ]; then
MAVEN_ARGS="$MAVEN_ARGS -Pneo4j"
# As you see all the Maven properties used in the POMs (and, from there in other files) can be overridden from
# the maven command line. So, this is a way to customise things like local installations, and doing so while
@@ -105,12 +112,11 @@ if [ "$is_neo4j" != "" ]; then
[ "$neo4j_pwd" == "" ] || MAVEN_ARGS="$MAVEN_ARGS -Dneo4j.server.password=$neo4j_pwd"
fi

# Default is -Pdocker, typically you DO WANT this
[ "$MAVEN_ARGS" == "" ] || DOCKER_OPTS="$DOCKER_OPTS --env MAVEN_ARGS"
export MAVEN_ARGS

[ "$JAVA_TOOL_OPTIONS" == "" ] && JAVA_TOOL_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1"

DOCKER_OPTS="$DOCKER_OPTS --env JAVA_TOOL_OPTIONS"
# Default is -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1
# which tells the JVM to use all the RAM passed to the container
[ "$JAVA_TOOL_OPTIONS" == "" ] || DOCKER_OPTS="$DOCKER_OPTS --env JAVA_TOOL_OPTIONS"

echo -e "\n"
echo "MAVEN_ARGS:" $MAVEN_ARGS
3 changes: 3 additions & 0 deletions common/quickstart/runtime-helper.sh
Original file line number Diff line number Diff line change
@@ -58,6 +58,9 @@ knet_tomcat_home=${3-$CATALINA_HOME}
# This is usually useful for custom Docker-independent builds, see local-env-ex/
export MAVEN_ARGS=${MAVEN_ARGS:-'-Pdocker'}

# Default Java options to tell the JVM to use all the available memory
export JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS:-'-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:MaxRAMFraction=1'}


# ---- Parameters/environment setup ends here
#