Foreman installer » History » Version 18
Greg Sutcliffe, 10/23/2012 12:53 PM
1 | 4 | Ohad Levy | {{toc}} |
---|---|---|---|
2 | |||
3 | 3 | Ohad Levy | h1. Puppet modules for managing Foreman |
4 | 1 | Romain Vrignaud | |
5 | 5 | Ohad Levy | The installer can be used in multiple ways: |
6 | * Installs Foreman as a standalone application or using apache passenger. |
||
7 | * Installs Foreman Proxy |
||
8 | * May install an example puppet master setup using passenger as well, including the tweaks required for foreman. |
||
9 | 1 | Romain Vrignaud | |
10 | 7 | Ohad Levy | h2. Installation |
11 | 1 | Romain Vrignaud | |
12 | 12 | Greg Sutcliffe | h3. A note on older puppet versions |
13 | |||
14 | The "master" branches are being updated with parameterized classes. If you are running a version of Puppet which doesn't support this (0.25.x or lower) then you should check out the "oldstable" versions of the modules. We will try to fix bugs in either branch, so bug reports are appreciated in either case. Currently, "oldstable" branches exist for: |
||
15 | 13 | Greg Sutcliffe | * puppet-foreman_proxy (master not parameterized yet, but contains references to experimental DHCP/DNS modules) |
16 | * puppet-puppet (master parameterized for both agent and server, see README for details) |
||
17 | 12 | Greg Sutcliffe | |
18 | 7 | Ohad Levy | h3. Using GIT |
19 | 1 | Romain Vrignaud | |
20 | 12 | Greg Sutcliffe | <pre> |
21 | git clone --recursive git://github.com/theforeman/foreman-installer.git (for the latest installer) |
||
22 | git clone --recursive git://github.com/theforeman/foreman-installer.git -b oldstable (for puppet 0.25.x or lower) |
||
23 | </pre> |
||
24 | 7 | Ohad Levy | |
25 | h3. Direct download |
||
26 | |||
27 | Since we are no longer using one repository for all sources, a single tarball is no longer provided. |
||
28 | You can either follow the script below, or download the source code for each module on its own: |
||
29 | |||
30 | http://github.com/theforeman/puppet-apache/tarball/master |
||
31 | http://github.com/theforeman/puppet-foreman/tarball/master |
||
32 | 1 | Romain Vrignaud | http://github.com/theforeman/puppet-foreman_proxy/tarball/master |
33 | 12 | Greg Sutcliffe | http://github.com/theforeman/puppet-git/tarball/master |
34 | 7 | Ohad Levy | http://github.com/theforeman/puppet-passenger/tarball/master |
35 | http://github.com/theforeman/puppet-puppet/tarball/master |
||
36 | http://github.com/theforeman/puppet-tftp/tarball/master |
||
37 | 1 | Romain Vrignaud | http://github.com/theforeman/puppet-xinetd/tarball/master |
38 | 12 | Greg Sutcliffe | |
39 | Optional Modules: |
||
40 | |||
41 | These provide support for the experimental DHCP/DNS auto configuration in the proxy. Use at your own risk (but send me bug reports :P) |
||
42 | 17 | Greg Sutcliffe | http://github.com/theforeman/puppet-concat/tarball/master (dependency for the next two) |
43 | http://github.com/theforeman/puppet-dhcp/tarball/master |
||
44 | http://github.com/theforeman/puppet-dns/tarball/master |
||
45 | |||
46 | 7 | Ohad Levy | |
47 | 1 | Romain Vrignaud | h2. Requirements |
48 | 3 | Ohad Levy | |
49 | 1 | Romain Vrignaud | if you are using RHEL, EPEL repo must be enabled http://fedoraproject.org/wiki/EPEL |
50 | 4 | Ohad Levy | |
51 | 3 | Ohad Levy | if you are using Debian (or Ubuntu), see the additional notes in README.debian |
52 | 1 | Romain Vrignaud | |
53 | 11 | Lukas Zapletal | Make sure SELinux is disabled or permissive when running on Fedora/RHEL. |
54 | |||
55 | 18 | Greg Sutcliffe | h2. Setup/Configuration - using the answers file (current branch only) |
56 | 1 | Romain Vrignaud | |
57 | 18 | Greg Sutcliffe | We now support using a simple YAML file to supply all your requirements. You can find this file in @[download path]/foreman_installer/answers.yaml@. |
58 | |||
59 | There are only 4 modules which can be configured this way - all the others are dependencies. These are: |
||
60 | |||
61 | foreman |
||
62 | puppet |
||
63 | puppetmaster (maps to the puppet::server class) |
||
64 | foreman_proxy |
||
65 | |||
66 | This file has two methods for specifying modules. To simply turn a module on or off, specify the module and true or false. For example, to install just foreman and not puppet (with all the defaults): |
||
67 | |||
68 | foreman: true |
||
69 | puppet: false |
||
70 | puppetmaster: false |
||
71 | foreman_proxy: true |
||
72 | |||
73 | If you need to override any of the class parameters (review **/manifestes/params.pp*) then you need to switch to a hash-style. These can be mixed, for example to install foreman with the defaults, but use git for puppet environments: |
||
74 | |||
75 | foreman: true |
||
76 | puppet: |
||
77 | git_repo: true |
||
78 | puppetmaster: false |
||
79 | foreman_proxy: true |
||
80 | |||
81 | Using the hash style impicitly declares the class - there is no need to specify "true" (in fact this will throw an error, as it's not valid YAML). |
||
82 | |||
83 | Here are the some examples: |
||
84 | |||
85 | h3. only Foreman, using Webrick instead of Passenger |
||
86 | |||
87 | foreman: |
||
88 | passenger: false |
||
89 | ssl: false |
||
90 | puppet: false |
||
91 | puppetmaster: false |
||
92 | foreman_proxy: false |
||
93 | |||
94 | h3. Both foreman and its proxy, from the latest code (testing/nightly instead of stable): |
||
95 | |||
96 | foreman: |
||
97 | use_testing: true |
||
98 | puppet: false |
||
99 | puppetmaster: false |
||
100 | foreman_proxy: |
||
101 | use_testing: true |
||
102 | |||
103 | h3. All in one box (Puppet, Foreman, Proxy) using git for your environments: |
||
104 | |||
105 | foreman: true |
||
106 | puppet: |
||
107 | git_repo: true |
||
108 | puppetmaster: true |
||
109 | foreman_proxy: true |
||
110 | |||
111 | Any parameter found in the *params.pp* files in the relevant modules (foreman, foreman_proxy, and puppet) can be specified this way. If you have any issues with this, please supply your answers file when submitting the bug so we can reproduce this issue. |
||
112 | |||
113 | Once you have your answers file, you can run the foreman installer with a single line: |
||
114 | |||
115 | echo include foreman_installer | puppet --modulepath /path_to/extracted_tarball |
||
116 | |||
117 | h2. Setup/Configuration - using the params.pp files (current and oldstable) |
||
118 | |||
119 | 1 | Romain Vrignaud | *Please review the variables under */manifests/params.pp* |
120 | 8 | Ohad Levy | |
121 | 1 | Romain Vrignaud | h3. only Foreman |
122 | |||
123 | <pre> |
||
124 | echo include foreman | puppet --modulepath /path_to/extracted_tarball |
||
125 | 3 | Ohad Levy | </pre> |
126 | 8 | Ohad Levy | |
127 | 3 | Ohad Levy | h3. Both foreman and its proxy: |
128 | 1 | Romain Vrignaud | |
129 | <pre> |
||
130 | 3 | Ohad Levy | echo include foreman, foreman_proxy | puppet --modulepath /path_to/extracted_tarball |
131 | 1 | Romain Vrignaud | </pre> |
132 | 8 | Ohad Levy | |
133 | 7 | Ohad Levy | h3. On your Puppet Master |
134 | 3 | Ohad Levy | |
135 | 1 | Romain Vrignaud | if you just want to include the relavant bits to run on your puppet master you may |
136 | 7 | Ohad Levy | |
137 | 1 | Romain Vrignaud | <pre> |
138 | include foreman::params, foreman::config::enc, foreman::config::reports |
||
139 | 3 | Ohad Levy | </pre> |
140 | 8 | Ohad Levy | |
141 | 1 | Romain Vrignaud | h3. All in one box (Puppet, Foreman, Proxy) |
142 | 16 | Lee Lowder | |
143 | 7 | Ohad Levy | if you want to install it all on one box (2.6.x and older) |
144 | 1 | Romain Vrignaud | |
145 | 3 | Ohad Levy | <pre> |
146 | export MODULE_PATH="/etc/puppet/modules/common" |
||
147 | 10 | Greg Sutcliffe | mkdir -p $MODULE_PATH |
148 | 7 | Ohad Levy | for mod in apache foreman foreman_proxy git passenger puppet tftp xinetd; do |
149 | mkdir -p $MODULE_PATH/$mod |
||
150 | wget http://github.com/theforeman/puppet-$mod/tarball/master -O - | tar xzvf - -C $MODULE_PATH/$mod --strip-components=1 |
||
151 | 1 | Romain Vrignaud | done; |
152 | 16 | Lee Lowder | echo include puppet, puppet::server, foreman, foreman_proxy | puppet --modulepath $MODULE_PATH |
153 | </pre> |
||
154 | |||
155 | if you want to install it all on one box (2.7.x and newer) |
||
156 | |||
157 | <pre> |
||
158 | 1 | Romain Vrignaud | export MODULE_PATH="/etc/puppet/modules/common" |
159 | 16 | Lee Lowder | mkdir -p $MODULE_PATH |
160 | 18 | Greg Sutcliffe | for mod in apache concat dns dhcp foreman foreman_proxy git passenger puppet tftp xinetd; do |
161 | 16 | Lee Lowder | mkdir -p $MODULE_PATH/$mod |
162 | wget http://github.com/theforeman/puppet-$mod/tarball/master -O - | tar xzvf - -C $MODULE_PATH/$mod --strip-components=1 |
||
163 | done; |
||
164 | echo include puppet, puppet::server, foreman, foreman_proxy | puppet apply --modulepath $MODULE_PATH |
||
165 | 3 | Ohad Levy | </pre> |