Update cookbooks
* Replace old nginx cookbook with new chef_nginx cookbooks * Update application cookbook
This commit is contained in:
parent
5d1d4832df
commit
4fb5390f9b
6
Batali
6
Batali
@ -15,10 +15,10 @@ Batali.define do
|
||||
cookbook 'postfix'
|
||||
cookbook 'unattended-upgrades'
|
||||
cookbook 'poise-ruby-build', '~> 1.1.0'
|
||||
cookbook 'application'
|
||||
cookbook 'application', '~> 5.2.0'
|
||||
cookbook 'application_javascript'
|
||||
cookbook 'application_ruby'
|
||||
cookbook 'application_git'
|
||||
cookbook 'application_git', '~> 1.1.0' # 1.2.0 doesn't work with knife-solo
|
||||
cookbook 'users'
|
||||
cookbook 'sudo'
|
||||
cookbook 'hostname'
|
||||
@ -27,7 +27,7 @@ Batali.define do
|
||||
ref: 'v0.5.6'
|
||||
cookbook 'ufw'
|
||||
cookbook 'firewall'
|
||||
cookbook 'nginx'
|
||||
cookbook 'chef_nginx'
|
||||
cookbook 'build-essential'
|
||||
cookbook 'mysql'
|
||||
cookbook 'postgresql', '~> 6.1'
|
||||
|
409
batali.manifest
409
batali.manifest
@ -21,7 +21,7 @@
|
||||
"> 0"
|
||||
],
|
||||
[
|
||||
"nginx",
|
||||
"chef_nginx",
|
||||
"> 0"
|
||||
],
|
||||
[
|
||||
@ -33,10 +33,10 @@
|
||||
"> 0"
|
||||
]
|
||||
],
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.0",
|
||||
"source": {
|
||||
"url": "https://github.com/67P/mediawiki-cookbook.git",
|
||||
"ref": "41d3c5129b5a6cd9c473e99339885bc1feac5d57",
|
||||
"ref": "8da675abc28b1b1ccf00d32df8a1923208e762c9",
|
||||
"type": "Batali::Source::Git",
|
||||
"subdirectory": null
|
||||
}
|
||||
@ -361,107 +361,34 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "nginx",
|
||||
"name": "chef_nginx",
|
||||
"dependencies": [
|
||||
[
|
||||
"apt",
|
||||
"~> 2.2"
|
||||
],
|
||||
[
|
||||
"bluepill",
|
||||
"~> 2.3"
|
||||
],
|
||||
[
|
||||
"build-essential",
|
||||
"~> 2.0"
|
||||
">= 0.0.0"
|
||||
],
|
||||
[
|
||||
"ohai",
|
||||
"~> 2.0"
|
||||
],
|
||||
[
|
||||
"runit",
|
||||
"~> 1.2"
|
||||
">= 4.1.0"
|
||||
],
|
||||
[
|
||||
"yum-epel",
|
||||
"~> 0.3"
|
||||
]
|
||||
">= 0.0.0"
|
||||
],
|
||||
"version": "2.7.6",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/nginx/versions/2.7.6/download",
|
||||
"version": "2.7.6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "apt",
|
||||
"dependencies": [
|
||||
|
||||
],
|
||||
"version": "2.9.2",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/apt/versions/2.9.2/download",
|
||||
"version": "2.9.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bluepill",
|
||||
"dependencies": [
|
||||
[
|
||||
"rsyslog",
|
||||
">= 2.0"
|
||||
]
|
||||
"compat_resource",
|
||||
">= 12.16.3"
|
||||
],
|
||||
"version": "2.4.3",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/bluepill/versions/2.4.3/download",
|
||||
"version": "2.4.3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rsyslog",
|
||||
"dependencies": [
|
||||
|
||||
],
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/rsyslog/versions/2.2.0/download",
|
||||
"version": "2.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "build-essential",
|
||||
"dependencies": [
|
||||
[
|
||||
"7-zip",
|
||||
"zypper",
|
||||
">= 0.0.0"
|
||||
]
|
||||
],
|
||||
"version": "2.4.0",
|
||||
"version": "6.0.2",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/build-essential/versions/2.4.0/download",
|
||||
"version": "2.4.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "7-zip",
|
||||
"dependencies": [
|
||||
[
|
||||
"windows",
|
||||
">= 1.2.2"
|
||||
]
|
||||
],
|
||||
"version": "1.0.2",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/7-zip/versions/1.0.2/download",
|
||||
"version": "1.0.2"
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/chef_nginx/versions/6.0.2/download",
|
||||
"version": "6.0.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -469,53 +396,23 @@
|
||||
"dependencies": [
|
||||
|
||||
],
|
||||
"version": "2.1.0",
|
||||
"version": "5.0.4",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/ohai/versions/2.1.0/download",
|
||||
"version": "2.1.0"
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/ohai/versions/5.0.4/download",
|
||||
"version": "5.0.4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "runit",
|
||||
"dependencies": [
|
||||
[
|
||||
"packagecloud",
|
||||
">= 0.0.0"
|
||||
]
|
||||
],
|
||||
"version": "1.7.6",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/runit/versions/1.7.6/download",
|
||||
"version": "1.7.6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "packagecloud",
|
||||
"name": "zypper",
|
||||
"dependencies": [
|
||||
|
||||
],
|
||||
"version": "0.2.0",
|
||||
"version": "0.4.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/packagecloud/versions/0.2.0/download",
|
||||
"version": "0.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "yum-epel",
|
||||
"dependencies": [
|
||||
[
|
||||
"yum",
|
||||
">= 3.6.3"
|
||||
]
|
||||
],
|
||||
"version": "0.7.1",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/yum-epel/versions/0.7.1/download",
|
||||
"version": "0.7.1"
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/zypper/versions/0.4.0/download",
|
||||
"version": "0.4.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -564,6 +461,18 @@
|
||||
"version": "0.3.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "apt",
|
||||
"dependencies": [
|
||||
|
||||
],
|
||||
"version": "2.9.2",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/apt/versions/2.9.2/download",
|
||||
"version": "2.9.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "php-fpm",
|
||||
"dependencies": [
|
||||
@ -624,8 +533,8 @@
|
||||
">= 0.3.1"
|
||||
],
|
||||
[
|
||||
"nginx",
|
||||
"~> 2.7.4"
|
||||
"chef_nginx",
|
||||
"> 0"
|
||||
],
|
||||
[
|
||||
"php-fpm",
|
||||
@ -636,10 +545,10 @@
|
||||
"~> 0.7"
|
||||
]
|
||||
],
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"source": {
|
||||
"url": "https://github.com/67P/wordpress-cookbook.git",
|
||||
"ref": "d6401db517476e6f3ab36aa92dfc0f5ed6a8a264",
|
||||
"ref": "a80b8a17fb823a01b769f690349d745c40fff04c",
|
||||
"type": "Batali::Source::Git",
|
||||
"subdirectory": null
|
||||
}
|
||||
@ -696,22 +605,30 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "application",
|
||||
"name": "poise-ruby-build",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.4"
|
||||
"~> 2.0"
|
||||
],
|
||||
[
|
||||
"poise-service",
|
||||
"poise-build-essential",
|
||||
"~> 1.0"
|
||||
],
|
||||
[
|
||||
"poise-git",
|
||||
"~> 1.0"
|
||||
],
|
||||
[
|
||||
"poise-ruby",
|
||||
"~> 2.1"
|
||||
]
|
||||
],
|
||||
"version": "5.1.0",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/application/versions/5.1.0/download",
|
||||
"version": "5.1.0"
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-ruby-build/versions/1.1.0/download",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -726,6 +643,112 @@
|
||||
"version": "2.7.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-build-essential",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.6"
|
||||
]
|
||||
],
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-build-essential/versions/1.0.0/download",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-git",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.6"
|
||||
],
|
||||
[
|
||||
"poise-languages",
|
||||
"~> 2.1"
|
||||
]
|
||||
],
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-git/versions/1.0.0/download",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-languages",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.5"
|
||||
],
|
||||
[
|
||||
"poise-archive",
|
||||
"~> 1.0"
|
||||
]
|
||||
],
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-languages/versions/2.1.0/download",
|
||||
"version": "2.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-archive",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.6"
|
||||
]
|
||||
],
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-archive/versions/1.4.0/download",
|
||||
"version": "1.4.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-ruby",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.0"
|
||||
],
|
||||
[
|
||||
"poise-languages",
|
||||
"~> 2.0"
|
||||
]
|
||||
],
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-ruby/versions/2.2.0/download",
|
||||
"version": "2.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "application",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.4"
|
||||
],
|
||||
[
|
||||
"poise-service",
|
||||
"~> 1.0"
|
||||
]
|
||||
],
|
||||
"version": "5.2.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/application/versions/5.2.0/download",
|
||||
"version": "5.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-service",
|
||||
"dependencies": [
|
||||
@ -787,40 +810,6 @@
|
||||
"version": "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-languages",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.5"
|
||||
],
|
||||
[
|
||||
"poise-archive",
|
||||
"~> 1.0"
|
||||
]
|
||||
],
|
||||
"version": "2.1.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-languages/versions/2.1.0/download",
|
||||
"version": "2.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-archive",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.6"
|
||||
]
|
||||
],
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-archive/versions/1.4.0/download",
|
||||
"version": "1.4.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "application_ruby",
|
||||
"dependencies": [
|
||||
@ -848,25 +837,6 @@
|
||||
"version": "4.0.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-ruby",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.0"
|
||||
],
|
||||
[
|
||||
"poise-languages",
|
||||
"~> 2.0"
|
||||
]
|
||||
],
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-ruby/versions/2.2.0/download",
|
||||
"version": "2.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "application_git",
|
||||
"dependencies": [
|
||||
@ -918,11 +888,11 @@
|
||||
"dependencies": [
|
||||
|
||||
],
|
||||
"version": "3.1.0",
|
||||
"version": "4.0.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/dmg/versions/3.1.0/download",
|
||||
"version": "3.1.0"
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/dmg/versions/4.0.0/download",
|
||||
"version": "4.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -1123,67 +1093,6 @@
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/logrotate/versions/1.9.2/download",
|
||||
"version": "1.9.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-ruby-build",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.0"
|
||||
],
|
||||
[
|
||||
"poise-build-essential",
|
||||
"~> 1.0"
|
||||
],
|
||||
[
|
||||
"poise-git",
|
||||
"~> 1.0"
|
||||
],
|
||||
[
|
||||
"poise-ruby",
|
||||
"~> 2.1"
|
||||
]
|
||||
],
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-ruby-build/versions/1.1.0/download",
|
||||
"version": "1.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-build-essential",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.6"
|
||||
]
|
||||
],
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-build-essential/versions/1.0.0/download",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "poise-git",
|
||||
"dependencies": [
|
||||
[
|
||||
"poise",
|
||||
"~> 2.6"
|
||||
],
|
||||
[
|
||||
"poise-languages",
|
||||
"~> 2.1"
|
||||
]
|
||||
],
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "Batali::Source::Site",
|
||||
"url": "https://supermarket.chef.io:443/api/v1/cookbooks/poise-git/versions/1.0.0/download",
|
||||
"version": "1.0.0"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
7-zip Cookbook CHANGELOG
|
||||
========================
|
||||
This file is used to list changes made in each version of the 7-zip cookbook.
|
||||
|
||||
|
||||
v1.0.2
|
||||
------
|
||||
### Improvement
|
||||
- **[COOK-3476](https://tickets.opscode.com/browse/COOK-3476)** - Upgrade to 7-zip 9.22
|
||||
|
||||
1.0.0
|
||||
-----
|
||||
- initial release
|
@ -1,50 +0,0 @@
|
||||
7-zip Cookbook
|
||||
==============
|
||||
[7-Zip](http://www.7-zip.org/) is a file archiver with a high compression ratio. This cookbook installs the full 7-zip suite of tools (GUI and CLI).
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
### Platform
|
||||
- Windows XP
|
||||
- Windows Vista
|
||||
- Windows Server 2003 R2
|
||||
- Windows 7
|
||||
- Windows Server 2008 (R1, R2)
|
||||
- Windows 8
|
||||
- Windows Server 2012
|
||||
|
||||
### Cookbooks
|
||||
- windows
|
||||
|
||||
|
||||
Attributes
|
||||
----------
|
||||
- `node['7-zip']['home']` - location to install 7-zip files to. default is `%SYSTEMDRIVE%\7-zip`
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
### default
|
||||
Downloads and installs 7-zip to the location specified by `node['7-zip']['home']`. Also ensures `node['7-zip']['home']` is in the system path.
|
||||
|
||||
|
||||
License & Authors
|
||||
-----------------
|
||||
- Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
|
||||
```text
|
||||
Copyright:: 2011, 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.
|
||||
```
|
@ -1,31 +0,0 @@
|
||||
#
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Cookbook Name:: 7-zip
|
||||
# Attribute:: default
|
||||
#
|
||||
# Copyright:: Copyright (c) 2011 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.
|
||||
#
|
||||
|
||||
if kernel['machine'] =~ /x86_64/
|
||||
default['7-zip']['url'] = "http://downloads.sourceforge.net/sevenzip/7z922-x64.msi"
|
||||
default['7-zip']['checksum'] = "f09bf515289eea45185a4cc673e3bbc18ce608c55b4cf96e77833435c9cdf3dc"
|
||||
default['7-zip']['package_name'] = "7-Zip 9.22 (x64 edition)"
|
||||
else
|
||||
default['7-zip']['url'] = "http://downloads.sourceforge.net/sevenzip/7z922.msi"
|
||||
default['7-zip']['checksum'] = "86df264d22c3dd3ab80cb55a118da2d41bdd95c2db2cd09a6bbdf48f069e3d7a"
|
||||
default['7-zip']['package_name'] = "7-Zip 9.22"
|
||||
end
|
||||
|
||||
default['7-zip']['home'] = "#{ENV['SYSTEMDRIVE']}\\7-zip"
|
@ -1,31 +0,0 @@
|
||||
{
|
||||
"name": "7-zip",
|
||||
"version": "1.0.2",
|
||||
"description": "Installs/Configures the 7-zip file archiver",
|
||||
"long_description": "7-zip Cookbook\n==============\n[7-Zip](http://www.7-zip.org/) is a file archiver with a high compression ratio. This cookbook installs the full 7-zip suite of tools (GUI and CLI).\n\n\nRequirements\n------------\n### Platform\n- Windows XP\n- Windows Vista\n- Windows Server 2003 R2\n- Windows 7\n- Windows Server 2008 (R1, R2)\n- Windows 8\n- Windows Server 2012\n\n### Cookbooks\n- windows\n\n\nAttributes\n----------\n- `node['7-zip']['home']` - location to install 7-zip files to. default is `%SYSTEMDRIVE%\\7-zip`\n\n\nUsage\n-----\n### default\nDownloads and installs 7-zip to the location specified by `node['7-zip']['home']`. Also ensures `node['7-zip']['home']` is in the system path.\n\n\nLicense & Authors\n-----------------\n- Author:: Seth Chisamore (<schisamo@opscode.com>)\n\n```text\nCopyright:: 2011, 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```\n",
|
||||
"maintainer": "Opscode, Inc.",
|
||||
"maintainer_email": "cookbooks@opscode.com",
|
||||
"license": "Apache 2.0",
|
||||
"platforms": {
|
||||
"windows": ">= 0.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"windows": ">= 1.2.2"
|
||||
},
|
||||
"recommendations": {
|
||||
},
|
||||
"suggestions": {
|
||||
},
|
||||
"conflicting": {
|
||||
},
|
||||
"providing": {
|
||||
},
|
||||
"replacing": {
|
||||
},
|
||||
"attributes": {
|
||||
},
|
||||
"groupings": {
|
||||
},
|
||||
"recipes": {
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
name "7-zip"
|
||||
maintainer "Opscode, Inc."
|
||||
maintainer_email "cookbooks@opscode.com"
|
||||
license "Apache 2.0"
|
||||
description "Installs/Configures the 7-zip file archiver"
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version "1.0.2"
|
||||
supports "windows"
|
||||
|
||||
depends "windows", ">= 1.2.2"
|
@ -1,31 +0,0 @@
|
||||
#
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Cookbook Name:: 7-zip
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2011, 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.
|
||||
#
|
||||
|
||||
windows_package node['7-zip']['package_name'] do
|
||||
source node['7-zip']['url']
|
||||
checksum node['7-zip']['checksum']
|
||||
options "INSTALLDIR=\"#{node['7-zip']['home']}\""
|
||||
action :install
|
||||
end
|
||||
|
||||
# update path
|
||||
windows_path node['7-zip']['home'] do
|
||||
action :add
|
||||
end
|
@ -1,8 +1,13 @@
|
||||
# Application Changelog
|
||||
|
||||
## v5.2.0
|
||||
|
||||
* Add `application_directory` resource.
|
||||
* Chef 13 compatibility.
|
||||
|
||||
## v5.1.0
|
||||
|
||||
* Add `application_cookbook_file`, `application_file`, and `application_template resources.
|
||||
* Add `application_cookbook_file`, `application_file`, and `application_template` resources.
|
||||
|
||||
## v5.0.0
|
||||
|
||||
|
@ -137,9 +137,9 @@ end
|
||||
* `action_on_update_immediately` – Run the `action_on_update` notification with
|
||||
`:immediately`. *(default: false)*
|
||||
|
||||
### `application_cookbook_file`, `application_file`, `application_template`
|
||||
### `application_cookbook_file`, `application_directory`, `application_file`, `application_template`
|
||||
|
||||
The `application_cookbook_file`, `application_file`, and `application_template`
|
||||
The `application_cookbook_file`, `application_directory`, `application_file`, and `application_template`
|
||||
resources extend the core Chef resources to take some application-level
|
||||
configuration in to account:
|
||||
|
||||
@ -148,6 +148,7 @@ application '/opt/myapp' do
|
||||
template 'myapp.conf' do
|
||||
source 'myapp.conf.erb'
|
||||
end
|
||||
directory 'logs'
|
||||
end
|
||||
```
|
||||
|
||||
@ -163,9 +164,9 @@ Some test recipes are available as examples for common application frameworks:
|
||||
|
||||
* [Sinatra](https://github.com/poise/application_ruby/blob/master/test/cookbooks/application_ruby_test/recipes/sinatra.rb)
|
||||
* [Rails](https://github.com/poise/application_ruby/blob/master/test/cookbooks/application_ruby_test/recipes/rails.rb)
|
||||
* [Flask](https://github.com/poise/application_python/blob/master/test/cookbooks/application_python_test/recipes/flask.rb)
|
||||
* [Django](https://github.com/poise/application_python/blob/master/test/cookbooks/application_python_test/recipes/django.rb)
|
||||
* [Express](https://github.com/poise/application_javascript/blob/master/test/cookbooks/application_javascript_test/recipes/express.rb)
|
||||
* [Flask](https://github.com/poise/application_python/blob/master/test/cookbook/recipes/flask.rb)
|
||||
* [Django](https://github.com/poise/application_python/blob/master/test/cookbook/recipes/django.rb)
|
||||
* [Express](https://github.com/poise/application_javascript/blob/master/test/cookbook/recipes/express.rb)
|
||||
|
||||
## Upgrading From 4.x
|
||||
|
||||
@ -244,7 +245,7 @@ The Poise test server infrastructure is sponsored by [Rackspace](https://rackspa
|
||||
|
||||
## License
|
||||
|
||||
Copyright 2015, Noah Kantrowitz
|
||||
Copyright 2015-2016, Noah Kantrowitz
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -48,10 +48,13 @@ module PoiseApplication
|
||||
# @return [String, Integer]
|
||||
attribute(:group, kind_of: [String, Integer, NilClass], default: lazy { parent && parent.group })
|
||||
|
||||
# @!attribute user
|
||||
# @!attribute owner
|
||||
# Override the default user to be the app owner if unspecified.
|
||||
# @return [String, Integer]
|
||||
attribute(:user, kind_of: [String, Integer, NilClass], default: lazy { parent && parent.owner })
|
||||
attribute(:owner, kind_of: [String, Integer, NilClass], default: lazy { parent && parent.owner })
|
||||
|
||||
# For the forgetful.
|
||||
alias_method :user, :owner
|
||||
end
|
||||
|
||||
module Provider
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
require 'poise_application/resources/application'
|
||||
require 'poise_application/resources/application_cookbook_file'
|
||||
require 'poise_application/resources/application_directory'
|
||||
require 'poise_application/resources/application_file'
|
||||
require 'poise_application/resources/application_template'
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -0,0 +1,50 @@
|
||||
#
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
require 'poise_application/app_file_mixin'
|
||||
|
||||
|
||||
module PoiseApplication
|
||||
module Resources
|
||||
# (see ApplicationDirectory::Resource)
|
||||
# @since 5.1.0
|
||||
module ApplicationDirectory
|
||||
# An `application_directory` resource to manage Chef files inside and
|
||||
# Application cookbook deployment.
|
||||
#
|
||||
# @provides application_directory
|
||||
# @action create
|
||||
# @action delete
|
||||
# @example
|
||||
# application '/srv/myapp' do
|
||||
# directory 'logs'
|
||||
# end
|
||||
class Resource < Chef::Resource::Directory
|
||||
include PoiseApplication::AppFileMixin
|
||||
provides(:application_directory)
|
||||
actions(:create, :delete)
|
||||
subclass_providers!
|
||||
|
||||
def initialize(*args)
|
||||
super
|
||||
# For older Chef.
|
||||
@resource_name = :application_directory
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -16,5 +16,5 @@
|
||||
|
||||
|
||||
module PoiseApplication
|
||||
VERSION = '5.1.0'
|
||||
VERSION = '5.2.0'
|
||||
end
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2015, Noah Kantrowitz
|
||||
# Copyright 2015-2016, Noah Kantrowitz
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
~FC059
|
@ -1,87 +0,0 @@
|
||||
# bluepill Cookbook CHANGELOG
|
||||
This file is used to list changes made in each version of the bluepill cookbook.
|
||||
|
||||
## 2.4.3 (04-18-2016)
|
||||
- Added ChefSpec custom matchers and examples
|
||||
|
||||
## 2.4.2 (02-19-2016)
|
||||
- Loosened the dependecy on rsyslog so the latest cookbook can be used
|
||||
- Updated testing dependencies and configurations
|
||||
|
||||
WARNING: It was noted after the release of 2.4.2 that the loosened dependency on rsyslog increased the minimum required Chef release to 12.0 for this cookbook. Chef 11 users will need to use 2.4.1.
|
||||
|
||||
## 2.4.1 (11-10-2015)
|
||||
- Require rsyslog ~> 2.0.0 to preserve Chef 11 compatibility
|
||||
- Fix rsyslog restarting on RHEL
|
||||
- Use platform_family when setting platform specific node attributes and fix bad syntax. This should improve RHEL support
|
||||
|
||||
## v2.4.0 (09-17-2015)
|
||||
- Updated the LSB Required-Start and Required-Stop comments of the LSB init script template to be valid
|
||||
- Added name to the bluepill_test cookbook metadata for Chef 12
|
||||
- If a defaults file on RHEL or Debian based systems exist for the service source that within the init scripts. Example if /etc/default/bar exists on debian for the bar service then source that
|
||||
- Added .kitchen.yml file with vagrant based testing for local testing and moved the cloud based kitchen to .kitchen.cloud.yml
|
||||
- Add Travis CI config
|
||||
- Added rubocop config
|
||||
- Updated Berksfile to 3.X format and removed yum cookbook that wasn't used
|
||||
- Updated contributing.md and added testing.md documentation
|
||||
- Updated development and testing dependencies in the Gemfile
|
||||
- Added maintainers.md and .toml and added Rake task for generating the MD file
|
||||
- Opscode -> Chef Software everywhere
|
||||
- Added Travis and cookbook version badges to the readme
|
||||
- Add rake file to easy testing
|
||||
- Resolved all Rubocop warnings
|
||||
- Added a chefignore file and added additional files to the gitignore
|
||||
- Added source_url and issues_url metadata for Supermarket
|
||||
|
||||
## v2.3.2
|
||||
- Never actually released
|
||||
|
||||
## v2.3.1
|
||||
### New Feature
|
||||
- **[COOK-3705](https://tickets.chef.io/browse/COOK-3705)** - Add init.d script with LSB style
|
||||
|
||||
## v2.3.0
|
||||
### Improvement
|
||||
- **[COOK-3503](https://tickets.chef.io/browse/COOK-3503)** - Add why-run support
|
||||
|
||||
## v2.2.2
|
||||
- [COOK-2507] - stringify language attributes
|
||||
|
||||
## v2.2.0
|
||||
- [COOK-547] - Add `load` action to provider to reload services when template changes.
|
||||
|
||||
## v2.1.0
|
||||
- [COOK-1295] - The bluepill cookbook does not create the default log file
|
||||
- [COOK-1840] - Enable bluepill to log to rsyslog
|
||||
|
||||
## v2.0.0
|
||||
This version uses platform_family attribute (in the provider), making the cookbook incompatible with older versions of Chef/Ohai, hence the major version bump.
|
||||
- [COOK-1644] - Bluepill cookbook fails on Redhat due to missing default or redhat template directory.
|
||||
- [COOK-1920] - init script should have a template file named after platform_family instead of using file specificity
|
||||
|
||||
## v1.1.2
|
||||
- [COOK-1730] - Add ability to specify which version of bluepill to install
|
||||
|
||||
## v1.1.0
|
||||
- [COOK-1592] - use mixlib-shellout instead of execute, add test-kitchen
|
||||
|
||||
## v1.0.6
|
||||
- [COOK-1304] - support amazon linux
|
||||
- [COOK-1427] - resolve foodcritic warnings
|
||||
|
||||
## v1.0.4
|
||||
- [COOK-1106] - fix chkconfig loader for CentOS 5
|
||||
- [COOK-1107] - use integer for GID instead of string
|
||||
|
||||
## v1.0.2
|
||||
- [COOK-1043] - Bluepill cookbook fails on OS X because it tries to use root group
|
||||
|
||||
## v1.0.0
|
||||
- [COOK-943] - add init script for freebsd
|
||||
|
||||
## v0.3.0
|
||||
- [COOK-867] - enable bluepill service on RHEL family
|
||||
- [COOK-550] - add freebsd support
|
||||
|
||||
## v0.2.2
|
||||
- Fixes COOK-524, COOK-632
|
@ -1,111 +0,0 @@
|
||||
# bluepill Cookbook
|
||||
[](https://travis-ci.org/chef-cookbooks/bluepill) [](https://supermarket.chef.io/cookbooks/bluepill)
|
||||
|
||||
Installs bluepill Ruby Gem and configures it to manage services. Also includes a LWRP.
|
||||
|
||||
## Requirements
|
||||
### Platforms
|
||||
Bluepill is a pure Ruby service management tool/library, so this cookbook should work on any system. The attributes do set up paths based on FHS locations, see below.
|
||||
|
||||
### Chef
|
||||
- Chef 12+
|
||||
|
||||
### Cookbooks
|
||||
- none
|
||||
|
||||
## Attributes
|
||||
Default locations for bluepill are in "FHS compliant" locations.
|
||||
- `node["bluepill"]["bin"]` - Path to bluepill program, default is 'bluepill' in the RubyGems binary directory.
|
||||
- `node["bluepill"]["logfile"]` - Location of the bluepill log file, default "/var/log/bluepill.log".
|
||||
- `node["bluepill"]["conf_dir"]` - Location of service config files (pills), default "/etc/bluepill".
|
||||
- `node["bluepill"]["pid_dir"]` - Location of pidfiles, default "/var/run/bluepill"
|
||||
- `node["bluepill"]["state_dir"]` - Location of state directory, default "/var/lib/bluepill"
|
||||
- `node["bluepill"]["init_dir"]` - Location of init script directory, default selected by platform.
|
||||
- `node["bluepill"]["version"]` - Version of bluepill to install, default is latest.
|
||||
- `node["bluepill"]["use_rsyslog"]` - Enable configuration and use of rsyslog for bluepill.
|
||||
|
||||
# Custom Resources
|
||||
This cookbook contains an LWRP, `bluepill_service`. This can be used with the normal Chef service resource, by using the `provider` parameter, or by specifying the `bluepill_service` shortcut. These two resources are equivalent.
|
||||
|
||||
```ruby
|
||||
service 'my_app' do
|
||||
provider bluepill_service
|
||||
action [:enable, :load, :start]
|
||||
end
|
||||
|
||||
bluepill_service 'my_app' do
|
||||
action [:enable, :load, :start]
|
||||
end
|
||||
```
|
||||
|
||||
The load action should probably always be specified, to ensure that if bluepill isn't running already it gets started. The
|
||||
|
||||
The recipe using the service must contain a template resource for the pill and it must be named `my_app.pill.erb`, where `my_app` is the service name passed to the bluepill service resource.
|
||||
|
||||
## Usage
|
||||
Be sure to include the bluepill recipe in the run list to ensure that the gem and bluepill-related directories are created. This will also make the cookbook available on the system and other cookbooks won't need to explicitly depend on it in the metadata.
|
||||
|
||||
If the default directory locations in the attributes/default.rb aren't what you want, change them by setting them either in the attributes file itself, or create attributes in a role applied to any systems that will use bluepill.
|
||||
|
||||
Example pill template resource and .erb file:
|
||||
|
||||
```ruby
|
||||
template '/etc/bluepill/my_app.pill' do
|
||||
source 'my_app.pill.erb'
|
||||
end
|
||||
|
||||
Bluepill.application('my_app') do |app|
|
||||
app.process('my_app') do |process|
|
||||
process.pid_file = '/var/run/my_app.pid'
|
||||
process.start_command = '/usr/bin/my_app'
|
||||
end
|
||||
end
|
||||
```
|
||||
|
||||
See bluepill's documentation for more information on creating pill templates.
|
||||
|
||||
## Testing
|
||||
This cookbook has the following [ChefSpec custom matchers](https://github.com/sethvargo/chefspec#packaging-custom-matchers) defined:
|
||||
|
||||
- enable_bluepill_service
|
||||
- load_bluepill_service
|
||||
- reload_bluepill_service
|
||||
- start_bluepill_service
|
||||
- disable_bluepill_service
|
||||
- stop_bluepill_service
|
||||
- restart_bluepill_service
|
||||
|
||||
### ChefSpec Examples:
|
||||
|
||||
```
|
||||
it 'enables my_app bluepill service' do
|
||||
chef_run.converge('my_app::default', described_recipe)
|
||||
expect(chef_run).to enable_bluepill_service('my_app')
|
||||
end
|
||||
|
||||
it 'reloads my_app bluepill service when pill file changes' do
|
||||
chef_run.converge('my_app::default', described_recipe)
|
||||
expect(chef_run).to create_template('/etc/bluepill/my_app.pill')
|
||||
my_app_pill = chef_run.template('/etc/bluepill/my_app.pill')
|
||||
expect(my_app_pill).to notify('bluepill_service[my_app]').to(:reload).delayed
|
||||
end
|
||||
```
|
||||
|
||||
## License & Authors
|
||||
**Author:** Cookbook Engineering Team ([cookbooks@chef.io](mailto:cookbooks@chef.io))
|
||||
|
||||
**Copyright:** 2010-2015, Chef Software, 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.
|
||||
```
|
@ -1,44 +0,0 @@
|
||||
# Cookbook Name:: bluepill
|
||||
# Attributes:: default
|
||||
#
|
||||
# Copyright 2010-2015, Chef Software, 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['bluepill']['bin'] = "#{node['languages']['ruby']['bin_dir']}/bluepill"
|
||||
default['bluepill']['logfile'] = '/var/log/bluepill.log'
|
||||
default['bluepill']['pid_dir'] = '/var/run/bluepill'
|
||||
default['bluepill']['state_dir'] = '/var/lib/bluepill'
|
||||
default['bluepill']['group'] = 0
|
||||
default['bluepill']['use_rsyslog'] = false
|
||||
|
||||
case node['platform_family']
|
||||
when 'arch'
|
||||
default['bluepill']['init_dir'] = '/etc/rc.d'
|
||||
default['bluepill']['conf_dir'] = '/etc/bluepill'
|
||||
default['bluepill']['defaults_dir'] = '/etc/default'
|
||||
when 'freebsd'
|
||||
default['bluepill']['init_dir'] = '/usr/local/etc/rc.d'
|
||||
default['bluepill']['conf_dir'] = '/usr/local/etc/bluepill'
|
||||
default['bluepill']['defaults_dir'] = '/etc/defaults'
|
||||
else
|
||||
default['bluepill']['init_dir'] = '/etc/init.d'
|
||||
default['bluepill']['conf_dir'] = '/etc/bluepill'
|
||||
end
|
||||
|
||||
case node['platform_family']
|
||||
when 'fedora', 'rhel'
|
||||
default['bluepill']['defaults_dir'] = '/etc/sysconfig'
|
||||
when 'debian'
|
||||
default['bluepill']['defaults_dir'] = '/etc/default'
|
||||
end
|
@ -1,33 +0,0 @@
|
||||
if defined?(ChefSpec)
|
||||
|
||||
ChefSpec.define_matcher(:bluepill_service)
|
||||
|
||||
def enable_bluepill_service(service)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:bluepill_service, :enable, service)
|
||||
end
|
||||
|
||||
def load_bluepill_service(service)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:bluepill_service, :load, service)
|
||||
end
|
||||
|
||||
def reload_bluepill_service(service)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:bluepill_service, :reload, service)
|
||||
end
|
||||
|
||||
def start_bluepill_service(service)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:bluepill_service, :start, service)
|
||||
end
|
||||
|
||||
def disable_bluepill_service(service)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:bluepill_service, :disable, service)
|
||||
end
|
||||
|
||||
def stop_bluepill_service(service)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:bluepill_service, :stop, service)
|
||||
end
|
||||
|
||||
def restart_bluepill_service(service)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:bluepill_service, :restart, service)
|
||||
end
|
||||
|
||||
end
|
File diff suppressed because one or more lines are too long
@ -1,172 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: bluepill
|
||||
# Provider:: service
|
||||
#
|
||||
# Copyright 2010-2015, Chef Software, Inc.
|
||||
# Copyright 2012, Heavy Water Operations, LLC
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
require 'chef/mixin/shell_out'
|
||||
require 'chef/mixin/language'
|
||||
|
||||
include Chef::Mixin::ShellOut
|
||||
|
||||
def whyrun_supported?
|
||||
true
|
||||
end
|
||||
|
||||
action :enable do
|
||||
config_file = ::File.join(node['bluepill']['conf_dir'],
|
||||
"#{new_resource.service_name}.pill")
|
||||
unless @current_resource.enabled
|
||||
converge_by("enable #{@new_resource}") do
|
||||
link "#{node['bluepill']['init_dir']}/#{new_resource.service_name}" do
|
||||
to node['bluepill']['bin']
|
||||
only_if { ::File.exist?(config_file) }
|
||||
end
|
||||
template_suffix = case node['platform_family']
|
||||
when 'rhel', 'fedora', 'freebsd' then node['platform_family']
|
||||
when 'debian' then 'lsb'
|
||||
end
|
||||
|
||||
template "#{node['bluepill']['init_dir']}/bluepill-#{new_resource.service_name}" do
|
||||
source "bluepill_init.#{template_suffix}.erb"
|
||||
cookbook 'bluepill'
|
||||
owner 'root'
|
||||
group node['bluepill']['group']
|
||||
mode '0755'
|
||||
variables(
|
||||
service_name: new_resource.service_name,
|
||||
config_file: config_file
|
||||
)
|
||||
end if template_suffix
|
||||
|
||||
service "bluepill-#{new_resource.service_name}" do
|
||||
action [:enable]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action :load do
|
||||
unless @current_resource.running
|
||||
converge_by("load #{@new_resource}") do
|
||||
shell_out!(load_command)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action :reload do
|
||||
converge_by("reload #{@new_resource}") do
|
||||
shell_out!(stop_command) if @current_resource.running
|
||||
shell_out!(load_command)
|
||||
end
|
||||
end
|
||||
|
||||
action :start do
|
||||
unless @current_resource.running
|
||||
converge_by("start #{@new_resource}") do
|
||||
shell_out!(start_command)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action :disable do
|
||||
if @current_resource.enabled
|
||||
converge_by("disable #{@new_resource}") do
|
||||
file "#{node['bluepill']['conf_dir']}/#{new_resource.service_name}.pill" do
|
||||
action :delete
|
||||
end
|
||||
link "#{node['bluepill']['init_dir']}/#{new_resource.service_name}" do
|
||||
action :delete
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action :stop do
|
||||
if @current_resource.running
|
||||
converge_by("stop #{@new_resource}") do
|
||||
shell_out!(stop_command)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
action :restart do
|
||||
if @current_resource.running
|
||||
converge_by("restart #{@new_resource}") do
|
||||
Chef::Log.debug "Restarting #{new_resource.service_name}"
|
||||
shell_out!(restart_command)
|
||||
Chef::Log.debug "Restarted #{new_resource.service_name}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def load_current_resource
|
||||
@current_resource = Chef::Resource::BluepillService.new(new_resource.name)
|
||||
@current_resource.service_name(new_resource.service_name)
|
||||
|
||||
Chef::Log.debug("Checking status of service #{new_resource.service_name}")
|
||||
|
||||
determine_current_status!
|
||||
|
||||
@current_resource
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def status_command
|
||||
"#{node['bluepill']['bin']} #{new_resource.service_name} status"
|
||||
end
|
||||
|
||||
def load_command
|
||||
"#{node['bluepill']['bin']} load #{node['bluepill']['conf_dir']}/#{new_resource.service_name}.pill"
|
||||
end
|
||||
|
||||
def start_command
|
||||
"#{node['bluepill']['bin']} #{new_resource.service_name} start"
|
||||
end
|
||||
|
||||
def stop_command
|
||||
"#{node['bluepill']['bin']} #{new_resource.service_name} stop"
|
||||
end
|
||||
|
||||
def restart_command
|
||||
"#{node['bluepill']['bin']} #{new_resource.service_name} restart"
|
||||
end
|
||||
|
||||
def determine_current_status!
|
||||
service_running?
|
||||
service_enabled?
|
||||
end
|
||||
|
||||
def service_running?
|
||||
if shell_out(status_command).exitstatus == 0
|
||||
@current_resource.running true
|
||||
Chef::Log.debug("#{new_resource} is running")
|
||||
end
|
||||
rescue Mixlib::ShellOut::ShellCommandFailed, SystemCallError
|
||||
@current_resource.running false
|
||||
nil
|
||||
end
|
||||
|
||||
def service_enabled?
|
||||
if ::File.exist?("#{node['bluepill']['conf_dir']}/#{new_resource.service_name}.pill") &&
|
||||
::File.symlink?("#{node['bluepill']['init_dir']}/#{new_resource.service_name}")
|
||||
@current_resource.enabled true
|
||||
else
|
||||
@current_resource.enabled false
|
||||
end
|
||||
end
|
@ -1,45 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: bluepill
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2010-2015, Chef Software, 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.
|
||||
#
|
||||
|
||||
gem_package 'i18n'
|
||||
|
||||
gem_package 'bluepill' do
|
||||
version node['bluepill']['version'] if node['bluepill']['version']
|
||||
end
|
||||
|
||||
[
|
||||
node['bluepill']['conf_dir'],
|
||||
node['bluepill']['pid_dir'],
|
||||
node['bluepill']['state_dir']
|
||||
].each do |dir|
|
||||
directory dir do
|
||||
recursive true
|
||||
owner 'root'
|
||||
group node['bluepill']['group']
|
||||
end
|
||||
end
|
||||
|
||||
file node['bluepill']['logfile'] do
|
||||
owner 'root'
|
||||
group node['bluepill']['group']
|
||||
mode '0755'
|
||||
action :create_if_missing
|
||||
end
|
||||
|
||||
include_recipe 'bluepill::rsyslog' if node['bluepill']['use_rsyslog']
|
@ -1,28 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: bluepill
|
||||
# Recipe:: rsyslog
|
||||
#
|
||||
# Copyright 2010-2015, Chef Software, 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.
|
||||
#
|
||||
|
||||
include_recipe 'rsyslog::default'
|
||||
|
||||
template '/etc/rsyslog.d/bluepill.conf' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '0644'
|
||||
source 'bluepill_rsyslog.conf.erb'
|
||||
notifies :restart, "service[#{node['rsyslog']['service_name']}]"
|
||||
end
|
@ -1,27 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: bluepill
|
||||
# Resource:: service
|
||||
#
|
||||
# Copyright 2010-2015, Chef Software, 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.
|
||||
#
|
||||
|
||||
actions :start, :stop, :enable, :disable, :load, :restart, :reload
|
||||
default_action :start
|
||||
|
||||
attribute :service_name, name_attribute: true
|
||||
attribute :enabled, default: false
|
||||
attribute :running, default: false
|
||||
attribute :variables, kind_of: Hash
|
||||
attribute :supports, default: { restart: true, status: true }
|
@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Author: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# chkconfig: 345 99 1
|
||||
# Description: Bluepill loader for <%= @service_name %>
|
||||
# Provides: <%= @service_name %>
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
|
||||
BLUEPILL_BIN=<%= node['bluepill']['bin'] %>
|
||||
BLUEPILL_CONFIG=<%= @config_file %>
|
||||
SERVICE_NAME=<%= @service_name %>
|
||||
|
||||
[ -r <%= node['bluepill']['defaults_dir'] %>/$SERVICE_NAME ] && . <%= node['bluepill']['defaults_dir'] %>/$SERVICE_NAME
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Loading bluepill configuration for $SERVICE_NAME "
|
||||
$BLUEPILL_BIN load $BLUEPILL_CONFIG
|
||||
;;
|
||||
stop)
|
||||
$BLUEPILL_BIN $SERVICE_NAME stop
|
||||
$BLUEPILL_BIN $SERVICE_NAME quit
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
@ -1,32 +0,0 @@
|
||||
#!/bin/sh
|
||||
##
|
||||
# PROVIDE: named
|
||||
# REQUIRE: SERVERS cleanvar
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="<%= @service_name %>"
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
# Set some defaults
|
||||
<%= @service_name %>_enable=${<%= @service_name %>_enable:-"NO"}
|
||||
|
||||
pidfile="/var/run/<%= @service_name %>.pid"
|
||||
command="/usr/local/bin/bluepill"
|
||||
|
||||
start_precmd="${command} load <%= node['bluepill']['conf_dir'] %>/<%= @service_name %>.pill"
|
||||
start_cmd="${command} ${name} start"
|
||||
|
||||
status_cmd="${command} ${name} status"
|
||||
|
||||
stop_cmd="${command} ${name} stop"
|
||||
stop_postcmd="${command} ${name} quit"
|
||||
|
||||
[ -r <%= node['bluepill']['defaults_dir'] %>/$name ] && . <%= node['bluepill']['defaults_dir'] %>/$name
|
||||
load_rc_config ${name}
|
||||
|
||||
PATH="${PATH}:/usr/local/bin"
|
||||
|
||||
run_rc_command "$1"
|
@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: <%= @service_name %>
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Defalt-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Description: Bluepill loader for <%= @service_name %>
|
||||
### END INIT INFO
|
||||
|
||||
BLUEPILL_BIN=<%= node['bluepill']['bin'] %>
|
||||
BLUEPILL_CONFIG=<%= @config_file %>
|
||||
SERVICE_NAME=<%= @service_name %>
|
||||
|
||||
[ -r <%= node['bluepill']['defaults_dir'] %>/$SERVICE_NAME ] && . <%= node['bluepill']['defaults_dir'] %>/$SERVICE_NAME
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Loading bluepill configuration for $SERVICE_NAME "
|
||||
$BLUEPILL_BIN load $BLUEPILL_CONFIG
|
||||
;;
|
||||
stop)
|
||||
$BLUEPILL_BIN $SERVICE_NAME stop
|
||||
$BLUEPILL_BIN $SERVICE_NAME quit
|
||||
;;
|
||||
restart)
|
||||
$BLUEPILL_BIN $SERVICE_NAME restart
|
||||
;;
|
||||
status)
|
||||
$BLUEPILL_BIN $SERVICE_NAME status
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Author: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# chkconfig: 345 99 1
|
||||
# Description: Bluepill loader for <%= @service_name %>
|
||||
# Provides: <%= @service_name %>
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
|
||||
BLUEPILL_BIN=<%= node['bluepill']['bin'] %>
|
||||
BLUEPILL_CONFIG=<%= @config_file %>
|
||||
SERVICE_NAME=<%= @service_name %>
|
||||
|
||||
[ -r <%= node['bluepill']['defaults_dir'] %>/$SERVICE_NAME ] && . <%= node['bluepill']['defaults_dir'] %>/$SERVICE_NAME
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo "Loading bluepill configuration for $SERVICE_NAME "
|
||||
$BLUEPILL_BIN load $BLUEPILL_CONFIG
|
||||
;;
|
||||
stop)
|
||||
$BLUEPILL_BIN $SERVICE_NAME stop
|
||||
$BLUEPILL_BIN $SERVICE_NAME quit
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
@ -1 +0,0 @@
|
||||
local6.* <%= node["bluepill"]["logfile"] %>
|
@ -1,2 +1 @@
|
||||
~FC052
|
||||
~FC057
|
||||
~FC016
|
||||
|
@ -2,6 +2,103 @@
|
||||
|
||||
This file is used to list changes made in each version of the build-essential cookbook.
|
||||
|
||||
## 8.0.1 (2017-04-14)
|
||||
|
||||
- Test with local delivery and not Rake
|
||||
- Ensure compatibility with Chef 12.5
|
||||
- Update apache2 license string
|
||||
- Ensure compatibility with Amazon Linux on Chef 13
|
||||
|
||||
## 8.0.0 (2017-02-14)
|
||||
|
||||
- Require 12.5 or later and remove compat_resource cookbook dependency
|
||||
|
||||
## 7.0.3 (2016-12-22)
|
||||
|
||||
- Require the latest compat_resource
|
||||
- Cookstyle fixes
|
||||
|
||||
## 7.0.2 (2016-11-07)
|
||||
|
||||
- Fix softwareupdate issue from -v to --verbose
|
||||
|
||||
## 7.0.1 (2016-10-06)
|
||||
|
||||
- Install gcc 4.8 on SUSE < 12
|
||||
|
||||
## 7.0.0 (2016-09-30)
|
||||
|
||||
- Remove support for OS X < 10.9 and add support for OS X 10.12
|
||||
- Refactor the xcode installer resource as a custom resource that does not require updates for each new OS X update
|
||||
- Use a test recipe with apt_update to avoid needing apt
|
||||
|
||||
## 6.0.6 (2016-09-19)
|
||||
|
||||
- Remove chef 11 compatibility in the metadata
|
||||
- Solaris 11 needs both make and gnu make
|
||||
|
||||
## 6.0.5 (2016-09-07)
|
||||
|
||||
- Testing updates
|
||||
- Require the latest compat_resource
|
||||
|
||||
## 6.0.4 (2016-08-19)
|
||||
|
||||
- Install CLTools from dmg with -allowUntrusted on old OSX
|
||||
- Switch to cookstyle for ruby linting
|
||||
- Add OS X hosts to the kitchen config
|
||||
- Remove chefdk included gems from the Gemfile
|
||||
- Better handle kitchen failures in the Rakefile
|
||||
- Perform all unit/linting in a single travis job
|
||||
|
||||
## v6.0.3 (2016-07-26)
|
||||
|
||||
- Fix how gcc version specified for Solaris 11
|
||||
|
||||
## v6.0.2 (2016-07-22)
|
||||
|
||||
- Properly warn on Solaris 10
|
||||
- Specify the verson of gcc to install on Solaris 11
|
||||
|
||||
## v6.0.1 (2016-07-19)
|
||||
|
||||
- Clarify that this cookbook actually required Chef 12.1 or later not 12.0 or later
|
||||
- Add chef_version metadata
|
||||
|
||||
## v6.0.0 (2016-06-03)
|
||||
|
||||
This cookbook now uses the new msys2 based compiler toolchain on windows. Both 32-bit DW2 and 64-bit SEH based toolchains are available based on the gcc 5.3x series compiler. By default these are located in C:\msys2\mingw32 and C:\msys2\mingw64
|
||||
|
||||
## v5.0.0 (2016-06-03)
|
||||
|
||||
The cookbook now ships with a 12.5+ style custom resource 'build_essential' which performs the same work that the existing default.rb recipe. The default.rb recipe has been converted to consume that resource to provide backwards compatibility for users that use build-essential::default in their run lists or cookbooks. In converting to this custom resource support for EOL omnios has been removed and warning messages for Solaris 10 users have been removed. See the readme for usage information on the new resource.
|
||||
|
||||
## v4.0.0 (2016-05-12)
|
||||
|
||||
### Breaking change
|
||||
|
||||
This cookbook now requires Chef 12 or later as it includes the new mingw cookbook for installing Windows compilers. Mingw includes 12.5 style custom resources, which will fail to compile on Chef 11\. If you are not running Chef 12 you'll need to pin to 3.x in your environment.
|
||||
|
||||
## v3.2.0 (2016-03-25)
|
||||
|
||||
This version backs out a change in the 3.0 release which attempted to install the version of kernel-devel for the current running kernel on RHEL systems. This change had several unintended consequences and we believe the best solution is to back to change out until a better solution for the original problem is developed. Several of the issues could be resolved by code updates to build-essential, but not all, which complicates rolling forward vs. a roll back. The change caused issues which Chefspec runs on cookbooks where build-essential is a dependency as Fauxhai, used by Chefspec, does not mock out node['virtualization']. Fauxhai is being updated to mock out node['virtualization'], but we'd like to make sure a ChefDK release ships with this new Fauxhai before depending on that change.
|
||||
|
||||
## v3.1.0 (2016-03-23)
|
||||
|
||||
- Install GCC 4.8 if running on OmniOS >= 151008
|
||||
|
||||
## v3.0.0 (2016-03-23)
|
||||
|
||||
- Install GCC 4.9 on FreeBSD < 10
|
||||
- Install the version of kernel-devel that matches the running Kernel on RHEL
|
||||
- Remove suggests 'pkgutil' from the metadata as suggests does nothing
|
||||
- Properly warn the user that build-essential does not support Solaris 10 instead of just silently continuing on
|
||||
- Updated specs to run against more recent OS releases
|
||||
- Removed the warning for OmniOS users from the Readme as the upstream issue has been resolved
|
||||
- Switch from 7-zip to seven_zip cookbook as 7-zip has been deprecated
|
||||
- Add 7-zip to the system path on Windows hosts so the recipe will work out of the box
|
||||
- Switch from the deprecated 7-zip cookbook to seven_zip
|
||||
|
||||
## v2.4.0 (2016-03-21)
|
||||
|
||||
- Add gettext package to RHEL / FreeBSD to match other platforms
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Cookbook:: build-essential
|
||||
# Attributes:: default
|
||||
#
|
||||
# Copyright 2008-2016, Chef Software, Inc.
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -18,4 +18,4 @@
|
||||
#
|
||||
|
||||
default['build-essential']['compile_time'] = false
|
||||
default['build-essential']['msys']['path'] = "#{ENV['SYSTEMDRIVE']}\\msys"
|
||||
default['build-essential']['msys2']['path'] = "#{ENV['SYSTEMDRIVE']}\\msys2"
|
||||
|
@ -1,15 +0,0 @@
|
||||
module BuildEssential
|
||||
module MsysHelper
|
||||
#
|
||||
# This function returns a struct representing an
|
||||
# msys package. It has two fields: url and checksum
|
||||
#
|
||||
# @return [OpenStruct]
|
||||
#
|
||||
def msys_p(url, checksum)
|
||||
OpenStruct.new(url: url, checksum: checksum)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Chef::Recipe.send(:include, BuildEssential::MsysHelper)
|
@ -2,4 +2,8 @@ if defined?(ChefSpec)
|
||||
def install_xcode_command_line_tools(resource_name)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:xcode_command_line_tools, :install, resource_name)
|
||||
end
|
||||
|
||||
def install_build_essential(resource_name)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:build_essential, :install, resource_name)
|
||||
end
|
||||
end
|
||||
|
@ -1,124 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Library:: timing
|
||||
#
|
||||
# Copyright 2014-2016, Chef Software, 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 module is used to clean up the recipe DSL and "potentially" execute
|
||||
# resources at compile time (depending on the value of an attribute).
|
||||
#
|
||||
# This library is only for use within the build-essential cookbook. Resources
|
||||
# inside the potentially_at_compile_time block will not fire notifications in
|
||||
# some situations. This is fixable, but since none of the resources in this
|
||||
# cookbook actually use notifications, it is not worth the added technical debt.
|
||||
#
|
||||
# TL;DR Don't use this DSL method outside of this cookbook.
|
||||
#
|
||||
module BuildEssential
|
||||
module Timing
|
||||
#
|
||||
# Potentially evaluate the given block at compile time, depending on the
|
||||
# value of the +node['build-essential']['compile_time']+ attribute.
|
||||
#
|
||||
# @example
|
||||
# potentially_at_compile_time do
|
||||
# package 'apache2'
|
||||
# end
|
||||
#
|
||||
# @param [Proc] block
|
||||
# the thing to eval
|
||||
#
|
||||
def potentially_at_compile_time(&block)
|
||||
if compile_time?
|
||||
CompileTime.new(self).evaluate(&block)
|
||||
else
|
||||
instance_eval(&block)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
#
|
||||
# Checks if the DSL should be evaluated at compile time.
|
||||
#
|
||||
# @return [true, false]
|
||||
#
|
||||
def compile_time?
|
||||
check_for_old_attributes!
|
||||
!!node['build-essential']['compile_time']
|
||||
end
|
||||
|
||||
#
|
||||
# Checks for the presence of the "old" attributes.
|
||||
#
|
||||
# @todo Remove in 2.0.0
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
def check_for_old_attributes!
|
||||
unless node['build_essential'].nil?
|
||||
Chef::Log.warn <<-EOH
|
||||
node['build_essential'] has been changed to node['build-essential'] to match the
|
||||
cookbook name and community standards. I have gracefully converted the attribute
|
||||
for you, but this warning and conversion will be removed in the next major
|
||||
release of the build-essential cookbook.
|
||||
EOH
|
||||
node.default['build-essential'] = node['build_essential']
|
||||
end
|
||||
|
||||
unless node['build-essential']['compiletime'].nil?
|
||||
Chef::Log.warn <<-EOH
|
||||
node['build-essential']['compiletime'] has been deprecated. Please use
|
||||
node['build-essential']['compile_time'] instead. I have gracefully converted the
|
||||
attribute for you, but this warning and conversion will be removed in the next
|
||||
major release of the build-essential cookbook.
|
||||
EOH
|
||||
node.default['build-essential']['compile_time'] = node['build-essential']['compiletime']
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# A class graciously borrowed from Chef Sugar for evaluating a resource at
|
||||
# compile time in a block.
|
||||
#
|
||||
class CompileTime
|
||||
def initialize(recipe)
|
||||
@recipe = recipe
|
||||
end
|
||||
|
||||
def evaluate(&block)
|
||||
instance_eval(&block)
|
||||
end
|
||||
|
||||
def method_missing(m, *args, &block)
|
||||
resource = @recipe.send(m, *args, &block)
|
||||
if resource.is_a?(Chef::Resource)
|
||||
actions = Array(resource.action)
|
||||
resource.action(:nothing)
|
||||
|
||||
actions.each do |action|
|
||||
resource.run_action(action)
|
||||
end
|
||||
end
|
||||
resource
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Include the timing module into the main recipe DSL
|
||||
Chef::Recipe.send(:include, BuildEssential::Timing)
|
@ -1,212 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Library:: xcode_command_line_tools
|
||||
#
|
||||
# Copyright 2014-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
class Chef
|
||||
class Resource::XcodeCommandLineTools < Resource::LWRPBase
|
||||
def self.resource_name
|
||||
:xcode_command_line_tools
|
||||
end
|
||||
|
||||
actions :install
|
||||
default_action :install
|
||||
|
||||
def initialize(name, run_context = nil)
|
||||
super
|
||||
|
||||
# => Break down SemVer
|
||||
major, minor, _patch = node['platform_version'].split('.').map { |v| String(v) }
|
||||
@provider = case [major, minor].join('.')
|
||||
when '10.7', '10.8'
|
||||
Provider::XcodeCommandLineToolsFromDmg
|
||||
when '10.9', '10.10', '10.11'
|
||||
Provider::XcodeCommandLineToolsFromSoftwareUpdate
|
||||
else
|
||||
Chef::Log.warn <<-EOH
|
||||
OSX #{node['platform_version']} is not an officially supported platform for the
|
||||
build-essential cookbook. I am going to try and install the command line tools
|
||||
from Software Update, but there is a high probability that it will fail...
|
||||
|
||||
If you have tested and verified OSX #{node['platform_version']} and you are sick
|
||||
of seeing this warning in your Chef Client runs, please submit a Pull Request to
|
||||
https://github.com/chef-cookbooks/build-essential and add this version of OSX
|
||||
to provider list.
|
||||
EOH
|
||||
Provider::XcodeCommandLineToolsFromSoftwareUpdate
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# This is a legacy provider for installing OSX from DMGs. It only supports OSX
|
||||
# versions 10.7 and 10.8 and will (hopefully) be deprecated in the future. It
|
||||
# downloads a remote .dmg file, mounts it, installs it, and unmounts it
|
||||
# automatically. In later versions of OSX, the operating system handles this for
|
||||
# the end user.
|
||||
#
|
||||
class Chef
|
||||
class Provider::XcodeCommandLineToolsFromDmg < Provider::LWRPBase
|
||||
action(:install) do
|
||||
if installed?
|
||||
Chef::Log.debug("#{new_resource} already installed - skipping")
|
||||
else
|
||||
converge_by("Install #{new_resource}") do
|
||||
download
|
||||
attach
|
||||
install
|
||||
detach
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
#
|
||||
# Determine if the XCode Command Line Tools are installed
|
||||
#
|
||||
# @return [true, false]
|
||||
#
|
||||
def installed?
|
||||
cmd = Mixlib::ShellOut.new('pkgutil --pkgs=com.apple.pkg.DeveloperToolsCLI')
|
||||
cmd.run_command
|
||||
cmd.error!
|
||||
true
|
||||
rescue Mixlib::ShellOut::ShellCommandFailed
|
||||
false
|
||||
end
|
||||
|
||||
#
|
||||
# The path where the dmg should be cached on disk.
|
||||
#
|
||||
# @return [String]
|
||||
#
|
||||
def dmg_cache_path
|
||||
::File.join(Chef::Config[:file_cache_path], 'osx-command-line-tools.dmg')
|
||||
end
|
||||
|
||||
#
|
||||
# The path where the dmg should be downloaded from. This is intentionally
|
||||
# not a configurable object by the end user. If you do not like where we
|
||||
# are downloading XCode from - too bad.
|
||||
#
|
||||
# @return [String]
|
||||
#
|
||||
def dmg_remote_source
|
||||
case node['platform_version'].to_f
|
||||
when 10.7
|
||||
'http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_lion_april_2013.dmg'
|
||||
when 10.8
|
||||
'http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_os_x_mountain_lion_march_2014.dmg'
|
||||
else
|
||||
raise "Unknown DMG download URL for OSX #{node['platform_version']}"
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# The path where the volume should be mounted.
|
||||
#
|
||||
# @return [String]
|
||||
#
|
||||
def mount_path
|
||||
::File.join(Chef::Config[:file_cache_path], 'osx-command-line-tools')
|
||||
end
|
||||
|
||||
#
|
||||
# Action: download the remote dmg.
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
def download
|
||||
remote_file = Resource::RemoteFile.new(dmg_cache_path, run_context)
|
||||
remote_file.source(dmg_remote_source)
|
||||
remote_file.backup(false)
|
||||
remote_file.run_action(:create)
|
||||
end
|
||||
|
||||
#
|
||||
# Action: attach the dmg (basically, double-click on it)
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
def attach
|
||||
execute %(hdiutil attach "#{dmg_cache_path}" -mountpoint "#{mount_path}")
|
||||
end
|
||||
|
||||
#
|
||||
# Action: install the package inside the dmg
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
def install
|
||||
execute %|installer -package "$(find '#{mount_path}' -name *.mpkg)" -target "/"|
|
||||
end
|
||||
|
||||
#
|
||||
# Action: detach the dmg (basically, drag it to eject on the dock)
|
||||
#
|
||||
# @return [void]
|
||||
#
|
||||
def detach
|
||||
execute %(hdiutil detach "#{mount_path}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Chef
|
||||
class Provider::XcodeCommandLineToolsFromSoftwareUpdate < Provider::LWRPBase
|
||||
action(:install) do
|
||||
if installed?
|
||||
Chef::Log.debug("#{new_resource} already installed - skipping")
|
||||
else
|
||||
converge_by("Install #{new_resource}") do
|
||||
# This script was graciously borrowed and modified from Tim Sutton's
|
||||
# osx-vm-templates at https://github.com/timsutton/osx-vm-templates/blob/b001475df54a9808d3d56d06e71b8fa3001fff42/scripts/xcode-cli-tools.sh
|
||||
execute 'install XCode Command Line tools' do
|
||||
command <<-EOH.gsub(/^ {14}/, '')
|
||||
# create the placeholder file that's checked by CLI updates' .dist code
|
||||
# in Apple's SUS catalog
|
||||
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
|
||||
# find the CLI Tools update
|
||||
PROD=$(softwareupdate -l | grep "\*.*Command Line" | head -n 1 | awk -F"*" '{print $2}' | sed -e 's/^ *//' | tr -d '\n')
|
||||
# install it
|
||||
softwareupdate -i "$PROD" -v
|
||||
EOH
|
||||
# rubocop:enable Metrics/LineLength
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
#
|
||||
# Determine if the XCode Command Line Tools are installed
|
||||
#
|
||||
# @return [true, false]
|
||||
#
|
||||
def installed?
|
||||
cmd = Mixlib::ShellOut.new('pkgutil --pkgs=com.apple.pkg.CLTools_Executables')
|
||||
cmd.run_command
|
||||
cmd.error!
|
||||
true
|
||||
rescue Mixlib::ShellOut::ShellCommandFailed
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
@ -1,102 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Provider:: msys_archive
|
||||
#
|
||||
# Copyright 2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
use_inline_resources
|
||||
|
||||
action :unpack do
|
||||
directory msys_dir do
|
||||
action :create
|
||||
end
|
||||
|
||||
directory "dir-#{mingw_dir}" do
|
||||
action :create
|
||||
path mingw_dir
|
||||
only_if do
|
||||
new_resource.mingw
|
||||
end
|
||||
end
|
||||
|
||||
directory cache_dir do
|
||||
action :create
|
||||
end
|
||||
|
||||
# Unpacking involves downloading the tar.whatever.
|
||||
# Then we unpack the tar.whatever with 7z, which
|
||||
# leaves us with a tar, which can finally be
|
||||
# untarred with 7z.
|
||||
|
||||
remote_file cache_path do
|
||||
source new_resource.source
|
||||
checksum new_resource.checksum
|
||||
notifies :run, "execute[#{archive_name}]", :immediately
|
||||
end
|
||||
|
||||
execute archive_name do
|
||||
command extract_cmd(cache_path, cache_dir)
|
||||
action :nothing
|
||||
notifies :run, "execute[#{tar_name}]", :immediately
|
||||
end
|
||||
|
||||
execute tar_name do
|
||||
command extract_cmd(tar_path, unpack_root_dir)
|
||||
action :nothing
|
||||
end
|
||||
end
|
||||
|
||||
# msys packages will be extracted into the root dir
|
||||
# mingw packages will get extracted into the root/mingw dir
|
||||
def unpack_root_dir
|
||||
if new_resource.mingw
|
||||
mingw_dir
|
||||
else
|
||||
msys_dir
|
||||
end
|
||||
end
|
||||
|
||||
def msys_dir
|
||||
new_resource.root_dir
|
||||
end
|
||||
|
||||
def mingw_dir
|
||||
::File.join(new_resource.root_dir, 'mingw')
|
||||
end
|
||||
|
||||
def archive_name
|
||||
::File.basename(new_resource.source)
|
||||
end
|
||||
|
||||
def cache_dir
|
||||
::File.join(unpack_root_dir, '.cache')
|
||||
end
|
||||
|
||||
def cache_path
|
||||
::File.join(cache_dir, archive_name)
|
||||
end
|
||||
|
||||
def tar_name
|
||||
::File.basename(archive_name, ::File.extname(archive_name))
|
||||
end
|
||||
|
||||
def tar_path
|
||||
::File.join(cache_dir, tar_name)
|
||||
end
|
||||
|
||||
def extract_cmd(source_file, dest_dir)
|
||||
"7z x #{source_file} -o#{dest_dir} -r -y"
|
||||
end
|
@ -1,28 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: debian
|
||||
#
|
||||
# Copyright 2008-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
potentially_at_compile_time do
|
||||
package 'autoconf'
|
||||
package 'binutils-doc'
|
||||
package 'bison'
|
||||
package 'build-essential'
|
||||
package 'flex'
|
||||
package 'gettext'
|
||||
package 'ncurses-dev'
|
||||
end
|
@ -1,32 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: fedora
|
||||
#
|
||||
# Copyright 2008-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
potentially_at_compile_time do
|
||||
package 'autoconf'
|
||||
package 'bison'
|
||||
package 'flex'
|
||||
package 'gcc'
|
||||
package 'gcc-c++'
|
||||
package 'gettext'
|
||||
package 'kernel-devel'
|
||||
package 'make'
|
||||
package 'm4'
|
||||
package 'ncurses-devel'
|
||||
package 'patch'
|
||||
end
|
@ -1,25 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: freebsd
|
||||
#
|
||||
# Copyright 2014-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
potentially_at_compile_time do
|
||||
package 'devel/gmake'
|
||||
package 'devel/autoconf'
|
||||
package 'devel/m4'
|
||||
package 'devel/gettext'
|
||||
end
|
@ -1,33 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: omnios
|
||||
#
|
||||
# Copyright 2013-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
potentially_at_compile_time do
|
||||
package 'developer/gcc47'
|
||||
package 'developer/object-file'
|
||||
package 'developer/linker'
|
||||
package 'developer/library/lint'
|
||||
package 'developer/build/gnu-make'
|
||||
package 'system/header'
|
||||
package 'system/library/math/header-math'
|
||||
end
|
||||
|
||||
# Per OmniOS documentation, the gcc bin dir isn't in the default
|
||||
# $PATH, so add it to the running process environment
|
||||
# http://omnios.omniti.com/wiki.php/DevEnv
|
||||
ENV['PATH'] = "#{ENV['PATH']}:/opt/gcc-4.7.2/bin"
|
@ -1,27 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: smartos
|
||||
#
|
||||
# Copyright 2008-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
potentially_at_compile_time do
|
||||
package 'autoconf'
|
||||
package 'binutils'
|
||||
package 'build-essential'
|
||||
package 'gcc47'
|
||||
package 'gmake'
|
||||
package 'pkg-config'
|
||||
end
|
@ -1,48 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: solaris2
|
||||
#
|
||||
# Copyright 2013-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
case node['platform_version'].to_f
|
||||
when 5.10
|
||||
# You should install the following packages from the Solaris 10 DVD:
|
||||
#
|
||||
# SUNWbison
|
||||
# SUNWgcc
|
||||
# SUNWggrp
|
||||
# SUNWgmake
|
||||
# SUNWgtar
|
||||
#
|
||||
when 5.11
|
||||
potentially_at_compile_time do
|
||||
package 'autoconf'
|
||||
package 'automake'
|
||||
package 'bison'
|
||||
package 'gnu-coreutils'
|
||||
package 'flex'
|
||||
package 'gcc'
|
||||
package 'gcc-3'
|
||||
package 'gnu-grep'
|
||||
package 'gnu-make'
|
||||
package 'gnu-patch'
|
||||
package 'gnu-tar'
|
||||
package 'pkg-config'
|
||||
package 'ucb'
|
||||
end
|
||||
else
|
||||
raise "Sorry, we don't support Solaris version #{node['platform_version']} at this juncture."
|
||||
end
|
@ -1,29 +0,0 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: suse
|
||||
#
|
||||
# Copyright 2008-2016, Chef Software, 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.
|
||||
#
|
||||
|
||||
potentially_at_compile_time do
|
||||
package 'autoconf'
|
||||
package 'bison'
|
||||
package 'flex'
|
||||
package 'gcc'
|
||||
package 'gcc-c++'
|
||||
package 'kernel-default-devel'
|
||||
package 'make'
|
||||
package 'm4'
|
||||
end
|
@ -1,7 +0,0 @@
|
||||
actions :unpack
|
||||
default_action :unpack
|
||||
|
||||
attribute :source, kind_of: String, name_attribute: true
|
||||
attribute :root_dir, kind_of: String, required: true
|
||||
attribute :mingw, kind_of: [TrueClass, FalseClass], default: false
|
||||
attribute :checksum, kind_of: String
|
1
cookbooks/chef_nginx/.foodcritic
Normal file
1
cookbooks/chef_nginx/.foodcritic
Normal file
@ -0,0 +1 @@
|
||||
~FC016
|
628
cookbooks/chef_nginx/CHANGELOG.md
Normal file
628
cookbooks/chef_nginx/CHANGELOG.md
Normal file
@ -0,0 +1,628 @@
|
||||
# nginx Cookbook CHANGELOG
|
||||
|
||||
This file is used to list changes made in each version of the nginx cookbook.
|
||||
|
||||
## 6.0.2 (2017-04-27)
|
||||
|
||||
- Resolve name conflicts in the resource
|
||||
|
||||
## 6.0.1 (2017-04-04)
|
||||
|
||||
- double quotes are unnecessary in lua configure flags
|
||||
|
||||
## 6.0.0 (2017-03-25)
|
||||
|
||||
### Breaking change
|
||||
|
||||
- Support for Runit as an init system has been removed. If you require runit you will need to pin to the 5.X cookbook release. We highly recommend using either systemd or upstart instead of Runit.
|
||||
|
||||
### Other changes
|
||||
|
||||
- Install nginx 1.10.3 for source based installs
|
||||
- Remove freebsd cookbook from testing as it’s not necessary anymore
|
||||
- Bump OpenSSL to 1.0.2k
|
||||
|
||||
## 5.1.3 (2017-03-24)
|
||||
|
||||
- Update apache2 license string
|
||||
- Add image/svg+xml to gzip_files defaults
|
||||
- support `worker_shutdown_timeout` released in 1.11.11
|
||||
|
||||
## 5.1.2 (2017-03-14)
|
||||
|
||||
- Setup LD options to include /usr/local/lib for libluajit in search path and bump the lua version
|
||||
|
||||
## 5.1.1 (2017-03-02)
|
||||
|
||||
- Add WantedBy to systemd service file so it starts at boot
|
||||
- Avoid a warning in nginx_site by moving the template check outside the resource
|
||||
- Allow nginx_site to specify template as an array of templates
|
||||
|
||||
## 5.1.0 (2017-03-01)
|
||||
|
||||
- Support the load_module directive
|
||||
- Test with Local Delivery and not Rake
|
||||
- Remove EOL platforms from the kitchen configs
|
||||
|
||||
## 5.0.7 (2017-02-12)
|
||||
|
||||
- Fix Opsworks compatibility
|
||||
- Resolve a Chef 13 deprecation warning
|
||||
|
||||
## 5.0.6 (2017-01-16)
|
||||
|
||||
- Rebuild shared library cache after installing luajit
|
||||
|
||||
## 5.0.5 (2017-01-09)
|
||||
|
||||
- Fix typo in the pagespeed recipe
|
||||
|
||||
## 5.0.4 (2017-01-04)
|
||||
|
||||
- Avoid deprecation warnings by only defining nginx service once
|
||||
|
||||
## 5.0.3 (2017-01-03)
|
||||
|
||||
- Add ability to write passenger log to another location
|
||||
- Properly disable the default site with nginx.org packages
|
||||
|
||||
## 5.0.2 (2016-12-22)
|
||||
- Requite the latest compat_resource
|
||||
|
||||
## 5.0.1 (2016-12-13)
|
||||
|
||||
- Use multipackage in pagespeed module recipe to speed up installs
|
||||
- Simplify the distro repo setup logic to ensure we're using the correct repos under all conditions. Previously the upstream repo was being missed on Suse systems
|
||||
- Determine pidfile location correctly via a helper so we correctly set pidfiles when using Upstream packages on Ubuntu 14.04 / 16.04. This involved removing the attribute for the pidfile location, which may cause issues if you relied on that attribute.
|
||||
- Testing improvements to make sure all suites run and the suites are testing the correct conditions
|
||||
|
||||
## 5.0.0 (2016-12-07)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Default to the upstream nginx.org repo for package installs. The official nginx repo gives an improved experience over outdated distro releases. This can be disabled via attribute if you'd like to remain on the distro packages.
|
||||
|
||||
### Other changes
|
||||
|
||||
- Add a deprecation warning when using runit
|
||||
- Rewrite the readme usage section
|
||||
- Better document how to compile modules
|
||||
|
||||
## 4.0.2 (2016-12-01)
|
||||
- Default to openssl 1.0.2j with source installs
|
||||
- Add cookbook property to the nginx_site resource to allow using templates defined in other cookbooks
|
||||
- Prevent default docroot index.html on bad url in status
|
||||
- Readme improvements
|
||||
|
||||
## 4.0.1 (2016-10-31)
|
||||
- Fix a version check in the realip recipe
|
||||
- Align the config with the default config a bit
|
||||
- Fix the ChefSpec matchers now that nginx_site is a custom resource
|
||||
|
||||
## 4.0.0 (2016-10-31)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
The nginx_site definition is now a custom_resource. This improves the overall experience and allows for notifications and reporting on resource updates. It does change the behavior in some circumstances however. Previously to disable a site you would set 'enable false' on your definition. This will still function, but will result in a deprecation warning. Instead you should use 'action :disable' since this is a real resource now.
|
||||
|
||||
### Other changes
|
||||
|
||||
- Avoid splitting on compile params in the ohai plugin, which resulted in some source installs attempting to install on every Chef run.
|
||||
- Expanded testing and improved kitchen suite setup
|
||||
- Improved documentation of attributes and cookbook usage
|
||||
|
||||
## 3.2.0 (2016-10-28)
|
||||
|
||||
- Reload nginx on site change
|
||||
|
||||
## 3.1.2 (2016-10-24)
|
||||
|
||||
- [GH-26] Remove guard on package[nginx] resource
|
||||
- Fix pcre packages on RHEL that prevented pagespeed module compilation
|
||||
|
||||
## 3.1.1 (2016-09-21)
|
||||
|
||||
- Raise on error vs. Chef::Appliation.fatal
|
||||
- Require compat_resource with notification fixes
|
||||
|
||||
## 3.1.0 (2016-09-14)
|
||||
|
||||
- Resolve FC023 warnings
|
||||
- FreeBSD fixes
|
||||
- Fail hard on unsupported platforms in the source recipe
|
||||
- Install 'ca-certificates' packages with passenger
|
||||
- Add `passenger_show_version_in_header` config
|
||||
- Remove chef 11 compatibility
|
||||
- Replace apt/yum deps with compat_resource
|
||||
- Fix specs for freebsd source installs
|
||||
- Remove apt recipe from the repo_passenger recipe
|
||||
- Switch to += operator as << also incorrectly replaces text in root.
|
||||
|
||||
## 3.0.0 (2016-08-18)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Ideally we'd offer perfect backwards compatibility forever, but in order to maintain the cookbook going forward we've evaluated the current scope of the cookbook and removed lesser used functionality that added code complexity.
|
||||
|
||||
- The minimum chef-client version is now 12.1 or later, which will enables support for Ohai 7+ plugins, the ohai_plugin custom resource, and automatic init system discovery.
|
||||
- Support for Gentoo has been removed. Gentoo lacks an official Chef package and there is no Bento image to use for Test Kitchen integration tests.
|
||||
- Support for the bluepill init system has been removed. Usage of this init system has declined, and supporting it added a cookbook dependency as well as code complexity.
|
||||
- Ubuntu source installs will no longer default to runit, and will instead use either Upstart or Systemd depending on the release of Ubuntu. You can still force the use of runit by setting default['nginx']['init_style'] to 'runit'. Runit was used historically before reliable init systems were shipped with Ubuntu. Both Upstart and Systemd have the concept of restarting on failure, which was the main reason for choosing Runit over sys-v init.
|
||||
|
||||
### Other changes
|
||||
|
||||
- Don't setup the YUM EPEL repo on Fedora as it's not needed
|
||||
- Systemd based platforms will now use systemd by default for source installs
|
||||
- Retry downloads of the nginx source file as the mirror sometimes fails to load
|
||||
- Download the nginx source from the secure nginx.org site
|
||||
- Updated the Ohai plugin to avoid deprecation notices and function better on non us-en locale systems
|
||||
- Install source install pre-reqs using multi-package which speeds up Chef runs
|
||||
- Add testing in Travis with Kitchen Dokken for full integration testing of each PR
|
||||
- Add integration test on Chef 12.1 as well as the latest Chef to ensure compatibility with the oldest release we support
|
||||
- Remove installation of apt-transport-https and instead increase the apt dependency to >= 2.9.1 which includes the installation of apt-transport-https
|
||||
- Don't try to setup the nginx.org repo on Fedora as this will fail
|
||||
- Better log when trying to setup repositories on unsupported platforms
|
||||
- Fixed source_url and issue_url in the metadata to point to the correct URLs
|
||||
- Removed Chef 10 compatibility code
|
||||
- Chefspec platform updates and minor fixes
|
||||
- Replace all usage of node.set with node.normal to avoid deprecation notices
|
||||
- Remove the suse init script that isn't used anymore
|
||||
- Speed up the specs with caching
|
||||
- Move test attributes and runlists out the kitchen.yml files and into a test cookbook
|
||||
|
||||
## 2.9.0 (2016-08-12)
|
||||
|
||||
- Add support for Suse Nginx.org packages
|
||||
|
||||
## v2.8.0 (2016-08-12)
|
||||
|
||||
This is the first release of the nginx codebase under the chef_nginx namespace. We've chosen to bring this cookbook under the direction of the Community Cookbook Team, in order to ship a working 2.X release. The cookbook name has been changed, but all attributes are the same and compatibility has been maintained. After this 2.8.0 release we will release 3.0 as a Chef 12+ version of the cookbook and then work to add additional custom resources for managing nginx with wrapper cookbooks. Expect regular releases as we march towards a resource driven model.
|
||||
|
||||
- Removed the restrictive version constraints for cookbook dependencies that prevented users from utilizing new functionality. Ohai has been pinned to < 4.0 to allow for Chef 11 compatibility, but other cookbooks have no upper limit
|
||||
- Updated all modules in the source install to their latest releases
|
||||
- Removed the GeoIP database checksums as these files are constantly updates and this causes Chef run failures
|
||||
- Updated OpenSSL for source installs to 1.0.1t
|
||||
- Updated the source install of Nginx to version 1.10.1
|
||||
- Updated the ohai recipe to install a Ohai 7+ compatible plugin on systems running Ohai 7+
|
||||
- Fixed installation of Passenger version 5.X+
|
||||
- Added a http_v2_module recipe
|
||||
- Replaced node.set usage with node.normal to avoid deprecation warnings
|
||||
- Removed the apt version pin in the Berkfile that wasn't necessary and constrained the apt version
|
||||
- Removed the lua-devel package install from the lua recipe that failed chef runs and wasn't necessary
|
||||
- Removed duplicate packages from the source module installs
|
||||
- Added a dependency on the yum cookbook which was missing from the metadata
|
||||
- Updated the mime.types file and added the charset_types configuration option to the nginx config
|
||||
- Added source_url, issue_url, and chef_version metadata
|
||||
- Fixed the pid file attribute logic for Ubuntu 16.04
|
||||
- Removed the Contributing doc that was for contributing to Opscode cookbooks
|
||||
- Updated all test dependencies in the Gemfile
|
||||
- Removed default user/group/mode declarations from resources for simplicity
|
||||
- Updated documentation for dependencies in the README
|
||||
- Added a chefignore file to limit the cookbook files that are uploaded to the chef server and speed up cookbook syncs to nodes
|
||||
- Added additional platforms to the Test Kitchen config and removed the .kitchen.cloud.yml file
|
||||
- Switched integration tests to Inspec and fixed several non-functional tests
|
||||
- Switched from Rubocop to Cookstyle and resolved all warnings
|
||||
- Added the standard Chef Rakefile for simplified testing
|
||||
- Updated Chefspecs to avoid constant deprecation warnings and converge using chef-zero on a newer Debian 8 system
|
||||
- Switch Travis CI testing to use ChefDK instead of RVM/Gem installs
|
||||
- Removed testing dependencies from the Gemfile as testing should be performed via ChefDK. Release gems are still in the Gemfile as they are not shipped with ChefDK
|
||||
- Added a maintainers.md doc and updated the contributing/testing docs to point to the Chef docs
|
||||
- Removed Guard as guard-foodcritic doesn't support the latest release which makes guard incompatible with ChefDK
|
||||
|
||||
## v2.7.6 (2015-03-17)
|
||||
|
||||
- Bugfix sites do not need a .conf suffix anymore, [#338][@runningman84]
|
||||
|
||||
## v2.7.5 (2015-03-17)
|
||||
|
||||
**NOTE** As of this release, this cookbook in its current format is deprecated, and only critical bugs and fixes will be added. A complete rewrite is in progress, so we appreciate your patience while we sort things out. The amount of change included here
|
||||
|
||||
- Fix nginx 1.4.4 archive checksum to prevent redownload, [#305][@irontoby]
|
||||
- Allow setting an empty string to prevent additional repos, [#243][@miketheman]
|
||||
- Use correct `mime.types` for javascript, [#259][@dwradcliffe]
|
||||
- Fix `headers_more` module for source installs, [#279], [@josh-padnick] & [@miketheman]
|
||||
- Remove `libtool` from `geoip` and update download paths & checksums, [@miketheman]
|
||||
- Fix unquoted URL with params failing geoip module build (and tests!), [#294][@karsten-bruckmann] & [@miketheman]
|
||||
- Fix typo in `source.rb`, [#205][@gregkare]
|
||||
- Test updates: ChefSpec, test-kitchen. Lots of help by [@jujugrrr]
|
||||
- Toolchain updates for testing
|
||||
- Adds support for `tcp_nopush`, `tcp_nodelay` [@shtouff]
|
||||
|
||||
After merging a ton of pull requests, here's a brief changelog. Click each to read more.
|
||||
|
||||
- Merge pull request [#335] from [@stevenolen]
|
||||
- Merge pull request [#332] from [@monsterstrike]
|
||||
- Merge pull request [#331] from [@jalberto]
|
||||
- Merge pull request [#327] from [@nkadel-skyhook]
|
||||
- Merge pull request [#326] from [@bchrobot]
|
||||
- Merge pull request [#325] from [@CanOfSpam3bug324]
|
||||
- Merge pull request [#321] from [@jalberto]
|
||||
- Merge pull request [#318] from [@evertrue]
|
||||
- Merge pull request [#314] from [@bkw]
|
||||
- Merge pull request [#312] from [@thomasmeeus]
|
||||
- Merge pull request [#310] from [@morr]
|
||||
- Merge pull request [#305] from [@irontoby]
|
||||
- Merge pull request [#302] from [@auth0]
|
||||
- Merge pull request [#298] from [@Mytho]
|
||||
- Merge pull request [#269] from [@yveslaroche]
|
||||
- Merge pull request [#259] from [@dwradcliffe]
|
||||
- Merge pull request [#254] from [@evertrue]
|
||||
- Merge pull request [#252] from [@gkra]
|
||||
- Merge pull request [#249] from [@whatcould]
|
||||
- Merge pull request [#240] from [@jcoleman]
|
||||
- Merge pull request [#236] from [@adepue]
|
||||
- Merge pull request [#230] from [@n1koo]
|
||||
- Merge pull request [#225] from [@thommay]
|
||||
- Merge pull request [#223] from [@firmhouse]
|
||||
- Merge pull request [#220] from [@evertrue]
|
||||
- Merge pull request [#219] from [@evertrue]
|
||||
- Merge pull request [#204] from [@usertesting]
|
||||
- Merge pull request [#200] from [@ffuenf]
|
||||
- Merge pull request [#188] from [@larkin]
|
||||
- Merge pull request [#184] from [@tvdinner]
|
||||
- Merge pull request [#183] from [@jenssegers]
|
||||
- Merge pull request [#174] from [@9minutesnooze]
|
||||
|
||||
<https://github.com/miketheman/nginx/compare/v2.7.4...v2.7.5>
|
||||
|
||||
## v2.7.4 (2014-06-06)
|
||||
|
||||
- [COOK-4703] Default openssl version to 1.0.1h to address CVE-2014-0224
|
||||
|
||||
## v2.7.2 (2014-05-27)
|
||||
|
||||
- [COOK-4658] - Nginx::socketproxy if the context is blank or nonexistent, the location in the config file has a double slash at the beginning
|
||||
- [COOK-4644] - add support to nginx::repo for Amazon Linux
|
||||
- Allow .kitchen.cloud.yml to use an environment variable for the EC2 Availability Zone
|
||||
|
||||
## v2.7.0 (2014-05-15)
|
||||
|
||||
- [COOK-4643] - Update metadata lock on ohai
|
||||
- [COOK-4588] - Give more love to FreeBSD
|
||||
- [COOK-4601] - Add proxy type: Socket
|
||||
|
||||
## v2.6.2 (2014-04-09)
|
||||
|
||||
[COOK-4527] - set default openssl source version to 1.0.1g to address CVE-2014-0160 aka Heartbleed
|
||||
|
||||
## v2.6.0 (2014-04-08)
|
||||
|
||||
- Reverting COOK-4323
|
||||
|
||||
## v2.5.0 (2014-03-27)
|
||||
|
||||
- [COOK-4323] - Need a resource to easily configure available sites (vhosts)
|
||||
|
||||
## v2.4.4 (2014-03-13)
|
||||
|
||||
- Updating for build-essential 2.0
|
||||
|
||||
## v2.4.2 (2014-02-28)
|
||||
|
||||
Fixing bad commit from COOK-4330
|
||||
|
||||
## v2.4.1 (2014-02-27)
|
||||
|
||||
- [COOK-4345] - nginx default recipe include install type recipe directly
|
||||
|
||||
## v2.4.0 (2014-02-27)
|
||||
|
||||
- [COOK-4380] - kitchen.yml platform listings for ubuntu-10.04 and ubuntu-12.04 are missing the dot
|
||||
- [COOK-4330] - Bump nginx version for security issues (CVE-2013-0337, CVE-2013-4547)
|
||||
|
||||
## v2.3.0 (2014-02-25)
|
||||
|
||||
- **[COOK-4293](https://tickets.chef.io/browse/COOK-4293)** - Update testing Gems in nginx and fix a rubocop warnings
|
||||
- **[COOK-4237] - Nginx version incorrectly parsed on Ubuntu 13
|
||||
- **[COOK-3866] - Nginx default site folder
|
||||
|
||||
## v2.2.2 (2014-01-23)
|
||||
|
||||
[COOK-3672] - Add gzip_static option
|
||||
|
||||
## v2.2.0
|
||||
|
||||
No changes. Version bump for toolchain
|
||||
|
||||
## v2.1.0
|
||||
|
||||
[COOK-3923] - Enable the list of packages installed by nginx::passenger to be configurable [COOK-3672] - Nginx should support the gzip_static option Updating for yum ~> 3.0 Fixing up style for rubocop Updating test-kitchen harness
|
||||
|
||||
## v2.0.8
|
||||
|
||||
fixing metadata version error. locking to 3.0
|
||||
|
||||
## v2.0.6
|
||||
|
||||
Locking yum dependency to '< 3'
|
||||
|
||||
## v2.0.4
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-3808](https://tickets.chef.io/browse/COOK-3808)** - nginx::passenger run fails because of broken installation of package dependencies
|
||||
- **[COOK-3779](https://tickets.chef.io/browse/COOK-3779)** - Build in master fails due to rubocop error
|
||||
|
||||
## v2.0.2
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-3808](https://tickets.chef.io/browse/COOK-3808)** - nginx::passenger run fails because of broken installation of package dependencies
|
||||
- **[COOK-3779](https://tickets.chef.io/browse/COOK-3779)** - Build in master fails due to rubocop error
|
||||
|
||||
## v2.0.0
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-3733](https://tickets.chef.io/browse/COOK-3733)** - Add RPM key names and GPG checking
|
||||
- **[COOK-3687](https://tickets.chef.io/browse/COOK-3687)** - Add support for `http_perl`
|
||||
- **[COOK-3603](https://tickets.chef.io/browse/COOK-3603)** - Add a recipe for using custom openssl
|
||||
- **[COOK-3602](https://tickets.chef.io/browse/COOK-3602)** - Use an attribute for the status module port
|
||||
- **[COOK-3549](https://tickets.chef.io/browse/COOK-3549)** - Refactor custom modules support
|
||||
- **[COOK-3521](https://tickets.chef.io/browse/COOK-3521)** - Add support for `http_auth_request`
|
||||
- **[COOK-3520](https://tickets.chef.io/browse/COOK-3520)** - Add support for `spdy`
|
||||
- **[COOK-3185](https://tickets.chef.io/browse/COOK-3185)** - Add `gzip_*` attributes
|
||||
- **[COOK-2712](https://tickets.chef.io/browse/COOK-2712)** - Update `upload_progress` version to 0.9.0
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-3686](https://tickets.chef.io/browse/COOK-3686)** - Remove deprecated 'passenger_use_global_queue' directive
|
||||
- **[COOK-3626](https://tickets.chef.io/browse/COOK-3626)** - Parameterize hardcoded path to helper scripts
|
||||
- **[COOK-3571](https://tickets.chef.io/browse/COOK-3571)** - Reloda ohai plugin after installation
|
||||
- **[COOK-3428](https://tickets.chef.io/browse/COOK-3428)** - Fix an issue where access logs are not disabled when the `disable_access_log` attribute is set to `true`
|
||||
- **[COOK-3322](https://tickets.chef.io/browse/COOK-3322)** - Fix an issue where `nginx::ohai_plugin` fails when using source recipe
|
||||
- **[COOK-3241](https://tickets.chef.io/browse/COOK-3241)** - Fix an issue where`nginx::ohai_plugin` fails unless using source recipe
|
||||
|
||||
### New Feature
|
||||
|
||||
- **[COOK-3605](https://tickets.chef.io/browse/COOK-3605)** - Add Lua module
|
||||
|
||||
## v1.8.0
|
||||
|
||||
### Bug
|
||||
|
||||
- **[COOK-3397](https://tickets.chef.io/browse/COOK-3397)** - Fix user from nginx package on Gentoo
|
||||
- **[COOK-2968](https://tickets.chef.io/browse/COOK-2968)** - Fix foodcritic failure
|
||||
- **[COOK-2723](https://tickets.chef.io/browse/COOK-2723)** - Remove duplicate passenger `max_pool_size`
|
||||
|
||||
### Improvement
|
||||
|
||||
- **[COOK-3186](https://tickets.chef.io/browse/COOK-3186)** - Add `client_body_buffer_size` and `server_tokens attributes`
|
||||
- **[COOK-3080](https://tickets.chef.io/browse/COOK-3080)** - Add rate-limiting support
|
||||
- **[COOK-2927](https://tickets.chef.io/browse/COOK-2927)** - Add support for `real_ip_recursive` directive
|
||||
- **[COOK-2925](https://tickets.chef.io/browse/COOK-2925)** - Fix ChefSpec converge
|
||||
- **[COOK-2724](https://tickets.chef.io/browse/COOK-2724)** - Automatically create directory for PID file
|
||||
- **[COOK-2472](https://tickets.chef.io/browse/COOK-2472)** - Bump nginx version to 1.2.9
|
||||
- **[COOK-2312](https://tickets.chef.io/browse/COOK-2312)** - Add additional `mine_types` to the `gzip_types` value
|
||||
|
||||
### New Feature
|
||||
|
||||
- **[COOK-3183](https://tickets.chef.io/browse/COOK-3183)** - Allow inclusion in extra-cookbook modules
|
||||
|
||||
## v1.7.0
|
||||
|
||||
### Improvement
|
||||
|
||||
- [COOK-3030]: The repo_source attribute should allow you to not add any additional repositories to your node
|
||||
|
||||
### Sub-task
|
||||
|
||||
- [COOK-2738]: move nginx::passenger attributes to `nginx/attributes/passenger.rb`
|
||||
|
||||
## v1.6.0
|
||||
|
||||
### Task
|
||||
|
||||
- [COOK-2409]: update nginx::source recipe for new `runit_service` resource
|
||||
- [COOK-2877]: update nginx cookbook test-kitchen support to 1.0 (alpha)
|
||||
|
||||
### Improvement
|
||||
|
||||
- [COOK-1976]: nginx source should be able to configure binary path
|
||||
- [COOK-2622]: nginx: add upstart support
|
||||
- [COOK-2725]: add "configtest" subcommand in initscript
|
||||
|
||||
### Bug
|
||||
|
||||
- [COOK-2398]: nginx_site definition cannot be used to manage the default site
|
||||
- [COOK-2493]: Resources in nginx::source recipe always use 1.2.6 version, even overriding version attribute
|
||||
- [COOK-2531]: Remove usage of non-existant attribute "description" for `apt_repository`
|
||||
- [COOK-2665]: nginx::source install with custom sbin_path breaks ohai data
|
||||
|
||||
## v1.4.0
|
||||
|
||||
- [COOK-2183] - Install nginx package from nginxyum repo
|
||||
- [COOK-2311] - headers-more should be updated to the latest version
|
||||
- [COOK-2455] - Support sendfile option (nginx.conf)
|
||||
|
||||
## v1.3.0
|
||||
|
||||
- [COOK-1979] - Passenger module requires curl-dev(el)
|
||||
- [COOK-2219] - Support `proxy_read_timeout` (in nginx.conf)
|
||||
- [COOK-2220] - Support `client_max_body_size` (in nginx.conf)
|
||||
- [COOK-2280] - Allow custom timing of nginx_site's reload notification
|
||||
- [COOK-2304] - nginx cookbook should install 1.2.6 not 1.2.3 for source installs
|
||||
- [COOK-2309] - checksums for geoip files need to be updated in nginx
|
||||
- [COOK-2310] - Checksum in the `nginx::upload_progress` recipe is not correct
|
||||
- [COOK-2314] - nginx::passenger: Install the latest version of passenger
|
||||
- [COOK-2327] - nginx: passenger recipe should find ruby via Ohai
|
||||
- [COOK-2328] - nginx: Update mime.types file to the latest
|
||||
- [COOK-2329] - nginx: Update naxsi rules to the current
|
||||
|
||||
## v1.2.0
|
||||
|
||||
- [COOK-1752] - Add headers more module to the nginx cookbook
|
||||
- [COOK-2209] - nginx source recipe should create web user before creating directories
|
||||
- [COOK-2221] - make nginx::source compatible with gentoo
|
||||
- [COOK-2267] - add version for runit recommends
|
||||
|
||||
## v1.1.4
|
||||
|
||||
- [COOK-2168] - specify package name as an attribute
|
||||
|
||||
## v1.1.2
|
||||
|
||||
- [COOK-1766] - Nginx Source Recipe Rebuilding Source at Every Run
|
||||
- [COOK-1910] - Add IPv6 module
|
||||
- [COOK-1966] - nginx cookbook should let you set `gzip_vary` and `gzip_buffers` in nginx.conf
|
||||
- [COOK-1969]- - nginx::passenger module not included due to use of symbolized `:nginx_configure_flags`
|
||||
- [COOK-1971] - Template passenger.conf.erb configures key `passenger_max_pool_size` 2 times
|
||||
- [COOK-1972] - nginx::source compile_nginx_source reports success in spite of failed compilation
|
||||
- [COOK-1975] - nginx::passenger requires rake gem
|
||||
- [COOK-1979] - Passenger module requires curl-dev(el)
|
||||
- [COOK-2080] - Restart nginx on source compilation
|
||||
|
||||
## v1.1.0
|
||||
|
||||
- [COOK-1263] - Nginx log (and possibly other) directory creations should be recursive
|
||||
- [COOK-1515] - move creation of `node['nginx']['dir']` out of commons.rb
|
||||
- [COOK-1523] - nginx `http_geoip_module` requires libtoolize
|
||||
- [COOK-1524] - nginx checksums are md5
|
||||
- [COOK-1641] - add "use", "`multi_accept`" and "`worker_rlimit_nofile`" to nginx cookbook
|
||||
- [COOK-1683] - Nginx fails Windows nodes just by being required in metadata
|
||||
- [COOK-1735] - Support Amazon Linux in nginx::source recipe
|
||||
- [COOK-1753] - Add ability for nginx::passenger recipe to configure more Passenger global settings
|
||||
- [COOK-1754] - Allow group to be set in nginx.conf file
|
||||
- [COOK-1770] - nginx cookbook fails on servers that don't have a "cpu" attribute
|
||||
- [COOK-1781] - Use 'sv' to reload nginx when using runit
|
||||
- [COOK-1789] - stop depending on bluepill, runit and yum. they are not required by nginx cookbook
|
||||
- [COOK-1791] - add name attribute to metadata
|
||||
- [COOK-1837] - nginx::passenger doesn't work on debian family
|
||||
- [COOK-1956] - update naxsi version due to incompatibility with newer nginx
|
||||
|
||||
## v1.0.2
|
||||
|
||||
- [COOK-1636] - relax the version constraint on ohai
|
||||
|
||||
## v1.0.0
|
||||
|
||||
- [COOK-913] - defaults for gzip cause warning on service restart
|
||||
- [COOK-1020] - duplicate MIME type
|
||||
- [COOK-1269] - add passenger module support through new recipe
|
||||
- [COOK-1306] - increment nginx version to 1.2 (now 1.2.3)
|
||||
- [COOK-1316] - default site should not always be enabled
|
||||
- [COOK-1417] - resolve errors preventing build from source
|
||||
- [COOK-1483] - source prefix attribute has no effect
|
||||
- [COOK-1484] - source relies on /etc/sysconfig
|
||||
- [COOK-1511] - add support for naxsi module
|
||||
- [COOK-1525] - nginx source is downloaded every time
|
||||
- [COOK-1526] - nginx_site does not remove sites
|
||||
- [COOK-1527] - add `http_echo_module` recipe
|
||||
|
||||
## v0.101.6
|
||||
|
||||
Erroneous cookbook upload due to timeout.
|
||||
|
||||
Version #'s are cheap.
|
||||
|
||||
## v0.101.4
|
||||
|
||||
- [COOK-1280] - Improve RHEL family support and fix ohai_plugins recipe bug
|
||||
- [COOK-1194] - allow installation method via attribute
|
||||
- [COOK-458] - fix duplicate nginx processes
|
||||
|
||||
## v0.101.2
|
||||
|
||||
- [COOK-1211] - include the default attributes explicitly so version is available.
|
||||
|
||||
## v0.101.0
|
||||
|
||||
**Attribute Change**: `node['nginx']['url']` -> `node['nginx']['source']['url']`; see the README.md.
|
||||
|
||||
- [COOK-1115] - daemonize when using init script
|
||||
- [COOK-477] - module compilation support in nginx::source
|
||||
|
||||
## v0.100.4
|
||||
|
||||
- [COOK-1126] - source version bump to 1.0.14
|
||||
|
||||
## v0.100.2
|
||||
|
||||
- [COOK-1053] - Add :url attribute to nginx cookbook
|
||||
|
||||
## v0.100.0
|
||||
|
||||
- [COOK-818] - add "application/json" per RFC.
|
||||
- [COOK-870] - bluepill init style support
|
||||
- [COOK-957] - Compress application/javascript.
|
||||
- [COOK-981] - Add reload support to NGINX service
|
||||
|
||||
## v0.99.2
|
||||
|
||||
- [COOK-809] - attribute to disable access logging
|
||||
- [COOK-772] - update nginx download source location
|
||||
|
||||
<!-- - The following link definition list is generated by PimpMyChangelog - -->
|
||||
|
||||
[#174]: https://github.com/miketheman/nginx/issues/174
|
||||
[#183]: https://github.com/miketheman/nginx/issues/183
|
||||
[#184]: https://github.com/miketheman/nginx/issues/184
|
||||
[#188]: https://github.com/miketheman/nginx/issues/188
|
||||
[#200]: https://github.com/miketheman/nginx/issues/200
|
||||
[#204]: https://github.com/miketheman/nginx/issues/204
|
||||
[#205]: https://github.com/miketheman/nginx/issues/205
|
||||
[#219]: https://github.com/miketheman/nginx/issues/219
|
||||
[#220]: https://github.com/miketheman/nginx/issues/220
|
||||
[#223]: https://github.com/miketheman/nginx/issues/223
|
||||
[#225]: https://github.com/miketheman/nginx/issues/225
|
||||
[#230]: https://github.com/miketheman/nginx/issues/230
|
||||
[#236]: https://github.com/miketheman/nginx/issues/236
|
||||
[#240]: https://github.com/miketheman/nginx/issues/240
|
||||
[#243]: https://github.com/miketheman/nginx/issues/243
|
||||
[#249]: https://github.com/miketheman/nginx/issues/249
|
||||
[#252]: https://github.com/miketheman/nginx/issues/252
|
||||
[#254]: https://github.com/miketheman/nginx/issues/254
|
||||
[#259]: https://github.com/miketheman/nginx/issues/259
|
||||
[#269]: https://github.com/miketheman/nginx/issues/269
|
||||
[#279]: https://github.com/miketheman/nginx/issues/279
|
||||
[#294]: https://github.com/miketheman/nginx/issues/294
|
||||
[#298]: https://github.com/miketheman/nginx/issues/298
|
||||
[#302]: https://github.com/miketheman/nginx/issues/302
|
||||
[#305]: https://github.com/miketheman/nginx/issues/305
|
||||
[#310]: https://github.com/miketheman/nginx/issues/310
|
||||
[#312]: https://github.com/miketheman/nginx/issues/312
|
||||
[#314]: https://github.com/miketheman/nginx/issues/314
|
||||
[#318]: https://github.com/miketheman/nginx/issues/318
|
||||
[#321]: https://github.com/miketheman/nginx/issues/321
|
||||
[#325]: https://github.com/miketheman/nginx/issues/325
|
||||
[#326]: https://github.com/miketheman/nginx/issues/326
|
||||
[#327]: https://github.com/miketheman/nginx/issues/327
|
||||
[#331]: https://github.com/miketheman/nginx/issues/331
|
||||
[#332]: https://github.com/miketheman/nginx/issues/332
|
||||
[#335]: https://github.com/miketheman/nginx/issues/335
|
||||
[#338]: https://github.com/miketheman/nginx/issues/338
|
||||
[@9minutesnooze]: https://github.com/9minutesnooze
|
||||
[@adepue]: https://github.com/adepue
|
||||
[@auth0]: https://github.com/auth0
|
||||
[@bchrobot]: https://github.com/bchrobot
|
||||
[@bkw]: https://github.com/bkw
|
||||
[@canofspam3bug324]: https://github.com/CanOfSpam3bug324
|
||||
[@dwradcliffe]: https://github.com/dwradcliffe
|
||||
[@evertrue]: https://github.com/evertrue
|
||||
[@ffuenf]: https://github.com/ffuenf
|
||||
[@firmhouse]: https://github.com/firmhouse
|
||||
[@gkra]: https://github.com/gkra
|
||||
[@gregkare]: https://github.com/gregkare
|
||||
[@irontoby]: https://github.com/irontoby
|
||||
[@jalberto]: https://github.com/jalberto
|
||||
[@jcoleman]: https://github.com/jcoleman
|
||||
[@jenssegers]: https://github.com/jenssegers
|
||||
[@josh-padnick]: https://github.com/josh-padnick
|
||||
[@jujugrrr]: https://github.com/jujugrrr
|
||||
[@karsten-bruckmann]: https://github.com/karsten-bruckmann
|
||||
[@larkin]: https://github.com/larkin
|
||||
[@miketheman]: https://github.com/miketheman
|
||||
[@monsterstrike]: https://github.com/monsterstrike
|
||||
[@morr]: https://github.com/morr
|
||||
[@mytho]: https://github.com/Mytho
|
||||
[@n1koo]: https://github.com/n1koo
|
||||
[@nkadel-skyhook]: https://github.com/nkadel-skyhook
|
||||
[@runningman84]: https://github.com/runningman84
|
||||
[@shtouff]: https://github.com/shtouff
|
||||
[@stevenolen]: https://github.com/stevenolen
|
||||
[@thomasmeeus]: https://github.com/thomasmeeus
|
||||
[@thommay]: https://github.com/thommay
|
||||
[@tvdinner]: https://github.com/tvdinner
|
||||
[@usertesting]: https://github.com/usertesting
|
||||
[@whatcould]: https://github.com/whatcould
|
||||
[@yveslaroche]: https://github.com/yveslaroche
|
@ -1,13 +1,10 @@
|
||||
<!-- This is a generated file. Please do not edit directly -->
|
||||
|
||||
# Maintainers
|
||||
This file lists how this cookbook project is maintained. When making changes to the system, this
|
||||
file tells you who needs to review your patch - you need a simple majority of maintainers
|
||||
for the relevant subsystems to provide a :+1: on your pull request. Additionally, you need
|
||||
to not receive a veto from a Lieutenant or the Project Lead.
|
||||
|
||||
Check out [How Cookbooks are Maintained](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD)
|
||||
for details on the process and how to become a maintainer or the project lead.
|
||||
This file lists how this cookbook project is maintained. When making changes to the system, this file tells you who needs to review your patch - you need a review from an existing maintainer for the cookbook to provide a :+1: on your pull request. Additionally, you need to not receive a veto from a Lieutenant or the Project Lead.
|
||||
|
||||
Check out [How Cookbooks are Maintained](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD) for details on the process and how to become a maintainer or the project lead.
|
||||
|
||||
# Project Maintainer
|
||||
* [Tim Smith](https://github.com/tas50)
|
367
cookbooks/chef_nginx/README.md
Normal file
367
cookbooks/chef_nginx/README.md
Normal file
@ -0,0 +1,367 @@
|
||||
# nginx Cookbook
|
||||
|
||||
[](https://supermarket.chef.io/cookbooks/chef_nginx) [](https://travis-ci.org/chef-cookbooks/chef_nginx)
|
||||
|
||||
Installs nginx from package OR source code and sets up configuration handling similar to Debian's Apache2 scripts.
|
||||
|
||||
## nginx vs. chef_nginx
|
||||
|
||||
This cookbook is a fork from the 2.7.x branch of the [community nginx cookbook](https://github.com/miketheman/nginx).
|
||||
|
||||
This fork will be actively supported by Chef Software and we will continue to migrate the cookbook to a more resource driven model, with incremental changes following the SemVer model.
|
||||
|
||||
## Requirements
|
||||
|
||||
### Cookbooks
|
||||
|
||||
The following cookbooks are direct dependencies because they're used for common "default" functionality.
|
||||
|
||||
- `build-essential` for source installations
|
||||
- `ohai` for setting up the ohai plugin
|
||||
- `compat_resource` for setting up the nginx.org repository on Chef 12.1 - 12.13
|
||||
- `yum-epel` for setting up the EPEL repository on RHEL platforms
|
||||
- `zypper` for setting up the nginx.org repository on Suse platforms
|
||||
|
||||
### Platforms
|
||||
|
||||
The following platforms are supported and tested with Test Kitchen:
|
||||
|
||||
- Ubuntu 12.04+
|
||||
- CentOS 5+
|
||||
- Debian 7+
|
||||
- openSUSE 13.2+
|
||||
- FreeBSD 9+
|
||||
|
||||
Other Debian and RHEL family distributions are assumed to work.
|
||||
|
||||
### Chef
|
||||
|
||||
- Chef 12.1+
|
||||
|
||||
## Attributes
|
||||
|
||||
Node attributes for this cookbook are logically separated into different files. Some attributes are set only via a specific recipe.
|
||||
|
||||
### chef_nginx::auth_request
|
||||
|
||||
These attributes are used in the `chef_nginx::auth_request` recipe.
|
||||
|
||||
- `node['nginx']['auth_request']['url']` - The url to the auth_request module tar.gz file
|
||||
- `node['nginx']['auth_request']['checksum']` - The checksum of the auth_request module tar.gz file
|
||||
|
||||
### chef_nginx::default
|
||||
|
||||
Generally used attributes. Some have platform specific values. See `attributes/default.rb`. "The Config" refers to "nginx.conf" the main config file.
|
||||
|
||||
- `node['nginx']['dir']` - Location for nginx configuration.
|
||||
- `node['nginx']['conf_template']` - The `source` template to use when creating the `nginx.conf`.
|
||||
- `node['nginx']['conf_cookbook']` - The cookbook where `node['nginx']['conf_template']` resides.
|
||||
- `node['nginx']['log_dir']` - Location for nginx logs.
|
||||
- `node['nginx']['log_dir_perm']` - Permissions for nginx logs folder.
|
||||
- `node['nginx']['user']` - User that nginx will run as.
|
||||
- `node['nginx']['group']` - Group for nginx.
|
||||
- `node['nginx']['port']` - Port for nginx to listen on.
|
||||
- `node['nginx']['binary']` - Path to the nginx binary.
|
||||
- `node['nginx']['init_style']` - How to run nginx as a service when using `chef_nginx::source`. Values can be "upstart", "systemd", or "init". This attribute is not used in the `package` recipe because the package manager's init script style for the platform is assumed.
|
||||
- `node['nginx']['upstart']['foreground']` - Set this to true if you want upstart to run nginx in the foreground, set to false if you want upstart to detach and track the process via pid.
|
||||
- `node['nginx']['upstart']['runlevels']` - String of runlevels in the format '2345' which determines which runlevels nginx will start at when entering and stop at when leaving.
|
||||
- `node['nginx']['upstart']['respawn_limit']` - Respawn limit in upstart stanza format, count followed by space followed by interval in seconds.
|
||||
- `node['nginx']['keepalive']` - Whether to use `keepalive_timeout`, any value besides "on" will leave that option out of the config.
|
||||
- `node['nginx']['keepalive_requests']` - used for config value of `keepalive_requests`.
|
||||
- `node['nginx']['keepalive_timeout']` - used for config value of `keepalive_timeout`.
|
||||
- `node['nginx']['worker_processes']` - used for config value of `worker_processes`.
|
||||
- `node['nginx']['worker_connections']` - used for config value of `events { worker_connections }`
|
||||
- `node['nginx']['worker_rlimit_nofile']` - used for config value of `worker_rlimit_nofile`. Can replace any "ulimit -n" command. The value depend on your usage (cache or not) but must always be superior than worker_connections.
|
||||
- `node['nginx']['worker_shutdown_timeout']` - used for config value of `worker_shutdown_timeout`.
|
||||
- `node['nginx']['worker_connections']` - used for config value of `events { worker_connections }`
|
||||
- `node['nginx']['multi_accept']` - used for config value of `events { multi_accept }`. Try to accept() as many connections as possible. Disable by default.
|
||||
- `node['nginx']['event']` - used for config value of `events { use }`. Set the event-model. By default nginx looks for the most suitable method for your OS.
|
||||
- `node['nginx']['accept_mutex_delay']` - used for config value of `accept_mutex_delay`
|
||||
- `node['nginx']['server_tokens']` - used for config value of `server_tokens`.
|
||||
- `node['nginx']['server_names_hash_bucket_size']` - used for config value of `server_names_hash_bucket_size`.
|
||||
- `node['nginx']['disable_access_log']` - set to true to disable the general access log, may be useful on high traffic sites.
|
||||
- `node['nginx']['access_log_options']` - Set to a string of additional options to be appended to the access log directive
|
||||
- `node['nginx']['error_log_options']` - Set to a string of additional options to be appended to the error log directive
|
||||
- `node['nginx']['default_site_enabled']` - enable the default site
|
||||
- `node['nginx']['sendfile']` - Whether to use `sendfile`. Defaults to "on".
|
||||
- `node['nginx']['tcp_nopush']` - Whether to use `tcp_nopush`. Defaults to "on".
|
||||
- `node['nginx']['tcp_nodelay']` - Whether to use `tcp_nodelay`. Defaults to "on".
|
||||
- `node['nginx']['install_method']` - Whether nginx is installed from packages or from source.
|
||||
- `node['nginx']['types_hash_max_size']` - Used for the `types_hash_max_size` configuration directive.
|
||||
- `node['nginx']['types_hash_bucket_size']` - Used for the `types_hash_bucket_size` configuration directive.
|
||||
- `node['nginx']['proxy_read_timeout']` - defines a timeout (between two successive read operations) for reading a response from the proxied server.
|
||||
- `node['nginx']['client_body_buffer_size']` - used for config value of `client_body_buffer_size`.
|
||||
- `node['nginx']['client_max_body_size']` - specifies the maximum accepted body size of a client request, as indicated by the request header Content-Length.
|
||||
- `node['nginx']['repo_source']` - when installed from a package this attribute affects which yum repositories, if any, will be added before installing the nginx package. The default value of 'epel' will use the `yum-epel` cookbook, 'nginx' will use the `chef_nginx::repo` recipe, 'passenger' will use the 'chef_nginx::repo_passenger' recipe, and setting no value will not add any additional repositories.
|
||||
- `node['nginx']['sts_max_age']` - Enable Strict Transport Security for all apps (See: <http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security>). This attribute adds the following header: Strict-Transport-Security max-age=SECONDS to all incoming requests and takes an integer (in seconds) as its argument.
|
||||
- `node['nginx']['default']['modules']` - Array specifying which modules to enable via the conf-enabled config include function. Currently the only valid value is "socketproxy".
|
||||
- `node['nginx']['load_modules']` - Array of paths to modules to dynamically load on nginx startup using the `load_module` directive. Default is `[]`.
|
||||
|
||||
#### authorized_ips module
|
||||
|
||||
- `node['nginx']['remote_ip_var']` - The remote ip variable name to use.
|
||||
- `node['nginx']['authorized_ips']` - IPs authorized by the module
|
||||
|
||||
#### gzip module
|
||||
|
||||
- `node['nginx']['gzip']` - Whether to use gzip, can be "on" or "off"
|
||||
- `node['nginx']['gzip_http_version']` - used for config value of `gzip_http_version`.
|
||||
- `node['nginx']['gzip_comp_level']` - used for config value of `gzip_comp_level`.
|
||||
- `node['nginx']['gzip_proxied']` - used for config value of `gzip_proxied`.
|
||||
- `node['nginx']['gzip_vary']` - used for config value of `gzip_vary`.
|
||||
- `node['nginx']['gzip_buffers']` - used for config value of `gzip_buffers`.
|
||||
- `node['nginx']['gzip_types']` - used for config value of `gzip_types` - must be an Array.
|
||||
- `node['nginx']['gzip_min_length']` - used for config value of `gzip_min_length`.
|
||||
- `node['nginx']['gzip_disable']` - used for config value of `gzip_disable`.
|
||||
- `node['nginx']['gzip_static']` - used for config value of `gzip_static` (`http_gzip_static_module` must be enabled)
|
||||
|
||||
#### Other configurations
|
||||
|
||||
- `node['nginx']['extra_configs']` - a Hash of key/values to nginx configuration.
|
||||
|
||||
### chef_nginx::echo
|
||||
|
||||
These attributes are used in the `chef_nginx::http_echo_module` recipe.
|
||||
|
||||
- `node['nginx']['echo']['version']` - The version of `http_echo` you want (default: 0.59)
|
||||
- `node['nginx']['echo']['url']` - URL for the tarball.
|
||||
- `node['nginx']['echo']['checksum']` - Checksum of the tarball.
|
||||
|
||||
### chef_nginx::devel
|
||||
|
||||
These attributes are used in the `chef_nginx::ngx_devel_module` recipe.
|
||||
|
||||
- `node['nginx']['devel']['version']` - The version of the nginx devel module
|
||||
- `node['nginx']['devel']['url']` - The URL of the nginx devel module tar.gz file
|
||||
- `node['nginx']['devel']['checksum']` - The checksum of the nginx devel module tar.gz file
|
||||
|
||||
### chef_nginx::geoip
|
||||
|
||||
These attributes are used in the `chef_nginx::http_geoip_module` recipe. Please note that the `country_dat_checksum` and `city_dat_checksum` are based on downloads from a datacenter in Fremont, CA, USA. You really should override these with checksums for the geo tarballs from your node location.
|
||||
|
||||
**Note** The upstream, maxmind.com, may block access for repeated downloads of the data files. It is recommended that you download and host the data files, and change the URLs in the attributes.
|
||||
|
||||
- `node['nginx']['geoip']['path']` - Location where to install the geoip libraries.
|
||||
- `node['nginx']['geoip']['enable_city']` - Whether to enable City data
|
||||
- `node['nginx']['geoip']['country_dat_url']` - Country data tarball URL
|
||||
- `node['nginx']['geoip']['country_dat_checksum']` - Country data tarball checksum
|
||||
- `node['nginx']['geoip']['city_dat_url']` - City data tarball URL
|
||||
- `node['nginx']['geoip']['city_dat_checksum']` - City data tarball checksum
|
||||
- `node['nginx']['geoip']['lib_version']` - Version of the GeoIP library to install
|
||||
- `node['nginx']['geoip']['lib_url']` - (Versioned) Tarball URL of the GeoIP library
|
||||
- `node['nginx']['geoip']['lib_checksum']` - Checksum of the GeoIP library tarball
|
||||
|
||||
### chef_nginx::http_realip_module
|
||||
|
||||
From: <http://nginx.org/en/docs/http/ngx_http_realip_module.html>
|
||||
|
||||
- `node['nginx']['realip']['header']` - Header to use for the RealIp Module; only accepts "X-Forwarded-For" or "X-Real-IP"
|
||||
- `node['nginx']['realip']['addresses']` - Addresses to use for the `http_realip` configuration.
|
||||
- `node['nginx']['realip']['real_ip_recursive']` - If recursive search is enabled, the original client address that matches one of the trusted addresses is replaced by the last non-trusted address sent in the request header field. Can be on "on" or "off" (default).
|
||||
|
||||
### chef_nginx::passenger
|
||||
|
||||
These attributes are used in the `chef_nginx::passenger` recipe.
|
||||
|
||||
- `node['nginx']['passenger']['version']` - passenger gem version
|
||||
- `node['nginx']['passenger']['root']` - passenger gem root path
|
||||
- `node['nginx']['passenger']['install_rake']` - set to false if rake already present on system
|
||||
- `node['nginx']['passenger']['max_pool_size']` - maximum passenger pool size (default=10)
|
||||
- `node['nginx']['passenger']['ruby']` - Ruby path for Passenger to use (default=`$(which ruby)`)
|
||||
- `node['nginx']['passenger']['spawn_method']` - passenger spawn method to use (default=`smart-lv2`)
|
||||
- `node['nginx']['passenger']['buffer_response']` - turns on or off response buffering (default=`on`)
|
||||
- `node['nginx']['passenger']['max_pool_size']` - passenger maximum pool size (default=`6`)
|
||||
- `node['nginx']['passenger']['min_instances']` - minimum instances (default=`1`)
|
||||
- `node['nginx']['passenger']['max_instances_per_app']` - maximum instances per app (default=`0`)
|
||||
- `node['nginx']['passenger']['pool_idle_time']` - passenger pool idle time (default=`300`)
|
||||
- `node['nginx']['passenger']['max_requests']` - maximum requests (default=`0`)
|
||||
- `node['nginx']['passenger']['nodejs']` - Nodejs path for Passenger to use (default=nil)
|
||||
- `node['nginx']['passenger']['show_version_in_header']` - Show passenger version in HTTP headers (default=`on`)
|
||||
|
||||
Basic configuration to use the official Phusion Passenger repositories:
|
||||
|
||||
- `node['nginx']['repo_source']` - 'passenger'
|
||||
- `node['nginx']['package_name']` - 'nginx-extras'
|
||||
- `node['nginx']['passenger']['install_method']` - 'package'
|
||||
|
||||
### chef_nginx::openssl_source
|
||||
|
||||
These attributes are used in the `chef_nginx::openssl_source` recipe.
|
||||
|
||||
- `node['nginx']['openssl_source']['version']` - The version of OpenSSL you want to download and use (default: 1.0.1t)
|
||||
- `node['nginx']['openssl_source']['url']` - The url for the OpenSSL source
|
||||
|
||||
### chef_nginx::rate_limiting
|
||||
|
||||
- `node['nginx']['enable_rate_limiting']` - set to true to enable rate limiting (`limit_req_zone` in nginx.conf)
|
||||
- `node['nginx']['rate_limiting_zone_name']` - sets the zone in `limit_req_zone`.
|
||||
- `node['nginx']['rate_limiting_backoff']` - sets the backoff time for `limit_req_zone`.
|
||||
- `node['nginx']['rate_limit']` - set the rate limit amount for `limit_req_zone`.
|
||||
|
||||
### chef_nginx::socketproxy
|
||||
|
||||
These attributes are used in the `chef_nginx::socketproxy` recipe.
|
||||
|
||||
- `node['nginx']['socketproxy']['root']` - The directory (on your server) where socketproxy apps are deployed.
|
||||
- `node['nginx']['socketproxy']['default_app']` - Static assets directory for requests to "/" that don't meet any proxy_pass filter requirements.
|
||||
- `node['nginx']['socketproxy']['apps']['app_name']['prepend_slash']` - Prepend a slash to requests to app "app_name" before sending them to the socketproxy socket.
|
||||
- `node['nginx']['socketproxy']['apps']['app_name']['context_name']` - URI (e.g. "app_name" in order to achieve "<http://mydomain.com/app_name>") at which to host the application "app_name"
|
||||
- `node['nginx']['socketproxy']['apps']['app_name']['subdir']` - Directory (under `node['nginx']['socketproxy']['root']`) in which to find the application.
|
||||
|
||||
### chef_nginx::source
|
||||
|
||||
These attributes are used in the `chef_nginx::source` recipe. Some of them are dynamically modified during the run. See `attributes/source.rb` for default values.
|
||||
|
||||
- `node['nginx']['source']['url']` - (versioned) URL for the nginx source code. By default this will use the version specified as `node['nginx']['version']`.
|
||||
- `node['nginx']['source']['prefix']` - (versioned) prefix for installing nginx from source
|
||||
- `node['nginx']['source']['conf_path']` - location of the main config file, in `node['nginx']['dir']` by default.
|
||||
- `node['nginx']['source']['modules']` - Array of modules that should be compiled into nginx by including their recipes in `chef_nginx::source`.
|
||||
- `node['nginx']['source']['default_configure_flags']` - The default flags passed to the configure script when building nginx.
|
||||
- `node['nginx']['configure_flags']` - Preserved for compatibility and dynamically generated from the `node['nginx']['source']['default_configure_flags']` in the `chef_nginx::source` recipe.
|
||||
- `node['nginx']['source']['use_existing_user']` - set to `true` if you do not want `chef_nginx::source` recipe to create system user with name `node['nginx']['user']`.
|
||||
|
||||
### chef_nginx::status
|
||||
|
||||
These attributes are used in the `chef_nginx::http_stub_status_module` recipe.
|
||||
|
||||
- `node['nginx']['status']['port']` - The port on which nginx will serve the status info (default: 8090)
|
||||
|
||||
### chef_nginx::syslog
|
||||
|
||||
These attributes are used in the `chef_nginx::syslog_module` recipe.
|
||||
|
||||
- `node['nginx']['syslog']['git_repo']` - The git repository url to use for the syslog patches.
|
||||
- `node['nginx']['syslog']['git_revision']` - The revision on the git repository to checkout.
|
||||
|
||||
### chef_nginx::upload_progress
|
||||
|
||||
These attributes are used in the `chef_nginx::upload_progress_module` recipe.
|
||||
|
||||
- `node['nginx']['upload_progress']['url']` - URL for the tarball.
|
||||
- `node['nginx']['upload_progress']['checksum']` - Checksum of the tarball.
|
||||
- `node['nginx']['upload_progress']['javascript_output']` - Output in javascript. Default is `true` for backwards compatibility.
|
||||
- `node['nginx']['upload_progress']['zone_name']` - Zone name which will be used to store the per-connection tracking information. Default is `proxied`.
|
||||
- `node['nginx']['upload_progress']['zone_size']` - Zone size in bytes. Default is `1m` (1 megabyte).
|
||||
|
||||
## Resources
|
||||
|
||||
### nginx_site
|
||||
|
||||
Enable or disable a Server Block in `#{node['nginx']['dir']}/sites-available` by calling nxensite or nxdissite (introduced by this cookbook) to manage the symbolic link in `#{node['nginx']['dir']}/sites-enabled`.
|
||||
|
||||
### Actions
|
||||
|
||||
- `enable` - Enable the nginx site (default)
|
||||
- `disable` - Disable the nginx site
|
||||
|
||||
### Properties:
|
||||
|
||||
- `name` - (optional) Name of the site to enable. By default it's assumed that the name of the nginx_site resource is the site name, but this allows overriding that.
|
||||
- `template` - (optional) Path to the source for the `template` resource.
|
||||
- `variables` - (optional) Variables to be used with the `template` resource
|
||||
|
||||
## Ohai Plugin
|
||||
|
||||
The `ohai_plugin` recipe includes an Ohai plugin. It will be automatically installed and activated, providing the following attributes via ohai, no matter how nginx is installed (source or package):
|
||||
|
||||
- `node['nginx']['version']` - version of nginx
|
||||
- `node['nginx']['configure_arguments']` - options passed to `./configure` when nginx was built
|
||||
- `node['nginx']['prefix']` - installation prefix
|
||||
- `node['nginx']['conf_path']` - configuration file path
|
||||
|
||||
In the source recipe, it is used to determine whether control attributes for building nginx have changed.
|
||||
|
||||
## Usage
|
||||
|
||||
This cookbook provides three distinct installation methods, all of which are controlled via attributes and executed using the chef_nginx::default recipe.
|
||||
|
||||
### Package installation using the nginx.org repositories
|
||||
|
||||
Nginx provides repositories for RHEL, Debian/Ubuntu, and Suse platforms with up to date packages available on older distributions. Due to the age of many nginx packages shipping with distros we believe this is the ideal installation method. With no attributes set the nginx.org repositories will be added to your system and nginx will be installed via package. This provides a solid out of the box install for most users.
|
||||
|
||||
### Package installation using distro repositories
|
||||
|
||||
If you prefer to use the packages included in your distro or to roll your own packages you'll want to set `node['nginx']['repo_source']` to `nil` or `distro` to skip the repository setup. The default recipe will still install nginx from packages, but you'll retain control over the package location.
|
||||
|
||||
### Source installation to compile non-dynamic modules
|
||||
|
||||
If you need control over how nginx is built, or you need non-dynamic modules to be included you'll need to compile nginx from source. We highly recommend against using this method as it requires the installation of a full compilation toolchain and development dependencies on your nodes. Creating your own packages with nginx compiled as necessary is a preferred option. If that's not possible you can set `node['nginx']['install_method']` to `source` and provide a version in `node['nginx']['version']`.
|
||||
|
||||
#### Specifying Modules to compile
|
||||
|
||||
The following recipes are used to build module support into nginx. To compile a module, add its recipe name to the array attribute `node['nginx']['source']['modules']`.
|
||||
|
||||
- `ipv6.rb` - enables IPv6 support
|
||||
- `headers_more_module` -
|
||||
- `http_auth_request_module``
|
||||
- `http_echo_module.rb` - downloads the `http_echo_module` module and enables it as a module when compiling nginx.
|
||||
- `http_geoip_module.rb` - installs the GeoIP libraries and data files and enables the module for compilation.
|
||||
- `http_gzip_static_module.rb` - enables the module for compilation. Be sure to set `node['nginx']['gzip_static'] = 'yes'`.
|
||||
- `http_mp4_module` -
|
||||
- `http_perl_module.rb` - enables embedded Perl for compilation.
|
||||
- `http_realip_module.rb` - enables the module for compilation and creates the configuration.
|
||||
- `http_spdy_module` -
|
||||
- `http_ssl_module.rb` - enables SSL for compilation.
|
||||
- `http_stub_status_module.rb` - provides `nginx_status` configuration and enables the module for compilation.
|
||||
- `http_v2_module`
|
||||
- `ipv6` -
|
||||
- `naxsi_module` - enables the naxsi module for the web application firewall for nginx.
|
||||
- `ngx_devel_module` -
|
||||
- `ngx_lua_module` -
|
||||
- `openssl_source.rb` - downloads and uses custom OpenSSL source when compiling nginx
|
||||
- `pagespeed_module`-
|
||||
- `passenger` - builds the passenger gem and configuration for "`mod_passenger`".
|
||||
- `set_misc` -
|
||||
- `syslog_module` - enables syslog support for nginx. This only works with source builds. See <https://github.com/yaoweibin/nginx_syslog_patch> -
|
||||
- `upload_progress_module.rb` - builds the `upload_progress` module and enables it as a module when compiling nginx.
|
||||
|
||||
## Resources
|
||||
|
||||
### nginx_site
|
||||
|
||||
Enable or disable a Server Block in `#{node['nginx']['dir']}/sites-available` by calling nxensite or nxdissite (introduced by this cookbook) to manage the symbolic link in `#{node['nginx']['dir']}/sites-enabled`.
|
||||
|
||||
### Actions
|
||||
|
||||
- `enable` - Enable the nginx site (default)
|
||||
- `disable` - Disable the nginx site
|
||||
|
||||
### Properties:
|
||||
|
||||
- `name` - (optional) Name of the site to enable. By default it's assumed that the name of the nginx_site resource is the site name, but this allows overriding that.
|
||||
- `template` - (optional) Path to the source for the `template` resource.
|
||||
- `cookbook` - (optional) The cookbook that contains the template source.
|
||||
- `variables` - (optional) Variables to be used with the `template` resource
|
||||
|
||||
## Adding New Modules
|
||||
|
||||
Previously we'd add each possible module to this cookbook itself. That's not necessary using wrapper cookbooks and we'd prefer to not add any addition module recipes at this time. Instead in your nginx wrapper cookbook setup any necessary packages and then include the follow code to add the module to the list of modules to compile:
|
||||
|
||||
```ruby
|
||||
node.run_state['nginx_configure_flags'] =
|
||||
node.run_state['nginx_configure_flags'] | ['--with-SOMETHING', "--with-SOME_OPT='things'"]
|
||||
```
|
||||
|
||||
## License & Authors
|
||||
|
||||
- Author:: Joshua Timberman ([joshua@chef.io](mailto:joshua@chef.io))
|
||||
- Author:: Adam Jacob ([adam@chef.io](mailto:adam@chef.io))
|
||||
- Author:: AJ Christensen ([aj@chef.io](mailto:aj@chef.io))
|
||||
- Author:: Jamie Winsor ([jamie@vialstudios.com](mailto:jamie@vialstudios.com))
|
||||
- Author:: Mike Fiedler ([miketheman@gmail.com](mailto:miketheman@gmail.com))
|
||||
|
||||
```text
|
||||
Copyright 2008-2016, Chef Software, 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.
|
||||
```
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: auth_request
|
||||
#
|
||||
# Author:: David Radcliffe (<radcliffe.david@gmail.com>)
|
||||
#
|
||||
# Copyright 2013, David Radcliffe
|
||||
# Copyright:: 2013-2017, David Radcliffe
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,5 +19,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['auth_request']['url'] = 'http://mdounin.ru/hg/ngx_http_auth_request_module/archive/ee8ff54f9b66.tar.gz'
|
||||
default['nginx']['auth_request']['checksum'] = '7ab85e1c350c5a9c60ed1319c45fed144cc3c3e1'
|
||||
default['nginx']['auth_request']['url'] = 'http://mdounin.ru/hg/ngx_http_auth_request_module/archive/662785733552.tar.gz'
|
||||
default['nginx']['auth_request']['checksum'] = '2057bdefd2137a5000d9dbdbfca049d1ba7832ad2b9f8855a88ea5dfa70bd8c1'
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: default
|
||||
#
|
||||
# Author:: Adam Jacob (<adam@chef.io>)
|
||||
# Author:: Joshua Timberman (<joshua@chef.io>)
|
||||
#
|
||||
# Copyright 2009-2013, Chef Software, Inc.
|
||||
# Copyright:: 2009-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -21,9 +21,8 @@
|
||||
#
|
||||
|
||||
# In order to update the version, the checksum attribute must be changed too.
|
||||
# This attribute is in the source.rb file, though we recommend overriding
|
||||
# attributes by modifying a role, or the node itself.
|
||||
default['nginx']['version'] = '1.6.2'
|
||||
# This attribute is defined in the source.rb attribute file
|
||||
default['nginx']['version'] = '1.10.3'
|
||||
default['nginx']['package_name'] = 'nginx'
|
||||
default['nginx']['port'] = '80'
|
||||
default['nginx']['dir'] = '/etc/nginx'
|
||||
@ -34,22 +33,20 @@ default['nginx']['binary'] = '/usr/sbin/nginx'
|
||||
default['nginx']['default_root'] = '/var/www/nginx-default'
|
||||
default['nginx']['ulimit'] = '1024'
|
||||
|
||||
default['nginx']['pid'] = '/var/run/nginx.pid'
|
||||
# use the upstream nginx repo vs. distro packages
|
||||
# this enables the use of modern nginx releases
|
||||
# set this to nil to use the distro packages
|
||||
# this is ignored if install_method is set to source
|
||||
default['nginx']['repo_source'] = 'nginx'
|
||||
default['nginx']['install_method'] = 'package'
|
||||
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
default['nginx']['user'] = 'www-data'
|
||||
default['nginx']['init_style'] = 'runit'
|
||||
if platform == 'ubuntu' && platform_version == '14.04'
|
||||
default['nginx']['pid'] = '/run/nginx.pid'
|
||||
end
|
||||
when 'rhel', 'fedora'
|
||||
when 'rhel'
|
||||
default['nginx']['user'] = 'nginx'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
default['nginx']['repo_source'] = 'epel'
|
||||
when 'gentoo'
|
||||
when 'fedora'
|
||||
default['nginx']['user'] = 'nginx'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
when 'freebsd'
|
||||
default['nginx']['package_name'] = 'www/nginx'
|
||||
default['nginx']['user'] = 'www'
|
||||
@ -59,11 +56,9 @@ when 'freebsd'
|
||||
default['nginx']['default_root'] = '/usr/local/www/nginx-dist'
|
||||
when 'suse'
|
||||
default['nginx']['user'] = 'wwwrun'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
default['nginx']['group'] = 'www'
|
||||
else
|
||||
default['nginx']['user'] = 'www-data'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
end
|
||||
|
||||
default['nginx']['upstart']['runlevels'] = '2345'
|
||||
@ -87,6 +82,7 @@ default['nginx']['gzip_types'] = %w(
|
||||
application/xml
|
||||
application/rss+xml
|
||||
application/atom+xml
|
||||
image/svg+xml
|
||||
text/javascript
|
||||
application/javascript
|
||||
application/json
|
||||
@ -117,7 +113,6 @@ default['nginx']['access_log_options'] = nil
|
||||
default['nginx']['error_log_options'] = nil
|
||||
default['nginx']['disable_access_log'] = false
|
||||
default['nginx']['log_formats'] = {}
|
||||
default['nginx']['install_method'] = 'package'
|
||||
default['nginx']['default_site_enabled'] = true
|
||||
default['nginx']['types_hash_max_size'] = 2_048
|
||||
default['nginx']['types_hash_bucket_size'] = 64
|
||||
@ -129,3 +124,5 @@ default['nginx']['large_client_header_buffers'] = nil
|
||||
default['nginx']['default']['modules'] = []
|
||||
|
||||
default['nginx']['extra_configs'] = {}
|
||||
|
||||
default['nginx']['load_modules'] = []
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: devel
|
||||
#
|
||||
# Author:: Arthur Freyman (<afreyman@riotgames.com>)
|
||||
#
|
||||
# Copyright 2013, Riot Games
|
||||
# Copyright:: 2013-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,6 +19,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['devel']['version'] = '0.2.18'
|
||||
default['nginx']['devel']['version'] = '0.3.0'
|
||||
default['nginx']['devel']['url'] = "https://github.com/simpl/ngx_devel_kit/archive/v#{node['nginx']['devel']['version']}.tar.gz"
|
||||
default['nginx']['devel']['checksum'] = 'c9c9f0a1b068d38c6c45b15d9605f1b2344dbcd45abf0764cd8e2ba92d6a3d2c'
|
||||
default['nginx']['devel']['checksum'] = '88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: echo
|
||||
#
|
||||
# Author:: Danial Pearce (<github@tigris.id.au>)
|
||||
#
|
||||
# Copyright 2013, Danial Pearce
|
||||
# Copyright:: 2013-2017, Danial Pearce
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,6 +19,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['echo']['version'] = '0.57'
|
||||
default['nginx']['echo']['version'] = '0.59'
|
||||
default['nginx']['echo']['url'] = "https://github.com/openresty/echo-nginx-module/archive/v#{node['nginx']['echo']['version']}.tar.gz"
|
||||
default['nginx']['echo']['checksum'] = '8467237ca0fae74ca7a32fbd34fc6044df307098415d48068214c9c235695a07'
|
||||
default['nginx']['echo']['checksum'] = '9b319ad7836202883128d2b9c24ed818082541df57ef7f2065b7557085c603cd'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: geoip
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,13 +19,17 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# NOTE: The GeoIP database checksums are nil by default as these files change
|
||||
# continuously and are not versioned.
|
||||
# If you self host these files you should create a checksum and set these attributes
|
||||
|
||||
default['nginx']['geoip']['path'] = '/srv/geoip'
|
||||
default['nginx']['geoip']['enable_city'] = true
|
||||
default['nginx']['geoip']['country_dat_url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'
|
||||
default['nginx']['geoip']['country_dat_checksum'] = '79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07'
|
||||
default['nginx']['geoip']['country_dat_checksum'] = nil
|
||||
default['nginx']['geoip']['city_dat_url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
|
||||
default['nginx']['geoip']['city_dat_checksum'] = '8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7'
|
||||
default['nginx']['geoip']['lib_version'] = '1.6.3'
|
||||
default['nginx']['geoip']['city_dat_checksum'] = nil
|
||||
default['nginx']['geoip']['lib_version'] = '1.6.9'
|
||||
lib_version = node['nginx']['geoip']['lib_version'] # convenience variable for line length
|
||||
default['nginx']['geoip']['lib_url'] = "https://github.com/maxmind/geoip-api-c/releases/download/v#{lib_version}/GeoIP-#{lib_version}.tar.gz"
|
||||
default['nginx']['geoip']['lib_checksum'] = 'e483839a81a91c3c85df89ef409fc7b526c489e0355d537861cfd1ea9534a8f2'
|
||||
default['nginx']['geoip']['lib_checksum'] = '4b446491843de67c1af9b887da17a3e5939e0aeed4826923a5f4bf09d845096f'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: headers_more
|
||||
#
|
||||
# Author:: Lucas Jandrew (<ljandrew@riotgames.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,6 +19,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['headers_more']['version'] = '0.25'
|
||||
default['nginx']['headers_more']['version'] = '0.30'
|
||||
default['nginx']['headers_more']['source_url'] = "https://github.com/openresty/headers-more-nginx-module/archive/v#{node['nginx']['headers_more']['version']}.tar.gz"
|
||||
default['nginx']['headers_more']['source_checksum'] = '1473f96f59dcec9d83ce65d691559993c1f80da8c0a4c0c0a30dae9f969eeabf'
|
||||
default['nginx']['headers_more']['source_checksum'] = '2aad309a9313c21c7c06ee4e71a39c99d4d829e31c8b3e7d76f8c964ea8047f5'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: lua
|
||||
#
|
||||
# Author:: Arthur Freyman (<afreyman@riotgames.com>)
|
||||
#
|
||||
# Copyright 2013, Riot Games
|
||||
# Copyright:: 2013-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,10 +19,10 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['lua']['version'] = '0.8.7'
|
||||
default['nginx']['lua']['version'] = '0.10.7'
|
||||
default['nginx']['lua']['url'] = "https://github.com/chaoslawful/lua-nginx-module/archive/v#{node['nginx']['lua']['version']}.tar.gz"
|
||||
default['nginx']['lua']['checksum'] = '4b9be3c159b9c884a38e044e07aaf4d06bd2893977d0b0dae02c124d8e907f93'
|
||||
default['nginx']['lua']['checksum'] = 'c21c8937dcdd6fc2b6a955f929e3f4d1388610f47180e60126e6dcab06786f77'
|
||||
|
||||
default['nginx']['luajit']['version'] = '2.0.2'
|
||||
default['nginx']['luajit']['version'] = '2.0.4'
|
||||
default['nginx']['luajit']['url'] = "http://luajit.org/download/LuaJIT-#{node['nginx']['luajit']['version']}.tar.gz"
|
||||
default['nginx']['luajit']['checksum'] = 'c05202974a5890e777b181908ac237625b499aece026654d7cc33607e3f46c38'
|
||||
default['nginx']['luajit']['checksum'] = '620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: naxsi
|
||||
#
|
||||
# Author:: Artiom Lunev (<artiom.lunev@gmail.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Artiom Lunev
|
||||
# Copyright:: 2012-2017, Artiom Lunev
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,6 +19,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['naxsi']['version'] = '0.53-2'
|
||||
default['nginx']['naxsi']['version'] = '0.54'
|
||||
default['nginx']['naxsi']['url'] = "https://github.com/nbs-system/naxsi/archive/#{node['nginx']['naxsi']['version']}.tar.gz"
|
||||
default['nginx']['naxsi']['checksum'] = '3eadff1d91995beae41b92733ade28091c2075a24ae37058f4d6aa90b0f4b660'
|
||||
default['nginx']['naxsi']['checksum'] = '9cc2c09405bc71f78ef26a8b6d70afcea3fccbe8125df70cb0cfc480133daba5'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: openssl_source
|
||||
#
|
||||
# Author:: David Radcliffe (<radcliffe.david@gmail.com>)
|
||||
#
|
||||
# Copyright 2013, David Radcliffe
|
||||
# Copyright:: 2013-2017, David Radcliffe
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,5 +19,5 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['openssl_source']['version'] = '1.0.1h'
|
||||
default['nginx']['openssl_source']['version'] = '1.0.2k'
|
||||
default['nginx']['openssl_source']['url'] = "http://www.openssl.org/source/openssl-#{node['nginx']['openssl_source']['version']}.tar.gz"
|
@ -1,9 +1,9 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Recipe:: pagespeed_module
|
||||
#
|
||||
default['nginx']['pagespeed']['version'] = '1.8.31.4'
|
||||
default['nginx']['pagespeed']['version'] = '1.11.33.2'
|
||||
default['nginx']['pagespeed']['url'] = "https://github.com/pagespeed/ngx_pagespeed/archive/release-#{node['nginx']['pagespeed']['version']}-beta.tar.gz"
|
||||
default['nginx']['psol']['url'] = "https://dl.google.com/dl/page-speed/psol/#{node['nginx']['pagespeed']['version']}.tar.gz"
|
||||
default['nginx']['pagespeed']['packages']['rhel'] = %w(gcc-c++ pcre-dev pcre-devel zlib-devel make)
|
||||
default['nginx']['pagespeed']['packages']['debian'] = %w(build-essential zlib1g-dev libpcre3 libpcre3-dev)
|
||||
default['nginx']['pagespeed']['packages']['rhel'] = %w(pcre-devel zlib-devel)
|
||||
default['nginx']['pagespeed']['packages']['debian'] = %w(zlib1g-dev libpcre3 libpcre3-dev)
|
@ -1,11 +1,11 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attribute:: passenger
|
||||
#
|
||||
# Author:: Alex Dergachev (<alex@evolvingweb.ca>)
|
||||
#
|
||||
# Copyright 2013, Chef Software, Inc.
|
||||
# Copyright 2012, Susan Potter
|
||||
# Copyright:: 2013-2017, Chef Software, Inc.
|
||||
# Copyright:: 2012-2017, Susan Potter
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -36,10 +36,10 @@ else
|
||||
node.default['nginx']['passenger']['ruby'] = '/usr/bin/ruby'
|
||||
end
|
||||
|
||||
if platform_family?('rhel') && node['platform_version'].to_i >= 6
|
||||
node.default['nginx']['passenger']['packages']['rhel'] = %w(ruby-devel libcurl-devel)
|
||||
node.default['nginx']['passenger']['packages']['rhel'] = if platform_family?('rhel') && node['platform_version'].to_i >= 6
|
||||
%w(ruby-devel libcurl-devel)
|
||||
else
|
||||
node.default['nginx']['passenger']['packages']['rhel'] = %w(ruby-devel curl-devel)
|
||||
%w(ruby-devel curl-devel)
|
||||
end
|
||||
node.default['nginx']['passenger']['packages']['fedora'] = %w(ruby-devel libcurl-devel)
|
||||
node.default['nginx']['passenger']['packages']['debian'] = %w(ruby-dev libcurl4-gnutls-dev)
|
||||
@ -53,6 +53,9 @@ node.default['nginx']['passenger']['max_instances_per_app'] = 0
|
||||
node.default['nginx']['passenger']['pool_idle_time'] = 300
|
||||
node.default['nginx']['passenger']['max_requests'] = 0
|
||||
node.default['nginx']['passenger']['gem_binary'] = nil
|
||||
node.default['nginx']['passenger']['show_version_in_header'] = 'on'
|
||||
# By default, the Passenger log file is the global Nginx error log file. Set this attribute to write passenger log to another location.
|
||||
node.default['nginx']['passenger']['passenger_log_file'] = nil
|
||||
|
||||
# NodeJs disable by default
|
||||
node.default['nginx']['passenger']['nodejs'] = nil
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attribute:: rate_limiting
|
||||
#
|
||||
# Copyright 2013, Chef Software, Inc.
|
||||
# Copyright:: 2013-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Recipe:: repo
|
||||
#
|
||||
# Author:: Nick Rycar <nrycar@bluebox.net>
|
||||
#
|
||||
# Copyright 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -21,14 +21,14 @@
|
||||
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora'
|
||||
case node['platform']
|
||||
default['nginx']['upstream_repository'] = case node['platform']
|
||||
when 'centos'
|
||||
# See http://wiki.nginx.org/Install
|
||||
default['nginx']['upstream_repository'] = "http://nginx.org/packages/centos/#{node['platform_version'].to_i}/$basearch/"
|
||||
"http://nginx.org/packages/centos/#{node['platform_version'].to_i}/$basearch/"
|
||||
when 'amazon'
|
||||
default['nginx']['upstream_repository'] = 'http://nginx.org/packages/rhel/6/$basearch/'
|
||||
'http://nginx.org/packages/rhel/6/$basearch/'
|
||||
else
|
||||
default['nginx']['upstream_repository'] = "http://nginx.org/packages/rhel/#{node['platform_version'].to_i}/$basearch/"
|
||||
"http://nginx.org/packages/rhel/#{node['platform_version'].to_i}/$basearch/"
|
||||
end
|
||||
when 'debian'
|
||||
default['nginx']['upstream_repository'] = "http://nginx.org/packages/#{node['platform']}"
|
8
cookbooks/chef_nginx/attributes/set_misc.rb
Normal file
8
cookbooks/chef_nginx/attributes/set_misc.rb
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: set_misc
|
||||
#
|
||||
|
||||
default['nginx']['set_misc']['version'] = '0.30'
|
||||
default['nginx']['set_misc']['url'] = "https://github.com/agentzh/set-misc-nginx-module/archive/v#{node['nginx']['set_misc']['version']}.tar.gz"
|
||||
default['nginx']['set_misc']['checksum'] = '59920dd3f92c2be32627121605751b52eae32b5884be09f2e4c53fb2fae8aabc'
|
@ -1,3 +1,8 @@
|
||||
#
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: socketproxy.rb
|
||||
#
|
||||
|
||||
default['nginx']['socketproxy']['root'] = '/usr/share/nginx/apps'
|
||||
default['nginx']['socketproxy']['app_owner'] = 'root'
|
||||
default['nginx']['socketproxy']['logname'] = 'socketproxy'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: source
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,7 +19,14 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_attribute 'nginx::default'
|
||||
include_attribute 'chef_nginx::default'
|
||||
|
||||
default['nginx']['init_style'] = if node['platform'] == 'ubuntu' && node['platform_version'].to_f <= 14.04
|
||||
# init_package identifies 12.04/14.04 as init, but we should be using upstart here
|
||||
'upstart'
|
||||
else
|
||||
node['init_package']
|
||||
end
|
||||
|
||||
default['nginx']['source']['version'] = node['nginx']['version']
|
||||
default['nginx']['source']['prefix'] = "/opt/nginx-#{node['nginx']['source']['version']}"
|
||||
@ -34,9 +41,9 @@ default['nginx']['source']['default_configure_flags'] = %W(
|
||||
default['nginx']['configure_flags'] = []
|
||||
default['nginx']['source']['version'] = node['nginx']['version']
|
||||
default['nginx']['source']['url'] = "http://nginx.org/download/nginx-#{node['nginx']['source']['version']}.tar.gz"
|
||||
default['nginx']['source']['checksum'] = 'b5608c2959d3e7ad09b20fc8f9e5bd4bc87b3bc8ba5936a513c04ed8f1391a18'
|
||||
default['nginx']['source']['checksum'] = '75020f1364cac459cb733c4e1caed2d00376e40ea05588fb8793076a4c69dd90'
|
||||
default['nginx']['source']['modules'] = %w(
|
||||
nginx::http_ssl_module
|
||||
nginx::http_gzip_static_module
|
||||
chef_nginx::http_ssl_module
|
||||
chef_nginx::http_gzip_static_module
|
||||
)
|
||||
default['nginx']['source']['use_existing_user'] = false
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: status
|
||||
#
|
||||
# Author:: David Radcliffe (<radcliffe.david@gmail.com>)
|
||||
#
|
||||
# Copyright 2013, David Radcliffe
|
||||
# Copyright:: 2013-2017, David Radcliffe
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
@ -1,11 +1,10 @@
|
||||
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: syslog
|
||||
#
|
||||
# Author:: Bob Ziuchkovski (<bob@bz-technology.com>)
|
||||
#
|
||||
# Copyright 2014, UserTesting
|
||||
# Copyright:: 2014-2017, UserTesting
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: chef_nginx
|
||||
# Attributes:: upload_progress
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
134
cookbooks/chef_nginx/files/default/mime.types
Normal file
134
cookbooks/chef_nginx/files/default/mime.types
Normal file
@ -0,0 +1,134 @@
|
||||
types {
|
||||
|
||||
# Data interchange
|
||||
|
||||
application/atom+xml atom;
|
||||
application/json json map topojson;
|
||||
application/ld+json jsonld;
|
||||
application/rss+xml rss;
|
||||
application/vnd.geo+json geojson;
|
||||
application/xml rdf xml;
|
||||
|
||||
|
||||
# JavaScript
|
||||
|
||||
# Normalize to standard type.
|
||||
# https://tools.ietf.org/html/rfc4329#section-7.2
|
||||
application/javascript js;
|
||||
|
||||
|
||||
# Manifest files
|
||||
|
||||
application/manifest+json webmanifest;
|
||||
application/x-web-app-manifest+json webapp;
|
||||
text/cache-manifest appcache;
|
||||
text/cache.manifest manifest;
|
||||
|
||||
|
||||
# Media files
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mp4 aac f4a f4b m4a;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg oga ogg opus;
|
||||
audio/x-realaudio ra;
|
||||
audio/x-wav wav;
|
||||
image/bmp bmp;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
image/png png;
|
||||
image/svg+xml svg svgz;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/webp webp;
|
||||
image/x-jng jng;
|
||||
video/3gpp 3gp 3gpp;
|
||||
video/mp4 f4p f4v m4v mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/ogg ogv;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asf asx;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
|
||||
# Serving `.ico` image files with a different media type
|
||||
# prevents Internet Explorer from displaying then as images:
|
||||
# https://github.com/h5bp/html5-boilerplate/commit/37b5fec090d00f38de64b591bcddcb205aadf8ee
|
||||
|
||||
image/x-icon cur ico;
|
||||
|
||||
|
||||
# Microsoft Office
|
||||
|
||||
application/msword doc;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
|
||||
|
||||
|
||||
# Web fonts
|
||||
|
||||
application/font-woff woff;
|
||||
application/font-woff2 woff2;
|
||||
application/vnd.ms-fontobject eot;
|
||||
|
||||
# Browsers usually ignore the font media types and simply sniff
|
||||
# the bytes to figure out the font type.
|
||||
# https://mimesniff.spec.whatwg.org/#matching-a-font-type-pattern
|
||||
#
|
||||
# However, Blink and WebKit based browsers will show a warning
|
||||
# in the console if the following font types are served with any
|
||||
# other media types.
|
||||
|
||||
application/x-font-ttf ttc ttf;
|
||||
font/opentype otf;
|
||||
|
||||
# Other
|
||||
|
||||
application/java-archive ear jar war;
|
||||
application/mac-binhex40 hqx;
|
||||
application/octet-stream bin deb dll dmg exe img iso msi msm msp safariextz;
|
||||
application/pdf pdf;
|
||||
application/postscript ai eps ps;
|
||||
application/rtf rtf;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-bb-appworld bbaw;
|
||||
application/x-bittorrent torrent;
|
||||
application/x-chrome-extension crx;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-opera-extension oex;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot pdb prc;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert crt der pem;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xslt+xml xsl;
|
||||
application/zip zip;
|
||||
text/css css;
|
||||
text/html htm html shtml;
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vcard vcard vcf;
|
||||
text/vnd.rim.location.xloc xloc;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/vtt vtt;
|
||||
text/x-component htc;
|
||||
}
|
38
cookbooks/chef_nginx/libraries/helpers.rb
Normal file
38
cookbooks/chef_nginx/libraries/helpers.rb
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# Cookbook:: chef_nginx
|
||||
# Library:: helpers
|
||||
#
|
||||
# Author:: Tim Smith (<tsmith@chef.io>)
|
||||
#
|
||||
# Copyright:: 2016-2017, Chef Software, 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.
|
||||
#
|
||||
|
||||
# simple helper module for the nginx cookbook
|
||||
module NginxRecipeHelpers
|
||||
# pidfile is hard to determine on Debian systems.
|
||||
# Upstream packages and older distro releases use '/var/run/nginx.pid'
|
||||
# systemd based distros and Ubuntu 14.04 use '/run/nginx.pid' for their
|
||||
# packages
|
||||
def pidfile_location
|
||||
if (node['nginx']['repo_source'].nil? || node['nginx']['repo_source'] == 'distro') &&
|
||||
(node['init_package'] == 'systemd' || node['platform_version'].to_f == 14.04)
|
||||
'/run/nginx.pid'
|
||||
else
|
||||
'/var/run/nginx.pid'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Chef::Resource.send(:include, NginxRecipeHelpers)
|
@ -1,8 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: build-essential
|
||||
# Recipe:: rhel
|
||||
# Cookbook:: chef_nginx
|
||||
# Library:: matchers
|
||||
#
|
||||
# Copyright 2008-2016, Chef Software, Inc.
|
||||
# Author:: Tim Smith (<tsmith@chef.io>)
|
||||
#
|
||||
# Copyright:: 2016-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,21 +19,17 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
potentially_at_compile_time do
|
||||
package 'autoconf'
|
||||
package 'bison'
|
||||
package 'flex'
|
||||
package 'gcc'
|
||||
package 'gcc-c++'
|
||||
package 'kernel-devel'
|
||||
package 'make'
|
||||
package 'm4'
|
||||
package 'patch'
|
||||
package 'gettext-devel'
|
||||
if defined?(ChefSpec)
|
||||
#############
|
||||
# nginx_site
|
||||
#############
|
||||
ChefSpec.define_matcher :nginx_site
|
||||
|
||||
# Ensure GCC 4 is available on older pre-6 EL
|
||||
if node['platform_version'].to_i < 6
|
||||
package 'gcc44'
|
||||
package 'gcc44-c++'
|
||||
def enable_nginx_site(resource_name)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:nginx_site, :enable, resource_name)
|
||||
end
|
||||
|
||||
def disable_nginx_site(resource_name)
|
||||
ChefSpec::Matchers::ResourceMatcher.new(:nginx_site, :disable, resource_name)
|
||||
end
|
||||
end
|
1
cookbooks/chef_nginx/metadata.json
Normal file
1
cookbooks/chef_nginx/metadata.json
Normal file
File diff suppressed because one or more lines are too long
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: authorized_ips
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -25,8 +25,5 @@ node.default['nginx']['authorized_ips'] = ['127.0.0.1/32']
|
||||
template 'authorized_ip' do
|
||||
path "#{node['nginx']['dir']}/authorized_ip"
|
||||
source 'modules/authorized_ip.erb'
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
notifies :reload, 'service[nginx]', :delayed
|
||||
end
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: commons
|
||||
#
|
||||
# Author:: AJ Christensen <aj@junglist.gen.nz>
|
||||
#
|
||||
# Copyright 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,6 +19,6 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe 'nginx::commons_dir'
|
||||
include_recipe 'nginx::commons_script'
|
||||
include_recipe 'nginx::commons_conf'
|
||||
include_recipe 'chef_nginx::commons_dir'
|
||||
include_recipe 'chef_nginx::commons_script'
|
||||
include_recipe 'chef_nginx::commons_conf'
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: common/conf
|
||||
#
|
||||
# Author:: AJ Christensen <aj@junglist.gen.nz>
|
||||
#
|
||||
# Copyright 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -23,20 +23,15 @@ template 'nginx.conf' do
|
||||
path "#{node['nginx']['dir']}/nginx.conf"
|
||||
source node['nginx']['conf_template']
|
||||
cookbook node['nginx']['conf_cookbook']
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
notifies :reload, 'service[nginx]', :delayed
|
||||
variables(lazy { { pid_file: pidfile_location } })
|
||||
end
|
||||
|
||||
template "#{node['nginx']['dir']}/sites-available/default" do
|
||||
source 'default-site.erb'
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
notifies :reload, 'service[nginx]', :delayed
|
||||
end
|
||||
|
||||
nginx_site 'default' do
|
||||
enable node['nginx']['default_site_enabled']
|
||||
action node['nginx']['default_site_enabled'] ? :enable : :disable
|
||||
end
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: common/dir
|
||||
#
|
||||
# Author:: AJ Christensen <aj@junglist.gen.nz>
|
||||
#
|
||||
# Copyright 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -20,8 +20,6 @@
|
||||
#
|
||||
|
||||
directory node['nginx']['dir'] do
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0755'
|
||||
recursive true
|
||||
end
|
||||
@ -33,22 +31,19 @@ directory node['nginx']['log_dir'] do
|
||||
recursive true
|
||||
end
|
||||
|
||||
directory File.dirname(node['nginx']['pid']) do
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
directory 'pid file directory' do
|
||||
path lazy { File.dirname(pidfile_location) }
|
||||
mode '0755'
|
||||
recursive true
|
||||
end
|
||||
|
||||
%w(sites-available sites-enabled conf.d).each do |leaf|
|
||||
directory File.join(node['nginx']['dir'], leaf) do
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0755'
|
||||
end
|
||||
end
|
||||
|
||||
if !node['nginx']['default_site_enabled'] && (node['platform_family'] == 'rhel' || node['platform_family'] == 'fedora')
|
||||
if !node['nginx']['default_site_enabled'] && platform_family?('rhel', 'fedora')
|
||||
%w(default.conf example_ssl.conf).each do |config|
|
||||
file "/etc/nginx/conf.d/#{config}" do
|
||||
action :delete
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: common/script
|
||||
#
|
||||
# Author:: AJ Christensen <aj@junglist.gen.nz>
|
||||
#
|
||||
# Copyright 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -23,7 +23,5 @@
|
||||
template "#{node['nginx']['script_dir']}/#{nxscript}" do
|
||||
source "#{nxscript}.erb"
|
||||
mode '0755'
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
end
|
||||
end
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: default
|
||||
#
|
||||
# Author:: AJ Christensen <aj@junglist.gen.nz>
|
||||
#
|
||||
# Copyright 2008-2013, Chef Software, Inc.
|
||||
# Copyright:: 2008-2017, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -19,13 +19,8 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
include_recipe "nginx::#{node['nginx']['install_method']}"
|
||||
|
||||
service 'nginx' do
|
||||
supports :status => true, :restart => true, :reload => true
|
||||
action :start
|
||||
end
|
||||
include_recipe "chef_nginx::#{node['nginx']['install_method']}"
|
||||
|
||||
node['nginx']['default']['modules'].each do |ngx_module|
|
||||
include_recipe "nginx::#{ngx_module}"
|
||||
include_recipe "chef_nginx::#{ngx_module}"
|
||||
end
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: headers_more_module
|
||||
#
|
||||
# Author:: Lucas Jandrew (<ljandrew@riotgames.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -24,14 +24,9 @@ module_location = "#{Chef::Config['file_cache_path']}/headers_more/#{node['nginx
|
||||
remote_file tar_location do
|
||||
source node['nginx']['headers_more']['source_url']
|
||||
checksum node['nginx']['headers_more']['source_checksum']
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
directory module_location do
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0755'
|
||||
recursive true
|
||||
action :create
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: http_auth_request_module
|
||||
#
|
||||
# Author:: David Radcliffe (<radcliffe.david@gmail.com>)
|
||||
#
|
||||
# Copyright 2013, David Radcliffe
|
||||
# Copyright:: 2013-2017, David Radcliffe
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -32,9 +32,6 @@ else
|
||||
remote_file arm_src_filepath do
|
||||
source node['nginx']['auth_request']['url']
|
||||
checksum node['nginx']['auth_request']['checksum']
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
bash 'extract_auth_request_module' do
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: http_echo_module
|
||||
#
|
||||
# Author:: Danial Pearce (<danial@cushycms.com>)
|
||||
#
|
||||
# Copyright 2012-2013, CushyCMS
|
||||
# Copyright:: 2012-2017, CushyCMS
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -26,9 +26,6 @@ echo_extract_path = "#{Chef::Config['file_cache_path']}/nginx_echo_module/#{node
|
||||
remote_file echo_src_filepath do
|
||||
source node['nginx']['echo']['url']
|
||||
checksum node['nginx']['echo']['checksum']
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
bash 'extract_http_echo_module' do
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: http_geoip_module
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -31,9 +31,6 @@ geolib_filepath = "#{Chef::Config['file_cache_path']}/#{geolib_filename}"
|
||||
remote_file geolib_filepath do
|
||||
source node['nginx']['geoip']['lib_url']
|
||||
checksum node['nginx']['geoip']['lib_checksum']
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
bash 'extract_geolib' do
|
||||
@ -50,8 +47,6 @@ bash 'extract_geolib' do
|
||||
end
|
||||
|
||||
directory node['nginx']['geoip']['path'] do
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0755'
|
||||
recursive true
|
||||
end
|
||||
@ -63,9 +58,6 @@ remote_file country_src_filepath do
|
||||
end
|
||||
source node['nginx']['geoip']['country_dat_url']
|
||||
checksum node['nginx']['geoip']['country_dat_checksum']
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
bash 'gunzip_geo_lite_country_dat' do
|
||||
@ -85,9 +77,6 @@ if node['nginx']['geoip']['enable_city']
|
||||
end
|
||||
source node['nginx']['geoip']['city_dat_url']
|
||||
checksum node['nginx']['geoip']['city_dat_checksum']
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
bash 'gunzip_geo_lite_city_dat' do
|
||||
@ -100,12 +89,9 @@ end
|
||||
|
||||
template "#{node['nginx']['dir']}/conf.d/http_geoip.conf" do
|
||||
source 'modules/http_geoip.conf.erb'
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
variables(
|
||||
:country_dat => country_dat,
|
||||
:city_dat => city_dat
|
||||
country_dat: country_dat,
|
||||
city_dat: city_dat
|
||||
)
|
||||
end
|
||||
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: http_gzip_static_module
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
# Copyright:: 2012-2017, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -21,9 +21,6 @@
|
||||
|
||||
template "#{node['nginx']['dir']}/conf.d/http_gzip_static.conf" do
|
||||
source 'modules/http_gzip_static.conf.erb'
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
node.run_state['nginx_configure_flags'] =
|
@ -1,10 +1,10 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Cookbook:: nginx
|
||||
# Recipe:: http_perl_module
|
||||
#
|
||||
# Author:: Akzhan Abdulin (<akzhan.abdulin@gmail.com>)
|
||||
#
|
||||
# Copyright 2012-2013, REG.RU
|
||||
# Copyright:: 2012-2017, REG.RU
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user