TobyHFerguson / Corralitos

A repo containing vagrant boxes for Oracle Linux
0 stars 1 forks source link

+TITLE: Oracle Linux 6 Minimal BTRFS UEK Build

+STARTUP: showall nohideblocks

Optionally one can choose to build machines that have an http_proxy setup.

The software to install Oracle Linux using btrfs as the root file system comes in two isos.

The software is available online at http://mirrors.dotsrc.org/oracle-linux/OL6

The variables are: | Variable | Description | Mandatory | Default | |-----------------------+--------------------------------------+-----------+---------| | uek_iso_url | URL to UEK boot iso | Yes | | | uek_iso_checksum | UEK boot iso checksum | Yes | | | uek_iso_checksum_type | Type of checksum (sha1, sha256, md5) | Yes | | | install_iso_file | File path to install iso file | Yes | | | minor_version | Minor Oracle Linux 6 version (4,5,6) | Yes | | | http_proxy | Proxy value | No | None | | headless | Use virtualbox headless | No | False |

For each minor version there is a file defining the variables for that minor version. These files have a common name, distinguished by the minor version number. Likewise the boxes that are output from each build share a common name, distinguished by the minor version number.

If the minor version is 'N', then the variable files and the box files would be =ol6uN_vars.json= and =ol6uN-minimal-btrfs-uek.box=, respectively (i.e. for minor version 4 the files would be =ol6u5_vars.json and =ol6u4-minimal-btrfs-uek.box=) *** Http_proxy When the =vbguest= plugin attempts to update the VirtualBox Guest Additions it is necessary to access =public-yum.oracle.com=. In some environments this requires that yum be setup with a proxy. Machines will be built for specific environments and proxy values (unfortunately using =http://wpad/wpad.dat= doesn't work with yum).

If the =http_proxy= variable is set to some non-null value (call it =$http_proxy=) then the following entry is made in the =/etc/yum.conf= file:

+BEGIN_EXAMPLE

proxy=$http_proxy

+END_EXAMPLE

Also the proxy is made available to all users by adding this entry to =/etc/profile.d/set-proxy.sh=:

+BEGIN_EXAMPLE

http_proxy=$http_proxy

+END_EXAMPLE

* headless When set to =true= then the VirtualBox build will be performed with no GUI. The default is =false=, which causes the console GUI to be shown during the build. Building the box For minor version N the command to build the box is:

+BEGIN_SRC sh

packer build -var-file=ol6uN_vars.json template.json

+END_SRC

This will build a box in the current directory called =ol6uN-minimal-btrfs-uek.box= ** Publishing and Using the box *** To the local Vagrant system Publish thus:

+BEGIN_SRC sh

vagrant box add --force ol6uN-minimal-btrfs-uek ol6uN-minimal-btrfs-uek.box

+END_SRC

Access this box by adding the following to your =Vagrantfile= to access this box:

+BEGIN_SRC ruby

config.vm.box = "ol6uN-minimal-btrfs-uek"

+END_SRC

*** To =tobyhferguson.org= (This will only work if you have the keys to =tobyhferguson.org=) Publish thus:

+BEGIN_SRC sh

scp ol6uN-minimal-btrfs-uek.box tobyhfer@tobyhferguson.org:public_html/

+END_SRC

Add the following to your =Vagrantfile= to access this box:

+BEGIN_SRC ruby

Vagrant.configure(2) do |config| config.vm.box = "ol6uN-minimal-btrfs-uek" config.vm.box_url = "http://tobyhferguson.org/ol6uN-minimal-btrfs-uek.box" end

+END_SRC

*** To =Atlas= Publish by logging in to the account =tobyhferguson= and uploading the box to =ol6uN-minimal-btrfs-uek= Add the following to your =Vagrantfile= to access this box:

+BEGIN_SRC ruby

Vagrant.configure(2) do |config| config.vm.box = "tobyhferguson/ol6uN-minimal-btrfs-uek" end

+END_SRC