forked from chef-boneyard/cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* COOK-382: deprecated java_sun cookbook final tweaks for combined jdk cookbook first pass at a combined openjdk and sun java cookbook
- Loading branch information
Showing
14 changed files
with
291 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Description | ||
=========== | ||
|
||
Installs a Java. Uses OpenJDK by default but supports installation of the Sun's Java (Debian and Ubuntu platforms only). | ||
|
||
Requirements | ||
============ | ||
|
||
Platform: | ||
|
||
* Debian, Ubuntu (OpenJDK, Sun) | ||
* CentOS, Red Hat, Fedora (OpenJDK) | ||
|
||
The following Opscode cookbooks are dependencies: | ||
|
||
* apt | ||
|
||
Attributes | ||
========== | ||
|
||
* `node["java"]["install_flavor"]` - Type of JRE you would like installed ("sun" or "openjdk"), default "openjdk". | ||
|
||
Usage | ||
===== | ||
|
||
Simply include the recipe where you want Java installed. | ||
|
||
If you would like to use the Sun flavor of Java, create a role and set the `java[install_flavor]` attribute to `'sun'`. | ||
|
||
% knife role show java | ||
{ | ||
"name": "java", | ||
"chef_type": "role", | ||
"json_class": "Chef::Role", | ||
"default_attributes": { | ||
"java": { | ||
"install_flavor":"sun" | ||
} | ||
}, | ||
"description": "", | ||
"run_list": [ | ||
"recipe[java]" | ||
], | ||
"override_attributes": { | ||
} | ||
} | ||
|
||
The Sun flavor of Java is only supported on Debian and Ubuntu systems, the recipe will preseed the package and update java alternatives. | ||
|
||
License and Author | ||
================== | ||
|
||
Author:: Seth Chisamore (<schisamo@opscode.com>) | ||
|
||
Copyright:: 2008-2010, 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. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Cookbook Name:: java | ||
# Attributes:: default | ||
# | ||
# Copyright 2010, 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. | ||
|
||
default["java"]["install_flavor"] = "openjdk" | ||
|
||
case platform | ||
when "centos","redhat","fedora" | ||
set["java"]["java_home"] = "/usr/lib/jvm/java" | ||
else | ||
set["java"]["java_home"] = "/usr/lib/jvm/default-java" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,48 @@ | ||
{ | ||
"recommendations": { | ||
}, | ||
"attributes": { | ||
}, | ||
"maintainer": "Opscode, Inc.", | ||
"suggestions": { | ||
}, | ||
"dependencies": { | ||
}, | ||
"maintainer_email": "cookbooks@opscode.com", | ||
"conflicting": { | ||
}, | ||
"platforms": { | ||
"debian": [ | ||
"providing": { | ||
}, | ||
"maintainer": "Opscode, Inc.", | ||
"replacing": { | ||
}, | ||
"description": "Installs java via openjdk.", | ||
"maintainer_email": "cookbooks@opscode.com", | ||
"groupings": { | ||
}, | ||
"attributes": { | ||
}, | ||
"recommendations": { | ||
}, | ||
"dependencies": { | ||
"apt": [ | ||
|
||
], | ||
"fedora": [ | ||
] | ||
}, | ||
"suggestions": { | ||
}, | ||
"long_description": "Description\n===========\n\nInstalls a Java. Uses OpenJDK by default but supports installation of the Sun's Java (Debian and Ubuntu platforms only).\n\nRequirements\n============\n\nPlatform: \n\n* Debian, Ubuntu (OpenJDK, Sun)\n* CentOS, Red Hat, Fedora (OpenJDK)\n\nThe following Opscode cookbooks are dependencies:\n\n* apt\n\nAttributes\n==========\n\n* `node[\"java\"][\"install_flavor\"]` - Type of JRE you would like installed (\"sun\" or \"openjdk\"), default \"openjdk\".\n\nUsage\n=====\n\nSimply include the recipe where you want Java installed.\n\nIf you would like to use the Sun flavor of Java, create a role and set the `java[install_flavor]` attribute to `'sun'`. \n\n % knife role show java\n {\n \"name\": \"java\",\n \"chef_type\": \"role\",\n \"json_class\": \"Chef::Role\",\n \"default_attributes\": {\n \"java\": {\n \"install_flavor\":\"sun\"\n }\n },\n \"description\": \"\",\n \"run_list\": [\n \"recipe[java]\"\n ],\n \"override_attributes\": {\n }\n }\n\nThe Sun flavor of Java is only supported on Debian and Ubuntu systems, the recipe will preseed the package and update java alternatives.\n\nLicense and Author\n==================\n\nAuthor:: Seth Chisamore (<schisamo@opscode.com>)\n\nCopyright:: 2008-2010, 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", | ||
"platforms": { | ||
"debian": [ | ||
|
||
], | ||
"centos": [ | ||
], | ||
"fedora": [ | ||
|
||
], | ||
"ubuntu": [ | ||
], | ||
"centos": [ | ||
|
||
], | ||
"redhat": [ | ||
], | ||
"ubuntu": [ | ||
|
||
] | ||
}, | ||
"license": "Apache 2.0", | ||
"version": "0.10.2", | ||
"providing": { | ||
}, | ||
"recipes": { | ||
"java": "Installs openjdk to provide Java" | ||
}, | ||
"replacing": { | ||
}, | ||
"name": "java", | ||
"description": "Installs java via openjdk.", | ||
"groupings": { | ||
}, | ||
"long_description": "= DESCRIPTION:\n\nInstalls Java and Ant. Uses OpenJDK, Sun's Java is deprecated in Ubuntu and may not be available in the future.\n\n= REQUIREMENTS:\n\nPlatform: Ubuntu, Debian, Red Hat, CentOS, Fedora.\n\nEnable the 'multiverse' repository on Ubuntu, 'non-free' on Debian or EPEL on RH/Cent/Fedora to get the Java package, or edit the default recipe to point at the Java package for your platform.\n\n= USAGE:\n\nSimply include the recipe where you want Java installed. Note the repository requirement above to get the right package. On Debian and Ubuntu systems, the recipe will preseed the package and update java alternaties.\n\n= LICENSE and AUTHOR:\n\nCopyright 2008-2010, 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" | ||
} | ||
], | ||
"redhat": [ | ||
|
||
] | ||
}, | ||
"name": "java", | ||
"version": "0.10.2", | ||
"conflicting": { | ||
}, | ||
"license": "Apache 2.0", | ||
"recipes": { | ||
"java": "Installs openjdk to provide Java" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Cookbook Name:: java | ||
# Recipe:: openjdk | ||
# | ||
# Copyright 2010, 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. | ||
|
||
node.run_state[:java_pkgs] = value_for_platform( | ||
["debian","ubuntu"] => { | ||
"default" => ["openjdk-6-jre","default-jre","icedtea6-plugin"] # icedtea6-plugin included to make update-java-alternatives work correctly | ||
}, | ||
["centos","redhat","fedora"] => { | ||
"default" => ["java-1.6.0-openjdk","java-1.6.0-openjdk-devel"] | ||
}, | ||
"default" => ["openjdk-6-jre-headless","default-jre-headless","default-jre"] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Cookbook Name:: java | ||
# Recipe:: sun | ||
# | ||
# Copyright 2010, 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. | ||
|
||
node.run_state[:java_pkgs] = value_for_platform( | ||
["debian","ubuntu"] => { | ||
"default" => ["sun-java6-jre","default-jre-headless"] | ||
}, | ||
"default" => ["sun-java6-jre"] | ||
) | ||
|
||
case node.platform | ||
when "debian","ubuntu" | ||
include_recipe "apt" | ||
|
||
template "/etc/apt/sources.list.d/canonical.com.list" do | ||
mode "0644" | ||
source "canonical.com.list.erb" | ||
notifies :run, resources(:execute => "apt-get update"), :immediately | ||
end | ||
else | ||
Chef::Log.error("Installation of Sun Java packages are only supported on Debian/Ubuntu at this time.") | ||
end |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.