freighthop 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Puppetfile +4 -3
- data/Puppetfile.lock +14 -2
- data/Vagrantfile +5 -1
- data/data/common.json +4 -3
- data/freighthop.gemspec +1 -1
- data/lib/freighthop/cli/checks.rb +12 -0
- data/lib/freighthop/cli/help.rb +7 -0
- data/lib/freighthop/cli/init.rb +35 -0
- data/lib/freighthop/cli/ssh.rb +1 -0
- data/lib/freighthop/cli/vagrant.rb +1 -0
- data/lib/freighthop/cli.rb +5 -17
- data/lib/freighthop/config.rb +5 -1
- data/lib/freighthop/version.rb +1 -1
- data/lib/freighthop.rb +6 -1
- data/local_modules/freighthop/manifests/database/mysql/grant.pp +11 -0
- data/local_modules/freighthop/manifests/database/mysql.pp +5 -15
- data/local_modules/freighthop/manifests/database/postgres.pp +2 -2
- data/local_modules/freighthop/manifests/database.pp +3 -3
- data/local_modules/freighthop/manifests/init.pp +6 -23
- data/local_modules/freighthop/manifests/language/ruby.pp +5 -25
- data/local_modules/freighthop/manifests/language.pp +1 -4
- data/local_modules/freighthop/manifests/packages.pp +2 -12
- data/local_modules/freighthop/manifests/params.pp +19 -11
- data/local_modules/freighthop/manifests/web/apache.pp +60 -0
- data/local_modules/freighthop/manifests/web/nginx.pp +22 -0
- data/local_modules/freighthop/manifests/web/ssl.pp +13 -0
- data/local_modules/freighthop/manifests/web.pp +25 -21
- data/local_modules/freighthop/templates/apache/passenger.conf.erb +18 -0
- data/local_modules/freighthop/templates/nginx/vagrant-rails.conf.erb +5 -3
- data/modules/apache/CHANGELOG.md +172 -0
- data/modules/apache/CONTRIBUTING.md +234 -0
- data/modules/apache/Gemfile +25 -0
- data/modules/apache/LICENSE +15 -0
- data/modules/apache/Modulefile +12 -0
- data/modules/apache/README.md +1515 -0
- data/modules/apache/README.passenger.md +93 -0
- data/modules/apache/Rakefile +1 -0
- data/modules/apache/files/httpd +24 -0
- data/modules/apache/lib/puppet/provider/a2mod/a2mod.rb +35 -0
- data/modules/apache/lib/puppet/provider/a2mod/gentoo.rb +116 -0
- data/modules/apache/lib/puppet/provider/a2mod/modfix.rb +12 -0
- data/modules/apache/lib/puppet/provider/a2mod/redhat.rb +60 -0
- data/modules/apache/lib/puppet/provider/a2mod.rb +34 -0
- data/modules/apache/lib/puppet/type/a2mod.rb +30 -0
- data/modules/apache/manifests/balancer.pp +80 -0
- data/modules/apache/manifests/balancermember.pp +52 -0
- data/modules/apache/manifests/confd/no_accf.pp +10 -0
- data/modules/apache/manifests/default_confd_files.pp +12 -0
- data/modules/apache/manifests/default_mods/load.pp +8 -0
- data/modules/apache/manifests/default_mods.pp +108 -0
- data/modules/apache/manifests/dev.pp +11 -0
- data/modules/apache/manifests/init.pp +329 -0
- data/modules/apache/manifests/listen.pp +9 -0
- data/modules/apache/manifests/mod/alias.pp +17 -0
- data/modules/apache/manifests/mod/auth_basic.pp +3 -0
- data/modules/apache/manifests/mod/auth_kerb.pp +5 -0
- data/modules/apache/manifests/mod/authnz_ldap.pp +19 -0
- data/modules/apache/manifests/mod/autoindex.pp +12 -0
- data/modules/apache/manifests/mod/cache.pp +3 -0
- data/modules/apache/manifests/mod/cgi.pp +4 -0
- data/modules/apache/manifests/mod/cgid.pp +23 -0
- data/modules/apache/manifests/mod/dav.pp +3 -0
- data/modules/apache/manifests/mod/dav_fs.pp +20 -0
- data/modules/apache/manifests/mod/dav_svn.pp +5 -0
- data/modules/apache/manifests/mod/deflate.pp +12 -0
- data/modules/apache/manifests/mod/dev.pp +5 -0
- data/modules/apache/manifests/mod/dir.pp +21 -0
- data/modules/apache/manifests/mod/disk_cache.pp +24 -0
- data/modules/apache/manifests/mod/event.pp +54 -0
- data/modules/apache/manifests/mod/expires.pp +3 -0
- data/modules/apache/manifests/mod/fastcgi.pp +24 -0
- data/modules/apache/manifests/mod/fcgid.pp +3 -0
- data/modules/apache/manifests/mod/headers.pp +3 -0
- data/modules/apache/manifests/mod/include.pp +3 -0
- data/modules/apache/manifests/mod/info.pp +14 -0
- data/modules/apache/manifests/mod/itk.pp +64 -0
- data/modules/apache/manifests/mod/ldap.pp +12 -0
- data/modules/apache/manifests/mod/mime.pp +21 -0
- data/modules/apache/manifests/mod/mime_magic.pp +14 -0
- data/modules/apache/manifests/mod/negotiation.pp +12 -0
- data/modules/apache/manifests/mod/nss.pp +25 -0
- data/modules/apache/manifests/mod/passenger.pp +38 -0
- data/modules/apache/manifests/mod/perl.pp +3 -0
- data/modules/apache/manifests/mod/peruser.pp +73 -0
- data/modules/apache/manifests/mod/php.pp +26 -0
- data/modules/apache/manifests/mod/prefork.pp +74 -0
- data/modules/apache/manifests/mod/proxy.pp +15 -0
- data/modules/apache/manifests/mod/proxy_ajp.pp +4 -0
- data/modules/apache/manifests/mod/proxy_balancer.pp +10 -0
- data/modules/apache/manifests/mod/proxy_html.pp +28 -0
- data/modules/apache/manifests/mod/proxy_http.pp +4 -0
- data/modules/apache/manifests/mod/python.pp +5 -0
- data/modules/apache/manifests/mod/reqtimeout.pp +12 -0
- data/modules/apache/manifests/mod/rewrite.pp +4 -0
- data/modules/apache/manifests/mod/rpaf.pp +20 -0
- data/modules/apache/manifests/mod/setenvif.pp +12 -0
- data/modules/apache/manifests/mod/ssl.pp +26 -0
- data/modules/apache/manifests/mod/status.pp +42 -0
- data/modules/apache/manifests/mod/suphp.pp +14 -0
- data/modules/apache/manifests/mod/userdir.pp +17 -0
- data/modules/apache/manifests/mod/vhost_alias.pp +3 -0
- data/modules/apache/manifests/mod/worker.pp +75 -0
- data/modules/apache/manifests/mod/wsgi.pp +21 -0
- data/modules/apache/manifests/mod/xsendfile.pp +4 -0
- data/modules/apache/manifests/mod.pp +120 -0
- data/modules/apache/manifests/namevirtualhost.pp +9 -0
- data/modules/apache/manifests/package.pp +48 -0
- data/modules/apache/manifests/params.pp +207 -0
- data/modules/apache/manifests/peruser/multiplexer.pp +17 -0
- data/modules/apache/manifests/peruser/processor.pp +17 -0
- data/modules/apache/manifests/php.pp +18 -0
- data/modules/apache/manifests/proxy.pp +15 -0
- data/modules/apache/manifests/python.pp +18 -0
- data/modules/apache/manifests/service.pp +35 -0
- data/modules/apache/manifests/ssl.pp +18 -0
- data/modules/apache/manifests/vhost.pp +516 -0
- data/modules/apache/spec/acceptance/basic_spec.rb +12 -0
- data/modules/apache/spec/acceptance/class_spec.rb +58 -0
- data/modules/apache/spec/acceptance/default_mods_spec.rb +97 -0
- data/modules/apache/spec/acceptance/itk_spec.rb +35 -0
- data/modules/apache/spec/acceptance/mod_php_spec.rb +52 -0
- data/modules/apache/spec/acceptance/mod_suphp_spec.rb +44 -0
- data/modules/apache/spec/acceptance/nodesets/centos-64-x64.yml +8 -0
- data/modules/apache/spec/acceptance/nodesets/default.yml +8 -0
- data/modules/apache/spec/acceptance/nodesets/ubuntu-server-12042-x64.yml +8 -0
- data/modules/apache/spec/acceptance/nodesets/vagrant.key +27 -0
- data/modules/apache/spec/acceptance/prefork_worker_spec.rb +81 -0
- data/modules/apache/spec/acceptance/service_spec.rb +19 -0
- data/modules/apache/spec/acceptance/vhost_spec.rb +290 -0
- data/modules/apache/spec/classes/apache_spec.rb +464 -0
- data/modules/apache/spec/classes/dev_spec.rb +38 -0
- data/modules/apache/spec/classes/mod/auth_kerb_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/authnz_ldap_spec.rb +65 -0
- data/modules/apache/spec/classes/mod/dav_svn_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/dev_spec.rb +23 -0
- data/modules/apache/spec/classes/mod/dir_spec.rb +88 -0
- data/modules/apache/spec/classes/mod/event_spec.rb +17 -0
- data/modules/apache/spec/classes/mod/fastcgi_spec.rb +32 -0
- data/modules/apache/spec/classes/mod/fcgid_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/info_spec.rb +99 -0
- data/modules/apache/spec/classes/mod/itk_spec.rb +31 -0
- data/modules/apache/spec/classes/mod/mime_magic_spec.rb +93 -0
- data/modules/apache/spec/classes/mod/passenger_spec.rb +112 -0
- data/modules/apache/spec/classes/mod/perl_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/peruser_spec.rb +17 -0
- data/modules/apache/spec/classes/mod/php_spec.rb +99 -0
- data/modules/apache/spec/classes/mod/prefork_spec.rb +47 -0
- data/modules/apache/spec/classes/mod/proxy_html_spec.rb +45 -0
- data/modules/apache/spec/classes/mod/python_spec.rb +41 -0
- data/modules/apache/spec/classes/mod/rpaf_spec.rb +77 -0
- data/modules/apache/spec/classes/mod/ssl_spec.rb +53 -0
- data/modules/apache/spec/classes/mod/status_spec.rb +166 -0
- data/modules/apache/spec/classes/mod/suphp_spec.rb +27 -0
- data/modules/apache/spec/classes/mod/worker_spec.rb +44 -0
- data/modules/apache/spec/classes/mod/wsgi_spec.rb +54 -0
- data/modules/apache/spec/classes/params_spec.rb +21 -0
- data/modules/apache/spec/classes/service_spec.rb +109 -0
- data/modules/apache/spec/defines/mod_spec.rb +105 -0
- data/modules/apache/spec/defines/vhost_spec.rb +1152 -0
- data/modules/apache/spec/fixtures/modules/site_apache/templates/fake.conf.erb +1 -0
- data/modules/apache/spec/spec.opts +4 -0
- data/modules/apache/spec/spec_helper.rb +1 -0
- data/modules/apache/spec/spec_helper_acceptance.rb +27 -0
- data/modules/apache/spec/unit/provider/a2mod/gentoo_spec.rb +184 -0
- data/modules/apache/templates/confd/no-accf.conf.erb +4 -0
- data/modules/apache/templates/httpd.conf.erb +92 -0
- data/modules/apache/templates/listen.erb +6 -0
- data/modules/apache/templates/mod/alias.conf.erb +9 -0
- data/modules/apache/templates/mod/authnz_ldap.conf.erb +5 -0
- data/modules/apache/templates/mod/autoindex.conf.erb +56 -0
- data/modules/apache/templates/mod/cgid.conf.erb +1 -0
- data/modules/apache/templates/mod/dav_fs.conf.erb +1 -0
- data/modules/apache/templates/mod/deflate.conf.erb +4 -0
- data/modules/apache/templates/mod/dir.conf.erb +1 -0
- data/modules/apache/templates/mod/disk_cache.conf.erb +8 -0
- data/modules/apache/templates/mod/event.conf.erb +9 -0
- data/modules/apache/templates/mod/fastcgi.conf.erb +6 -0
- data/modules/apache/templates/mod/info.conf.erb +6 -0
- data/modules/apache/templates/mod/itk.conf.erb +8 -0
- data/modules/apache/templates/mod/ldap.conf.erb +7 -0
- data/modules/apache/templates/mod/mime.conf.erb +36 -0
- data/modules/apache/templates/mod/mime_magic.conf.erb +1 -0
- data/modules/apache/templates/mod/mpm_event.conf.erb +9 -0
- data/modules/apache/templates/mod/negotiation.conf.erb +2 -0
- data/modules/apache/templates/mod/nss.conf.erb +228 -0
- data/modules/apache/templates/mod/passenger.conf.erb +30 -0
- data/modules/apache/templates/mod/peruser.conf.erb +12 -0
- data/modules/apache/templates/mod/php5.conf.erb +30 -0
- data/modules/apache/templates/mod/prefork.conf.erb +8 -0
- data/modules/apache/templates/mod/proxy.conf.erb +23 -0
- data/modules/apache/templates/mod/proxy_html.conf.erb +24 -0
- data/modules/apache/templates/mod/reqtimeout.conf.erb +2 -0
- data/modules/apache/templates/mod/rpaf.conf.erb +15 -0
- data/modules/apache/templates/mod/setenvif.conf.erb +34 -0
- data/modules/apache/templates/mod/ssl.conf.erb +24 -0
- data/modules/apache/templates/mod/status.conf.erb +12 -0
- data/modules/apache/templates/mod/suphp.conf.erb +19 -0
- data/modules/apache/templates/mod/userdir.conf.erb +19 -0
- data/modules/apache/templates/mod/worker.conf.erb +9 -0
- data/modules/apache/templates/mod/wsgi.conf.erb +13 -0
- data/modules/apache/templates/namevirtualhost.erb +8 -0
- data/modules/apache/templates/ports_header.erb +5 -0
- data/modules/apache/templates/vhost/_aliases.erb +12 -0
- data/modules/apache/templates/vhost/_block.erb +10 -0
- data/modules/apache/templates/vhost/_custom_fragment.erb +5 -0
- data/modules/apache/templates/vhost/_directories.erb +143 -0
- data/modules/apache/templates/vhost/_error_document.erb +7 -0
- data/modules/apache/templates/vhost/_fastcgi.erb +18 -0
- data/modules/apache/templates/vhost/_itk.erb +28 -0
- data/modules/apache/templates/vhost/_php_admin.erb +12 -0
- data/modules/apache/templates/vhost/_proxy.erb +20 -0
- data/modules/apache/templates/vhost/_rack.erb +7 -0
- data/modules/apache/templates/vhost/_redirect.erb +12 -0
- data/modules/apache/templates/vhost/_requestheader.erb +10 -0
- data/modules/apache/templates/vhost/_rewrite.erb +40 -0
- data/modules/apache/templates/vhost/_scriptalias.erb +24 -0
- data/modules/apache/templates/vhost/_serveralias.erb +7 -0
- data/modules/apache/templates/vhost/_setenv.erb +12 -0
- data/modules/apache/templates/vhost/_ssl.erb +41 -0
- data/modules/apache/templates/vhost/_suphp.erb +11 -0
- data/modules/apache/templates/vhost/_wsgi.erb +15 -0
- data/modules/apache/templates/vhost.conf.erb +63 -0
- data/modules/apache/tests/apache.pp +6 -0
- data/modules/apache/tests/dev.pp +1 -0
- data/modules/apache/tests/init.pp +1 -0
- data/modules/apache/tests/mod_load_params.pp +11 -0
- data/modules/apache/tests/mods.pp +9 -0
- data/modules/apache/tests/mods_custom.pp +16 -0
- data/modules/apache/tests/php.pp +4 -0
- data/modules/apache/tests/vhost.pp +237 -0
- data/modules/apache/tests/vhost_directories.pp +30 -0
- data/modules/apache/tests/vhost_ip_based.pp +25 -0
- data/modules/apache/tests/vhost_ssl.pp +23 -0
- data/modules/apache/tests/vhosts_without_listen.pp +53 -0
- data/modules/freighthop/manifests/database/mysql/grant.pp +11 -0
- data/modules/freighthop/manifests/database/mysql.pp +5 -15
- data/modules/freighthop/manifests/database/postgres.pp +2 -2
- data/modules/freighthop/manifests/database.pp +3 -3
- data/modules/freighthop/manifests/init.pp +6 -23
- data/modules/freighthop/manifests/language/ruby.pp +5 -25
- data/modules/freighthop/manifests/language.pp +1 -4
- data/modules/freighthop/manifests/packages.pp +2 -12
- data/modules/freighthop/manifests/params.pp +19 -11
- data/modules/freighthop/manifests/web/apache.pp +60 -0
- data/modules/freighthop/manifests/web/nginx.pp +22 -0
- data/modules/freighthop/manifests/web/ssl.pp +13 -0
- data/modules/freighthop/manifests/web.pp +25 -21
- data/modules/freighthop/templates/apache/passenger.conf.erb +18 -0
- data/modules/freighthop/templates/nginx/vagrant-rails.conf.erb +5 -3
- data/modules/rbenv/AUTHORS +11 -0
- data/modules/rbenv/CHANGELOG.md +70 -0
- data/modules/rbenv/Gemfile +5 -10
- data/modules/rbenv/Gemfile.lock +16 -58
- data/modules/rbenv/Modulefile +7 -7
- data/modules/rbenv/README.md +156 -20
- data/modules/rbenv/Rakefile +18 -24
- data/modules/rbenv/TODO +10 -0
- data/modules/rbenv/bin/autospec +16 -0
- data/modules/rbenv/bin/facter +16 -0
- data/modules/rbenv/bin/filebucket +16 -0
- data/modules/rbenv/bin/hiera +16 -0
- data/modules/rbenv/bin/htmldiff +16 -0
- data/modules/rbenv/bin/ldiff +16 -0
- data/modules/rbenv/bin/pi +16 -0
- data/modules/rbenv/bin/puppet +16 -0
- data/modules/rbenv/bin/puppet-lint +16 -0
- data/modules/rbenv/bin/puppet-module +16 -0
- data/modules/rbenv/bin/puppetca +16 -0
- data/modules/rbenv/bin/puppetd +16 -0
- data/modules/rbenv/bin/puppetdoc +16 -0
- data/modules/rbenv/bin/puppetmasterd +16 -0
- data/modules/rbenv/bin/puppetqd +16 -0
- data/modules/rbenv/bin/puppetrun +16 -0
- data/modules/rbenv/bin/rake +16 -0
- data/modules/rbenv/bin/ralsh +16 -0
- data/modules/rbenv/bin/rspec +16 -0
- data/modules/rbenv/bin/rspec-puppet-init +16 -0
- data/modules/rbenv/lib/puppet/provider/rbenvgem/default.rb +50 -0
- data/modules/rbenv/lib/puppet/type/rbenvgem.rb +62 -0
- data/modules/rbenv/manifests/bundle.pp +36 -0
- data/modules/rbenv/manifests/client.pp +48 -0
- data/modules/rbenv/manifests/compile.pp +102 -0
- data/modules/rbenv/manifests/definition.pp +31 -0
- data/modules/rbenv/manifests/dependencies/centos.pp +25 -0
- data/modules/rbenv/manifests/dependencies/suse.pp +28 -0
- data/modules/rbenv/manifests/dependencies/ubuntu.pp +17 -0
- data/modules/rbenv/manifests/dependencies.pp +8 -0
- data/modules/rbenv/manifests/gem.pp +29 -0
- data/modules/rbenv/manifests/install.pp +55 -0
- data/modules/rbenv/manifests/plugin/rbenvvars.pp +16 -0
- data/modules/rbenv/manifests/plugin/rubybuild.pp +16 -0
- data/modules/rbenv/manifests/plugin.pp +40 -0
- data/modules/rbenv/metadata.json +99 -31
- data/modules/rbenv/spec/classes/dependencies_spec.rb +20 -0
- data/modules/rbenv/spec/defines/rbenv__compile_spec.rb +34 -0
- data/modules/rbenv/spec/defines/rbenv__definition_spec.rb +40 -0
- data/modules/rbenv/spec/defines/rbenv__install_spec.rb +24 -0
- data/modules/rbenv/spec/defines/rbenv__plugin__rbenvvars_spec.rb +14 -0
- data/modules/rbenv/spec/defines/rbenv__plugin__rubybuild_spec.rb +14 -0
- data/modules/rbenv/spec/defines/rbenv__plugin_spec.rb +31 -0
- data/modules/rbenv/spec/fixtures/manifests/site.pp +0 -0
- data/modules/rbenv/spec/spec_helper.rb +6 -1
- data/modules/rbenv/templates/Gemfile.erb +5 -0
- data/modules/rbenv/templates/dot.rbenvrc.erb +8 -0
- metadata +271 -23
- data/modules/rbenv/CHANGELOG +0 -33
- data/modules/rbenv/LICENSE +0 -20
- data/modules/rbenv/manifests/alias.pp +0 -32
- data/modules/rbenv/manifests/global.pp +0 -22
- data/modules/rbenv/manifests/init.pp +0 -30
- data/modules/rbenv/manifests/params.pp +0 -16
- data/modules/rbenv/manifests/rehash.pp +0 -28
- data/modules/rbenv/manifests/version.pp +0 -63
- data/modules/rbenv/spec/classes/rbenv__global_spec.rb +0 -31
- data/modules/rbenv/spec/classes/rbenv_spec.rb +0 -30
- data/modules/rbenv/spec/defines/rbenv__alias_spec.rb +0 -22
- data/modules/rbenv/spec/defines/rbenv__rehash_spec.rb +0 -22
- data/modules/rbenv/spec/defines/rbenv__version_spec.rb +0 -60
- data/modules/rbenv/spec/spec_helper_system.rb +0 -16
- data/modules/rbenv/spec/system/basic_spec.rb +0 -13
- data/modules/rbenv/templates/etc/profile.d/rbenv.sh.erb +0 -2
- data/modules/rbenv/tests/init.pp +0 -12
@@ -0,0 +1,237 @@
|
|
1
|
+
## Default vhosts, and custom vhosts
|
2
|
+
# NB: Please see the other vhost_*.pp example files for further
|
3
|
+
# examples.
|
4
|
+
|
5
|
+
# Base class. Declares default vhost on port 80 and default ssl
|
6
|
+
# vhost on port 443 listening on all interfaces and serving
|
7
|
+
# $apache::docroot
|
8
|
+
class { 'apache': }
|
9
|
+
|
10
|
+
# Most basic vhost
|
11
|
+
apache::vhost { 'first.example.com':
|
12
|
+
port => '80',
|
13
|
+
docroot => '/var/www/first',
|
14
|
+
}
|
15
|
+
|
16
|
+
# Vhost with different docroot owner/group
|
17
|
+
apache::vhost { 'second.example.com':
|
18
|
+
port => '80',
|
19
|
+
docroot => '/var/www/second',
|
20
|
+
docroot_owner => 'third',
|
21
|
+
docroot_group => 'third',
|
22
|
+
}
|
23
|
+
|
24
|
+
# Vhost with serveradmin
|
25
|
+
apache::vhost { 'third.example.com':
|
26
|
+
port => '80',
|
27
|
+
docroot => '/var/www/third',
|
28
|
+
serveradmin => 'admin@example.com',
|
29
|
+
}
|
30
|
+
|
31
|
+
# Vhost with ssl (uses default ssl certs)
|
32
|
+
apache::vhost { 'ssl.example.com':
|
33
|
+
port => '443',
|
34
|
+
docroot => '/var/www/ssl',
|
35
|
+
ssl => true,
|
36
|
+
}
|
37
|
+
|
38
|
+
# Vhost with ssl and specific ssl certs
|
39
|
+
apache::vhost { 'fourth.example.com':
|
40
|
+
port => '443',
|
41
|
+
docroot => '/var/www/fourth',
|
42
|
+
ssl => true,
|
43
|
+
ssl_cert => '/etc/ssl/fourth.example.com.cert',
|
44
|
+
ssl_key => '/etc/ssl/fourth.example.com.key',
|
45
|
+
}
|
46
|
+
|
47
|
+
# Vhost with english title and servername parameter
|
48
|
+
apache::vhost { 'The fifth vhost':
|
49
|
+
servername => 'fifth.example.com',
|
50
|
+
port => '80',
|
51
|
+
docroot => '/var/www/fifth',
|
52
|
+
}
|
53
|
+
|
54
|
+
# Vhost with server aliases
|
55
|
+
apache::vhost { 'sixth.example.com':
|
56
|
+
serveraliases => [
|
57
|
+
'sixth.example.org',
|
58
|
+
'sixth.example.net',
|
59
|
+
],
|
60
|
+
port => '80',
|
61
|
+
docroot => '/var/www/fifth',
|
62
|
+
}
|
63
|
+
|
64
|
+
# Vhost with alternate options
|
65
|
+
apache::vhost { 'seventh.example.com':
|
66
|
+
port => '80',
|
67
|
+
docroot => '/var/www/seventh',
|
68
|
+
options => [
|
69
|
+
'Indexes',
|
70
|
+
'MultiViews',
|
71
|
+
],
|
72
|
+
}
|
73
|
+
|
74
|
+
# Vhost with AllowOverride for .htaccess
|
75
|
+
apache::vhost { 'eighth.example.com':
|
76
|
+
port => '80',
|
77
|
+
docroot => '/var/www/eighth',
|
78
|
+
override => 'All',
|
79
|
+
}
|
80
|
+
|
81
|
+
# Vhost with access and error logs disabled
|
82
|
+
apache::vhost { 'ninth.example.com':
|
83
|
+
port => '80',
|
84
|
+
docroot => '/var/www/ninth',
|
85
|
+
access_log => false,
|
86
|
+
error_log => false,
|
87
|
+
}
|
88
|
+
|
89
|
+
# Vhost with custom access and error logs and logroot
|
90
|
+
apache::vhost { 'tenth.example.com':
|
91
|
+
port => '80',
|
92
|
+
docroot => '/var/www/tenth',
|
93
|
+
access_log_file => 'tenth_vhost.log',
|
94
|
+
error_log_file => 'tenth_vhost_error.log',
|
95
|
+
logroot => '/var/log',
|
96
|
+
}
|
97
|
+
|
98
|
+
# Vhost with a cgi-bin
|
99
|
+
apache::vhost { 'eleventh.example.com':
|
100
|
+
port => '80',
|
101
|
+
docroot => '/var/www/eleventh',
|
102
|
+
scriptalias => '/usr/lib/cgi-bin',
|
103
|
+
}
|
104
|
+
|
105
|
+
# Vhost with a proxypass configuration
|
106
|
+
apache::vhost { 'twelfth.example.com':
|
107
|
+
port => '80',
|
108
|
+
docroot => '/var/www/twelfth',
|
109
|
+
proxy_dest => 'http://internal.example.com:8080/twelfth',
|
110
|
+
no_proxy_uris => ['/login','/logout'],
|
111
|
+
}
|
112
|
+
|
113
|
+
# Vhost to redirect /login and /logout
|
114
|
+
apache::vhost { 'thirteenth.example.com':
|
115
|
+
port => '80',
|
116
|
+
docroot => '/var/www/thirteenth',
|
117
|
+
redirect_source => [
|
118
|
+
'/login',
|
119
|
+
'/logout',
|
120
|
+
],
|
121
|
+
redirect_dest => [
|
122
|
+
'http://10.0.0.10/login',
|
123
|
+
'http://10.0.0.10/logout',
|
124
|
+
],
|
125
|
+
}
|
126
|
+
|
127
|
+
# Vhost to permamently redirect
|
128
|
+
apache::vhost { 'fourteenth.example.com':
|
129
|
+
port => '80',
|
130
|
+
docroot => '/var/www/fourteenth',
|
131
|
+
redirect_source => '/blog',
|
132
|
+
redirect_dest => 'http://blog.example.com',
|
133
|
+
redirect_status => 'permanent',
|
134
|
+
}
|
135
|
+
|
136
|
+
# Vhost with a rack configuration
|
137
|
+
apache::vhost { 'fifteenth.example.com':
|
138
|
+
port => '80',
|
139
|
+
docroot => '/var/www/fifteenth',
|
140
|
+
rack_base_uris => ['/rackapp1', '/rackapp2'],
|
141
|
+
}
|
142
|
+
|
143
|
+
# Vhost to redirect non-ssl to ssl
|
144
|
+
apache::vhost { 'sixteenth.example.com non-ssl':
|
145
|
+
servername => 'sixteenth.example.com',
|
146
|
+
port => '80',
|
147
|
+
docroot => '/var/www/sixteenth',
|
148
|
+
rewrites => [
|
149
|
+
{
|
150
|
+
comment => "redirect non-SSL traffic to SSL site",
|
151
|
+
rewrite_cond => ['%{HTTPS} off'],
|
152
|
+
rewrite_rule => ['(.*) https://%{HTTPS_HOST}%{REQUEST_URI}'],
|
153
|
+
}
|
154
|
+
]
|
155
|
+
}
|
156
|
+
apache::vhost { 'sixteenth.example.com ssl':
|
157
|
+
servername => 'sixteenth.example.com',
|
158
|
+
port => '443',
|
159
|
+
docroot => '/var/www/sixteenth',
|
160
|
+
ssl => true,
|
161
|
+
}
|
162
|
+
|
163
|
+
# Vhost to redirect non-ssl to ssl using old rewrite method
|
164
|
+
apache::vhost { 'sixteenth.example.com non-ssl old rewrite':
|
165
|
+
servername => 'sixteenth.example.com',
|
166
|
+
port => '80',
|
167
|
+
docroot => '/var/www/sixteenth',
|
168
|
+
rewrite_cond => '%{HTTPS} off',
|
169
|
+
rewrite_rule => '(.*) https://%{HTTPS_HOST}%{REQUEST_URI}',
|
170
|
+
}
|
171
|
+
apache::vhost { 'sixteenth.example.com ssl old rewrite':
|
172
|
+
servername => 'sixteenth.example.com',
|
173
|
+
port => '443',
|
174
|
+
docroot => '/var/www/sixteenth',
|
175
|
+
ssl => true,
|
176
|
+
}
|
177
|
+
|
178
|
+
# Vhost to block repository files
|
179
|
+
apache::vhost { 'seventeenth.example.com':
|
180
|
+
port => '80',
|
181
|
+
docroot => '/var/www/seventeenth',
|
182
|
+
block => 'scm',
|
183
|
+
}
|
184
|
+
|
185
|
+
# Vhost with special environment variables
|
186
|
+
apache::vhost { 'eighteenth.example.com':
|
187
|
+
port => '80',
|
188
|
+
docroot => '/var/www/eighteenth',
|
189
|
+
setenv => ['SPECIAL_PATH /foo/bin','KILROY was_here'],
|
190
|
+
}
|
191
|
+
|
192
|
+
apache::vhost { 'nineteenth.example.com':
|
193
|
+
port => '80',
|
194
|
+
docroot => '/var/www/nineteenth',
|
195
|
+
setenvif => 'Host "^([^\.]*)\.website\.com$" CLIENT_NAME=$1',
|
196
|
+
}
|
197
|
+
|
198
|
+
# Vhost with additional include files
|
199
|
+
apache::vhost { 'twentyieth.example.com':
|
200
|
+
port => '80',
|
201
|
+
docroot => '/var/www/twelfth',
|
202
|
+
additional_includes => ['/tmp/proxy_group_a','/tmp/proxy_group_b'],
|
203
|
+
}
|
204
|
+
|
205
|
+
# Vhost with alias for subdomain mapped to same named directory
|
206
|
+
# http://example.com.loc => /var/www/example.com
|
207
|
+
apache::vhost { 'subdomain.loc':
|
208
|
+
vhost_name => '*',
|
209
|
+
port => '80',
|
210
|
+
virtual_docroot => '/var/www/%-2+',
|
211
|
+
docroot => '/var/www',
|
212
|
+
serveraliases => ['*.loc',],
|
213
|
+
}
|
214
|
+
|
215
|
+
# Vhost with SSLProtocol,SSLCipherSuite, SSLHonorCipherOrder
|
216
|
+
apache::vhost { 'securedomain.com':
|
217
|
+
priority => '10',
|
218
|
+
vhost_name => 'www.securedomain.com',
|
219
|
+
port => '443',
|
220
|
+
docroot => '/var/www/secure',
|
221
|
+
ssl => true,
|
222
|
+
ssl_cert => '/etc/ssl/securedomain.cert',
|
223
|
+
ssl_key => '/etc/ssl/securedomain.key',
|
224
|
+
ssl_chain => '/etc/ssl/securedomain.crt',
|
225
|
+
ssl_protocol => '-ALL +SSLv3 +TLSv1',
|
226
|
+
ssl_cipher => 'ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM',
|
227
|
+
ssl_honorcipherorder => 'On',
|
228
|
+
add_listen => 'false',
|
229
|
+
}
|
230
|
+
|
231
|
+
# Vhost with access log environment variables writing control
|
232
|
+
apache::vhost { 'twentyfirst.example.com':
|
233
|
+
port => '80',
|
234
|
+
docroot => '/var/www/twentyfirst',
|
235
|
+
access_log_env_var => 'admin',
|
236
|
+
}
|
237
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Base class. Declares default vhost on port 80 and default ssl
|
2
|
+
# vhost on port 443 listening on all interfaces and serving
|
3
|
+
# $apache::docroot
|
4
|
+
class { 'apache': }
|
5
|
+
|
6
|
+
# Example from README adapted.
|
7
|
+
apache::vhost { 'readme.example.net':
|
8
|
+
docroot => '/var/www/readme',
|
9
|
+
directories => [
|
10
|
+
{ path => '/var/www/readme', 'ServerTokens' => 'prod' },
|
11
|
+
{ path => '/usr/share/empty', 'allow' => 'from all' },
|
12
|
+
],
|
13
|
+
}
|
14
|
+
|
15
|
+
# location test
|
16
|
+
apache::vhost { 'location.example.net':
|
17
|
+
docroot => '/var/www/location',
|
18
|
+
directories => [
|
19
|
+
{ path => '/location', 'provider' => 'location', 'ServerTokens' => 'prod' },
|
20
|
+
],
|
21
|
+
}
|
22
|
+
|
23
|
+
# files test, curedly disable access to accidental backup files.
|
24
|
+
apache::vhost { 'files.example.net':
|
25
|
+
docroot => '/var/www/files',
|
26
|
+
directories => [
|
27
|
+
{ path => '~ (\.swp|\.bak|~)$', 'provider' => 'files', 'deny' => 'from all' },
|
28
|
+
],
|
29
|
+
}
|
30
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
## IP-based vhosts on any listen port
|
2
|
+
# IP-based vhosts respond to requests on specific IP addresses.
|
3
|
+
|
4
|
+
# Base class. Turn off the default vhosts; we will be declaring
|
5
|
+
# all vhosts below.
|
6
|
+
class { 'apache':
|
7
|
+
default_vhost => false,
|
8
|
+
}
|
9
|
+
|
10
|
+
# Listen on port 80 and 81; required because the following vhosts
|
11
|
+
# are not declared with a port parameter.
|
12
|
+
apache::listen { '80': }
|
13
|
+
apache::listen { '81': }
|
14
|
+
|
15
|
+
# IP-based vhosts
|
16
|
+
apache::vhost { 'first.example.com':
|
17
|
+
ip => '10.0.0.10',
|
18
|
+
docroot => '/var/www/first',
|
19
|
+
ip_based => true,
|
20
|
+
}
|
21
|
+
apache::vhost { 'second.example.com':
|
22
|
+
ip => '10.0.0.11',
|
23
|
+
docroot => '/var/www/second',
|
24
|
+
ip_based => true,
|
25
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
## SSL-enabled vhosts
|
2
|
+
# SSL-enabled vhosts respond only to HTTPS queries.
|
3
|
+
|
4
|
+
# Base class. Turn off the default vhosts; we will be declaring
|
5
|
+
# all vhosts below.
|
6
|
+
class { 'apache':
|
7
|
+
default_vhost => false,
|
8
|
+
}
|
9
|
+
|
10
|
+
# Non-ssl vhost
|
11
|
+
apache::vhost { 'first.example.com non-ssl':
|
12
|
+
servername => 'first.example.com',
|
13
|
+
port => '80',
|
14
|
+
docroot => '/var/www/first',
|
15
|
+
}
|
16
|
+
|
17
|
+
# SSL vhost at the same domain
|
18
|
+
apache::vhost { 'first.example.com ssl':
|
19
|
+
servername => 'first.example.com',
|
20
|
+
port => '443',
|
21
|
+
docroot => '/var/www/first',
|
22
|
+
ssl => true,
|
23
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
## Declare ip-based and name-based vhosts
|
2
|
+
# Mixing Name-based vhost with IP-specific vhosts requires `add_listen =>
|
3
|
+
# 'false'` on the non-IP vhosts
|
4
|
+
|
5
|
+
# Base class. Turn off the default vhosts; we will be declaring
|
6
|
+
# all vhosts below.
|
7
|
+
class { 'apache':
|
8
|
+
default_vhost => false,
|
9
|
+
}
|
10
|
+
|
11
|
+
|
12
|
+
# Add two an IP-based vhost on 10.0.0.10, ssl and non-ssl
|
13
|
+
apache::vhost { 'The first IP-based vhost, non-ssl':
|
14
|
+
servername => 'first.example.com',
|
15
|
+
ip => '10.0.0.10',
|
16
|
+
port => '80',
|
17
|
+
ip_based => true,
|
18
|
+
docroot => '/var/www/first',
|
19
|
+
}
|
20
|
+
apache::vhost { 'The first IP-based vhost, ssl':
|
21
|
+
servername => 'first.example.com',
|
22
|
+
ip => '10.0.0.10',
|
23
|
+
port => '443',
|
24
|
+
ip_based => true,
|
25
|
+
docroot => '/var/www/first-ssl',
|
26
|
+
ssl => true,
|
27
|
+
}
|
28
|
+
|
29
|
+
# Two name-based vhost listening on 10.0.0.20
|
30
|
+
apache::vhost { 'second.example.com':
|
31
|
+
ip => '10.0.0.20',
|
32
|
+
port => '80',
|
33
|
+
docroot => '/var/www/second',
|
34
|
+
}
|
35
|
+
apache::vhost { 'third.example.com':
|
36
|
+
ip => '10.0.0.20',
|
37
|
+
port => '80',
|
38
|
+
docroot => '/var/www/third',
|
39
|
+
}
|
40
|
+
|
41
|
+
# Two name-based vhosts without IPs specified, so that they will answer on either 10.0.0.10 or 10.0.0.20 . It is requried to declare
|
42
|
+
# `add_listen => 'false'` to disable declaring "Listen 80" which will conflict
|
43
|
+
# with the IP-based preceeding vhosts.
|
44
|
+
apache::vhost { 'fourth.example.com':
|
45
|
+
port => '80',
|
46
|
+
docroot => '/var/www/fourth',
|
47
|
+
add_listen => false,
|
48
|
+
}
|
49
|
+
apache::vhost { 'fifth.example.com':
|
50
|
+
port => '80',
|
51
|
+
docroot => '/var/www/fifth',
|
52
|
+
add_listen => false,
|
53
|
+
}
|
@@ -1,20 +1,10 @@
|
|
1
1
|
class freighthop::database::mysql(
|
2
|
-
$
|
2
|
+
$databases,
|
3
3
|
$users,
|
4
4
|
) {
|
5
5
|
include mysql::server
|
6
|
+
include mysql::client
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
host => "localhost",
|
11
|
-
grant => ['All']
|
12
|
-
}
|
13
|
-
mysql_grant { $users:
|
14
|
-
ensure => 'present',
|
15
|
-
options => ['GRANT'],
|
16
|
-
privileges => ['ALL'],
|
17
|
-
table => '*.*',
|
18
|
-
user => 'notorious@%',
|
19
|
-
}
|
20
|
-
}
|
8
|
+
mysql_database { $databases: } ->
|
9
|
+
freighthop::database::mysql::grant { $users: }
|
10
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class freighthop::database::postgres(
|
2
|
-
$
|
2
|
+
$databases,
|
3
3
|
$users,
|
4
4
|
) {
|
5
5
|
include postgresql::server
|
@@ -19,7 +19,7 @@ class freighthop::database::postgres(
|
|
19
19
|
auth_method => 'trust',
|
20
20
|
order => '0001',
|
21
21
|
}
|
22
|
-
postgresql::server::database { $
|
22
|
+
postgresql::server::database { $databases: }
|
23
23
|
postgresql::server::role { $users:
|
24
24
|
superuser => true,
|
25
25
|
createdb => true,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class freighthop::database(
|
2
|
-
$
|
2
|
+
$servers = []
|
3
3
|
) {
|
4
|
-
if
|
4
|
+
if member($servers, 'postgres') {
|
5
5
|
class { 'freighthop::database::postgres':}
|
6
6
|
}
|
7
|
-
if
|
7
|
+
if member($servers, 'mysql') {
|
8
8
|
class { 'freighthop::database::mysql':}
|
9
9
|
}
|
10
10
|
}
|
@@ -1,35 +1,18 @@
|
|
1
1
|
class freighthop(
|
2
|
-
$ppas
|
3
|
-
$packages
|
4
|
-
$languages
|
5
|
-
|
6
|
-
|
7
|
-
$app_root = $freighthop::params::app_root,
|
8
|
-
$web_root = $freighthop::params::web_root,
|
9
|
-
$web_port = $freighthop::params::web_port,
|
10
|
-
$server_name = $freighthop::params::server_name,
|
11
|
-
$ssl_cert_path = $freighthop::params::ssl_cert_path,
|
12
|
-
$ssl_key_path = $freighthop::params::ssl_key_path,
|
13
|
-
) inherits freighthop::params {
|
14
|
-
|
2
|
+
$ppas,
|
3
|
+
$packages,
|
4
|
+
$languages,
|
5
|
+
) {
|
6
|
+
class { 'freighthop::params': } ->
|
15
7
|
class { 'freighthop::packages':
|
16
8
|
ppas => $ppas,
|
17
9
|
packages => $packages,
|
18
|
-
languages => $languages,
|
19
10
|
} ->
|
20
11
|
|
21
12
|
class { 'freighthop::language':
|
22
13
|
languages => $languages,
|
23
|
-
ruby_version => $ruby_version
|
24
|
-
} ->
|
25
|
-
|
26
|
-
class { 'freighthop::web':
|
27
|
-
upstream_web_port => $web_port,
|
28
|
-
server_name => $server_name,
|
29
|
-
web_root => $web_root,
|
30
|
-
ssl_cert_path => $ssl_cert_path,
|
31
|
-
ssl_key_path => $ssl_key_path,
|
32
14
|
} ->
|
33
15
|
|
16
|
+
class { 'freighthop::web': } ->
|
34
17
|
class { 'freighthop::database':}
|
35
18
|
}
|
@@ -1,29 +1,9 @@
|
|
1
1
|
class freighthop::language::ruby(
|
2
|
-
$version
|
2
|
+
$version = $freighthop::params::ruby_version
|
3
3
|
){
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
rbenv::version { $version: }
|
9
|
-
|
10
|
-
# The rbenv puppet module drops $RBENV_ROOT/version but the package from
|
11
|
-
# ppa:gds/govuk is an older version of rbenv that expects $RBENV_ROOT/global;
|
12
|
-
# this is a workaround that uses the installed CLI to fix it.
|
13
|
-
exec { 'fix-rbenv-global-version':
|
14
|
-
command => "rbenv global ${version}",
|
15
|
-
unless => "rbenv global | grep '${version}'",
|
16
|
-
environment => 'RBENV_ROOT=/usr/lib/rbenv',
|
17
|
-
require => Rbenv::Version[$version]
|
18
|
-
}
|
19
|
-
|
20
|
-
Exec {
|
21
|
-
path => [
|
22
|
-
'/usr/local/bin',
|
23
|
-
'/usr/bin',
|
24
|
-
'/usr/sbin',
|
25
|
-
'/bin',
|
26
|
-
'/sbin',
|
27
|
-
]
|
4
|
+
rbenv::install { 'vagrant': }
|
5
|
+
rbenv::compile { $version:
|
6
|
+
global => true,
|
7
|
+
user => 'vagrant',
|
28
8
|
}
|
29
9
|
}
|
@@ -1,11 +1,8 @@
|
|
1
1
|
class freighthop::language(
|
2
2
|
$languages,
|
3
|
-
$ruby_version
|
4
3
|
) {
|
5
4
|
if (member($languages, 'ruby')) {
|
6
|
-
class { 'freighthop::language::ruby':
|
7
|
-
version => $ruby_version,
|
8
|
-
}
|
5
|
+
class { 'freighthop::language::ruby': }
|
9
6
|
}
|
10
7
|
if (member($languages, 'clojure')) {
|
11
8
|
class { 'freighthop::language::clojure':
|
@@ -1,20 +1,10 @@
|
|
1
1
|
class freighthop::packages(
|
2
2
|
$ppas,
|
3
3
|
$packages,
|
4
|
-
$languages,
|
5
4
|
) {
|
6
|
-
|
7
|
-
apt::ppa { 'ppa:gds/govuk': }
|
8
|
-
apt::ppa { 'ppa:phinze/rbenv': }
|
9
|
-
}
|
10
|
-
apt::ppa { $ppas: }
|
5
|
+
include apt
|
11
6
|
|
12
|
-
|
13
|
-
'build-essential',
|
14
|
-
'git-core',
|
15
|
-
]:
|
16
|
-
ensure => installed,
|
17
|
-
}
|
7
|
+
apt::ppa { $ppas: }
|
18
8
|
|
19
9
|
package { $packages:
|
20
10
|
ensure => installed,
|
@@ -1,13 +1,21 @@
|
|
1
1
|
class freighthop::params {
|
2
|
-
$packages
|
3
|
-
$ppas
|
4
|
-
$languages
|
5
|
-
$ruby_version
|
6
|
-
$app_name
|
7
|
-
$app_root
|
8
|
-
$
|
9
|
-
$
|
10
|
-
$
|
11
|
-
$
|
12
|
-
$
|
2
|
+
$packages = []
|
3
|
+
$ppas = []
|
4
|
+
$languages = []
|
5
|
+
$ruby_version = '1.9.3-p392'
|
6
|
+
$app_name = $::hostname
|
7
|
+
$app_root = "/srv/${app_name}"
|
8
|
+
$web_servers = ['nginx']
|
9
|
+
$web_root = "${app_root}/public"
|
10
|
+
$http_port = 80
|
11
|
+
$https_port = 443
|
12
|
+
$upstream_port = 3000
|
13
|
+
$server_name = $::fqdn
|
14
|
+
$ssl = true
|
15
|
+
$ssl_cert_path = "/etc/ssl/certs/${app_name}.pem"
|
16
|
+
$ssl_key_path = "/etc/ssl/private/${app_name}.key"
|
17
|
+
$uid = $::freighthop_uid
|
18
|
+
$gid = $::freighthop_gid
|
19
|
+
$passenger = false
|
20
|
+
$passenger_buffer_upload = false
|
13
21
|
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
class freighthop::web::apache(
|
2
|
+
$ssl,
|
3
|
+
$ssl_cert_path,
|
4
|
+
$ssl_key_path,
|
5
|
+
$server_name,
|
6
|
+
$port = $freighthop::params::http_port,
|
7
|
+
$ssl_port = $freighthop::params::https_port,
|
8
|
+
$upstream_port = $freighthop::params::upstream_port,
|
9
|
+
$owner = $freighthop::params::uid,
|
10
|
+
$group = $freighthop::params::gid,
|
11
|
+
$web_root = $freighthop::params::web_root,
|
12
|
+
$passenger = $freighthop::params::passenger,
|
13
|
+
$passenger_buffer_upload = $freighthop::params::passenger_buffer_upload,
|
14
|
+
) {
|
15
|
+
class { '::apache':
|
16
|
+
default_vhost => false,
|
17
|
+
}
|
18
|
+
apache::vhost { "${server_name} non-ssl":
|
19
|
+
servername => $server_name,
|
20
|
+
docroot => $web_root,
|
21
|
+
port => $port,
|
22
|
+
docroot_owner => $owner,
|
23
|
+
docroot_group => $group,
|
24
|
+
}
|
25
|
+
|
26
|
+
if str2bool($ssl) {
|
27
|
+
apache::vhost { "${server_name} ssl":
|
28
|
+
servername => $server_name,
|
29
|
+
docroot => $web_root,
|
30
|
+
port => $ssl_port,
|
31
|
+
ssl => true,
|
32
|
+
ssl_cert => $ssl_cert_path,
|
33
|
+
ssl_key => $ssl_key_path,
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
if str2bool($passenger) {
|
38
|
+
package { 'apt-transport-https':
|
39
|
+
ensure => installed
|
40
|
+
} ->
|
41
|
+
apt::source { 'phusion':
|
42
|
+
location => 'https://oss-binaries.phusionpassenger.com/apt/passenger',
|
43
|
+
key => '561F9B9CAC40B2F7',
|
44
|
+
pin => 1000,
|
45
|
+
} ->
|
46
|
+
package { 'passenger':
|
47
|
+
ensure => 'installed'
|
48
|
+
} ->
|
49
|
+
apache::mod { 'passenger':
|
50
|
+
} ->
|
51
|
+
file { '/etc/apache2/conf.d/passenger.conf':
|
52
|
+
ensure => present,
|
53
|
+
owner => 'root',
|
54
|
+
group => 'root',
|
55
|
+
mode => '0644',
|
56
|
+
content => template('freighthop/apache/passenger.conf.erb'),
|
57
|
+
notify => Service['httpd'],
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
class freighthop::web::nginx(
|
2
|
+
$ssl,
|
3
|
+
$ssl_cert_path,
|
4
|
+
$ssl_key_path,
|
5
|
+
$server_name,
|
6
|
+
$port = $freighthop::params::http_port,
|
7
|
+
$ssl_port = $freighthop::params::https_port,
|
8
|
+
$upstream_port = $freighthop::params::upstream_port,
|
9
|
+
$web_root = $freighthop::params::web_root,
|
10
|
+
) {
|
11
|
+
class {'::nginx':
|
12
|
+
confd_purge => true
|
13
|
+
}
|
14
|
+
|
15
|
+
file { '/etc/nginx/conf.d/vagrant-rails.conf':
|
16
|
+
owner => 'root',
|
17
|
+
group => 'root',
|
18
|
+
mode => '0644',
|
19
|
+
content => template('freighthop/nginx/vagrant-rails.conf.erb'),
|
20
|
+
notify => Service['nginx'],
|
21
|
+
}
|
22
|
+
}
|