Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

java (142) Versions 1.8.0

Recipes and resources for installing Java and managing certificates

Policyfile
Berkshelf
Knife
cookbook 'java', '= 1.8.0', :supermarket
cookbook 'java', '= 1.8.0'
knife supermarket install java
knife supermarket download java
README
Dependencies
Quality -%

Description

Installs a Java. Uses OpenJDK by default but supports installation of Oracle's JDK.

This cookbook contains the java_ark LWPR which has been deprecated
in favor of ark.

IMPORTANT NOTE

As of 26 March 2012 you can no longer directly download
the JDK from Oracle's website without using a special cookie. This cookbook uses
that cookie to download the oracle recipe on your behalf, but . . .

the java::oracle recipe forces you to set either override
the node['java']['oracle']['accept_oracle_download_terms'] to true or set up a
private repository accessible by HTTP.

Example

override the accept_oracle_download_terms

roles/base.rb
This cookbook also provides the java_ark LWRP which other java
cookbooks can use to install java-related applications from binary
packages.

default_attributes(
  :java => {
     :oracle => {
       "accept_oracle_download_terms" => true
     }
   }
)

You are most encouraged to voice your complaints to Oracle and/or
switch to OpenJDK.

Requirements

Platform

  • Debian, Ubuntu
  • CentOS, Red Hat, Fedora, Scientific, Amazon
  • ArchLinux
  • FreeBSD
  • Windows

Attributes

See attributes/default.rb for default values.

  • node["java"]["install_flavor"] - Flavor of JVM you would like installed (oracle or openjdk), default openjdk.
  • node['java']['java_home'] - Default location of the "$JAVA_HOME".
  • node['java']['tarball'] - Name of the tarball to retrieve from your corporate repository default jdk1.6.0_29_i386.tar.gz
  • node['java']['tarball_checksum'] - Checksum for the tarball, if you use a different tarball, you also need to create a new sha256 checksum
  • node['java']['jdk'] - Version and architecture specific attributes for setting the URL on Oracle's site for the JDK, and the checksum of the .tar.gz.
  • node['java']['remove_deprecated_packages'] - Removes the now deprecated Ubuntu JDK packages from the system, default false
  • node['java']['oracle']['accept_oracle_download_terms'] - Indicates that you accept Oracle's EULA
  • node['java']['windows']['url'] - The internal location of your java install for windows
  • node['java']['windows']['package_name'] - The package name used by windows_package to check in the registry to determine if the install has already been run

Recipes

default

Include the default recipe in a run list, to get java. By default
the openjdk flavor of Java is installed, but this can be changed by
using the install_flavor attribute. If the platform is windows it
will include the windows recipe instead.

OpenJDK is the default because of licensing changes made upstream by
Oracle. See notes on the oracle recipe below.

openjdk

This recipe installs the openjdk flavor of Java.

oracle

This recipe installs the oracle flavor of Java. This recipe does not
use distribution packages as Oracle changed the licensing terms with
JDK 1.6u27 and prohibited the practice for both the debian and EL worlds.

For both debian and centos/rhel, this recipe pulls the binary
distribution from the Oracle website, and installs it in the default
JAVA_HOME for each distribution. For debian/ubuntu, this is
/usr/lib/jvm/default-java. For Centos/RHEL, this is /usr/lib/jvm/java

After putting the binaries in place, the oracle recipe updates
/usr/bin/java to point to the installed JDK using the
update-alternatives script

oracle_i386

This recipe installs the 32-bit Java virtual machine without setting
it as the default. This can be useful if you have applications on the
same machine that require different versions of the JVM.

windows

Because there is no easy way to pull the java msi off oracle's site,
this recipe requires you to host it internally on your own http repo.

Resources/Providers

This cookbook contains the java_ark LWPR which has been deprecated
in favor of ark.

By default, the extracted directory is extracted to
app_root/extracted_dir_name and symlinked to app_root/default

Actions

  • :install: extracts the tarball and makes necessary symlinks
  • :remove: removes the tarball and run update-alternatives for all symlinked bin_cmds

Attribute Parameters

  • url: path to tarball, .tar.gz, .bin (oracle-specific), and .zip currently supported
  • checksum: sha256 checksum, not used for security but avoid redownloading the archive on each chef-client run
  • app_home: the default for installations of this type of application, for example, /usr/lib/tomcat/default. If your application is not set to the default, it will be placed at the same level in the directory hierarchy but the directory name will be app_root/extracted_directory_name + "_alt"
  • app_home_mode: file mode for app_home, is an integer
  • bin_cmds: array of binary commands that should be symlinked to /usr/bin, examples are mvn, java, javac, etc. These cmds must be in the bin/ subdirectory of the extracted folder. Will be ignored if this java_ark is not the default
  • owner: owner of extracted directory, set to "root" by default
  • default: whether this the default installation of this package, boolean true or false

Examples

# install jdk6 from Oracle
java_ark "jdk" do
    url 'http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x64.bin'
    checksum  'a8603fa62045ce2164b26f7c04859cd548ffe0e33bfc979d9fa73df42e3b3365'
    app_home '/usr/local/java/default'
    bin_cmds ["java", "javac"]
    action :install
