Juju layer for Oracle Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/charms/layer
reactive
.gitignore
Makefile
README.md
config.yaml
copyright
icon.svg
layer.yaml
metadata.yaml
requirements.txt
tox.ini
wheelhouse.txt

README.md

Java

This charm provides Oracle Java.

(Based on layer-openjdk by the infamous Kevin Monroe)

Deployment

juju deploy cs:~jamesbeedy/java-2

By 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.yaml

Usage

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: java

With these pieces in place, you will then be able to relate this charm to your charm or layer.

juju add-relation java6 my-application

And 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.