Project

General

Profile

RPM's distribution based installation » History » Version 18

Anonymous, 07/03/2012 11:14 AM

1 1 Romain Vrignaud
h1. RPM's distribution based installation
2
3
We maintain a repository for RHEL and Fedora (and clones) - you may add it via:
4
5 2 Anonymous
h2. Stable
6
7 1 Romain Vrignaud
h3. Puppet 
8
9
<pre>
10
yumrepo { 'foreman':
11
    descr => 'Foreman Repo',
12
    baseurl => 'http://yum.theforeman.org/stable',
13
    gpgcheck => '0',
14
    enabled => '1'
15
}
16
</pre>
17
18
h3. Quick and dirty
19
20
<pre>
21
cat > /etc/yum.repos.d/foreman.repo << EOF
22
[foreman]
23
name=Foreman Repo
24
baseurl=http://yum.theforeman.org/stable
25
gpgcheck=0
26
enabled=1
27
EOF
28
</pre>
29
30
<pre>
31
yum install foreman
32
</pre>
33
34
35 2 Anonymous
h2. Development
36 1 Romain Vrignaud
37 14 Anonymous
1.) For RHEL 6 ensure your system is subscribed to EPEL. For RHEL 5 you will need to be subscribed to both EPEL and the RHEL Virtualization RHN Channel
38 2 Anonymous
<pre>
39
http://fedoraproject.org/wiki/EPEL
40
</pre>
41 1 Romain Vrignaud
42 14 Anonymous
43 11 Anonymous
2.) Install the foreman-release.rpm for your version of RHEL or Fedora
44 1 Romain Vrignaud
<pre>
45 14 Anonymous
http://yum.theforeman.org/development/el5/foreman-release.rpm
46 5 Anonymous
http://yum.theforeman.org/development/el6/foreman-release.rpm
47
http://yum.theforeman.org/development/f16/foreman-release.rpm
48
http://yum.theforeman.org/development/f17/foreman-release.rpm
49 2 Anonymous
</pre>
50 1 Romain Vrignaud
51 2 Anonymous
3.) Install foreman and other foreman-* packages to add functionality:
52 3 Anonymous
<pre>
53 7 Anonymous
foreman               Foreman server
54
foreman-proxy         Foreman Smart Proxy
55
foreman-cli           Foreman CLI utility
56
foreman-libvirt       libvirt provisioning support
57
foreman-ovirt         ovirt/RHEV provisioning support
58 12 Anonymous
foreman-ec2           EC2 provisioning support
59 7 Anonymous
foreman-vmware        VMware provisioning support
60
foreman-console       Console additions
61
foreman-mysql         MySQL database support
62
foreman-mysql2        MySQL database support
63
foreman-postgresql    PostgreSQL database support
64
foreman-sqlite        SQLite database support
65
foreman-test          Testing support (dependency rpm's not built yet)
66
foreman-devel         Development support (dependency rpm's not built yet)
67 2 Anonymous
</pre>
68
69
5.) Configure
70
<pre>
71
Edit /etc/foreman/settings.yaml and /etc/foreman/database.yml
72 9 Anonymous
su - foreman -s /bin/bash -c /usr/share/foreman/extras/dbmigrate
73 2 Anonymous
</pre>
74
75
6.) Start the foreman service or set up passenger
76
<pre>
77
service foreman start
78 16 Anonymous
79
Or:
80
81
Passenger packages/repos are available at http://passenger.stealthymonkeys.com/
82
Note that because Foreman requires ruby 1.8.7 it is upgraded on RHEL5 and so the RPM's at the URL above will not run on RHEL5. 
83
Fortunately it is fairly easy to get it working again. After foreman is installed ensure /usr/sbin is in your path so that 
84
the axps binary can be found, otherwise the rpm's may fail to build while complaining about being unable to find some files.
85
Then do the following:
86
yum localinstall http://passenger.stealthymonkeys.com/rhel/5/x86_64/rubygem-daemon_controller-0.2.5-1.noarch.rpm
87 18 Anonymous
wget http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.12-1.src.rpm 
88
yum-builddep rubygem-passenger-3.0.12-1.src.rpm 
89
rpmbuild --rebuild rubygem-passenger-3.0.12-1.src.rpm
90 2 Anonymous
</pre>
91
92
Example RHEL6 setup:
93 6 Anonymous
<pre>
94 1 Romain Vrignaud
yum install http://mirror.symnds.com/distributions/fedora-epel/6/i386/epel-release-6-7.noarch.rpm 
95 6 Anonymous
yum install http://yum.theforeman.org/development/el6/foreman-release.rpm
96 18 Anonymous
yum install foreman foreman-proxy foreman-ovirt foreman-sqlite foreman-ec2 foreman-console foreman-libvirt foreman-vmware 
97 2 Anonymous
vi /etc/settings/settings.yaml /etc/settings/database.yml
98 1 Romain Vrignaud
su - foreman -s /bin/bash -c /usr/share/foreman/extras/dbmigrate
99 15 Anonymous
</pre>
100
101 1 Romain Vrignaud
h2. Getting the RPMS
102 6 Anonymous
103 1 Romain Vrignaud
If you just want to get the rpms:
104 6 Anonymous
105 1 Romain Vrignaud
http://yum.theforeman.org