hapi-fhir/vagrant/chef/cookbooks/java/metadata.json

57 lines
16 KiB
JSON

{
"name": "java",
"description": "Installs Java runtime.",
"long_description": "java\n=====\n\nThis cookbook installs a Java JDK/JRE. It defaults to installing\nOpenJDK, but it can also install Oracle and IBM JDKs.\n\nUsage\n-----\n\nSimply include the `java` recipe wherever you would like Java installed, such as a run list (`recipe[java]`) or a cookbook (`include_recipe 'java'`). By default, OpenJDK 6 is installed. The `install_flavor` attribute is used to determine which JDK to install (OpenJDK, Oracle, IBM, or Windows), and `jdk_version` specifies which version to install (currently 6 and 7 are supported for all JDK types, 8 for Oracle only).\n\n### Examples\n\nTo install Oracle Java 7 (note that when installing Oracle JDK, `accept_oracle_download_terms` must be set -- see below for details):\n```ruby\nname \"java\"\ndescription \"Install Oracle Java\"\ndefault_attributes(\n \"java\" => {\n \"install_flavor\" => \"oracle\",\n \"jdk_version\" => \"7\",\n \"oracle\" => {\n \"accept_oracle_download_terms\" => true\n }\n }\n)\nrun_list(\n \"recipe[java]\"\n)\n```\n\nTo install IBM flavored Java:\n```ruby\nname \"java\"\ndescription \"Install IBM Java on Ubuntu\"\ndefault_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)\nrun_list(\n \"recipe[java]\"\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* SmartOS\n* Windows\n\nAttributes\n-----\n\nSee `attributes/default.rb` for default values.\n\n* `node['java']['install_flavor']` - Flavor of JVM you would like\ninstalled (`oracle`, `oracle_rpm`, `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']['set_etc_environment']` - Optionally sets\n JAVA_HOME in `/etc/environment` for Default `false`.\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']['windows']['checksum']` - The checksum for the package to\n download on Windows machines (default is nil, which does not perform\n checksum validation)\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* `node['java']['oracle_rpm']['type']` - Type of java RPM (`jre` or `jdk`), default `jdk`\n* `node['java']['oracle_rpm']['package_version']` - optional, can be set \n to pin a version different from the up-to-date one available in the YUM repo,\n it might be needed to also override the node['java']['java_home'] attribute \n to a value consistent with the defined version\n* `node['java']['oracle_rpm']['package_name']` - optional, can be set \n to define a package name different from the RPM published by Oracle.\n* `node['java']['accept_license_agreement']` - Indicates that you accept\n the EULA for openjdk package installation.\n* `node['java']['set_default']` - Indicates whether or not you want the\n JDK installed to be default on the system. Defaults to true.\n\nRecipes\n-----\n\n### default\n\nInclude the default recipe in a run list or recipe 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\nNOTE: In most cases, including just the default recipe will be sufficient.\nIt's possible to include the install_type recipes directly, as long as\nthe necessary attributes (such as java_home) are set.\n\n### set_attributes_from_version\n\nSets default attributes based on the JDK version. This is included by `default.rb`. This logic must be in\na recipe instead of attributes/default.rb. See [#95](https://github.com/agileorbit-cookbooks/java/pull/95)\nfor details.\n\n### default_java_symlink\n\nUpdates /usr/lib/jvm/default-java to point to JAVA_HOME.\n\n### purge_packages\n\nPurges deprecated Sun Java packages.\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\nOn platforms such as SmartOS that require the acceptance of a license\nagreement during package installation, set\n`node['java']['accept_license_agreement']` to true in order to indicate\nthat you accept the license.\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\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\noverride the `accept_oracle_download_terms` in, e.g., `roles/base.rb`\n```ruby\n default_attributes(\n :java => {\n :oracle => {\n \"accept_oracle_download_terms\" => true\n }\n }\n )\n```\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### oracle_rpm\n\nThis recipe installs the Oracle JRE or JDK provided by a custom YUM\nrepositories.\nIt also uses the `alternatives` system on RHEL families to set\nthe default Java.\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**IMPORTANT NOTE**\n\nIf you use the `windows` recipe, you'll need to make sure you've uploaded\nthe `aws` and `windows` cookbooks. As of version 1.18.0, this cookbook\nreferences them with `suggests` instead of `depends`, as they are only\nused by the `windows` recipe.\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\n### java_ark\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- `group`: group of extracted directory, set to `:owner` by default\n- `default`: whether this the default installation of this package,\n boolean true or false\n\n#### Examples\n```ruby\n# install jdk6 from Oracle\njava_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\nend\n```\n### java_alternatives\n\nThe `java_alternatives` LWRP uses `update-alternatives` command\nto set and unset command alternatives for various Java tools\nsuch as java, javac, etc.\n\n#### Actions\n\n- `:set`: set alternatives for Java tools\n- `:unset`: unset alternatives for Java tools\n\n#### Attribute Parameters\n\n- `java_location`: Java installation location.\n- `bin_cmds`: array of Java tool names to set or unset alternatives on.\n- `default`: whether to set the Java tools as system default. Boolean, defaults to `true`.\n- `priority`: priority of the alternatives. Integer, defaults to `1061`.\n\n#### Examples\n```ruby\n# set alternatives for java and javac commands\njava_alternatives \"set java alternatives\" do\n java_location '/usr/local/java'\n bin_cmds [\"java\", \"javac\"]\n action :set\nend\n```\n\nProduction Deployment with Oracle Java\n-----\nOracle has been known to change the behavior of its download site frequently. It is recommended you store the archives on an artifact server or s3 bucket. You can then override the attributes in a cookbook, role, or environment:\n\n```ruby\ndefault['java']['jdk_version'] = '7'\ndefault['java']['install_flavor'] = 'oracle'\ndefault['java']['jdk']['7']['x86_64']['url'] = 'http://artifactory.example.com/artifacts/jdk-7u65-linux-x64.tar.gz'\ndefault['java']['oracle']['accept_oracle_download_terms'] = true\n```\n\nRecommendations for inclusion in community cookbooks\n-----\n\nThis cookbook is a dependency for many other cookbooks in the Java/Chef sphere. Here are some guidelines for including it into other cookbooks:\n\n### Allow people to not use this cookbook\nMany users manage Java on their own or have systems that already have java installed. Give these users an option to skip this cookbook, for example:\n```ruby\ninclude_recipe 'java' if node['maven']['install_java']\n```\n\nThis would allow a users of the maven cookbook to choose if they want the maven cookbook to install java for them or leave that up to the consumer.\n\nAnother good example is from the [Jenkins Cookbook Java recipe](https://github.com/opscode-cookbooks/jenkins/commit/ca2a69d982011dc1bec6a6d0ee4da5c1a1599864).\n\n### Pinning to major version of cookbook and Java\nThis cookbook follows semver. It is recommended to pin at the major version of this cookbook when including it in other cookbooks, eg: `depends 'java', '~> 1.0'`\n\nIt is acceptable to set the `node['java']['jdk_version']` to a specific version if required for your software to run, eg software xyz requires Java 8 to run. Refrain from pinning to specific patches of the JDK to allow users to consume security updates.\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/sethvargo/chefspec) for unit tests.\nSee [TESTING.md](https://github.com/agileorbit-cookbooks/java/blob/master/TESTING.md) for testing instructions.\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```yml\nsuites:\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```\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 (<schisamo@opscode.com>)\n* Author: Bryan W. Berry (<bryan.berry@gmail.com>)\n* Author: Joshua Timberman (<joshua@opscode.com>)\n* Author: Eric Helgeson (<erichelgeson@gmail.com>)\n\nCopyright: 2014, Agile Orbit, LLC\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": "Agile Orbit",
"maintainer_email": "info@agileorbit.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",
"smartos": ">= 0.0.0"
},
"dependencies": {
},
"recommendations": {
},
"suggestions": {
"windows": ">= 0.0.0",
"aws": ">= 0.0.0"
},
"conflicting": {
},
"providing": {
},
"replacing": {
},
"attributes": {
},
"groupings": {
},
"recipes": {
"java::default": "Installs Java runtime",
"java::default_java_symlink": "Updates /usr/lib/jvm/default-java",
"java::ibm": "Installs the JDK for IBM",
"java::ibm_tar": "Installs the JDK for IBM from a tarball",
"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",
"java::oracle_rpm": "Installs the Oracle RPM flavor of Java",
"java::purge_packages": "Purges old Sun JDK packages",
"java::set_attributes_from_version": "Sets various attributes that depend on jdk_version",
"java::set_java_home": "Sets the JAVA_HOME environment variable",
"java::windows": "Installs the JDK on Windows"
},
"version": "1.28.0"
}