thelastpickle / tlp-cluster

tlp-cluster, a tool for launching Cassandra clusters in AWS
http://thelastpickle.com/tlp-cluster/
Other
21 stars 11 forks source link

Add an option to allow the JDK version to be selected #166

Open ossarga opened 4 years ago

ossarga commented 4 years ago

As part of the use command add in an option to select the JDK to install on the node. We could do this by having pre-canned install scripts to install the different JDK versions. This would mean the valid values that can be supplied to the option are fixed.

In the above case, by default we install JDK 1.8 and copy its install script to the provisioning directory. If a different JDK version is specified, we would copy the appropriate install script to the provisioning directory.

ossarga commented 4 years ago

@rzvoncek has suggested we https://sdkman.io/ to switch JDK versions. We should definitely give this a try.

ossarga commented 4 years ago

@adejanovski has run tests that required the ability to switch Java clients using Jabba.

curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh
jabba install openjdk-shenandoah@1.11.0
jabba alias default openjdk-shenandoah@1.11.0
sudo update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 20000
sudo update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 20000