summaryrefslogtreecommitdiffstats
path: root/ext/rack/README
blob: 63b8fde7af8800fb60b40a90c6d89f9e39e6d4f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

PUPPETMASTER AS A RACK APPLICATION
==================================

puppetmaster can now be hosted as a standard Rack application. A proper
config.ru is provided for this.

For more details about rack, see http://rack.rubyforge.org/ .

Getting started
===============

You'll need rack installed, version 1.0.0. Older versions are known not
to work.


WEBrick
-------

WEBrick is currently not supported as a Rack host. You'll be better off
just running puppetmasterd directly.


Mongrel
-------

If you like Mongrel, and want to replicate wiki:UsingMongrel, you could
probably start your backend mongrels this way:

cd ext/rack
for port in `seq 18140 18150`; do
  rackup --server mongrel --port $port &
done

rackup is part of the rack gem. Make sure it's in your path.



Apache with Passenger (aka mod_rails)
-------------------------------------

Make sure puppetmasterd ran at least once, so the SSL certificates
got set up.

Requirements:
  Passenger version 2.2.2 or newer [1]
  Rack version 1.0.0
  Apache 2.x
  SSL Module loaded

Apache configuration snippet is in files/apache2.conf. You need to
edit it to reflect your servername.

Required puppet.conf settings:
  [puppetmasterd]
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY

To set up most of the boring stuff, you can use this command:
  puppet --verbose --modulepath ./ext ext/rack/manifest.pp
Or use manifest.pp as a starting point for your own module.

Note: Passenger will not let applications run as root or the Apache user,
instead an implicit setuid will be done, to the user whom owns
config.ru. Therefore, config.ru shall be owned by the puppet user.


[1] http://www.modrails.com/install.html