diff --git a/metadata.json b/metadata.json new file mode 100644 index 00000000..99156531 --- /dev/null +++ b/metadata.json @@ -0,0 +1,47 @@ +{ + "name": "java", + "description": "Installs Java runtime.", + "long_description": "Description\n===========\n\nThis cookbook installs a Java JDK/JRE. It defaults to installing\nOpenJDK, but it can also install Oracle and IBM JDKs.\n\n**IMPORTANT NOTE**\n\nAs of 26 March 2012 you can no longer directly download the JDK from\nOracle's website without using a special cookie. This cookbook uses\nthat cookie to download the oracle recipe on your behalf, however the\n`java::oracle` recipe forces you to set either override the\n`node['java']['oracle']['accept_oracle_download_terms']` to true or\nset up a private repository accessible by HTTP.\n\n### Example\n\noverride the `accept_oracle_download_terms` in, e.g., `roles/base.rb`\n\n default_attributes(\n :java => {\n :oracle => {\n \"accept_oracle_download_terms\" => true\n }\n }\n )\n\nRequirements\n============\n\nChef 0.10.10+ and Ohai 6.10+ for `platform_family` use.\n\n## Platform\n\n* Debian, Ubuntu\n* CentOS, Red Hat, Fedora, Scientific, Amazon, XenServer\n* ArchLinux\n* FreeBSD\n* Windows\n\nThis cookbook includes cross-platform testing support via\n`test-kitchen`, see `TESTING.md`.\n\nAttributes\n==========\n\nSee `attributes/default.rb` for default values.\n\n* `node['java']['remove_deprecated_packages']` - Removes the now\ndeprecated Ubuntu JDK packages from the system, default `false`\n* `node['java']['install_flavor']` - Flavor of JVM you would like\ninstalled (`oracle`, `openjdk`, `ibm`, `windows`), default `openjdk`\non Linux/Unix platforms, `windows` on Windows platforms.\n* `node['java']['jdk_version']` - JDK version to install, defaults to\n `'6'`.\n* `node['java']['java_home']` - Default location of the\n \"`$JAVA_HOME`\".\n* `node['java']['openjdk_packages']` - Array of OpenJDK package names\n to install in the `java::openjdk` recipe. This is set based on the\n platform.\n* `node['java']['tarball']` - Name of the tarball to retrieve from\nyour internal repository, default `jdk1.6.0_29_i386.tar.gz`\n* `node['java']['tarball_checksum']` - Checksum for the tarball, if\nyou use a different tarball, you also need to create a new sha256\nchecksum\n* `node['java']['jdk']` - Version and architecture specific attributes\nfor setting the URL on Oracle's site for the JDK, and the checksum of\nthe .tar.gz.\n* `node['java']['oracle']['accept_oracle_download_terms']` - Indicates\n that you accept Oracle's EULA\n* `node['java']['windows']['url']` - The internal location of your\n java install for windows\n* `node['java']['windows']['package_name']` - The package name used by\n windows_package to check in the registry to determine if the install\n has already been run\n* `node['java']['ibm']['url']` - The URL which to download the IBM\n JDK/SDK. See the `ibm` recipe section below.\n* `node['java']['ibm']['accept_ibm_download_terms']` - Indicates that\n you accept IBM's EULA (for `java::ibm`)\n\nRecipes\n=======\n\n## default\n\nInclude the default recipe in a run list, to get `java`. By default\nthe `openjdk` flavor of Java is installed, but this can be changed by\nusing the `install_flavor` attribute. By default on Windows platform\nsystems, the `install_flavor` is `windows`.\n\nOpenJDK is the default because of licensing changes made upstream by\nOracle. See notes on the `oracle` recipe below.\n\n## openjdk\n\nThis recipe installs the `openjdk` flavor of Java. It also uses the\n`alternatives` system on RHEL/Debian families to set the default Java.\n\n## oracle\n\nThis recipe installs the `oracle` flavor of Java. This recipe does not\nuse distribution packages as Oracle changed the licensing terms with\nJDK 1.6u27 and prohibited the practice for both RHEL and Debian family\nplatforms.\n\nFor both RHEL and Debian families, this recipe pulls the binary\ndistribution from the Oracle website, and installs it in the default\n`JAVA_HOME` for each distribution. For Debian, this is\n`/usr/lib/jvm/default-java`. For RHEl, this is `/usr/lib/jvm/java`.\n\nAfter putting the binaries in place, the `java::oracle` recipe updates\n`/usr/bin/java` to point to the installed JDK using the\n`update-alternatives` script. This is all handled in the `java_ark`\nLWRP.\n\n## oracle_i386\n\nThis recipe installs the 32-bit Java virtual machine without setting\nit as the default. This can be useful if you have applications on the\nsame machine that require different versions of the JVM.\n\nThis recipe operates in a similar manner to `java::oracle`.\n\n## windows\n\nBecause there is no easy way to pull the java msi off oracle's site,\nthis recipe requires you to host it internally on your own http repo.\n\n## ibm\n\nThe `java::ibm` recipe is used to install the IBM version of Java.\nNote that IBM requires you to create an account *and* log in to\ndownload the binary installer for your platform. You must accept the\nlicense agreement with IBM to use their version of Java. In this\ncookbook, you indicate this by setting\n`node['java']['ibm']['accept_ibm_download_terms']` to `true`. You must\nalso host the binary on your own HTTP server to have an automated\ninstallation. The `node['java']['ibm']['url']` attribute must be set\nto a valid https/http URL; the URL is checked for validity in the recipe.\n\nAt this time the `java::ibm` recipe does not support multiple SDK\ninstallations.\n\nResources/Providers\n===================\n\nThis cookbook contains the `java_ark` LWRP. Generally speaking this\nLWRP is deprecated in favor of `ark` from the\n[ark cookbook](https://github.com/opscode-cookbooks/ark), but it is\nstill used in this cookbook for handling the Oracle JDK installation.\n\nBy default, the extracted directory is extracted to\n`app_root/extracted_dir_name` and symlinked to `app_root/default`\n\n## Actions\n\n- `:install`: extracts the tarball and makes necessary symlinks\n- `:remove`: removes the tarball and run update-alternatives for all\n symlinked `bin_cmds`\n\n## Attribute Parameters\n\n- `url`: path to tarball, .tar.gz, .bin (oracle-specific), and .zip\n currently supported\n- `checksum`: SHA256 checksum, not used for security but avoid\n redownloading the archive on each chef-client run\n- `app_home`: the default for installations of this type of\n application, for example, `/usr/lib/tomcat/default`. If your\n application is not set to the default, it will be placed at the same\n level in the directory hierarchy but the directory name will be\n `app_root/extracted_directory_name + \"_alt\"`\n- `app_home_mode`: file mode for app_home, is an integer\n- `bin_cmds`: array of binary commands that should be symlinked to\n `/usr/bin`, examples are mvn, java, javac, etc. These cmds must be in\n the `bin` subdirectory of the extracted folder. Will be ignored if this\n `java_ark` is not the default\n- `owner`: owner of extracted directory, set to \"root\" by default\n- `default`: whether this the default installation of this package,\n boolean true or false\n\n## Examples\n\n # install jdk6 from Oracle\n java_ark \"jdk\" do\n url 'http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x64.bin'\n checksum 'a8603fa62045ce2164b26f7c04859cd548ffe0e33bfc979d9fa73df42e3b3365'\n app_home '/usr/local/java/default'\n bin_cmds [\"java\", \"javac\"]\n action :install\n end\n\nUsage\n=====\n\nSimply include the `java` recipe where ever you would like Java installed.\n\nTo install Oracle flavored Java override the `node['java']['install_flavor']` attribute with in role:\n\n name \"java\"\n description \"Install Oracle Java on Ubuntu\"\n default_attributes(\n \"java\" => {\n \"install_flavor\" => \"oracle\"\n }\n )\n run_list(\n \"recipe[java]\"\n )\n\nTo install IBM flavored Java, set the required attributes:\n\n name \"java\"\n description \"Install IBM Java on Ubuntu\"\n default_attributes(\n \"java\" => {\n \"install_flavor\" => \"ibm\",\n \"ibm\" => {\n \"accept_ibm_download_terms\" => true,\n \"url\" => \"http://fileserver.example.com/ibm-java-x86_64-sdk-7.0-4.1.bin\",\n \"checksum\" => \"The SHA256 checksum of the bin\"\n }\n }\n )\n run_list(\n \"recipe[java]\"\n )\n\n\nDevelopment\n===========\n\nThis cookbook uses\n[test-kitchen](https://github.com/opscode/test-kitchen) for\nintegration tests and\n[ChefSpec/RSpec](https://github.com/acrmp/chefspec) for unit tests.\nPull requests should pass existing tests in\n`files/default/tests/minitest-handler`.\n\nAt this time due to licensing concerns, the IBM recipe is not set up\nin test kitchen. If you would like to test this locally, copy\n.kitchen.yml to .kitchen.local.yml and add the following suite:\n\n suites:\n - name: ibm\n run_list: [\"recipe[java]\"]\n attributes:\n java:\n install_flavor: \"ibm\"\n ibm:\n accept_ibm_download_terms: true\n url: \"http://jenkins/ibm-java-x86_64-sdk-7.0-4.1.bin\"\n checksum: the-sha256-checksum\n\nLog into the IBM DeveloperWorks site to download a copy of the IBM\nJava SDK you wish to use/test, host it on an internal HTTP server, and\ncalculate the SHA256 checksum to use in the suite.\n\nLicense and Author\n==================\n\n* Author: Seth Chisamore ()\n* Author: Bryan W. Berry ()\n* Author: Joshua Timberman ()\n\nCopyright: 2008-2013, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n", + "maintainer": "Opscode, Inc.", + "maintainer_email": "cookbooks@opscode.com", + "license": "Apache 2.0", + "platforms": { + "debian": ">= 0.0.0", + "ubuntu": ">= 0.0.0", + "centos": ">= 0.0.0", + "redhat": ">= 0.0.0", + "scientific": ">= 0.0.0", + "fedora": ">= 0.0.0", + "amazon": ">= 0.0.0", + "arch": ">= 0.0.0", + "oracle": ">= 0.0.0", + "freebsd": ">= 0.0.0", + "windows": ">= 0.0.0", + "suse": ">= 0.0.0", + "xenserver": ">= 0.0.0" + }, + "dependencies": { + "windows": ">= 0.0.0" + }, + "recommendations": { + }, + "suggestions": { + }, + "conflicting": { + }, + "providing": { + }, + "replacing": { + }, + "attributes": { + }, + "groupings": { + }, + "recipes": { + "java": "Installs Java runtime", + "java::openjdk": "Installs the OpenJDK flavor of Java", + "java::oracle": "Installs the Oracle flavor of Java", + "java::oracle_i386": "Installs the 32-bit jvm without setting it as the default" + }, + "version": "1.11.7" +} \ No newline at end of file