Installation instructions » History » Version 54
Romain Vrignaud, 11/17/2011 08:51 AM
1 | 8 | Ohad Levy | {{toc}} |
---|---|---|---|
2 | 1 | Ohad Levy | |
3 | 38 | Paul Kelly | h1. Requirements for the foreman core component |
4 | 8 | Ohad Levy | |
5 | 1 | Ohad Levy | before you start, make sure you have: |
6 | |||
7 | * Puppet >= 0.24-4 |
||
8 | * rake >= 0.84 |
||
9 | 8 | Ohad Levy | * rubygems |
10 | * ruby-sqlite3 (libsqlite3-ruby) if you are going to use sqlite as your database |
||
11 | * git (if installing from source ) |
||
12 | 1 | Ohad Levy | |
13 | 44 | Jochen Schalanda | The installation has been successfully tested on RHEL[5,6], Fedora[13,14], Debian Linux 5.0 (Lenny) and 6.0 (Squeeze) and Ubuntu Linux 10.04, 10.10, and 11.04. For older operating systems you might need additional packages (e.g. sqlite). |
14 | |||
15 | 34 | Ohad Levy | It is also known to work on Solaris and Mac. |
16 | 1 | Ohad Levy | |
17 | 8 | Ohad Levy | h1. Download |
18 | 1 | Ohad Levy | |
19 | 13 | Ohad Levy | h2. Puppet Module ready to use |
20 | |||
21 | You may try out the puppet Foreman module, this should take care for most of the basic setup. |
||
22 | |||
23 | 25 | Ohad Levy | The module could be downloaded via: http://github.com/ohadlevy/puppet-foreman/tarball/master |
24 | 1 | Ohad Levy | |
25 | you may use puppet (if you don't want to add it as a module to your puppetmaster) in the following way: |
||
26 | |||
27 | 32 | Ohad Levy | if you are using RHEL, EPEL repo must be enabled http://fedoraproject.org/wiki/EPEL |
28 | 1 | Ohad Levy | |
29 | 25 | Ohad Levy | If you are using puppet store configs please set $using_store_configs to true in foreman/manifests/init.pp. |
30 | If you want this module to configure passenger as well, set $using_passenger to true in foreman/manifests/init.pp |
||
31 | 21 | Ohad Levy | |
32 | 25 | Ohad Levy | usage: |
33 | |||
34 | 21 | Ohad Levy | <pre> |
35 | 35 | Andrew Niemantsverdriet | echo include foreman | puppet --verbose --modulepath /path_to/extracted_tarball |
36 | 21 | Ohad Levy | </pre> |
37 | |||
38 | 13 | Ohad Levy | *Its recommend to review the module prior usage.* |
39 | |||
40 | 54 | Romain Vrignaud | h2. [[Debian-Ubuntu installation by packages]] |
41 | 29 | Ohad Levy | |
42 | 43 | Jochen Schalanda | The Foreman packages should work on the following Debian-based Linux distributions: |
43 | 1 | Ohad Levy | |
44 | 43 | Jochen Schalanda | * Debian Linux 5.0 (Lenny), see [[Installation_instructions#Debian-Linux-50-Lenny]] |
45 | * Debian Linux 6.0 (Squeeze) |
||
46 | * Ubuntu Linux 10.04 LTS (Lucid Lynx) |
||
47 | * Ubuntu Linux 10.10 (Maverick Meerkat) |
||
48 | * Ubuntu Linux 11.04 (Natty Narwhal) |
||
49 | |||
50 | If you encounter any errors during the installation, please file a bug report! |
||
51 | |||
52 | |||
53 | 48 | Eugene Ventimiglia | Add one of the following lines to your @/etc/apt/sources.list@ (alternatively in a separate file in @/etc/apt/sources.list.d/foreman.list@): |
54 | 43 | Jochen Schalanda | |
55 | 31 | Jochen Schalanda | <pre> |
56 | 47 | Jochen Schalanda | # Stable packages |
57 | 31 | Jochen Schalanda | deb http://deb.theforeman.org/ stable main |
58 | |||
59 | 47 | Jochen Schalanda | # Testing packages |
60 | 1 | Ohad Levy | deb http://deb.theforeman.org/ testing main |
61 | 47 | Jochen Schalanda | |
62 | # Nightly builds. Beware: HERE BE DRAGONS |
||
63 | deb http://deb.theforeman.org/ nightly main |
||
64 | 31 | Jochen Schalanda | </pre> |
65 | |||
66 | The public key for "secure APT":http://wiki.debian.org/SecureApt can be downloaded "here":http://deb.theforeman.org/foreman.asc |
||
67 | |||
68 | 1 | Ohad Levy | You can add this key with |
69 | 31 | Jochen Schalanda | <pre> |
70 | 43 | Jochen Schalanda | apt-key add foreman.asc |
71 | 31 | Jochen Schalanda | </pre> |
72 | 1 | Ohad Levy | |
73 | 31 | Jochen Schalanda | or combine downloading and registering: |
74 | <pre> |
||
75 | 43 | Jochen Schalanda | wget -q http://deb.theforeman.org/foreman.asc -O- | apt-key add - |
76 | 31 | Jochen Schalanda | </pre> |
77 | |||
78 | The key fingerprint is |
||
79 | <pre> |
||
80 | 1DCB 15D1 2CA1 40EE F494 7E57 66CF 053F E775 FF07 |
||
81 | Foreman Archive Signing Key <packages@theforeman.org> |
||
82 | </pre> |
||
83 | |||
84 | To install Foreman, run |
||
85 | |||
86 | 1 | Ohad Levy | <pre> |
87 | 31 | Jochen Schalanda | sudo apt-get update |
88 | |||
89 | # Depending on the database you want to use with Foreman, |
||
90 | 43 | Jochen Schalanda | # install one of these meta-packages: |
91 | 1 | Ohad Levy | sudo apt-get install foreman-mysql |
92 | sudo apt-get install foreman-pgsql |
||
93 | sudo apt-get install foreman-sqlite3 |
||
94 | 43 | Jochen Schalanda | |
95 | # or install the foreman main package and configure the |
||
96 | # database manually in /etc/foreman/database.yml |
||
97 | sudo apt-get install foreman |
||
98 | 1 | Ohad Levy | </pre> |
99 | 31 | Jochen Schalanda | |
100 | 43 | Jochen Schalanda | The only purpose of the meta-packages @foreman-mysql@, @foreman-pgsql@, and @foreman-sqlite3@ is to pull in any dependencies on the respective database system during the package installation. If you don't want to run the Foreman database on the same host, please use the @foreman@ package and configure the database settings in @/etc/foreman/database.yml@. You cannot use @dbconfig-common@ in this case. |
101 | |||
102 | |||
103 | 36 | Jochen Schalanda | h3. Debian Linux 5.0 (Lenny) |
104 | |||
105 | 43 | Jochen Schalanda | Users of Debian Lenny will have to install "rake":http://packages.debian.org/lenny-backports/rake and "libsinatra-ruby":http://packages.debian.org/lenny-backports/libsinatra-ruby from @lenny-backports@. |
106 | 36 | Jochen Schalanda | |
107 | See http://backports.debian.org/Instructions/ for instructions on how to add @lenny-backports@ to your list of repositories and install a package from it. |
||
108 | |||
109 | 1 | Ohad Levy | |
110 | 23 | Ohad Levy | h2. RPM |
111 | |||
112 | 32 | Ohad Levy | We maintain a repository for RHEL and Fedora (and clones) - you may add it via: |
113 | 23 | Ohad Levy | |
114 | h3. Puppet |
||
115 | 1 | Ohad Levy | |
116 | 23 | Ohad Levy | <pre> |
117 | yumrepo { 'foreman': |
||
118 | descr => 'Foreman Repo', |
||
119 | 32 | Ohad Levy | baseurl => 'http://yum.theforeman.org/stable', |
120 | 23 | Ohad Levy | gpgcheck => '0', |
121 | enabled => '1' |
||
122 | } |
||
123 | </pre> |
||
124 | |||
125 | h3. Quick and dirty |
||
126 | 1 | Ohad Levy | |
127 | 23 | Ohad Levy | <pre> |
128 | cat > /etc/yum.repos.d/foreman.repo << EOF |
||
129 | [foreman] |
||
130 | name=Foreman Repo |
||
131 | 32 | Ohad Levy | baseurl=http://yum.theforeman.org/stable |
132 | 23 | Ohad Levy | gpgcheck=0 |
133 | 1 | Ohad Levy | enabled=1 |
134 | 23 | Ohad Levy | EOF |
135 | </pre> |
||
136 | |||
137 | 1 | Ohad Levy | <pre> |
138 | yum install foreman |
||
139 | 23 | Ohad Levy | </pre> |
140 | |||
141 | |||
142 | 30 | Ohad Levy | if you just want to get the rpms: |
143 | 23 | Ohad Levy | |
144 | 32 | Ohad Levy | http://yum.theforeman.org |
145 | |||
146 | 23 | Ohad Levy | |
147 | 8 | Ohad Levy | h2. Latest stable release |
148 | 7 | Ohad Levy | |
149 | 30 | Ohad Levy | Latest stable version can be found under the files section |
150 | 19 | Ohad Levy | |
151 | 8 | Ohad Levy | h2. Latest source code |
152 | 7 | Ohad Levy | |
153 | You can get the latest source code of Foreman from the git repository hosted at github. |
||
154 | This is the preferred way to get Foreman if you want to benefit from the latest improvements. By using the git repository you can also upgrade more easily. |
||
155 | |||
156 | 41 | Ohad Levy | to get latest "development" version do: |
157 | 1 | Ohad Levy | |
158 | 4 | Ohad Levy | <pre><code>git clone git://github.com/ohadlevy/foreman.git foreman |
159 | cd foreman |
||
160 | 1 | Ohad Levy | git submodule init |
161 | git submodule update |
||
162 | </code></pre> |
||
163 | |||
164 | * if you are behind a proxy or firewall and dont have access to github using the git protocol, use http protocol instead (e.g.) |
||
165 | 5 | Rama Krishna | <pre> |
166 | git clone http://github.com/ohadlevy/foreman.git foreman |
||
167 | cd foreman |
||
168 | 1 | Ohad Levy | sed -i 's/git:\/\//http:\/\//g' .gitmodules |
169 | git submodule init |
||
170 | 5 | Rama Krishna | git submodule update |
171 | </pre> |
||
172 | |||
173 | 12 | Ohad Levy | h3. Daily snapshot |
174 | |||
175 | You can also fetch the latest daily snapshot of the development version at: |
||
176 | 28 | Ohad Levy | http://theforeman.org/foreman-nightly.tar.bz2 |
177 | 12 | Ohad Levy | |
178 | 3 | Ohad Levy | |
179 | 8 | Ohad Levy | h1. Initial setup |
180 | 1 | Ohad Levy | |
181 | 49 | Paul Kelly | h2. Configuration |
182 | |||
183 | Foreman configuration is managed from two places; a configuration file *config/settings.yaml* and from the *SETTINGS/Foreman Settings* page. A full description of the configuration options is given [[foreman_configuration|here]] |
||
184 | |||
185 | 8 | Ohad Levy | h2. Database |
186 | 6 | Ohad Levy | |
187 | Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema). |
||
188 | 14 | Ohad Levy | By default, SQLite is used, if you want to use other database (e.g. [[FAQ#I-want-to-use-MySQL|MySQL]]) please modify the configuration file under +config/database.yml+. |
189 | 1 | Ohad Levy | |
190 | 6 | Ohad Levy | If you want to share the database with Puppets (storeconfig), just modify +config/database.yml+ to point to the same database configuration as puppet is. |
191 | |||
192 | 1 | Ohad Levy | In both cases, please use the *production* settings. |
193 | 6 | Ohad Levy | |
194 | 1 | Ohad Levy | to initialize the database schema type: |
195 | 11 | Ohad Levy | <pre> |
196 | 51 | Florian Koch | cd <foreman installation path> && RAILS_ENV=production rake db:migrate |
197 | 11 | Ohad Levy | </pre> |
198 | 6 | Ohad Levy | |
199 | 8 | Ohad Levy | h2. Import Data from Puppet |
200 | 6 | Ohad Levy | |
201 | At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman. |
||
202 | |||
203 | 8 | Ohad Levy | h2. Start The Web Server |
204 | 6 | Ohad Levy | |
205 | 26 | Ohad Levy | if you installed via rpm, just start the foreman service, or start the built in web server by typing: |
206 | 1 | Ohad Levy | <code>./script/server -e production</code> |
207 | |||
208 | 6 | Ohad Levy | and point your browser to http://foreman:3000 |
209 | 1 | Ohad Levy | |
210 | 26 | Ohad Levy | If you would like to keep the server running, its recommend to setup passenger or use the RPM. |
211 | 1 | Ohad Levy | example usage with passenger can be found here: http://github.com/ohadlevy/puppet-foreman/blob/master/foreman/templates/foreman-vhost.conf.erb |
212 | 38 | Paul Kelly | |
213 | 52 | Mikael Fridh | h2. Getting your Puppet Reports into Foreman |
214 | |||
215 | Read [[Puppet_Reports]] to learn how to get your nodes to report to Foreman. |
||
216 | |||
217 | 38 | Paul Kelly | h1. Smart proxy installation |
218 | |||
219 | A smart proxy is an autonomous web-based foreman component that is placed on a host performing a specific function in the host commissioning phase. |
||
220 | 1 | Ohad Levy | It receives requests from Foreman to perform operations that are required during the commissioning process and executes them on its behalf. More details can be found on the [[Foreman Architecture]] page. |
221 | |||
222 | 42 | Ohad Levy | To fully manage the commissioning process then a smart proxy will have to manipulate these services, DHCP, DNS, Puppet CA, Puppet and TFTP. These services may exist on separate machines or several of them may be hosted on the same machine. As each smart proxy instance is capable of managing all the of these services, there is only need for one proxy per host. |
223 | 39 | Paul Kelly | In the special case of a smart proxy managing a windows DHCP server, the host machine must be running Windows and support the *netsh dhcp* utility, it does not need to be the Microsoft DHCP server itself. |
224 | 42 | Ohad Levy | |
225 | see [[Smart-Proxy:Installation_instructions]] |
||
226 | 39 | Paul Kelly | |
227 | h2. Download |
||
228 | |||
229 | Download the smart proxy code from |
||
230 | * the git repository |
||
231 | * the rpm location |
||
232 | 40 | Paul Kelly | * this zip file. |
233 | 39 | Paul Kelly | |
234 | When downloaded, extract into a suitable location and follow the README file. |
||
235 | 1 | Ohad Levy | |
236 | 8 | Ohad Levy | h1. Future Updates |
237 | 1 | Ohad Levy | |
238 | 9 | Ohad Levy | see [[Upgrade instructions]] |
239 | 1 | Ohad Levy | |
240 | 9 | Ohad Levy | h1. Problems? |
241 | |||
242 | see [[Troubleshooting]] |