From eedaa5159c58192db5e1ca8f6edb2956be2d9496 Mon Sep 17 00:00:00 2001 From: James Fryman Date: Mon, 6 Jun 2011 17:38:40 -0500 Subject: [PATCH] Updated Documentation --- Modulefile | 4 +-- README | 24 ------------------ files/README.markdown | 22 ---------------- lib/facter/README.markdown | 22 ---------------- lib/puppet/parser/functions/README.markdown | 17 ------------- lib/puppet/provider/README.markdown | 14 ----------- lib/puppet/type/README.markdown | 14 ----------- manifests/README.markdown | 28 --------------------- templates/README.markdown | 23 ----------------- tests/upstream.pp | 10 ++++++++ tests/vhost.pp | 11 ++++---- tests/vhost_ssl.erb | 17 +++++++++++++ 12 files changed, 34 insertions(+), 172 deletions(-) delete mode 100644 files/README.markdown delete mode 100644 lib/facter/README.markdown delete mode 100644 lib/puppet/parser/functions/README.markdown delete mode 100644 lib/puppet/provider/README.markdown delete mode 100644 lib/puppet/type/README.markdown delete mode 100644 manifests/README.markdown delete mode 100644 templates/README.markdown create mode 100644 tests/upstream.pp create mode 100644 tests/vhost_ssl.erb diff --git a/Modulefile b/Modulefile index b0131e9..9961e27 100644 --- a/Modulefile +++ b/Modulefile @@ -3,9 +3,7 @@ version '0.0.1' source 'http://github.com/jfryman/puppet-nginx' author 'James Fryman' license 'Apache 2' -summary 'Puppet NGinX management module' +summary 'Puppet NGINX management module' description 'This module can be used for basic NGINX Management' project_page 'http://github.com/jfryman/puppet-nginx' -## Add dependencies, if any: -# dependency 'username/name', '>= 1.2.0' diff --git a/README b/README index 68ec076..e69de29 100644 --- a/README +++ b/README @@ -1,24 +0,0 @@ -nginx - -This is the nginx module. - -User Stories: - * Must be able to be used on a major linux system - - Ubuntu (LTS/Current) [DONE] - - Debian (stable) [DONE] - - CentOS [DONE] - - RHEL [CANNOT TEST] - - Fedora [DONE] - - SLES - - Solaris (optional goal) - * Must be able to install NGINX - - must have an option to perform a base install [DONE] - - must have an option to install a PHP/MySQL Stack - - must have an option to install a Perl/MySQL stack - * Must be able to create a new vhost - - vhost must be able to be ssl enabled [DONE] - - vhost must be able to point to N proxies - - vhost must be able to create a rewrite rule - - * errors detected: - fails on ipv6 if ipv6 is not enabled on the host. Need some error check. \ No newline at end of file diff --git a/files/README.markdown b/files/README.markdown deleted file mode 100644 index be52188..0000000 --- a/files/README.markdown +++ /dev/null @@ -1,22 +0,0 @@ -Files -===== - -Puppet comes with both a client and server for copying files around. The file -serving function is provided as part of the central Puppet daemon, -puppetmasterd, and the client function is used through the source attribute of -file objects. Learn more at -http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration - -You can use managed files like this: - - class myclass { - package { mypackage: ensure => latest } - service { myservice: ensure => running } - file { "/etc/myfile": - source => "puppet://$servername/modules/mymodule/myfile" - } - } - -The files are searched for in: - - $modulepath/mymodule/files/myfile diff --git a/lib/facter/README.markdown b/lib/facter/README.markdown deleted file mode 100644 index 2b96273..0000000 --- a/lib/facter/README.markdown +++ /dev/null @@ -1,22 +0,0 @@ -Facter -====== - -Define facts in this directory. - -Sometimes you need to be able to write conditional expressions based -on site-specific data that just isn’t available via Facter. The -solution may be to add a fact to Facter. These additional facts can -then be distributed to Puppet clients and are available for use in -manifests. Learn more at -http://projects.puppetlabs.com/projects/puppet/wiki/Adding_Facts - -File paths should match the fact name; for example, a fact -`hardware_platform`, defined like this: - - Facter.add("hardware_platform") do - setcode do - %x{/bin/uname -i}.chomp - end - end - -Should be found in `hardware_platform.rb` in this directory. diff --git a/lib/puppet/parser/functions/README.markdown b/lib/puppet/parser/functions/README.markdown deleted file mode 100644 index 15d7495..0000000 --- a/lib/puppet/parser/functions/README.markdown +++ /dev/null @@ -1,17 +0,0 @@ -Functions -========= - -Define functions in this directory. - -File paths should match the function name; for example, a function -`myfunction`, defined like this: - - Puppet::Parser::Functions::newfunction( - :myfunction, - :type => :statement, - :doc => "Documentation here." - ) do |vals| - # ... - end - -Should be found in `myfunction.rb` in this directory. diff --git a/lib/puppet/provider/README.markdown b/lib/puppet/provider/README.markdown deleted file mode 100644 index 27aa1a9..0000000 --- a/lib/puppet/provider/README.markdown +++ /dev/null @@ -1,14 +0,0 @@ -Providers -========= - -Define providers under this directory. - -File paths should match the resource type name and provider name; for -example, a provider `myprovider` for a resource type `mytype`, defined like this: - - Puppet::Type.type(:mytype).provide(:myprovider) do - desc "Documentation here" - # ... - end - -Should be found in `mytype/myprovider.rb` under this directory. diff --git a/lib/puppet/type/README.markdown b/lib/puppet/type/README.markdown deleted file mode 100644 index 7a169c7..0000000 --- a/lib/puppet/type/README.markdown +++ /dev/null @@ -1,14 +0,0 @@ -Resource Types -============== - -Define resource types in this directory. - -Filenames should match the resource type name; for example, a resource -type `mytype`, defined like this: - - Puppet::Type.newtype(:mytype) do - @doc = "Documentation here." - # ... - end - -Should be found in `mytype.rb` diff --git a/manifests/README.markdown b/manifests/README.markdown deleted file mode 100644 index bbf645a..0000000 --- a/manifests/README.markdown +++ /dev/null @@ -1,28 +0,0 @@ -Manifests -========= - -Module manifest files belong in this directory. - -`init.pp` defines how the module will carry out its tasks in this file. - -Add additional definitions in this directory. Their file paths should match the -definition name; for example, a definition `mydefinition`, defined like this: - - # Definition: mydefinition - # - # This is the mydefinition in the mymodule module. - # - # Parameters: - # - # Actions: - # - # Requires: - # - # Sample Usage: - # - # [Remember: No empty lines between comments and class definition] - define mydefinition { - # ... - } - -Should be found in `mydefinition.pp` in this directory. diff --git a/templates/README.markdown b/templates/README.markdown deleted file mode 100644 index 575bbea..0000000 --- a/templates/README.markdown +++ /dev/null @@ -1,23 +0,0 @@ -Templates -========= - -Puppet supports templates and templating via ERB, which is part of the Ruby -standard library and is used for many other projects including Ruby on Rails. -Templates allow you to manage the content of template files, for example -configuration files that cannot yet be managed as a Puppet type. Learn more at -http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating - -You can use templates like this: - - class myclass { - package { mypackage: ensure => latest } - service { myservice: ensure => running } - file { "/etc/myfile": - content => template("mymodule/myfile.erb") - } - } - -The templates are searched for in: - - $templatedir/mymodule/myfile.erb - $modulepath/mymodule/templates/myfile.erb diff --git a/tests/upstream.pp b/tests/upstream.pp new file mode 100644 index 0000000..8cc323b --- /dev/null +++ b/tests/upstream.pp @@ -0,0 +1,10 @@ +include nginx + +nginx::resource::upstream { 'proxypass': + ensure => present, + members => [ + 'localhost:3000', + 'localhost:3001', + 'localhost:3002', + ], +} diff --git a/tests/vhost.pp b/tests/vhost.pp index 642ba31..40658d9 100644 --- a/tests/vhost.pp +++ b/tests/vhost.pp @@ -1,7 +1,8 @@ include nginix -nginix::vhost { 'www.test.com': - port => '80', - webroot => "/opt/www/test", - ssl => false, -} \ No newline at end of file +nginx::resource::vhost { 'test.local': + ensure => present, + ipv6_enable => 'true', + proxy => 'http://proxypass', +} + diff --git a/tests/vhost_ssl.erb b/tests/vhost_ssl.erb new file mode 100644 index 0000000..30e8bfb --- /dev/null +++ b/tests/vhost_ssl.erb @@ -0,0 +1,17 @@ +include nginx + +nginx::resource::vhost { 'test2.local': + ensure => present, + www_root => '/var/www/nginx-default', + ssl => 'true', + ssl_cert => '/tmp/server.crt', + ssl_key => '/tmp/server.pem', +} + +nginx::resource::location { 'test2.local-bob': + ensure => present, + www_root => '/var/www/bob', + location => '/bob', + vhost => 'test2.local', +} +