Project

General

Profile

Installation instructions » History » Version 43

Jochen Schalanda, 04/03/2011 12:12 PM

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 37 Jochen Schalanda
The installation has been successfully tested on RHEL[5,6], Fedora[13,14], Debian Linux 5.0 (Lenny) and Ubuntu Linux 9.04, 10.04, and 10.10. For older operating systems you might need additional packages (e.g. sqlite)
14 34 Ohad Levy
It is also known to work on Solaris and Mac.
15 1 Ohad Levy
16 8 Ohad Levy
h1. Download
17 1 Ohad Levy
18 13 Ohad Levy
h2. Puppet Module ready to use
19
20
You may try out the puppet Foreman module, this should take care for most of the basic setup.
21
22 25 Ohad Levy
The module could be downloaded via: http://github.com/ohadlevy/puppet-foreman/tarball/master
23 1 Ohad Levy
24
you may use puppet (if you don't want to add it as a module to your puppetmaster) in the following way:
25
26 32 Ohad Levy
if you are using RHEL, EPEL repo must be enabled http://fedoraproject.org/wiki/EPEL
27 1 Ohad Levy
28 25 Ohad Levy
If you are using puppet store configs please set $using_store_configs to true in foreman/manifests/init.pp.
29
If you want this module to configure passenger as well, set $using_passenger to true in foreman/manifests/init.pp
30 21 Ohad Levy
31 25 Ohad Levy
usage:
32
33 21 Ohad Levy
<pre>
34 35 Andrew Niemantsverdriet
echo include foreman | puppet  --verbose --modulepath /path_to/extracted_tarball
35 21 Ohad Levy
</pre>
36
37 13 Ohad Levy
*Its recommend to review the module prior usage.*
38
39 31 Jochen Schalanda
h2. Debian / Ubuntu Packages
40 29 Ohad Levy
41 43 Jochen Schalanda
The Foreman packages should work on the following Debian-based Linux distributions:
42 1 Ohad Levy
43 43 Jochen Schalanda
* Debian Linux 5.0 (Lenny), see [[Installation_instructions#Debian-Linux-50-Lenny]]
44
* Debian Linux 6.0 (Squeeze)
45
* Ubuntu Linux 10.04 LTS (Lucid Lynx)
46
* Ubuntu Linux 10.10 (Maverick Meerkat)
47
* Ubuntu Linux 11.04 (Natty Narwhal)
48
49
If you encounter any errors during the installation, please file a bug report!
50
51
52
Add one of the following lines to your @/etc/apt/sources.list@ (alternatively in a separate file in @/etc/apt/sources.list.d/@):
53
54 31 Jochen Schalanda
<pre>
55
# For stable packages
56
deb http://deb.theforeman.org/ stable main
57
58
# For testing packages
59
deb http://deb.theforeman.org/ testing main
60
</pre>
61
62
The public key for "secure APT":http://wiki.debian.org/SecureApt can be downloaded "here":http://deb.theforeman.org/foreman.asc
63
64 1 Ohad Levy
You can add this key with
65 31 Jochen Schalanda
<pre>
66 43 Jochen Schalanda
apt-key add foreman.asc
67 31 Jochen Schalanda
</pre>
68 1 Ohad Levy
69 31 Jochen Schalanda
or combine downloading and registering:
70
<pre>
71 43 Jochen Schalanda
wget -q http://deb.theforeman.org/foreman.asc -O- | apt-key add -
72 31 Jochen Schalanda
</pre>
73
74
The key fingerprint is
75
<pre>
76
1DCB 15D1 2CA1 40EE F494  7E57 66CF 053F E775 FF07
77
Foreman Archive Signing Key <packages@theforeman.org>
78
</pre>
79
80
To install Foreman, run
81
82 1 Ohad Levy
<pre>
83 31 Jochen Schalanda
sudo apt-get update
84
85
# Depending on the database you want to use with Foreman,
86 43 Jochen Schalanda
# install one of these meta-packages:
87 1 Ohad Levy
sudo apt-get install foreman-mysql
88
sudo apt-get install foreman-pgsql
89
sudo apt-get install foreman-sqlite3
90 43 Jochen Schalanda
91
# or install the foreman main package and configure the
92
# database manually in /etc/foreman/database.yml
93
sudo apt-get install foreman
94 1 Ohad Levy
</pre>
95 31 Jochen Schalanda
96 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.
97
98
99 36 Jochen Schalanda
h3. Debian Linux 5.0 (Lenny)
100
101 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@.
102 36 Jochen Schalanda
103
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.
104
105 1 Ohad Levy
106 23 Ohad Levy
h2. RPM
107
108 32 Ohad Levy
We maintain a repository for RHEL and Fedora (and clones) - you may add it via:
109 23 Ohad Levy
110
h3. Puppet 
111 1 Ohad Levy
112 23 Ohad Levy
<pre>
113
yumrepo { 'foreman':
114
    descr => 'Foreman Repo',
115 32 Ohad Levy
    baseurl => 'http://yum.theforeman.org/stable',
116 23 Ohad Levy
    gpgcheck => '0',
117
    enabled => '1'
118
}
119
</pre>
120
121
h3. Quick and dirty
122 1 Ohad Levy
123 23 Ohad Levy
<pre>
124
cat > /etc/yum.repos.d/foreman.repo << EOF
125
[foreman]
126
name=Foreman Repo
127 32 Ohad Levy
baseurl=http://yum.theforeman.org/stable
128 23 Ohad Levy
gpgcheck=0
129 1 Ohad Levy
enabled=1
130 23 Ohad Levy
EOF
131
</pre>
132
133 1 Ohad Levy
<pre>
134
yum install foreman
135 23 Ohad Levy
</pre>
136
137
138 30 Ohad Levy
if you just want to get the rpms:
139 23 Ohad Levy
140 32 Ohad Levy
http://yum.theforeman.org
141
142 23 Ohad Levy
143 8 Ohad Levy
h2. Latest stable release
144 7 Ohad Levy
145 30 Ohad Levy
Latest stable version can be found under the files section
146 19 Ohad Levy
147 8 Ohad Levy
h2. Latest source code
148 7 Ohad Levy
149
You can get the latest source code of Foreman from the git repository hosted at github.
150
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.
151
152 41 Ohad Levy
to get latest "development" version do:
153 1 Ohad Levy
154 4 Ohad Levy
<pre><code>git clone git://github.com/ohadlevy/foreman.git foreman
155
cd foreman
156 1 Ohad Levy
git submodule init
157
git submodule update
158
</code></pre>
159
160
* if you are behind a proxy or firewall and dont have access to github using the git protocol, use http protocol instead (e.g.)
161 5 Rama Krishna
<pre>
162
git clone http://github.com/ohadlevy/foreman.git foreman
163
cd foreman
164 1 Ohad Levy
sed -i 's/git:\/\//http:\/\//g' .gitmodules
165
git submodule init
166 5 Rama Krishna
git submodule update
167
</pre>
168
169 12 Ohad Levy
h3. Daily snapshot
170
171
You can also fetch the latest daily snapshot of the development version at:
172 28 Ohad Levy
http://theforeman.org/foreman-nightly.tar.bz2
173 12 Ohad Levy
174 3 Ohad Levy
175 8 Ohad Levy
h1. Initial setup
176 1 Ohad Levy
177 8 Ohad Levy
h2. Database
178 6 Ohad Levy
179
Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema).
180 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+.
181 1 Ohad Levy
182 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.
183
184 1 Ohad Levy
In both cases, please use the *production* settings.
185 6 Ohad Levy
186 1 Ohad Levy
to initialize the database schema type:
187 11 Ohad Levy
<pre>
188
RAILS_ENV=production rake db:migrate
189
</pre>
190 6 Ohad Levy
191 8 Ohad Levy
h2. Import Data from Puppet
192 6 Ohad Levy
193
At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman.
194
195 8 Ohad Levy
h2. Start The Web Server
196 6 Ohad Levy
197 26 Ohad Levy
if you installed via rpm, just start the foreman service, or start the built in web server by typing:
198 1 Ohad Levy
<code>./script/server -e production</code>
199
200 6 Ohad Levy
and point your browser to http://foreman:3000
201 1 Ohad Levy
202 26 Ohad Levy
If you would like to keep the server running, its recommend to setup passenger or use the RPM.
203 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
204 38 Paul Kelly
205
h1. Smart proxy installation
206
207
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. 
208 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.
209
210 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.
211 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.
212 42 Ohad Levy
213
see [[Smart-Proxy:Installation_instructions]]
214 39 Paul Kelly
215
h2. Download
216
217
Download the smart proxy code from
218
* the git repository 
219
* the rpm location
220 40 Paul Kelly
* this zip file. 
221 39 Paul Kelly
222
When downloaded, extract into a suitable location and follow the README file.
223 1 Ohad Levy
224 8 Ohad Levy
h1. Future Updates
225 1 Ohad Levy
226 9 Ohad Levy
see [[Upgrade instructions]]
227 1 Ohad Levy
228 9 Ohad Levy
h1. Problems?
229
230
see [[Troubleshooting]]