fabric8io/fabric8 — pull request #2500 by paoloantinori (2014-09-12 08:55:24+00:00)
Title: karaf shell command to edit jvmOpts for child and ssh karaf containers

Sample usage:

```

Fabric8:karaf@root> container-edit-jvm-options --help

DESCRIPTION
fabric:container-edit-jvm-options

Get or set the configured JVM options for a specific container

SYNTAX
fabric:container-edit-jvm-options [options] containerName [jvmOptions]

ARGUMENTS
containerName
The name of the container.
jvmOptions
The default JVM options to use, or empty to show current.

OPTIONS
-u, --username
Remote user name
--help
Display this help message
-p, --password
Remote user password

Fabric8:karaf@root> container-edit-jvm-options child

-Dcom.sun.management.jmxremote -Dorg.jboss.gravia.repository.storage.dir=data/repository -Dzookeeper.url=192.168.1.132:2181 -Dzookeeper.password.encode=true -Dzookeeper.password=ZKENC=YWRtaW4= -Xmx512m -XX:MaxPermSize=256m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dio.fabric8.datastore.gitPushInterval=60000 -Dio.fabric8.datastore.component.name=io.fabric8.datastore -Dio.fabric8.datastore.importDir=fabric -Dio.fabric8.datastore.felix.fileinstall.filename=file:/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/etc/io.fabric8.datastore.cfg -Dio.fabric8.datastore.service.pid=io.fabric8.datastore -Densemble.auto.start=true -Densemble.auto.start=true -Djava.util.logging.config.file=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child/etc/java.util.logging.properties -Djava.endorsed.dirs=/usr/java/jdk1.7.0_51/jre/jre/lib/endorsed:/usr/java/jdk1.7.0_51/jre/lib/endorsed:/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/lib/endorsed -Djava.ext.dirs=/usr/java/jdk1.7.0_51/jre/jre/lib/ext:/usr/java/jdk1.7.0_51/jre/lib/ext:/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/lib/ext -Dkaraf.home=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT -Dkaraf.base=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child -Dkaraf.data=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child/data -Dkaraf.etc=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child/etc -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true

Fabric8:karaf@root> container-edit-jvm-options child '-XX:NewRatio=9 -Dcom.sun.management.jmxremote -Dorg.jboss.gravia.repository.storage.dir=data/repository -Dzookeeper.url=192.168.1.132:2181 -Dzookeeper.password.encode=true -Dzookeeper.password=ZKENC=YWRtaW4= -Xmx512m -XX:MaxPermSize=256m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dio.fabric8.datastore.gitPushInterval=60000 -Dio.fabric8.datastore.component.name=io.fabric8.datastore -Dio.fabric8.datastore.importDir=fabric -Dio.fabric8.datastore.felix.fileinstall.filename=file:/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/etc/io.fabric8.datastore.cfg -Dio.fabric8.datastore.service.pid=io.fabric8.datastore -Densemble.auto.start=true -Densemble.auto.start=true -Djava.util.logging.config.file=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child/etc/java.util.logging.properties -Djava.endorsed.dirs=/usr/java/jdk1.7.0_51/jre/jre/lib/endorsed:/usr/java/jdk1.7.0_51/jre/lib/endorsed:/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/lib/endorsed -Djava.ext.dirs=/usr/java/jdk1.7.0_51/jre/jre/lib/ext:/usr/java/jdk1.7.0_51/jre/lib/ext:/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/lib/ext -Dkaraf.home=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT -Dkaraf.base=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child -Dkaraf.data=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child/data -Dkaraf.etc=/data/repositories/github/fuse/fabric8/fabric8/fabric/fabric8-karaf/target/fabric8-karaf-1.2.0-SNAPSHOT/instances/child/etc -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true'

Operation succeeded. New JVM flags will be loaded at the next start of child container
```