Project

General

Profile

Foreman installer » History » Revision 19

Revision 18 (Greg Sutcliffe, 10/23/2012 12:53 PM) → Revision 19/20 (Greg Sutcliffe, 10/25/2012 10:49 AM)

{{toc}} 

 h1. Puppet modules for managing Foreman 

 The installer can be used in multiple ways: 
 * Installs Foreman as a standalone application or using apache passenger. 
 * Installs Foreman Proxy 
 * May install an example puppet master setup using passenger as well, including the tweaks required for foreman. 

 h2. Installation 

 h3. A note on older puppet versions 

 The "master" branches are being updated with parameterized classes. If you are running a version of Puppet which doesn't support this (0.25.x or lower) then you should check out the "oldstable" versions of the modules. We will try to fix bugs in either branch, so bug reports are appreciated in either case. Currently, "oldstable" branches exist for: 
 * puppet-foreman_proxy (master not parameterized yet, but contains references to experimental DHCP/DNS modules) 
 * puppet-puppet          (master parameterized for both agent and server, see README for details) 

 h3. Using GIT 

 <pre> 
 git clone --recursive git://github.com/theforeman/foreman-installer.git                (for the latest installer) 
 git clone --recursive git://github.com/theforeman/foreman-installer.git -b oldstable (for puppet 0.25.x or lower) 
 </pre> 

 h3. Direct download 

 Since we are no longer using one repository for all sources, a single tarball is no longer provided. 
 You can either follow the script below, or download the source code for each module on its own: 

 http://github.com/theforeman/puppet-apache/tarball/master 
 http://github.com/theforeman/puppet-foreman/tarball/master 
 http://github.com/theforeman/puppet-foreman_proxy/tarball/master 
 http://github.com/theforeman/puppet-git/tarball/master 
 http://github.com/theforeman/puppet-passenger/tarball/master 
 http://github.com/theforeman/puppet-puppet/tarball/master 
 http://github.com/theforeman/puppet-tftp/tarball/master 
 http://github.com/theforeman/puppet-xinetd/tarball/master 

 Optional Modules: 

 These provide support for the experimental DHCP/DNS auto configuration in the proxy. Use at your own risk (but send me bug reports :P) 
 http://github.com/theforeman/puppet-concat/tarball/master (dependency for the next two) 
 http://github.com/theforeman/puppet-dhcp/tarball/master 
 http://github.com/theforeman/puppet-dns/tarball/master 


 h2. Requirements 

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

 if you are using Debian (or Ubuntu), see the additional notes in README.debian 

 Make sure SELinux is disabled or permissive when running on Fedora/RHEL. 

 h2. Setup/Configuration - using the answers file (current branch only) 

 We now support using a simple YAML file to supply all your requirements. You can find this file in @[download path]/foreman_installer/answers.yaml@.  

 There are only 4 modules which can be configured this way - all the others are dependencies. These are: 

     foreman 
 puppet 
 puppetmaster (maps to the puppet::server class) 
 foreman_proxy 

 This file has two methods for specifying modules. To simply turn a module on or off, specify the module and true or false. For example, to install just foreman and not puppet (with all the defaults): 

     foreman: true 
 puppet: false 
 puppetmaster: false 
 foreman_proxy: true 

 If you need to override any of the class parameters (review **/manifestes/params.pp*) then you need to switch to a hash-style. These can be mixed, for example to install foreman with the defaults, but use git for puppet environments: 

     foreman: true 
 puppet: 
   git_repo: true 
 puppetmaster: false 
 foreman_proxy: true 

 Using the hash style impicitly declares the class - there is no need to specify "true" (in fact this will throw an error, as it's not valid YAML). 

 Here are the some examples: 

 h3. only Foreman, using Webrick instead of Passenger 

     foreman: 
   passenger: false 
   ssl: false 
 puppet: false 
 puppetmaster: false 
 foreman_proxy: false 

 h3. Both foreman and its proxy, from the latest code (testing/nightly instead of stable): 

     foreman: 
   use_testing: true 
 puppet: false 
 puppetmaster: false 
 foreman_proxy: 
   use_testing: true 

 h3. All in one box (Puppet, Foreman, Proxy) using git for your environments: 

     foreman: true 
 puppet: 
   git_repo: true 
 puppetmaster: true 
 foreman_proxy: true 

 Any parameter found in the *params.pp* files in the relevant modules (foreman, foreman_proxy, and puppet) can be specified this way. If you have any issues with this, please supply your answers file when submitting the bug so we can reproduce this issue. 

 Once you have your answers file, you can run the foreman installer with a single line: 

     echo include foreman_installer | puppet --modulepath /path_to/extracted_tarball 

 h2. Setup/Configuration - using the params.pp files (current and oldstable) 

 *Please review the variables under */manifests/params.pp* 

 h3. only Foreman 

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

 h3. Both foreman and its proxy: 

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

 h3. On your Puppet Master 

 if you just want to include the relavant bits to run on your puppet master you may 

 <pre> 
 include foreman::params, foreman::config::enc, foreman::config::reports 
 </pre> 

 h3. All in one box (Puppet, Foreman, Proxy) 

 if you want to install it all on one box (2.6.x and older) 

 <pre> 
 export MODULE_PATH="/etc/puppet/modules/common" 
 mkdir -p $MODULE_PATH 
 for mod in apache foreman foreman_proxy git passenger puppet tftp xinetd; do 
   mkdir -p $MODULE_PATH/$mod 
   wget http://github.com/theforeman/puppet-$mod/tarball/master -O - | tar xzvf - -C $MODULE_PATH/$mod --strip-components=1 
 done; 
 echo include puppet, puppet::server, foreman, foreman_proxy | puppet --modulepath $MODULE_PATH 
 </pre> 

 if you want to install it all on one box (2.7.x and newer) 

 <pre> 
 export MODULE_PATH="/etc/puppet/modules/common" 
 mkdir -p $MODULE_PATH 
 for mod in apache concat dns dhcp foreman foreman_proxy git passenger puppet tftp xinetd; do 
   mkdir -p $MODULE_PATH/$mod 
   wget http://github.com/theforeman/puppet-$mod/tarball/master -O - | tar xzvf - -C $MODULE_PATH/$mod --strip-components=1 
 done; 
 echo include puppet, puppet::server, foreman, foreman_proxy | puppet apply --modulepath $MODULE_PATH 
 </pre>