Skip to content

heyook/puppet-nginx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGINX Module

James Fryman [email protected]

This module manages NGINX from within Puppet.

Quick Start

Install and bootstrap an NGINX instance

node default {
  class { 'nginx': }
}

Setup a new virtual host

node default {
  class { 'mcollective': }
  nginx::resource::vhost { 'www.puppetlabs.com':
    ensure   => present,
    www_root => '/var/www/www.puppetlabs.com',
  }
}

Add a Proxy Server(s)

node default {
  class { 'mcollective': }
    nginx::resource::upstream { 'puppet_rack_app':
      ensure  => present,
      members => [
      'localhost:3000', 
      'localhost:3001',
      'localhost:3002',
    ],
  }
  nginx::resource::vhost { 'rack.puppetlabs.com':
    ensure   => present,
    proxy  => 'http://puppet_rack_app',
  }
} 

Creating the Rails Directory Tree

class massiveapp {
  file {
    ["/var/massiveapp/",
     "/var/massiveapp/shared/",
     "/var/massiveapp/shared/config/"]:
    ensure => directory,
    owner => vagrant,
    group => vagrant,
    mode => 775
  }
}

We also need bundler to be installed.

package {
  "bundler":
  provider => gem
}

About

Puppet Module to manage NGINX on various UNIXes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Puppet 97.3%
  • Ruby 2.7%