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