Project

General

Profile

Installation instructions » History » Revision 42

Revision 41 (Ohad Levy, 01/25/2011 02:12 PM) → Revision 42/77 (Ohad Levy, 03/23/2011 07:51 AM)

{{toc}} 

 h1. Requirements for the foreman core component 

 before you start, make sure you have: 

 * Puppet >= 0.24-4 
 * rake >= 0.84  
 * rubygems 
 * ruby-sqlite3 (libsqlite3-ruby) if you are going to use sqlite as your database 
 * git (if installing from source ) 

 The installation has been successfully tested on RHEL[5,6], Fedora[13,14], Debian Linux 5.0 (Lenny) and Ubuntu Linux 9.04, 10.04, and 10.10. For older operating systems you might need additional packages (e.g. sqlite) 
 It is also known to work on Solaris and Mac. 

 h1. Download 

 h2. Puppet Module ready to use 

 You may try out the puppet Foreman module, this should take care for most of the basic setup. 

 The module could be downloaded via: http://github.com/ohadlevy/puppet-foreman/tarball/master 

 you may use puppet (if you don't want to add it as a module to your puppetmaster) in the following way: 

 if you are using RHEL, EPEL repo must be enabled http://fedoraproject.org/wiki/EPEL 

 If you are using puppet store configs please set $using_store_configs to true in foreman/manifests/init.pp. 
 If you want this module to configure passenger as well, set $using_passenger to true in foreman/manifests/init.pp 

 usage: 

 <pre> 
 echo include foreman | puppet    --verbose --modulepath /path_to/extracted_tarball 
 </pre> 

 *Its recommend to review the module prior usage.* 

 h2. Debian / Ubuntu Packages 

 Add one of the following lines to your @/etc/apt/sources.list@: 

 <pre> 
 # For stable packages 
 deb http://deb.theforeman.org/ stable main 

 # For testing packages 
 deb http://deb.theforeman.org/ testing main 
 </pre> 

 The public key for "secure APT":http://wiki.debian.org/SecureApt can be downloaded "here":http://deb.theforeman.org/foreman.asc 

 You can add this key with 
 <pre> 
 sudo apt-key add foreman.asc 
 </pre> 

 or combine downloading and registering: 
 <pre> 
 wget -q http://deb.theforeman.org/foreman.asc -O- | sudo apt-key add - 
 </pre> 

 The key fingerprint is 
 <pre> 
 1DCB 15D1 2CA1 40EE F494    7E57 66CF 053F E775 FF07 
 Foreman Archive Signing Key <packages@theforeman.org> 
 </pre> 

 To install Foreman, run 

 <pre> 
 sudo apt-get update 

 # Depending on the database you want to use with Foreman, 
 # install one of these: 
 sudo apt-get install foreman-mysql 
 sudo apt-get install foreman-pgsql 
 sudo apt-get install foreman-sqlite3 
 </pre> 

 h3. Debian Linux 5.0 (Lenny) 

 Users of Debian Lenny will have to use "rake":http://packages.debian.org/lenny-backports/rake from @lenny-backports@. 

 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. 


 h2. RPM 

 We maintain a repository for RHEL and Fedora (and clones) - you may add it via: 

 h3. Puppet  

 <pre> 
 yumrepo { 'foreman': 
     descr => 'Foreman Repo', 
     baseurl => 'http://yum.theforeman.org/stable', 
     gpgcheck => '0', 
     enabled => '1' 
 } 
 </pre> 

 h3. Quick and dirty 

 <pre> 
 cat > /etc/yum.repos.d/foreman.repo << EOF 
 [foreman] 
 name=Foreman Repo 
 baseurl=http://yum.theforeman.org/stable 
 gpgcheck=0 
 enabled=1 
 EOF 
 </pre> 

 <pre> 
 yum install foreman 
 </pre> 


 if you just want to get the rpms: 

 http://yum.theforeman.org 


 h2. Latest stable release 

 Latest stable version can be found under the files section 

 h2. Latest source code 

 You can get the latest source code of Foreman from the git repository hosted at github. 
 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. 

 to get latest "development" version do: 

 <pre><code>git clone git://github.com/ohadlevy/foreman.git foreman 
 cd foreman 
 git submodule init 
 git submodule update 
 </code></pre> 

 * if you are behind a proxy or firewall and dont have access to github using the git protocol, use http protocol instead (e.g.) 
 <pre> 
 git clone http://github.com/ohadlevy/foreman.git foreman 
 cd foreman 
 sed -i 's/git:\/\//http:\/\//g' .gitmodules 
 git submodule init 
 git submodule update 
 </pre> 

 h3. Daily snapshot 

 You can also fetch the latest daily snapshot of the development version at: 
 http://theforeman.org/foreman-nightly.tar.bz2 


 h1. Initial setup 

 h2. Database 

 Foreman uses a database, this database can be shared with Puppet store-configs (they are compatible, as Foreman extends the puppet database schema). 
 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+. 

 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. 

 In both cases, please use the *production* settings. 

 to initialize the database schema type: 
 <pre> 
 RAILS_ENV=production rake db:migrate 
 </pre> 

 h2. Import Data from Puppet 

 At this point, you might want to go through the [[FAQ]] to see how can you import your data into Foreman. 

 h2. Start The Web Server 

 if you installed via rpm, just start the foreman service, or start the built in web server by typing: 
 <code>./script/server -e production</code> 

 and point your browser to http://foreman:3000 

 If you would like to keep the server running, its recommend to setup passenger or use the RPM. 
 example usage with passenger can be found here: http://github.com/ohadlevy/puppet-foreman/blob/master/foreman/templates/foreman-vhost.conf.erb 

 h1. Smart proxy installation 

 (This feature is currently under development and will be available soon.) 

 A smart proxy is an autonomous web-based foreman component that is placed on a host performing a specific function in the host commissioning phase.  
 It receives requests from Foreman to perform operations that are required during the commissioning process and executes them on its behalf. More details can be found on the [[Foreman Architecture]] page. 

 To fully manage the commissioning process then a smart proxy will have to manipulate these services, DHCP, DNS, Puppet CA, Puppet reports and TFTP. These services may exist on separate machines or several of them may be hosted on the same machine. As each smart proxy instance is capable of managing all the of these services, there is only need for one proxy per host. 
 In the special case of a smart proxy managing a windows DHCP server, the host machine must be running Windows and support the *netsh dhcp* utility, it does not need to be the Microsoft DHCP server itself. 

 see [[Smart-Proxy:Installation_instructions]] 

 h2. Download 

 Download the smart proxy code from 
 * the git repository  
 * the rpm location 
 * this zip file.  

 When downloaded, extract into a suitable location and follow the README file. 

 h1. Future Updates 

 see [[Upgrade instructions]] 

 h1. Problems? 

 see [[Troubleshooting]]