Project

General

Profile

Installation instructions » History » Version 33

Ohad Levy, 11/10/2010 06:42 PM

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