-
-
Notifications
You must be signed in to change notification settings - Fork 882
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #453 from jfryman/add-puppet-module-tool
Introducing Puppet Module Data
- Loading branch information
Showing
34 changed files
with
486 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ files/server_test.pem | |
pkg/ | ||
pkg/ | ||
Gemfile.lock | ||
spec/fixtures/ | ||
spec/fixtures/modules | ||
spec/fixtures/manifests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
# NGINX Module | ||
|
||
## INSTALLING OR UPGRADING | ||
** Please note **: This module is currently undergoing some structural | ||
maintenance. Please take a look at [https://github.com/jfryman/puppet-nginx/blob/master/docs/hiera.md](https://github.com/jfryman/puppet-nginx/blob/master/docs/hiera.md) | ||
before upgrading or installing Version 0.1.0 or greater. | ||
|
||
[![Build Status](https://travis-ci.org/jfryman/puppet-nginx.png)](https://travis-ci.org/jfryman/puppet-nginx) | ||
|
||
|
||
* James Fryman <[email protected]> | ||
* Matthew Haughton <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
nginx::config::temp_dir: /tmp | ||
nginx::config::run_dir: /var/nginx | ||
nginx::config::conf_template: nginx/conf.d/nginx.conf.erb | ||
nginx::config::proxy_conf_template: nginx/conf.d/proxy.conf.erb | ||
nginx::config::confd_purge: false | ||
nginx::config::vhost_purge: false | ||
nginx::config::worker_processes: 1 | ||
nginx::config::worker_connections: 1024 | ||
nginx::config::worker_rlimit_nofile: 1024 | ||
nginx::config::types_hash_max_size: 1024 | ||
nginx::config::types_hash_bucket_size: 512 | ||
nginx::config::names_hash_bucket_size: 64 | ||
nginx::config::names_hash_max_size: 512 | ||
nginx::config::multi_accept: 'off' | ||
nginx::config::events_use: false | ||
nginx::config::sendfile: 'on' | ||
nginx::config::keepalive_timeout: 65 | ||
nginx::config::http_tcp_nodelay: 'on' | ||
nginx::config::http_tcp_nopush: 'off' | ||
nginx::config::gzip: 'on' | ||
nginx::config::server_tokens: 'on' | ||
nginx::config::spdy: 'off' | ||
nginx::config::ssl_stapling: 'off' | ||
nginx::config::proxy_redirect: 'off' | ||
nginx::config::proxy_set_header: | ||
- 'Host $host' | ||
- 'X-Real-IP $remote_addr' | ||
- 'X-Forwarded-For $proxy_add_x_forwarded_for' | ||
nginx::config::proxy_cache_path: false | ||
nginx::config::proxy_cache_levels: '1' | ||
nginx::config::proxy_cache_keys_zone: 'd2:100m' | ||
nginx::config::proxy_cache_max_size: 500m | ||
nginx::config::proxy_cache_inactive: 20m | ||
nginx::config::fastcgi_cache_path: false | ||
nginx::config::fastcgi_cache_levels: '1' | ||
nginx::config::fastcgi_cache_keys_zone: 'd3:100m' | ||
nginx::config::fastcgi_cache_max_size: 500m | ||
nginx::config::fastcgi_cache_inactive: 20m | ||
nginx::config::fastcgi_cache_key: false | ||
nginx::config::fastcgi_cache_use_stale: false | ||
nginx::config::client_body_temp_path: /var/nginx/client_body_temp | ||
nginx::config::client_body_buffer_size: 128k | ||
nginx::config::client_max_body_size: 10m | ||
nginx::config::proxy_temp_path: /var/nginx/proxy_temp | ||
nginx::config::proxy_connect_timeout: '90' | ||
nginx::config::proxy_send_timeout: '90' | ||
nginx::config::proxy_read_timeout: '90' | ||
nginx::config::proxy_buffers: '32 4k' | ||
nginx::config::proxy_http_version: '1.0' | ||
nginx::config::proxy_buffer_size: 8k | ||
nginx::config::proxy_headers_hash_bucket_size: '64' | ||
nginx::config::logdir: /var/log/nginx | ||
|
||
nginx::config::mail: false | ||
|
||
nginx::config::http_cfg_append: false | ||
nginx::config::nginx_error_log: /var/log/nginx/error.log | ||
nginx::config::http_access_log: /var/log/nginx/access.log | ||
|
||
nginx::config::root_group: root | ||
# Specific owner for sites-available directory | ||
nginx::config::sites_available_owner: root | ||
nginx::config::sites_available_group: root | ||
nginx::config::sites_available_mode: '0644' | ||
|
||
# Owner for all other files | ||
nginx::config::global_owner: root | ||
nginx::config::global_group: root | ||
nginx::config::global_mode: '0644' | ||
|
||
nginx::config::pid: /var/run/nginx.pid | ||
|
||
nginx::config::conf_dir: /etc/nginx | ||
|
||
nginx::config::super_user: true | ||
nginx::config::daemon_user: nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
:hierarchy: | ||
- operatingsystem/%{::operatingsystem}/%{::operatingsystemmajrelease} | ||
- operatingsystem/%{::operatingsystem} | ||
- osfamily/%{::osfamily} | ||
- common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
nginx::config::conf_dir: /opt/local/etc/nginx | ||
nginx::config::daemon_user: www |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
nginx::config::pid: false | ||
nginx::config::daemon_user: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
nginx::config::daemon_user: www-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
nginx::config::conf_dir: /usr/local/etc/nginx | ||
nginx::config::daemon_user: www | ||
nginx::config::root_group: wheel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
nginx::config::daemon_user: webservd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Usage of Hiera | ||
|
||
This module takes advantage of the `puppet-module-data` pattern as introduced | ||
by R.I. Pinnear to allow for a significant amount of flexibility with base | ||
configuration of the module. This is to reduce the amount of clutter starting | ||
to gather in `params.pp`, and provide a foundation for future enhancements. | ||
|
||
## Upgrading | ||
|
||
If you happen to be here because of some silly deprecation notice, it is | ||
probably because a manifest is declaring attributes for the Nginx Class. | ||
Upgrading should be easy! | ||
|
||
* Step 1: Make sure you have Hiera configured. https://docs.puppetlabs.com/hiera/1/puppet.html#puppet-3-and-newer | ||
* Step 2: Move any declared parameters to hiera. | ||
* Step 3: Profit! | ||
|
||
For example: | ||
|
||
``` | ||
class { 'nginx': | ||
logdir => '/data/nginx/logs', | ||
} | ||
``` | ||
|
||
should become in your hiera configs: | ||
|
||
``` | ||
nginx::config::logdir: /data/nginx/logs | ||
``` | ||
|
||
Please note: This module takes advantage of Puppet 3 data module bindings. | ||
Be aware of any gotchas that accompany this. Take a look at https://docs.puppetlabs.com/hiera/1/puppet.html#limitations | ||
|
||
## I cannot/do not use Hiera! NOW WHAT! | ||
|
||
Do not fret! This is a big change to the core module, and it may be difficult | ||
to make the conversion right away. First off, we intend to make it blatantly | ||
clear when the module will tear out the parameters in Class[nginx] as | ||
detailed in the deprecation notice. (The current target is v1.0) | ||
|
||
In the event that you are unable to leverage Hiera for your attribute configuration, you can use the Spaceship Operator to set the parameters for the nginx::config class. For example: | ||
|
||
```ruby | ||
Class<| title == 'nginx::class' |> { | ||
proxy_cache_levels => '2', | ||
} | ||
``` | ||
The recommended path is to use Hiera, but this pattern should give you an intermediate step during the upgrade process. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.