Initial Chef repository

This commit is contained in:
Greg Karékinian
2015-07-21 19:45:23 +02:00
parent 7e5401fc71
commit ee4079fa85
1151 changed files with 185163 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#
# Cookbook Name:: nodejs
# Attributes:: nodejs
#
# Copyright 2010-2012, Promet Solutions
#
# 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.
#
case node['platform_family']
when 'smartos', 'rhel', 'debian', 'fedora', 'mac_os_x'
default['nodejs']['install_method'] = 'package'
else
default['nodejs']['install_method'] = 'source'
end
default['nodejs']['engine'] = 'node' # or iojs
default['nodejs']['version'] = '0.10.26'
if node['nodejs']['engine'] == 'iojs'
default['nodejs']['prefix_url'] = 'http://iojs.org/dist/'
else
default['nodejs']['prefix_url'] = 'http://nodejs.org/dist/'
end
default['nodejs']['source']['url'] = nil # Auto generated
default['nodejs']['source']['checksum'] = 'ef5e4ea6f2689ed7f781355012b942a2347e0299da0804a58de8e6281c4b1daa'
default['nodejs']['binary']['url'] = nil # Auto generated
default['nodejs']['binary']['checksum']['linux_x64'] = '305bf2983c65edea6dd2c9f3669b956251af03523d31cf0a0471504fd5920aac'
default['nodejs']['binary']['checksum']['linux_x86'] = '8fa2d952556c8b5aa37c077e2735c972c522510facaa4df76d4244be88f4dc0f'
default['nodejs']['binary']['checksum']['linux_arm-pi'] = '52a0f6ed9c0be1ea5f79de6527c481c1b803edbea6413a4fdc65a45ad401565d'
default['nodejs']['make_threads'] = node['cpu'] ? node['cpu']['total'].to_i : 2

View File

@@ -0,0 +1,3 @@
default['nodejs']['npm']['install_method'] = 'embedded'
default['nodejs']['npm']['version'] = 'latest'

View File

@@ -0,0 +1,14 @@
include_attribute 'nodejs::default'
include_attribute 'nodejs::repo'
case node['nodejs']['engine']
when 'node'
default['nodejs']['packages'] = value_for_platform_family(
'debian' => node['nodejs']['install_repo'] ? ['nodejs'] : ['nodejs', 'npm', 'nodejs-dev'],
['rhel', 'fedora'] => ['nodejs', 'nodejs-devel', 'npm'],
'mac_os_x' => ['node'],
'default' => ['nodejs']
)
when 'iojs'
default['nodejs']['packages'] = nil
end

View File

@@ -0,0 +1,13 @@
case node['nodejs']['engine']
when 'node'
case node['platform_family']
when 'debian'
default['nodejs']['install_repo'] = true
default['nodejs']['repo'] = 'https://deb.nodesource.com/node'
default['nodejs']['keyserver'] = 'keyserver.ubuntu.com'
default['nodejs']['key'] = '1655a0ab68576280'
when 'rhel'
default['nodejs']['install_repo'] = true
end
end