|
1 | 1 | # Class: puppet::unicorn
|
2 | 2 | #
|
3 | 3 | # Parameters:
|
4 |
| -# ['listen_address'] - IP for binding the webserver, defaults to * |
5 |
| -# ['puppet_proxy_port'] - The port for the virtual host |
6 |
| -# ['disable_ssl'] - Disables SSL on the webserver. usefull if you use this master behind a loadbalancer. currently only supported by nginx, defaults to undef |
7 |
| -# ['backup_upstream'] - specify another puppet master as fallback. currently only supported by nginx |
8 |
| -# ['unicorn_package'] - package name of a unicorn rpm. if provided we install it, otherwise we built it via gem/gcc |
9 |
| -# ['unicorn_path'] - custom path to the unicorn binary |
| 4 | +# ['certname'] - |
| 5 | +# ['puppet_conf'] - |
| 6 | +# ['puppet_ssldir'] - |
| 7 | +# ['dns_alt_names'] - |
| 8 | +# ['listen_address'] - IP for binding the webserver, defaults to * |
| 9 | +# ['puppet_proxy_port'] - The port for the virtual host |
| 10 | +# ['disable_ssl'] - Disables SSL on the webserver. usefull if you use this master behind a loadbalancer. currently only supported by nginx, defaults to undef |
| 11 | +# ['backup_upstream'] - specify several puppet master as fallback. currently only supported by nginx |
| 12 | +# ['unicorn_package'] - package name of a unicorn rpm. if provided we install it, otherwise we built it via gem/gcc |
| 13 | +# ['unicorn_path'] - custom path to the unicorn binary |
| 14 | +# ['disable_master'] - this disables the normal master, the server will only act as a CA |
| 15 | +# ['upstream'] - define additional masters reachable via tcp as an array |
10 | 16 | #
|
11 | 17 | # Actions:
|
12 | 18 | # - Configures nginx and unicorn for puppet master use. Tested only on CentOS 7
|
| 19 | +# - server can act as a simple LB with multiple puppet master backends and backups |
13 | 20 | #
|
14 | 21 | # Requires:
|
15 | 22 | # - nginx
|
|
34 | 41 | $backup_upstream,
|
35 | 42 | $unicorn_package,
|
36 | 43 | $unicorn_path,
|
| 44 | + $disable_master, |
| 45 | + $upstream, |
37 | 46 | ){
|
38 | 47 | class { '::nginx':
|
39 | 48 | worker_processes => $::processorcount,
|
|
96 | 105 | }
|
97 | 106 |
|
98 | 107 | # first we need to generate the cert
|
99 |
| - # Clean the installed certs out ifrst |
| 108 | + # Clean the installed certs out first |
100 | 109 | $crt_clean_cmd = "puppet cert clean ${certname}"
|
101 | 110 | # I would have preferred to use puppet cert generate, but it does not
|
102 |
| - # return the corret exit code on some versions of puppet |
| 111 | + # return the correct exit code on some versions of puppet |
103 | 112 | $crt_gen_cmd = "puppet certificate --ca-location=local --dns_alt_names=$dns_alt_names generate ${certname}"
|
104 | 113 | # I am using the sign command here b/c AFAICT, the sign command for certificate
|
105 | 114 | # does not work
|
|
116 | 125 | require => File[$puppet_conf]
|
117 | 126 | }
|
118 | 127 |
|
119 |
| - |
120 |
| - |
121 |
| - |
122 | 128 | # hacky vhost
|
123 | 129 | file {'puppetmaster-vhost':
|
124 | 130 | path => '/etc/nginx/sites-available/puppetmaster',
|
|
0 commit comments