Project

General

Profile

Installation instructions » History » Version 30

Ohad Levy, 06/09/2010 07:43 AM

1 8 Ohad Levy
{{toc}}
2 1 Ohad Levy
3 8 Ohad Levy
h1. Requirements
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 17 Ohad Levy
* rack = 1.0.1
11 8 Ohad Levy
* ruby-sqlite3 (libsqlite3-ruby) if you are going to use sqlite as your database
12 8 Ohad Levy
* git (if installing from source )
13 1 Ohad Levy
14 27 Ohad Levy
The installation has been successfully tested on RHE5 and Ubuntu 8.04 -  10.04,  for older operating systems you might need additional packages (e.g. sqlite)
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 13 Ohad Levy
20 13 Ohad Levy
You may try out the puppet Foreman module, this should take care for most of the basic setup.
21 13 Ohad Levy
22 25 Ohad Levy
The module could be downloaded via: http://github.com/ohadlevy/puppet-foreman/tarball/master
23 1 Ohad Levy
24 21 Ohad Levy
you may use puppet (if you don't want to add it as a module to your puppetmaster) in the following way:
25 1 Ohad Levy
26 25 Ohad Levy
if you are using RHE5, 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 25 Ohad Levy
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 25 Ohad Levy
33 21 Ohad Levy
<pre>
34 25 Ohad Levy
echo include foreman | puppet  --verbose --modulepath /path_to/tarball
35 21 Ohad Levy
</pre>
36 21 Ohad Levy
37 13 Ohad Levy
*Its recommend to review the module prior usage.*
38 13 Ohad Levy
39 29 Ohad Levy
h2. Debian / Ubuntu Package
40 29 Ohad Levy
41 29 Ohad Levy
Can be downloaded from "Here":http://theforeman.org/attachments/download/109/foreman_0.1.5-1_all.deb
42 29 Ohad Levy
43 23 Ohad Levy
h2. RPM
44 23 Ohad Levy
45 23 Ohad Levy
We maintain a repository for RHE5 (and clones) - you may add it via:
46 23 Ohad Levy
47 23 Ohad Levy
h3. Puppet 
48 23 Ohad Levy
49 23 Ohad Levy
<pre>
50 23 Ohad Levy
yumrepo { 'foreman':
51 23 Ohad Levy
    descr => 'Foreman Repo',
52 23 Ohad Levy
    baseurl => 'http://theforeman.org/repo',
53 23 Ohad Levy
    gpgcheck => '0',
54 23 Ohad Levy
    enabled => '1'
55 23 Ohad Levy
}
56 23 Ohad Levy
</pre>
57 23 Ohad Levy
58 23 Ohad Levy
h3. Quick and dirty
59 23 Ohad Levy
60 23 Ohad Levy
<pre>
61 23 Ohad Levy
cat > /etc/yum.repos.d/foreman.repo << EOF
62 23 Ohad Levy
[foreman]
63 23 Ohad Levy
name=Foreman Repo
64 23 Ohad Levy
baseurl=http://theforeman.org/repo
65 23 Ohad Levy
gpgcheck=0
66 1 Ohad Levy
enabled=1
67 23 Ohad Levy
EOF
68 23 Ohad Levy
</pre>
69 23 Ohad Levy
70 23 Ohad Levy
<pre>
71 23 Ohad Levy
yum install foreman
72 23 Ohad Levy
</pre>
73 23 Ohad Levy
74 25 Ohad Levy
Additional rpms might be required from epel repo's
75 23 Ohad Levy
76 23 Ohad Levy
if you just want to get the rpms:
77 23 Ohad Levy
78 30 Ohad Levy
http://theforeman.org/repo/el5/noarch/foreman-0.1.5-1.noarch.rpm
79 23 Ohad Levy
http://theforeman.org/repo/el5/noarch/rubygem-rack-1.0.1-1.noarch.rpm
80 23 Ohad Levy
and 
81 30 Ohad Levy
http://theforeman.org/repo/el5/SRPM/foreman-0.1.5-1.src.rpm
82 23 Ohad Levy
83 8 Ohad Levy
h2. Latest stable release
84 7 Ohad Levy
85 30 Ohad Levy
Latest stable version can be found under the files section
86 19 Ohad Levy
87 8 Ohad Levy
h2. Latest source code
88 7 Ohad Levy
89 7 Ohad Levy
You can get the latest source code of Foreman from the git repository hosted at github.
90 7 Ohad Levy
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.
91 7 Ohad Levy
92 1 Ohad Levy
to get latest "stable" version do:
93 1 Ohad Levy
94 4 Ohad Levy
<pre><code>git clone git://github.com/ohadlevy/foreman.git foreman
95 4 Ohad Levy
cd foreman
96 1 Ohad Levy
git submodule init
97 1 Ohad Levy
git submodule update
98 1 Ohad Levy
</code></pre>
99 1 Ohad Levy
100 1 Ohad Levy
* if you are behind a proxy or firewall and dont have access to github using the git protocol, use http protocol instead (e.g.)
101 5 Rama Krishna
<pre>
102 5 Rama Krishna
git clone http://github.com/ohadlevy/foreman.git foreman
103 5 Rama Krishna
cd foreman
104 1 Ohad Levy
sed -i 's/git:\/\//http:\/\//g' .gitmodules
105 1 Ohad Levy
git submodule init
106 5 Rama Krishna
git submodule update
107 5 Rama Krishna
</pre>
108 5 Rama Krishna
109 12 Ohad Levy
h3. Daily snapshot
110 12 Ohad Levy
111 12 Ohad Levy
You can also fetch the latest daily snapshot of the development version at:
112 28 Ohad Levy
http://theforeman.org/foreman-nightly.tar.bz2
113 12 Ohad Levy
114 3 Ohad Levy
115 8 Ohad Levy
h1. Initial setup
116 1 Ohad Levy
117 8 Ohad Levy
h2. Database
118 6 Ohad Levy
119 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).
120 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+.
121 1 Ohad Levy
122 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.
123 6 Ohad Levy
124 1 Ohad Levy
In both cases, please use the *production* settings.
125 6 Ohad Levy
126 1 Ohad Levy
to initialize the database schema type:
127 11 Ohad Levy
<pre>
128 11 Ohad Levy
RAILS_ENV=production rake db:migrate
129 11 Ohad Levy
</pre>
130 6 Ohad Levy
131 8 Ohad Levy
h2. Import Data from Puppet
132 6 Ohad Levy
133 6 Ohad Levy
At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman.
134 6 Ohad Levy
135 8 Ohad Levy
h2. Start The Web Server
136 6 Ohad Levy
137 26 Ohad Levy
if you installed via rpm, just start the foreman service, or start the built in web server by typing:
138 1 Ohad Levy
<code>./script/server -e production</code>
139 1 Ohad Levy
140 6 Ohad Levy
and point your browser to http://foreman:3000
141 1 Ohad Levy
142 26 Ohad Levy
If you would like to keep the server running, its recommend to setup passenger or use the RPM.
143 26 Ohad Levy
example usage with passenger can be found here: http://github.com/ohadlevy/puppet-foreman/blob/master/foreman/templates/foreman-vhost.conf.erb
144 1 Ohad Levy
145 8 Ohad Levy
h1. Future Updates
146 1 Ohad Levy
147 9 Ohad Levy
see [[Upgrade instructions]]
148 1 Ohad Levy
149 9 Ohad Levy
h1. Problems?
150 9 Ohad Levy
151 9 Ohad Levy
see [[Troubleshooting]]