Update cookbooks and add wordpress cookbook
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
v1.0.6
|
||||
======
|
||||
* Get rid of warnings about defined constant
|
||||
* update Chef download url
|
||||
* Updates supported versions
|
||||
* require chef/rest
|
||||
* use Chef::Mash explicitly
|
||||
* Define the Chef::Mash constant if not provided by chef
|
||||
* add test suites for ubuntu 14.04 and centos 7
|
||||
|
||||
v1.0.4
|
||||
======
|
||||
* file_cache_path path to store chef-client
|
||||
|
||||
@@ -6,6 +6,19 @@ Chef package into your system if you are currently running
|
||||
via gem install, and it can keep your omnibus install up
|
||||
to date.
|
||||
|
||||
Supports
|
||||
========
|
||||
|
||||
- redhat
|
||||
- centos
|
||||
- amazon
|
||||
- scientific
|
||||
- oracle
|
||||
- debian
|
||||
- ubuntu
|
||||
- mac_os_x
|
||||
- solaris
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
|
||||
@@ -17,13 +17,21 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
require "chef/rest"
|
||||
require "chef/mash"
|
||||
require "net/http"
|
||||
|
||||
unless(Chef.constants.include?(:Mash))
|
||||
Chef::Mash = Mash
|
||||
end
|
||||
|
||||
module OmnibusTrucker
|
||||
class << self
|
||||
URL_MAP = {
|
||||
:p => :platform, :pv => :platform_version, :m => :machine,
|
||||
:v => :version, :prerelease => :prerelease,
|
||||
:nightlies => :nightlies
|
||||
}
|
||||
} unless defined?(URL_MAP)
|
||||
|
||||
def build_url(*opts)
|
||||
args = node = nil
|
||||
@@ -40,7 +48,7 @@ module OmnibusTrucker
|
||||
if(node)
|
||||
args = collect_attributes(node).merge(args)
|
||||
end
|
||||
url = args[:url] || "http://www.opscode.com/chef/download#{'-server' if args[:server]}"
|
||||
url = args[:url] || "http://www.chef.io/chef/download#{'-server' if args[:server]}"
|
||||
u_args = URL_MAP.map do |u_k, a_k|
|
||||
"#{u_k}=#{args[a_k]}" unless args[a_k].nil?
|
||||
end.compact
|
||||
@@ -48,7 +56,7 @@ module OmnibusTrucker
|
||||
end
|
||||
|
||||
def collect_attributes(node, args={})
|
||||
set = Mash[
|
||||
set = Chef::Mash[
|
||||
[:platform_family, :platform, :platform_version].map do |k|
|
||||
[k, args[k] || node[k]]
|
||||
end
|
||||
|
||||
@@ -1,29 +1,56 @@
|
||||
{
|
||||
"name": "omnibus_updater",
|
||||
"description": "Chef omnibus package updater and installer",
|
||||
"long_description": "OmnibusUpdater\n==============\n\nUpdate your omnibus! This cookbook can install the omnibus\nChef package into your system if you are currently running\nvia gem install, and it can keep your omnibus install up\nto date.\n\nUsage\n=====\n\nAdd the recipe to your run list and specify what version should\nbe installed on the node:\n\n`knife node run_list add recipe[omnibus_updater]`\n\nIn your role you'll likely want to set the version. It defaults\nto nothing, and will install the latest..\n\n```\noverride_attributes(\n :omnibus_updater => {\n :version => '11.4.0'\n }\n)\n```\n\nIt can also uninstall Chef from the system Ruby installation\nif you tell it to:\n\n```\noverride_attributes(\n :omnibus_updater => {\n :remove_chef_system_gem => true\n }\n)\n```\n\nFeatures\n========\n\nLatest Version\n--------------\n\nForce installation of the latest version regardless of value stored in version\nattribute by setting the `force_latest` attribute.\n\nChef Killing\n------------\n\nBy default the omnibus updater will kill the chef instance by raising an exception.\nYou can turn this off using the `kill_chef_on_upgrade` attribute. It is not\nrecommended to turn this off. Internal chef libraries may change, move, or no\nlonger exist. The currently running instance can encounter unexpected states because\nof this. To prevent this, the updater will attempt to kill the Chef instance so\nthat it can be restarted in a normal state.\n\nRestart chef-client Service\n---------------------------\n\nUse the `restart_chef_service` attribute to restart chef-client if you have it running as a service.\n\nPrerelease\n--------\n\nPrereleases can be installed via the auto-installation using `prerelease` attribute.\n\nDisable\n-------\n\nIf you want to disable the updater you can set the `disabled`\nattribute to true. This might be useful if the cookbook is added\nto a role but should then be skipped for example on a Chef server.\n\nPrevent Downgrade\n-----------------\n\nIf you want to prevent the updater from downgrading chef on a node, you \ncan set the `prevent_downgrade` attribute to true. This can be useful\nfor testing new versions manually. Note that the `always_download` \nattribute takes precedence if set.\n\nInfos\n=====\n\n* Repo: https://github.com/hw-cookbooks/omnibus_updater\n* IRC: Freenode @ #heavywater\n* Cookbook: http://ckbk.it/omnibus_updater\n",
|
||||
"long_description": "OmnibusUpdater\n==============\n\nUpdate your omnibus! This cookbook can install the omnibus\nChef package into your system if you are currently running\nvia gem install, and it can keep your omnibus install up\nto date.\n\nSupports\n========\n\n- redhat\n- centos\n- amazon\n- scientific\n- oracle\n- debian\n- ubuntu\n- mac_os_x\n- solaris\n\nUsage\n=====\n\nAdd the recipe to your run list and specify what version should\nbe installed on the node:\n\n`knife node run_list add recipe[omnibus_updater]`\n\nIn your role you'll likely want to set the version. It defaults\nto nothing, and will install the latest..\n\n```\noverride_attributes(\n :omnibus_updater => {\n :version => '11.4.0'\n }\n)\n```\n\nIt can also uninstall Chef from the system Ruby installation\nif you tell it to:\n\n```\noverride_attributes(\n :omnibus_updater => {\n :remove_chef_system_gem => true\n }\n)\n```\n\nFeatures\n========\n\nLatest Version\n--------------\n\nForce installation of the latest version regardless of value stored in version\nattribute by setting the `force_latest` attribute.\n\nChef Killing\n------------\n\nBy default the omnibus updater will kill the chef instance by raising an exception.\nYou can turn this off using the `kill_chef_on_upgrade` attribute. It is not\nrecommended to turn this off. Internal chef libraries may change, move, or no\nlonger exist. The currently running instance can encounter unexpected states because\nof this. To prevent this, the updater will attempt to kill the Chef instance so\nthat it can be restarted in a normal state.\n\nRestart chef-client Service\n---------------------------\n\nUse the `restart_chef_service` attribute to restart chef-client if you have it running as a service.\n\nPrerelease\n--------\n\nPrereleases can be installed via the auto-installation using `prerelease` attribute.\n\nDisable\n-------\n\nIf you want to disable the updater you can set the `disabled`\nattribute to true. This might be useful if the cookbook is added\nto a role but should then be skipped for example on a Chef server.\n\nPrevent Downgrade\n-----------------\n\nIf you want to prevent the updater from downgrading chef on a node, you \ncan set the `prevent_downgrade` attribute to true. This can be useful\nfor testing new versions manually. Note that the `always_download` \nattribute takes precedence if set.\n\nInfos\n=====\n\n* Repo: https://github.com/hw-cookbooks/omnibus_updater\n* IRC: Freenode @ #heavywater\n* Cookbook: http://ckbk.it/omnibus_updater\n",
|
||||
"maintainer": "Chris Roberts",
|
||||
"maintainer_email": "chrisroberts.code@gmail.com",
|
||||
"license": "Apache 2.0",
|
||||
"platforms": {
|
||||
"redhat": ">= 0.0.0",
|
||||
"centos": ">= 0.0.0",
|
||||
"amazon": ">= 0.0.0",
|
||||
"scientific": ">= 0.0.0",
|
||||
"oracle": ">= 0.0.0",
|
||||
"debian": ">= 0.0.0",
|
||||
"ubuntu": ">= 0.0.0",
|
||||
"mac_os_x": ">= 0.0.0",
|
||||
"solaris": ">= 0.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"recommendations": {
|
||||
|
||||
},
|
||||
"suggestions": {
|
||||
|
||||
},
|
||||
"conflicting": {
|
||||
|
||||
},
|
||||
"providing": {
|
||||
|
||||
},
|
||||
"replacing": {
|
||||
|
||||
},
|
||||
"attributes": {
|
||||
|
||||
},
|
||||
"groupings": {
|
||||
|
||||
},
|
||||
"recipes": {
|
||||
|
||||
},
|
||||
"version": "1.0.4"
|
||||
}
|
||||
"version": "1.0.6",
|
||||
"source_url": "",
|
||||
"issues_url": "",
|
||||
"privacy": false,
|
||||
"chef_versions": [
|
||||
|
||||
],
|
||||
"ohai_versions": [
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,4 +4,8 @@ maintainer_email "chrisroberts.code@gmail.com"
|
||||
license "Apache 2.0"
|
||||
description "Chef omnibus package updater and installer"
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version "1.0.4"
|
||||
version "1.0.6"
|
||||
|
||||
%w(redhat centos amazon scientific oracle debian ubuntu mac_os_x solaris).each do |plat|
|
||||
supports plat
|
||||
end
|
||||
|
||||
@@ -21,6 +21,8 @@ if(node[:omnibus_updater][:disabled])
|
||||
Chef::Log.warn 'Omnibus updater disabled via `disabled` attribute'
|
||||
elsif(node[:platform] == 'debian' && Gem::Version.new(node[:platform_version]) < Gem::Version.new('6.0.0'))
|
||||
Chef::Log.warn 'Omnibus updater does not support Debian 5'
|
||||
elsif(node[:platform] == 'raspbian')
|
||||
Chef::Log.warn 'Omnibus updater does not support Raspbian'
|
||||
else
|
||||
include_recipe 'omnibus_updater::downloader'
|
||||
include_recipe 'omnibus_updater::installer'
|
||||
|
||||
Reference in New Issue
Block a user