end

Usage

Simply include the java recipe where ever you would like Java installed.

To install Oracle flavored Java on Debian or Ubuntu override the node['java']['install_flavor'] attribute with in role:

name "java"
description "Install Oracle Java on Ubuntu"
override_attributes(
  "java" => {
    "install_flavor" => "oracle"
  }
)
run_list(
  "recipe[java]"
)

Development

This cookbook uses
test-kitchen for
integration tests. Pull requests should pass existing tests in
files/default/tests/minitest-handler. Additional tests are always welcome.

License and Author

Author:: Seth Chisamore (schisamo@opscode.com)
Author:: Bryan W. Berry (bryan.berry@gmail.com)

Copyright:: 2008-2012, Opscode, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

windows >= 0.0.0

Contingent cookbooks

abiquo Applicable Versions
activemq Applicable Versions
aem Applicable Versions
aet Applicable Versions
akibanserver Applicable Versions
alfresco Applicable Versions
alfresco-utils Applicable Versions
alphard-artifactory Applicable Versions
alphard-chef-artifactory Applicable Versions
alphard-chef-deploy Applicable Versions
alphard-chef-sbt Applicable Versions
android-sdk Applicable Versions
ant Applicable Versions
apache-log-analysis Applicable Versions
apache-newrelic-plugin Applicable Versions
apache_hadoop Applicable Versions
apache_kafka Applicable Versions
apache_spark Applicable Versions
apache_spark_ng Applicable Versions
apache_tomcat Applicable Versions
apache_zookeeper Applicable Versions
apktool Applicable Versions
application_java Applicable Versions
archiva Applicable Versions
ark Applicable Versions
artifact-deployer Applicable Versions
artifactory Applicable Versions
artifactory_ii Applicable Versions
asgard Applicable Versions
askbot Applicable Versions
aws-cloud-watch-cli-tools Applicable Versions
aws_developer_tools Applicable Versions
bamboo Applicable Versions
bamboo-agent Applicable Versions
baragon Applicable Versions
bastion Applicable Versions
bazel Applicable Versions
bigdata Applicable Versions
bitbucket_server Applicable Versions
bjn_java Applicable Versions
bootstrap Applicable Versions
buildr Applicable Versions
cassandra Applicable Versions
cassandra-dse Applicable Versions
cassandra-opscenter Applicable Versions
cassandra-priam Applicable Versions
cassandra-reaper Applicable Versions
cdap Applicable Versions
cerner_kafka Applicable Versions
cerner_tomcat Applicable Versions
chamber-kibana Applicable Versions
chef Applicable Versions
chef-server Applicable Versions
chef-teamcity Applicable Versions
chef_crowd Applicable Versions
chef_ec2_cli_tools Applicable Versions
chef_jira Applicable Versions
chronos Applicable Versions
coffee-truck Applicable Versions
configure_and_deploy_ssc Applicable Versions
confluence Applicable Versions
confluent Applicable Versions
confluent-cookbook Applicable Versions
coopr Applicable Versions
corbel Applicable Versions
corus Applicable Versions
couchdb Applicable Versions
cq Applicable Versions
crowd Applicable Versions
deploy-play Applicable Versions
dima-repose Applicable Versions
drelephant Applicable Versions
drill Applicable Versions
dropwizard Applicable Versions
druid Applicable Versions
dse Applicable Versions
dse-chef Applicable Versions
dynatrace Applicable Versions
dynatrace-appmon Applicable Versions
elassandra Applicable Versions
elastic Applicable Versions
elasticsearch Applicable Versions
elasticsearch-cluster Applicable Versions
elasticsearch-ng Applicable Versions
elasticsearch_cluster Applicable Versions
elk Applicable Versions
elkstack Applicable Versions
emptyness Applicable Versions
enstratius_agent_proxy Applicable Versions
epipe Applicable Versions
esri-tomcat Applicable Versions
et_elk Applicable Versions
et_gradle Applicable Versions
et_mesos Applicable Versions
eulipion-cleanspeak Applicable Versions
exhibitor Applicable Versions
flink Applicable Versions
flume Applicable Versions
flyway-cli Applicable Versions
foreflight_build_agent Applicable Versions
formatron_monitor Applicable Versions
gads Applicable Versions
ganglia_cluster Applicable Versions
gatling Applicable Versions
gerrit Applicable Versions
glassfish Applicable Versions
gobblin Applicable Versions
gocd Applicable Versions
gocd_agent Applicable Versions
gradle Applicable Versions
graphhopper Applicable Versions
graylog2 Applicable Versions
grinder Applicable Versions
groovy Applicable Versions
hadoop Applicable Versions
hadoop_cluster Applicable Versions
hadoop_cluster_rpm Applicable Versions
hadoop_for_hbase Applicable Versions
hadoop_spark Applicable Versions
hbase Applicable Versions
hbase_cluster Applicable Versions
hipsnip-jetty Applicable Versions
hive Applicable Versions
hops Applicable Versions
ice Applicable Versions
idea Applicable Versions
ignite-openfire Applicable Versions
impala Applicable Versions
intel_hadoop_metrics Applicable Versions
jar_deployment Applicable Versions
java-management Applicable Versions
java-service Applicable Versions
java_sun Applicable Versions
javadeploy Applicable Versions
jboss Applicable Versions
jboss-atg Applicable Versions
jboss7 Applicable Versions
jenkins Applicable Versions
jenkins-server Applicable Versions
jenkins_config Applicable Versions
jenkins_jnlp_slave Applicable Versions
jenkins_utils Applicable Versions
jetty Applicable Versions
jira Applicable Versions
jmeter Applicable Versions
jmxsh-chef Applicable Versions
jpackage Applicable Versions
jruby Applicable Versions
kafka Applicable Versions
kafka-cluster Applicable Versions
kafka-manager Applicable Versions
kafka_broker Applicable Versions
karaf Applicable Versions
katello Applicable Versions
keycloak Applicable Versions
kibana5-gm Applicable Versions
kibana_lwrp Applicable Versions
kkafka Applicable Versions
knotx Applicable Versions
kzookeeper Applicable Versions
lein Applicable Versions
leiningen Applicable Versions
liquibase Applicable Versions
livy Applicable Versions
logstash Applicable Versions
logstash_simple Applicable Versions
looker Applicable Versions
mapr Applicable Versions
marathon Applicable Versions
maven Applicable Versions
mecab-java Applicable Versions
mesos Applicable Versions
midokura Applicable Versions
minecraft Applicable Versions
minecraft-server Applicable Versions
mule Applicable Versions
neo4j Applicable Versions
netkernel Applicable Versions
nexus Applicable Versions
nexus_repository_manager Applicable Versions
nodestack Applicable Versions
noosfero Applicable Versions
ohmage Applicable Versions
oozie Applicable Versions
opendj-openam Applicable Versions
openfire Applicable Versions
openhab Applicable Versions
openmq Applicable Versions
opennms Applicable Versions
openoffice Applicable Versions
opentsdb Applicable Versions
oracle-fmw Applicable Versions
oracle_java Applicable Versions
orientdb Applicable Versions
paramount Applicable Versions
pennyworth Applicable Versions
petals Applicable Versions
pig Applicable Versions
pipeline Applicable Versions
platformstack Applicable Versions
polyglot Applicable Versions
protractor Applicable Versions
puncha-kibana Applicable Versions
r_config Applicable Versions
recognizer Applicable Versions
resin Applicable Versions
riak Applicable Versions
riemann2 Applicable Versions
robot Applicable Versions
rubymine Applicable Versions
rundeck Applicable Versions
rundeck-alt Applicable Versions
rundeck-server Applicable Versions
sauceconnect Applicable Versions
sbt-extras Applicable Versions
scala Applicable Versions
sda-agent Applicable Versions
simple-cerebro Applicable Versions
singularity Applicable Versions
singularity_executor Applicable Versions
sips-office-server Applicable Versions
soa_tools Applicable Versions
solr Applicable Versions
solr-lts Applicable Versions
solr_6 Applicable Versions
solrcloud Applicable Versions
sonar Applicable Versions
sonarqube_server Applicable Versions
spark Applicable Versions
spigot Applicable Versions
spinen-artifactory Applicable Versions
spring-boot Applicable Versions
stack-java Applicable Versions
stack_commons Applicable Versions
stash Applicable Versions
storm Applicable Versions
storm-cluster Applicable Versions
subrosa Applicable Versions
sudo_elastic Applicable Versions
sudo_logstash Applicable Versions
sumologic-collector Applicable Versions
takipi Applicable Versions
taurus Applicable Versions
teamcity_server Applicable Versions
tekno-mineos Applicable Versions
tensorflow Applicable Versions
thrift Applicable Versions
titan Applicable Versions
tizen Applicable Versions
tomcat Applicable Versions
tomcat-all Applicable Versions
tomcat-openam Applicable Versions
tomcat-solr Applicable Versions
tomcat7 Applicable Versions
tomcat8 Applicable Versions
tomcat_latest Applicable Versions
tomee Applicable Versions
tungsten Applicable Versions
typesafe-stack Applicable Versions
unifi Applicable Versions
unjava Applicable Versions
vault-cli Applicable Versions
vertx Applicable Versions
was_liberty Applicable Versions
webgoat Applicable Versions
weblogic Applicable Versions
webobjects Applicable Versions
wildfly Applicable Versions
wlp Applicable Versions
xldeploy Applicable Versions
xlrelease Applicable Versions
yajsw Applicable Versions
youtrack Applicable Versions
zabbix Applicable Versions
zammad Applicable Versions
zendserver Applicable Versions
zenoss Applicable Versions
zeppelin Applicable Versions
ziggrid Applicable Versions
zipkin Applicable Versions
zncrypt Applicable Versions
zookeeper Applicable Versions
zookeeper-cluster Applicable Versions
zookeeper-grid Applicable Versions
zookeeper_cluster Applicable Versions
zookeeperd Applicable Versions

No quality metric results found