Java
This charm provides Oracle Java.
(Based on layer-openjdk by the infamous Kevin Monroe)
Deployment
juju deploy cs:~jamesbeedy/java-2By default, this charm installs the latest release of Java 9 contained in the ppa:webupd8team/java PPA. If you wish to use an earlier version of Java (6,7,8,9 are supported), you can specify the 'java-major' param in the charm config prior to deployment.
Example config for Java 6:
# java-config.yaml
java6:
java-major: "6"To deploy this charm with java 6:
juju deploy cs:~jamesbeedy/java-2 java6 --config java-config.yamlUsage
This charm uses interface:java, so you must include interface:java in your layer.yaml, and
provide the java interface in your charm or layer's metadata.yaml like so:
# layer.yaml
includes: ['layer:basic', 'interface:java']# metadata.yaml
...
provides:
java:
interface: javaWith these pieces in place, you will then be able to relate this charm to your charm or layer.
juju add-relation java6 my-applicationAnd react to the java.ready flag in your charm or layer code.
(example from elasticsearch-base layer)
@when('java.ready')
@when_not('apt.installed.elasticsearch')
def install_elasticsearch():
"""Check for container, install elasticsearch
"""
if is_container():
os.environ['ES_SKIP_SET_KERNEL_PARAMETERS'] = "true"
apt.queue_install(['elasticsearch'])TODO
- juju terms
Copyright
James Beedy (c) 2016 jamesbeedy@gmail.com
This project is maintained under the AGPLv3. SEE copyright for licence information.