[OFI] Speeding up OFI provisioning in Dev env

If you are like me and you have a dog slow connection and you are
wanting to test orchestration on using Staypuft, it can take forever and
a day. The main issue for me was that the network installs were taking
hours, if you are using Fedora etc… you can quite easily use a proxy
like Squid to cache everything. However, I am using RHEL which is
usually behind SSL. It's not impossible to get round this with squid,
but you'll need to play around with man in the middle stuff.

One quick and easy way to speed up network install for RHEL and any
other distro, is just to download the DVD iso, mount it, then service it
up via apache. You'll still need to do some public traffic as you'lll
need to download all the OpenStack modules etc… but this has taken
provision time of a host for me from about 90 mins to about 15mins.
Since we are provisioning sequentially that makes a massive difference.

Here are the steps involved:

1. Add a entry in /etc/hosts for your virtual host:

192.168.100.1 mirrors.local

2. create a new virtual host file, /etc/httpd/conf.d/06-local-mirrors.conf

<VirtualHost mirrors.local:80>
ServerName mirrors.local

DocumentRoot /var/www/html/repos
</VirtualHost>

<Directory "/var/www/html/repos">
Options +Indexes
</Directory>

3. Download the your ISO of choice and mount it somewhere:

mkdir /mnt/rhel-iso
mount -o loop <ISO> /mnt/rhel-iso

··· * **4. Create symlink to the ISO*

mkdir /var/www/html/repos
ln -s /mnt/rhel-iso /var/www/html/repos

5. Add your new install media in foreman as normal, adding the URL to
your ISO

path: http://mirrors.local/rhel

Hey,

thanks for the tip. There is also higher-level setup with automounter
which is described here (unfortunately in Czech):

http://fedora.cz/foreman-hromadna-instalace-a-konfigurace-serveru-2-dil/

Scroll down a bit, should be clear from the examples there.

Based on Dominic's remarks from IRC channel.

LZ

··· On Wed, Apr 02, 2014 at 02:28:57PM +0100, Martyn Taylor wrote: > If you are like me and you have a dog slow connection and you are > wanting to test orchestration on using Staypuft, it can take forever > and a day. The main issue for me was that the network installs were > taking hours, if you are using Fedora etc... you can quite easily > use a proxy like Squid to cache everything. However, I am using > RHEL which is usually behind SSL. It's not impossible to get round > this with squid, but you'll need to play around with man in the > middle stuff. > > One quick and easy way to speed up network install for RHEL and any > other distro, is just to download the DVD iso, mount it, then > service it up via apache. You'll still need to do some public > traffic as you'lll need to download all the OpenStack modules etc... > but this has taken provision time of a host for me from about 90 > mins to about 15mins. Since we are provisioning sequentially that > makes a massive difference. > > Here are the steps involved: > > *1. Add a entry in /etc/hosts for your virtual host:* > > 192.168.100.1 mirrors.local > > *2. create a new virtual host file, /etc/httpd/conf.d/06-local-mirrors.conf* > > > ServerName mirrors.local > > DocumentRoot /var/www/html/repos > > > > Options +Indexes > > > *3. Download the your ISO of choice and mount it somewhere:* > > mkdir /mnt/rhel-iso > mount -o loop /mnt/rhel-iso > * > **4. Create symlink to the ISO* > > mkdir /var/www/html/repos > ln -s /mnt/rhel-iso /var/www/html/repos > > *5. Add your new install media in foreman as normal, adding the URL > to your ISO* > > path: http://mirrors.local/rhel > > -- > You received this message because you are subscribed to the Google Groups "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman