RPM's distribution based installation » History » Version 26
Rytis Sileika, 08/01/2012 10:02 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 | 23 | Anonymous | h2. Release |
| 6 | 1 | Romain Vrignaud | |
| 7 | 24 | Anonymous | 1.) For RHEL 6 ensure your system is subscribed to EPEL. |
| 8 | |||
| 9 | For RHEL 5 you will need to be subscribed to both EPEL and the RHEL Virtualization RHN Channel. |
||
| 10 | Also be advised, that on RHEL5 the Foreman Repo will update Ruby to version 1.8.7. This has |
||
| 11 | the potential to break stuff (like passenger, notes on getting it working again below), |
||
| 12 | so be sure you want to proceed before committing to the installation. |
||
| 13 | |||
| 14 | <pre> |
||
| 15 | http://fedoraproject.org/wiki/EPEL |
||
| 16 | </pre> |
||
| 17 | |||
| 18 | 2.) Install the foreman-release.rpm for your version of RHEL or Fedora |
||
| 19 | <pre> |
||
| 20 | 25 | Anonymous | http://yum.theforeman.org/releases/1.0/el5/foreman-release.rpm |
| 21 | http://yum.theforeman.org/releases/1.0/el6/foreman-release.rpm |
||
| 22 | http://yum.theforeman.org/releases/1.0/f16/foreman-release.rpm |
||
| 23 | http://yum.theforeman.org/releases/1.0/f17/foreman-release.rpm |
||
| 24 | 24 | Anonymous | </pre> |
| 25 | |||
| 26 | 3.) Install foreman and other foreman-* packages to add functionality: |
||
| 27 | <pre> |
||
| 28 | foreman Foreman server |
||
| 29 | foreman-proxy Foreman Smart Proxy |
||
| 30 | foreman-cli Foreman CLI utility |
||
| 31 | foreman-libvirt libvirt provisioning support |
||
| 32 | foreman-ovirt ovirt/RHEV provisioning support |
||
| 33 | foreman-ec2 EC2 provisioning support |
||
| 34 | foreman-vmware VMware provisioning support |
||
| 35 | foreman-console Console additions |
||
| 36 | foreman-mysql MySQL database support |
||
| 37 | foreman-mysql2 MySQL database support |
||
| 38 | foreman-postgresql PostgreSQL database support |
||
| 39 | foreman-sqlite SQLite database support |
||
| 40 | foreman-test Testing support (dependency rpm's not built yet) |
||
| 41 | foreman-devel Development support (dependency rpm's not built yet) |
||
| 42 | </pre> |
||
| 43 | |||
| 44 | 5.) Configure |
||
| 45 | <pre> |
||
| 46 | Edit /etc/foreman/settings.yaml and /etc/foreman/database.yml |
||
| 47 | su - foreman -s /bin/bash -c /usr/share/foreman/extras/dbmigrate |
||
| 48 | </pre> |
||
| 49 | |||
| 50 | 6.) Start the foreman service or set up passenger |
||
| 51 | <pre> |
||
| 52 | service foreman start |
||
| 53 | </pre> |
||
| 54 | 1 | Romain Vrignaud | |
| 55 | 26 | Rytis Sileika | 7.) Set up Nginx + Passenger |
| 56 | |||
| 57 | 1 | Romain Vrignaud | Passenger packages/repos are available at http://passenger.stealthymonkeys.com/ |
| 58 | 26 | Rytis Sileika | |
| 59 | |||
| 60 | Install packages |
||
| 61 | |||
| 62 | <pre> |
||
| 63 | # yum install -y nginx-passenger |
||
| 64 | </pre> |
||
| 65 | |||
| 66 | Create self signed certificate |
||
| 67 | |||
| 68 | <pre> |
||
| 69 | # cd /etc/nginx/ |
||
| 70 | # openssl genrsa -des3 -out server.key 1024 |
||
| 71 | # openssl req -new -key server.key -out server.csr |
||
| 72 | # cp server.key server.key.org |
||
| 73 | # openssl rsa -in server.key.org -out server.key |
||
| 74 | # openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt |
||
| 75 | </pre> |
||
| 76 | |||
| 77 | Make a local copy of the apps `public` directory (local to rails, as nginx/passenger doesn't seem to like symbolic links) |
||
| 78 | |||
| 79 | <pre> |
||
| 80 | # cd /usr/share/foreman |
||
| 81 | # rm public |
||
| 82 | # cp -a /var/lib/foreman/public . |
||
| 83 | </pre> |
||
| 84 | |||
| 85 | Add to `/etc/nginx/nginx.conf`: |
||
| 86 | |||
| 87 | <pre> |
||
| 88 | env PATH; |
||
| 89 | </pre> |
||
| 90 | |||
| 91 | Create foreman application config file `/etc/nginx/conf.d/foreman.conf`: |
||
| 92 | |||
| 93 | <pre> |
||
| 94 | server { |
||
| 95 | listen 443; |
||
| 96 | server_name _; |
||
| 97 | ssl on; |
||
| 98 | ssl_certificate /etc/nginx/server.crt; |
||
| 99 | ssl_certificate_key /etc/nginx/server.key; |
||
| 100 | access_log /var/log/nginx/foreman_access.log; |
||
| 101 | error_log /var/log/nginx/foreman_error.log debug; |
||
| 102 | root /usr/share/foreman/public; |
||
| 103 | passenger_enabled on; |
||
| 104 | #location / { |
||
| 105 | #} |
||
| 106 | } |
||
| 107 | </pre> |
||
| 108 | 24 | Anonymous | |
| 109 | On RHEL5 the RPM's at the URL above will not run after updating ruby. Fortunately it is fairly easy to get it working again. |
||
| 110 | After foreman is installed ensure /usr/sbin is in your path so that the axps binary can be found, otherwise the rpm's may |
||
| 111 | fail to build while complaining about being unable to find some files. Then do the following: |
||
| 112 | <pre> |
||
| 113 | yum localinstall http://passenger.stealthymonkeys.com/rhel/5/x86_64/rubygem-daemon_controller-0.2.5-1.noarch.rpm |
||
| 114 | wget http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.12-1.src.rpm |
||
| 115 | yum-builddep rubygem-passenger-3.0.12-1.src.rpm |
||
| 116 | rpmbuild --rebuild rubygem-passenger-3.0.12-1.src.rpm |
||
| 117 | </pre> |
||
| 118 | |||
| 119 | 2 | Anonymous | h2. Development |
| 120 | 1 | Romain Vrignaud | |
| 121 | 19 | Anonymous | 1.) For RHEL 6 ensure your system is subscribed to EPEL. |
| 122 | |||
| 123 | For RHEL 5 you will need to be subscribed to both EPEL and the RHEL Virtualization RHN Channel. |
||
| 124 | Also be advised, that on RHEL5 the Foreman Repo will update Ruby to version 1.8.7. This has |
||
| 125 | 20 | Anonymous | the potential to break stuff (like passenger, notes on getting it working again below), |
| 126 | 19 | Anonymous | so be sure you want to proceed before committing to the installation. |
| 127 | |||
| 128 | 2 | Anonymous | <pre> |
| 129 | http://fedoraproject.org/wiki/EPEL |
||
| 130 | 1 | Romain Vrignaud | </pre> |
| 131 | 14 | Anonymous | |
| 132 | 11 | Anonymous | 2.) Install the foreman-release.rpm for your version of RHEL or Fedora |
| 133 | 1 | Romain Vrignaud | <pre> |
| 134 | 14 | Anonymous | http://yum.theforeman.org/development/el5/foreman-release.rpm |
| 135 | 5 | Anonymous | http://yum.theforeman.org/development/el6/foreman-release.rpm |
| 136 | http://yum.theforeman.org/development/f16/foreman-release.rpm |
||
| 137 | http://yum.theforeman.org/development/f17/foreman-release.rpm |
||
| 138 | 2 | Anonymous | </pre> |
| 139 | 1 | Romain Vrignaud | |
| 140 | 2 | Anonymous | 3.) Install foreman and other foreman-* packages to add functionality: |
| 141 | 3 | Anonymous | <pre> |
| 142 | 7 | Anonymous | foreman Foreman server |
| 143 | foreman-proxy Foreman Smart Proxy |
||
| 144 | foreman-cli Foreman CLI utility |
||
| 145 | foreman-libvirt libvirt provisioning support |
||
| 146 | foreman-ovirt ovirt/RHEV provisioning support |
||
| 147 | 12 | Anonymous | foreman-ec2 EC2 provisioning support |
| 148 | 7 | Anonymous | foreman-vmware VMware provisioning support |
| 149 | foreman-console Console additions |
||
| 150 | foreman-mysql MySQL database support |
||
| 151 | foreman-mysql2 MySQL database support |
||
| 152 | foreman-postgresql PostgreSQL database support |
||
| 153 | foreman-sqlite SQLite database support |
||
| 154 | foreman-test Testing support (dependency rpm's not built yet) |
||
| 155 | foreman-devel Development support (dependency rpm's not built yet) |
||
| 156 | 2 | Anonymous | </pre> |
| 157 | |||
| 158 | 5.) Configure |
||
| 159 | <pre> |
||
| 160 | Edit /etc/foreman/settings.yaml and /etc/foreman/database.yml |
||
| 161 | 9 | Anonymous | su - foreman -s /bin/bash -c /usr/share/foreman/extras/dbmigrate |
| 162 | 2 | Anonymous | </pre> |
| 163 | |||
| 164 | 6.) Start the foreman service or set up passenger |
||
| 165 | <pre> |
||
| 166 | service foreman start |
||
| 167 | 21 | Anonymous | </pre> |
| 168 | 16 | Anonymous | Or: |
| 169 | |||
| 170 | 1 | Romain Vrignaud | Passenger packages/repos are available at http://passenger.stealthymonkeys.com/ |
| 171 | 21 | Anonymous | |
| 172 | On RHEL5 the RPM's at the URL above will not run after updating ruby. Fortunately it is fairly easy to get it working again. |
||
| 173 | After foreman is installed ensure /usr/sbin is in your path so that the axps binary can be found, otherwise the rpm's may |
||
| 174 | fail to build while complaining about being unable to find some files. Then do the following: |
||
| 175 | <pre> |
||
| 176 | 16 | Anonymous | yum localinstall http://passenger.stealthymonkeys.com/rhel/5/x86_64/rubygem-daemon_controller-0.2.5-1.noarch.rpm |
| 177 | 18 | Anonymous | wget http://passenger.stealthymonkeys.com/SRPMS/rubygem-passenger-3.0.12-1.src.rpm |
| 178 | 2 | Anonymous | yum-builddep rubygem-passenger-3.0.12-1.src.rpm |
| 179 | 1 | Romain Vrignaud | rpmbuild --rebuild rubygem-passenger-3.0.12-1.src.rpm |
| 180 | 15 | Anonymous | </pre> |
| 181 | |||
| 182 | 22 | Anonymous | h2. Nightly Builds |
| 183 | |||
| 184 | Create a /etc/yum.repos.d/foreman-nightly.repo with the following contents: |
||
| 185 | el5: |
||
| 186 | <pre> |
||
| 187 | [foreman-nightly] |
||
| 188 | name=foreman-nightly |
||
| 189 | baseurl=http://yum.theforeman.org/nightly/el5/$basearch |
||
| 190 | gpgcheck=0 |
||
| 191 | enabled=1 |
||
| 192 | |||
| 193 | [foreman-nightly-source] |
||
| 194 | name=foreman-nightly |
||
| 195 | baseurl=http://yum.theforeman.org/nightly/el5/source |
||
| 196 | gpgcheck=0 |
||
| 197 | enabled=0 |
||
| 198 | </pre> |
||
| 199 | |||
| 200 | el6: |
||
| 201 | <pre> |
||
| 202 | [foreman-nightly] |
||
| 203 | name=foreman-nightly |
||
| 204 | baseurl=http://yum.theforeman.org/nightly/el6/$basearch |
||
| 205 | gpgcheck=0 |
||
| 206 | enabled=1 |
||
| 207 | |||
| 208 | [foreman-nightly-source] |
||
| 209 | name=foreman-nightly |
||
| 210 | baseurl=http://yum.theforeman.org/nightly/el6/source |
||
| 211 | gpgcheck=0 |
||
| 212 | enabled=0 |
||
| 213 | </pre> |
||
| 214 | |||
| 215 | f16: |
||
| 216 | <pre> |
||
| 217 | [foreman-nightly] |
||
| 218 | name=foreman-nightly |
||
| 219 | baseurl=http://yum.theforeman.org/nightly/f16/$basearch |
||
| 220 | gpgcheck=0 |
||
| 221 | enabled=1 |
||
| 222 | |||
| 223 | [foreman-nightly-source] |
||
| 224 | name=foreman-nightly |
||
| 225 | baseurl=http://yum.theforeman.org/nightly/f16/source |
||
| 226 | gpgcheck=0 |
||
| 227 | enabled=0 |
||
| 228 | </pre> |
||
| 229 | |||
| 230 | f17: |
||
| 231 | <pre> |
||
| 232 | [foreman-nightly] |
||
| 233 | name=foreman-nightly |
||
| 234 | baseurl=http://yum.theforeman.org/nightly/f17/$basearch |
||
| 235 | gpgcheck=0 |
||
| 236 | enabled=1 |
||
| 237 | |||
| 238 | [foreman-nightly-source] |
||
| 239 | name=foreman-nightly |
||
| 240 | baseurl=http://yum.theforeman.org/nightly/f17/source |
||
| 241 | gpgcheck=0 |
||
| 242 | enabled=0 |
||
| 243 | </pre> |
||
| 244 | |||
| 245 | 1 | Romain Vrignaud | h2. Getting the RPMS |
| 246 | 6 | Anonymous | |
| 247 | 1 | Romain Vrignaud | If you just want to get the rpms: |
| 248 | 6 | Anonymous | |
| 249 | 1 | Romain Vrignaud | http://yum.theforeman.org |