Project

General

Profile

Installation instructions » History » Version 56

Romain Vrignaud, 11/17/2011 08:55 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 1 Ohad Levy
7 1 Ohad Levy
* Puppet >= 0.24-4
8 1 Ohad Levy
* rake >= 0.84 
9 8 Ohad Levy
* rubygems
10 8 Ohad Levy
* ruby-sqlite3 (libsqlite3-ruby) if you are going to use sqlite as your database
11 8 Ohad Levy
* 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 44 Jochen Schalanda
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 13 Ohad Levy
21 13 Ohad Levy
You may try out the puppet Foreman module, this should take care for most of the basic setup.
22 13 Ohad Levy
23 25 Ohad Levy
The module could be downloaded via: http://github.com/ohadlevy/puppet-foreman/tarball/master
24 1 Ohad Levy
25 1 Ohad Levy
you may use puppet (if you don't want to add it as a module to your puppetmaster) in the following way:
26 1 Ohad Levy
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 25 Ohad Levy
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 25 Ohad Levy
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 21 Ohad Levy
38 13 Ohad Levy
*Its recommend to review the module prior usage.*
39 13 Ohad Levy
40 56 Romain Vrignaud
h2. [[Debian-Ubuntu installation by packages]]
41 29 Ohad Levy
42 1 Ohad Levy
43 55 Romain Vrignaud
h2. [[RPM's distribution based installation]]
44 1 Ohad Levy
45 23 Ohad Levy
46 56 Romain Vrignaud
h2. [[Installing latest code ]]
47 28 Ohad Levy
48 12 Ohad Levy
49 3 Ohad Levy
50 8 Ohad Levy
h1. Initial setup
51 1 Ohad Levy
52 49 Paul Kelly
h2. Configuration
53 49 Paul Kelly
54 49 Paul Kelly
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]]
55 49 Paul Kelly
56 8 Ohad Levy
h2. Database
57 6 Ohad Levy
58 6 Ohad Levy
Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema).
59 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+.
60 1 Ohad Levy
61 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.
62 6 Ohad Levy
63 1 Ohad Levy
In both cases, please use the *production* settings.
64 6 Ohad Levy
65 1 Ohad Levy
to initialize the database schema type:
66 11 Ohad Levy
<pre>
67 51 Florian Koch
cd <foreman installation path> && RAILS_ENV=production rake db:migrate
68 11 Ohad Levy
</pre>
69 6 Ohad Levy
70 8 Ohad Levy
h2. Import Data from Puppet
71 6 Ohad Levy
72 6 Ohad Levy
At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman.
73 6 Ohad Levy
74 8 Ohad Levy
h2. Start The Web Server
75 6 Ohad Levy
76 26 Ohad Levy
if you installed via rpm, just start the foreman service, or start the built in web server by typing:
77 1 Ohad Levy
<code>./script/server -e production</code>
78 1 Ohad Levy
79 6 Ohad Levy
and point your browser to http://foreman:3000
80 1 Ohad Levy
81 26 Ohad Levy
If you would like to keep the server running, its recommend to setup passenger or use the RPM.
82 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
83 38 Paul Kelly
84 52 Mikael Fridh
h2. Getting your Puppet Reports into Foreman
85 52 Mikael Fridh
86 52 Mikael Fridh
Read [[Puppet_Reports]] to learn how to get your nodes to report to Foreman.
87 52 Mikael Fridh
88 38 Paul Kelly
h1. Smart proxy installation
89 38 Paul Kelly
90 38 Paul Kelly
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. 
91 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.
92 1 Ohad Levy
93 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.
94 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.
95 42 Ohad Levy
96 42 Ohad Levy
see [[Smart-Proxy:Installation_instructions]]
97 39 Paul Kelly
98 39 Paul Kelly
h2. Download
99 39 Paul Kelly
100 39 Paul Kelly
Download the smart proxy code from
101 39 Paul Kelly
* the git repository 
102 39 Paul Kelly
* the rpm location
103 40 Paul Kelly
* this zip file. 
104 39 Paul Kelly
105 39 Paul Kelly
When downloaded, extract into a suitable location and follow the README file.
106 1 Ohad Levy
107 8 Ohad Levy
h1. Future Updates
108 1 Ohad Levy
109 9 Ohad Levy
see [[Upgrade instructions]]
110 1 Ohad Levy
111 9 Ohad Levy
h1. Problems?
112 9 Ohad Levy
113 9 Ohad Levy
see [[Troubleshooting]]