Project

General

Profile

Installation instructions » History » Version 23

Ohad Levy, 04/13/2010 08:51 AM

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 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
* git (if installing from source )
13 1 Ohad Levy
14 19 Ohad Levy
The installation has been successfully tested on RHE5 and Ubuntu 8.04 -  9.10,  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
20
You may try out the puppet Foreman module, this should take care for most of the basic setup.
21
22
The module could be found here: source:extras/puppet/foreman
23
24 22 Ohad Levy
The module is included in the official tarbar in the extras/puppet sub directory, you may extract it from this archive: http://thetorque.org/foreman-nightly.tar.bz2
25 21 Ohad Levy
26 22 Ohad Levy
you may use puppet (if you don't want to add it as a module to your puppetmaster) in the following way:
27 21 Ohad Levy
28
<pre>
29
echo include foreman | puppet  --verbose --modulepath /path_to/tarball/extras/puppet
30
</pre>
31
32
if you would like to setup passenger as well, you can 
33
34
<pre>
35
echo include foreman::passenger | puppet  --verbose --modulepath /path_to/tarball/extras/puppet
36
</pre>
37
38 13 Ohad Levy
*Its recommend to review the module prior usage.*
39
40 23 Ohad Levy
h2. RPM
41
42
We maintain a repository for RHE5 (and clones) - you may add it via:
43
44
h3. Puppet 
45
46
<pre>
47
yumrepo { 'foreman':
48
    descr => 'Foreman Repo',
49
    baseurl => 'http://theforeman.org/repo',
50
    gpgcheck => '0',
51
    enabled => '1'
52
}
53
</pre>
54
55
h3. Quick and dirty
56
57
<pre>
58
cat > /etc/yum.repos.d/foreman.repo << EOF
59
[foreman]
60
name=Foreman Repo
61
baseurl=http://theforeman.org/repo
62
gpgcheck=0
63
enabled=1
64
EOF
65
</pre>
66
67
<pre>
68
yum install foreman
69
</pre>
70
71
Update: Additional rpms might be required from epel repo's
72
73
if you just want to get the rpms:
74
75
http://theforeman.org/repo/el5/noarch/foreman-0.1.4-2.noarch.rpm
76
http://theforeman.org/repo/el5/noarch/rubygem-rack-1.0.1-1.noarch.rpm
77
and 
78
http://theforeman.org/repo/el5/SRPM/foreman-0.1.4-2.src.rpm
79
80 8 Ohad Levy
h2. Latest stable release
81 7 Ohad Levy
82 1 Ohad Levy
Latest stable version can be found "here":http://theforeman.org/attachments/download/60/foreman-0.1-4.tar.bz2
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 1 Ohad Levy
to get latest "stable" version do:
90
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
http://thetorque.org/foreman-nightly.tar.bz2
110
111 3 Ohad Levy
112 8 Ohad Levy
h1. Initial setup
113 1 Ohad Levy
114 8 Ohad Levy
h2. Database
115 6 Ohad Levy
116
Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema).
117 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+.
118 1 Ohad Levy
119 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.
120
121 1 Ohad Levy
In both cases, please use the *production* settings.
122 6 Ohad Levy
123 1 Ohad Levy
to initialize the database schema type:
124 11 Ohad Levy
<pre>
125
RAILS_ENV=production rake db:migrate
126
</pre>
127 6 Ohad Levy
128 8 Ohad Levy
h2. Import Data from Puppet
129 6 Ohad Levy
130
At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman.
131
132 8 Ohad Levy
h2. Start The Web Server
133 6 Ohad Levy
134
Start the built in web server by typing:
135 1 Ohad Levy
<code>./script/server -e production</code>
136
137 6 Ohad Levy
and point your browser to http://foreman:3000
138 1 Ohad Levy
139 20 Ohad Levy
If you would like to keep the server running, its recommend to setup passenger, an example puppet manifest could be found source:extras/puppet/foreman/templates/foreman-vhost.conf.erb
140 1 Ohad Levy
141 8 Ohad Levy
h1. Future Updates
142 1 Ohad Levy
143 9 Ohad Levy
see [[Upgrade instructions]]
144 1 Ohad Levy
145 9 Ohad Levy
h1. Problems?
146
147
see [[Troubleshooting]]