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