github.com/kardianos/nomad@v0.1.3-0.20151022182107-b13df73ee850/website/source/docs/drivers/java.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Drivers: Java"
     4  sidebar_current: "docs-drivers-java"
     5  description: |-
     6    The Java task driver is used to run Jars using the JVM.
     7  ---
     8  
     9  # Java Driver
    10  
    11  Name: `java`
    12  
    13  The `Java` driver is used to execute Java applications packaged into a Java Jar 
    14  file. The driver currently requires the Jar file be accessible via
    15  HTTP from the Nomad client. 
    16  
    17  ## Task Configuration
    18  
    19  The `java` driver supports the following configuration in the job spec:
    20  
    21  * `jar_source` - **(Required)** The hosted location of the source Jar file. Must be accessible
    22  from the Nomad client, via HTTP
    23  
    24  * `args` - **(Optional)** The argument list for the `java` command, space separated.
    25  
    26  * `jvm_options` - **(Optional)** JVM options to be passed while invoking java. These options
    27    are passed not validated in any way in Nomad.
    28  
    29  ## Client Requirements
    30  
    31  The `java` driver requires Java to be installed and in your systems `$PATH`.
    32  The `jar_source` must be accessible by the node running Nomad. This can be an 
    33  internal source, private to your cluster, but it must be reachable by the client 
    34  over HTTP. 
    35  
    36  ## Client Attributes
    37  
    38  The `java` driver will set the following client attributes:
    39  
    40  * `driver.java` - Set to `1` if Java is found on the host node. Nomad determines
    41  this by executing `java -version` on the host and parsing the output
    42  * `driver.java.version` - Version of Java, ex: `1.6.0_65`
    43  * `driver.java.runtime` - Runtime version, ex: `Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)`
    44  * `driver.java.vm` - Virtual Machine information, ex: `Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)`
    45  
    46  ## Resource Isolation
    47  
    48  The resource isolation provided varies by the operating system of
    49  the client and the configuration.
    50  
    51  On Linux, Nomad will attempt to use cgroups, namespaces, and chroot
    52  to isolate the resources of a process. If the Nomad agent is not
    53  running as root many of these mechanisms cannot be used.
    54  
    55  As a baseline, the Java jars will be ran inside a Java Virtual Machine,
    56  providing a minimum amount of isolation.
    57