Installation instructions » History » Version 26
Ohad Levy, 04/21/2010 09:54 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 | 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 | 23 | Ohad Levy | h2. RPM |
40 | |||
41 | We maintain a repository for RHE5 (and clones) - you may add it via: |
||
42 | |||
43 | h3. Puppet |
||
44 | |||
45 | <pre> |
||
46 | yumrepo { 'foreman': |
||
47 | descr => 'Foreman Repo', |
||
48 | baseurl => 'http://theforeman.org/repo', |
||
49 | gpgcheck => '0', |
||
50 | enabled => '1' |
||
51 | } |
||
52 | </pre> |
||
53 | |||
54 | h3. Quick and dirty |
||
55 | |||
56 | <pre> |
||
57 | cat > /etc/yum.repos.d/foreman.repo << EOF |
||
58 | [foreman] |
||
59 | name=Foreman Repo |
||
60 | baseurl=http://theforeman.org/repo |
||
61 | gpgcheck=0 |
||
62 | 1 | Ohad Levy | enabled=1 |
63 | 23 | Ohad Levy | EOF |
64 | </pre> |
||
65 | |||
66 | <pre> |
||
67 | yum install foreman |
||
68 | </pre> |
||
69 | |||
70 | 25 | Ohad Levy | Additional rpms might be required from epel repo's |
71 | 23 | Ohad Levy | |
72 | if you just want to get the rpms: |
||
73 | |||
74 | 24 | Ohad Levy | http://theforeman.org/repo/el5/noarch/foreman-0.1.4-3.noarch.rpm |
75 | 23 | Ohad Levy | http://theforeman.org/repo/el5/noarch/rubygem-rack-1.0.1-1.noarch.rpm |
76 | and |
||
77 | http://theforeman.org/repo/el5/SRPM/foreman-0.1.4-2.src.rpm |
||
78 | |||
79 | 8 | Ohad Levy | h2. Latest stable release |
80 | 7 | Ohad Levy | |
81 | 1 | Ohad Levy | Latest stable version can be found "here":http://theforeman.org/attachments/download/60/foreman-0.1-4.tar.bz2 |
82 | 19 | Ohad Levy | |
83 | 8 | Ohad Levy | h2. Latest source code |
84 | 7 | Ohad Levy | |
85 | You can get the latest source code of Foreman from the git repository hosted at github. |
||
86 | 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. |
||
87 | |||
88 | 1 | Ohad Levy | to get latest "stable" version do: |
89 | |||
90 | 4 | Ohad Levy | <pre><code>git clone git://github.com/ohadlevy/foreman.git foreman |
91 | cd foreman |
||
92 | 1 | Ohad Levy | git submodule init |
93 | git submodule update |
||
94 | </code></pre> |
||
95 | |||
96 | * if you are behind a proxy or firewall and dont have access to github using the git protocol, use http protocol instead (e.g.) |
||
97 | 5 | Rama Krishna | <pre> |
98 | git clone http://github.com/ohadlevy/foreman.git foreman |
||
99 | cd foreman |
||
100 | 1 | Ohad Levy | sed -i 's/git:\/\//http:\/\//g' .gitmodules |
101 | git submodule init |
||
102 | 5 | Rama Krishna | git submodule update |
103 | </pre> |
||
104 | |||
105 | 12 | Ohad Levy | h3. Daily snapshot |
106 | |||
107 | You can also fetch the latest daily snapshot of the development version at: |
||
108 | http://thetorque.org/foreman-nightly.tar.bz2 |
||
109 | |||
110 | 3 | Ohad Levy | |
111 | 8 | Ohad Levy | h1. Initial setup |
112 | 1 | Ohad Levy | |
113 | 8 | Ohad Levy | h2. Database |
114 | 6 | Ohad Levy | |
115 | Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema). |
||
116 | 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+. |
117 | 1 | Ohad Levy | |
118 | 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. |
119 | |||
120 | 1 | Ohad Levy | In both cases, please use the *production* settings. |
121 | 6 | Ohad Levy | |
122 | 1 | Ohad Levy | to initialize the database schema type: |
123 | 11 | Ohad Levy | <pre> |
124 | RAILS_ENV=production rake db:migrate |
||
125 | </pre> |
||
126 | 6 | Ohad Levy | |
127 | 8 | Ohad Levy | h2. Import Data from Puppet |
128 | 6 | Ohad Levy | |
129 | At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman. |
||
130 | |||
131 | 8 | Ohad Levy | h2. Start The Web Server |
132 | 6 | Ohad Levy | |
133 | 26 | Ohad Levy | if you installed via rpm, just start the foreman service, or start the built in web server by typing: |
134 | 1 | Ohad Levy | <code>./script/server -e production</code> |
135 | |||
136 | 6 | Ohad Levy | and point your browser to http://foreman:3000 |
137 | 1 | Ohad Levy | |
138 | 26 | Ohad Levy | If you would like to keep the server running, its recommend to setup passenger or use the RPM. |
139 | example usage with passenger can be found here: http://github.com/ohadlevy/puppet-foreman/blob/master/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]] |