Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The snu_nginx cookbook has been deprecated

Author provided reason for deprecation:

The snu_nginx cookbook has been deprecated and is no longer being maintained by its authors. Use of the snu_nginx cookbook is no longer recommended.

RSS

snu_nginx (5) Versions 0.1.0

Installs/configures snu_nginx

Policyfile
Berkshelf
Knife
cookbook 'snu_nginx', '= 0.1.0', :supermarket
cookbook 'snu_nginx', '= 0.1.0'
knife supermarket install snu_nginx
knife supermarket download snu_nginx
README
Dependencies
Changelog
Quality 83%

Snu Nginx Cookbook README

Cookbook Version
Build Status

A simplified, resourceified, more opinionated Nginx cookbook.

Requirements

This cookbook is continously tested against a matrix of Chef versions and platforms. For a full list, see the output of chef exec microwave list.

Usage

Use the included custom resources in a recipe of your own.

Resources

snu_nginx

Ties together an app resource, a series of common config resources, and a service resource to create a full Nginx install.

Syntax:

snu_nginx do
  app_properties {}
  config_properties {}
  conf_d_properties { general: {}, gzip: {}, logging: {}, ssl: {} }
  service_properties {}
end

Properties:

Property Default Description
name 'nginx' The resource name
nginx_name Resource name Not used for anything
app_properties {} Properties to pass to the app resource
config_properties {} Properties to pass to the config resource
conf_d_properties { general: {}, gzip: {}, logging: {}, ssl: {} Properties to pass to the conf_d resources
service_properties {} Properties to pass to the service resource
action :create The action(s) to perform

Actions:

Action Description
:create Install, configure, enable, and start Nginx
:remove Stop, disable, deconfigure, and uninstall Nginx

snu_nginx_app

Manages the Nginx packages.

Syntax:

snu_nginx_app do
  package_name 'nginx'
  version '1.2.3'
  action :install
end

Properties:

Property Default Description
name 'nginx' The resource name
package_name Resource name The name of the package to install
version nil Install a specific version of Nginx
action :install The action(s) to perform

Actions:

Action Description
:install Install Nginx
`:upgrade Upgrade Nginx
:remove Uninstall Nginx

snu_nginx_config

Manages the main nginx.conf file that mainly serves to include files from Nginx's .d-style config directories.

Syntax:

snu_nginx_config do
  service_name 'nginx'
  dir '/etc'
  template 'nginx.conf.erb'
  cookbook 'snu_nginx'
  variables(user: 'nginx'...)
  worker_connections 4096
  action :create
end

Properties:

Property Default Description
name 'nginx' The resource name
service_name Resource name The config dir under /etc and corresponding service resource
dir '/etc' The system's main config directory
template 'nginx.conf.erb' The name of the template to use
cookbook 'snu_nginx' The cookbook the template resides in
variables [1] The main set of variables to pass to the template
* nil Any unrecognized property gets merged into variables
action :create The action(s) to perform
  1. See the source for the full set of default variables.

Actions:

Action Description
:create Render the config file
:remove Delete the config file

snu_nginx_conf_d

Manages files stored in Nginx's conf.d dir and included from the main nginx.conf.

Syntax:

snu_nginx_conf_d 'gzip' do
  config_name 'gzip'
  service_name 'nginx'
  dir '/etc'
  template 'gzip.conf.erb'
  cookbook 'snu_nginx'
  variables(gzip: 'on')
  http_version '1.1'
  action :create
end

Properties:

Property Default Description
name nil The resource name
config_name Resource name The name of the config file to generate
service_name 'nginx' The config dir under /etc and corresponding service resource
dir '/etc' The system's main config directory
template "#{config_name}.conf.erb" The name of the template to use
cookbook 'snu_nginx' The cookbook the template resides in
variables [1] The main set of variables to pass to the template
* nil Any unrecognized property gets merged into variables
action :create The action(s) to perform
  1. See the source for the full set of default variables for each built-in conf_d template.

Actions:

Action Description
:create Render the config file
:remove Delete the config file

snu_nginx_site

Manges site configs stored in Nginx's siltes-available and sites-enabled dirs and included from the main nginx.conf.

Syntax:

snu_nginx_site 'test' do
  site_name 'test'
  service_name 'nginx'
  dir '/etc'
  template 'test.erb'
  cookbook 'test'
  variables(name: 'test')
  port 8080
  root '/tmp/www'
  action :create
end

Properties:

Property Default Description
name nil The resource name
site_name Resource name The name of the site file to generate
service_name 'nginx' The config dir under /etc and corresponding service resource
dir '/etc' The system's main config directory
template nil The name of the template to use
cookbook nil The cookbook the template resides in
variables {} The main set of variables to pass to the template
* nil Any unrecognized property gets merged into variables
action :create The action(s) to perform

Actions:

Action Description
:create Render the site config in sites-available
:remove Delete the site config in sites-available
:enable Link to the site config in sites-enabled
:disable Delete the link from sites-enabled

snu_nginx_service

Manages the Nginx service.

Syntax:

snu_nginx_service do
  service_name 'nginx'
  config_dir '/etc'
  config_file '/etc/nginx/nginx.conf'
  file_limit 10_000
  action %i[create enable start]
end

Properties:

Property Default Description
name 'nginx' The resource name
service_name Resource name The name of the service and its config dir under /etc
config_dir '/etc' The system's main config directory
config_file "#{config_dir}/#{service_name}/nginx.conf" The path to the main nginx.conf
file_limit 10_000 The open file limit to run the service with
action %i[create enable start] The action(s) to perform

Actions:

Action Description
:create Render the service config
:remove Delete the service config
* Any other action supported by Chef's main service resource

Maintainers

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Snu Nginx CHANGELOG

This file is used to list changes made in each version of the snu_nginx cookbook.

0.1.0 (2019-07-12)

  • Prepare the initial release!

0.0.1 (2019-06-27)

  • Development started

Collaborator Number Metric
            

0.1.0 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.0 passed this metric

Foodcritic Metric
            

0.1.0 passed this metric

No Binaries Metric
            

0.1.0 passed this metric

Testing File Metric
            

0.1.0 passed this metric

Version Tag Metric
            

0.1.0 passed this metric