Project

General

Profile

Installation instructions » History » Version 55

Romain Vrignaud, 11/17/2011 08:53 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 1 Ohad Levy
43 55 Romain Vrignaud
h2. [[RPM's distribution based installation]]
44 23 Ohad Levy
45 32 Ohad Levy
We maintain a repository for RHEL and Fedora (and clones) - you may add it via:
46 23 Ohad Levy
47
h3. Puppet 
48 1 Ohad Levy
49 23 Ohad Levy
<pre>
50
yumrepo { 'foreman':
51
    descr => 'Foreman Repo',
52 32 Ohad Levy
    baseurl => 'http://yum.theforeman.org/stable',
53 23 Ohad Levy
    gpgcheck => '0',
54
    enabled => '1'
55
}
56
</pre>
57
58
h3. Quick and dirty
59 1 Ohad Levy
60 23 Ohad Levy
<pre>
61
cat > /etc/yum.repos.d/foreman.repo << EOF
62
[foreman]
63
name=Foreman Repo
64 32 Ohad Levy
baseurl=http://yum.theforeman.org/stable
65 23 Ohad Levy
gpgcheck=0
66 1 Ohad Levy
enabled=1
67 23 Ohad Levy
EOF
68
</pre>
69
70 1 Ohad Levy
<pre>
71
yum install foreman
72 23 Ohad Levy
</pre>
73
74
75 30 Ohad Levy
if you just want to get the rpms:
76 23 Ohad Levy
77 32 Ohad Levy
http://yum.theforeman.org
78
79 23 Ohad Levy
80 8 Ohad Levy
h2. Latest stable release
81 7 Ohad Levy
82 30 Ohad Levy
Latest stable version can be found under the files section
83 19 Ohad Levy
84 8 Ohad Levy
h2. Latest source code
85 7 Ohad Levy
86
You can get the latest source code of Foreman from the git repository hosted at github.
87
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.
88
89 41 Ohad Levy
to get latest "development" version do:
90 1 Ohad Levy
91 4 Ohad Levy
<pre><code>git clone git://github.com/ohadlevy/foreman.git foreman
92
cd foreman
93 1 Ohad Levy
git submodule init
94
git submodule update
95
</code></pre>
96
97
* if you are behind a proxy or firewall and dont have access to github using the git protocol, use http protocol instead (e.g.)
98 5 Rama Krishna
<pre>
99
git clone http://github.com/ohadlevy/foreman.git foreman
100
cd foreman
101 1 Ohad Levy
sed -i 's/git:\/\//http:\/\//g' .gitmodules
102
git submodule init
103 5 Rama Krishna
git submodule update
104
</pre>
105
106 12 Ohad Levy
h3. Daily snapshot
107
108
You can also fetch the latest daily snapshot of the development version at:
109 28 Ohad Levy
http://theforeman.org/foreman-nightly.tar.bz2
110 12 Ohad Levy
111 3 Ohad Levy
112 8 Ohad Levy
h1. Initial setup
113 1 Ohad Levy
114 49 Paul Kelly
h2. Configuration
115
116
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]]
117
118 8 Ohad Levy
h2. Database
119 6 Ohad Levy
120
Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema).
121 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+.
122 1 Ohad Levy
123 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.
124
125 1 Ohad Levy
In both cases, please use the *production* settings.
126 6 Ohad Levy
127 1 Ohad Levy
to initialize the database schema type:
128 11 Ohad Levy
<pre>
129 51 Florian Koch
cd <foreman installation path> && RAILS_ENV=production rake db:migrate
130 11 Ohad Levy
</pre>
131 6 Ohad Levy
132 8 Ohad Levy
h2. Import Data from Puppet
133 6 Ohad Levy
134
At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman.
135
136 8 Ohad Levy
h2. Start The Web Server
137 6 Ohad Levy
138 26 Ohad Levy
if you installed via rpm, just start the foreman service, or start the built in web server by typing:
139 1 Ohad Levy
<code>./script/server -e production</code>
140
141 6 Ohad Levy
and point your browser to http://foreman:3000
142 1 Ohad Levy
143 26 Ohad Levy
If you would like to keep the server running, its recommend to setup passenger or use the RPM.
144 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
145 38 Paul Kelly
146 52 Mikael Fridh
h2. Getting your Puppet Reports into Foreman
147
148
Read [[Puppet_Reports]] to learn how to get your nodes to report to Foreman.
149
150 38 Paul Kelly
h1. Smart proxy installation
151
152
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. 
153 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.
154
155 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.
156 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.
157 42 Ohad Levy
158
see [[Smart-Proxy:Installation_instructions]]
159 39 Paul Kelly
160
h2. Download
161
162
Download the smart proxy code from
163
* the git repository 
164
* the rpm location
165 40 Paul Kelly
* this zip file. 
166 39 Paul Kelly
167
When downloaded, extract into a suitable location and follow the README file.
168 1 Ohad Levy
169 8 Ohad Levy
h1. Future Updates
170 1 Ohad Levy
171 9 Ohad Levy
see [[Upgrade instructions]]
172 1 Ohad Levy
173 9 Ohad Levy
h1. Problems?
174
175
see [[Troubleshooting]]