Skip to content

Commit 2e815cd

Browse files
authored
add notes about using ubuntu 18 with this role. (#12)
1 parent 828f28d commit 2e815cd

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ For a list of all variables, see `defaults/main.yml`.
6363

6464
The following should be installed before installing this role:
6565

66-
- java (openJDK or Oracle, see [A note on openjdk vs oracle:](#a-note-on-openjdk-vs-oracle))
66+
- Java 8 (openJDK or Oracle, see [A note on openjdk vs oracle:](#a-note-on-openjdk-vs-oracle))
6767
- ntp
6868

6969
For the above dependencies, you can use the same roles as in `molecule/default/requirements.yml` - but you don't have to.
7070

7171
## Platforms
7272

73-
- Currently tested with ubuntu 16.04 only
73+
- Currently tested with Ubuntu 16.04 and Ubuntu 18.04 (see [A note on Java 8 and Ubuntu 18.04](#a-note-on-Java-8-and-Ubuntu-18.04)).
7474

7575
## Example Playbook
7676

@@ -110,10 +110,12 @@ Then the following should work and start your cluster:
110110
cassandra_cluster_name: my_cluster
111111
cassandra_keyspaces:
112112
- my_keyspace1
113+
# set installed java package version manually. required when using Ubuntu 18.04. see: [A note on Java 8 and Ubuntu 18.04](#a-note-on-Java-8-and-Ubuntu-18.04)
114+
java_packages: openjdk-8-jdk
113115
roles:
114-
# ensure to install java ntp first, e.g. by running these roles (see Dependencies section):
116+
# ensure to install java and ntp first, e.g. by running these roles (see Dependencies section):
115117
# - ansible-ntp
116-
# - ansible-java
118+
# - ansible-role-java
117119
- ansible-cassandra
118120
```
119121

@@ -144,6 +146,14 @@ In the [official upgrade-to-DSE docs](https://docs.datastax.com/en/pdf/upgrade.p
144146

145147
It seems OpenJDK is the more future-proof JVM to use. This role is tested using openjdk.
146148

149+
## A note on Java 8 and Ubuntu 18.04:
150+
151+
In order to deploy Java on Ubuntu using Ansible, we have been using the 'ansible-role-java' role. This role will install OpenJDK 11 on Ubuntu 18.04 by default. If you are using this role, it is required to set the 'java_packages' variable before running it. for example:
152+
```yaml
153+
# set the java packages installed by the ansible-role-java role manually.
154+
java_packages: openjdk-8-jdk
155+
```
156+
147157
## Development setup
148158

149159
Install [molecule](https://github.com/ansible/molecule). E.g. ensure you have docker installed, then, using a virtualenv, `pip install molecule ansible docker`.

0 commit comments

Comments
 (0)