You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-38
Original file line number
Diff line number
Diff line change
@@ -1,52 +1,59 @@
1
1
Description
2
2
===========
3
3
4
-
Installs a Java. Uses Oracle's JDK by default but supports installation of the OpenJDK.
4
+
Installs a Java. Uses OpenJDK by default but supports installation of Oracle's JDK.
5
5
6
-
This cookbook also provides the java_ark LWRP which other java
6
+
This cookbook also provides the `java_ark` LWRP which other java
7
7
cookbooks can use to install java-related applications from binary
8
8
packages.
9
9
10
-
---
10
+
The `java_ark` LWPR may move to its own cookbook at some point in the
11
+
future as its functionality is useful for other purposes.
12
+
11
13
Requirements
12
14
============
13
15
14
16
Platform
15
17
--------
16
18
17
19
* Debian, Ubuntu
18
-
* CentOS, Red Hat, Fedora
19
-
20
-
Cookbooks
21
-
---------
22
-
23
-
* java
20
+
* CentOS, Red Hat, Fedora, Scientific, Amazon
21
+
* ArchLinux
22
+
* FreeBSD
24
23
25
-
---
26
24
Attributes
27
25
==========
28
26
29
-
*`node["java"]["install_flavor"]` - Flavor of JVM you would like installed (`oracle` or `openjdk`), default `oracle`.
30
-
*`node['java']['java_home']`
27
+
See `attributes/default.rb` for default values.
28
+
29
+
*`node["java"]["install_flavor"]` - Flavor of JVM you would like installed (`oracle` or `openjdk`), default `openjdk`.
30
+
*`node['java']['java_home']` - Default location of the "`$JAVA_HOME`".
31
31
*`node['java']['tarball']` - name of the tarball to retrieve from your corporate repository default `jdk1.6.0_29_i386.tar.gz`
32
32
*`node['java']['tarball_checksum']` - checksum for the tarball, if you use a different tarball, you also need to create a new sha256 checksum
33
+
*`node['java']['jdk']` - version and architecture specific attributes
34
+
for setting the URL on Oracle's site for the JDK, and the checksum
35
+
of the .tar.gz.
33
36
34
-
---
35
37
Recipes
36
38
=======
37
39
38
40
default
39
41
-------
40
42
41
-
Include the default recipe in a run list, to get `java`. By default the `oracle` flavor of Java is installed, but this can be changed by using the `install_flavor` attribute.
43
+
Include the default recipe in a run list, to get `java`. By default
44
+
the `openjdk` flavor of Java is installed, but this can be changed by
45
+
using the `install_flavor` attribute.
46
+
47
+
OpenJDK is the default because of licensing changes made upstream by
48
+
Oracle. See notes on the `oracle` recipe below.
42
49
43
50
openjdk
44
51
-------
45
52
46
53
This recipe installs the `openjdk` flavor of Java.
47
54
48
55
oracle
49
-
---
56
+
------
50
57
51
58
This recipe installs the `oracle` flavor of Java. This recipe does not
52
59
use distribution packages as Oracle changed the licensing terms with
@@ -58,50 +65,56 @@ JAVA_HOME for each distribution. For debian/ubuntu, this is
58
65
/usr/lib/jvm/default-java. For Centos/RHEL, this is /usr/lib/jvm/java
59
66
60
67
After putting the binaries in place, the oracle recipe updates
61
-
/usr/bin/java to point to the installed JDK using the update-alternatives script
68
+
/usr/bin/java to point to the installed JDK using the
69
+
`update-alternatives` script
62
70
63
71
oracle_i386
64
72
-----------
65
73
66
-
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.
74
+
This recipe installs the 32-bit Java virtual machine without setting
75
+
it as the default. This can be useful if you have applications on the
76
+
same machine that require different versions of the JVM.
67
77
68
78
Resources/Providers
69
79
===================
70
80
71
81
This LWRP provides an easy way to manage java applications. It uses
72
82
the LWRP arkive (deliberately misspelled). It is an arkive and not an
73
-
"archive" because the java_ark lwrp is not the same as a java archive
74
-
or "jar". Essentially, you provide the java_ark with the URL to a tarball and
75
-
the commands within the extracted result that you want symlinked to /usr/bin/
83
+
"archive" because the `java_ark` lwrp is not the same as a java
84
+
archive or "jar". Essentially, you provide the `java_ark` with the URL
85
+
to a tarball and the commands within the extracted result that you
86
+
want symlinked to /usr/bin/
76
87
77
-
If you have a better name for this lwrp please contact the maintainer.
88
+
The `java_ark` LWPR may move to its own cookbook at some point in the
89
+
future as its functionality is useful for other purposes.
78
90
79
-
By default, the extracted directory is extracted to app_root/extracted_dir_name and symlinked to app_root/default
91
+
By default, the extracted directory is extracted to
92
+
`app_root/extracted_dir_name` and symlinked to `app_root/default`
80
93
81
94
# Actions
82
95
83
-
- :install: extracts the tarball and makes necessary symlinks
84
-
- :remove: removes the tarball and run update-alternatives for all
85
-
symlinked bin_cmds
96
+
-`:install`: extracts the tarball and makes necessary symlinks
97
+
-`:remove`: removes the tarball and run update-alternatives for all
98
+
symlinked `bin_cmds`
86
99
87
100
# Attribute Parameters
88
101
89
-
- url: path to tarball, .tar.gz, .bin (oracle-specific), and .zip
102
+
-`url`: path to tarball, .tar.gz, .bin (oracle-specific), and .zip
90
103
currently supported
91
-
- checksum: sha256 checksum, not used for security but avoid
104
+
-`checksum`: sha256 checksum, not used for security but avoid
92
105
redownloading the archive on each chef-client run
93
-
- app_home: the default for installations of this type of
94
-
application, for example, /usr/lib/tomcat/default. If your
106
+
-`app_home`: the default for installations of this type of
107
+
application, for example, `/usr/lib/tomcat/default`. If your
95
108
application is not set to the default, it will be placed at the same
96
109
level in the directory hierarchy but the directory name will be
97
-
app_root/extracted_directory_name + "_alt"
98
-
- app_home_mode: file mode for app_home, is an integer
99
-
- bin_cmds: array of binary commands that should be symlinked to
110
+
`app_root/extracted_directory_name + "_alt"`
111
+
-`app_home_mode`: file mode for app_home, is an integer
112
+
-`bin_cmds`: array of binary commands that should be symlinked to
100
113
/usr/bin, examples are mvn, java, javac, etc. These cmds must be in
101
114
the bin/ subdirectory of the extracted folder. Will be ignored if this
102
115
java_ark is not the default
103
-
- owner: owner of extracted directory, set to "root" by default
104
-
- default: whether this the default installation of this package,
116
+
-`owner`: owner of extracted directory, set to "root" by default
117
+
-`default`: whether this the default installation of this package,
105
118
boolean true or false
106
119
107
120
@@ -125,9 +138,6 @@ By default, the extracted directory is extracted to app_root/extracted_dir_name
125
138
action :install
126
139
end
127
140
128
-
129
-
130
-
---
131
141
Usage
132
142
=====
133
143
@@ -146,15 +156,23 @@ To install Oracle flavored Java on Debian or Ubuntu override the `node['java']['
146
156
"recipe[java]"
147
157
)
148
158
159
+
Changes
160
+
=======
161
+
162
+
## v1.4.0:
149
163
164
+
*[COOK-858] - numerous updates: handle jdk6 and 7, switch from sun to
165
+
oracle, make openjdk default, add `java_ark` LWRP.
0 commit comments