These are my (bdwheele) brainstorming notes for the VM image...I'm still testing this.
- Using VirtualBox:
- 1 Core
- 3G RAM
- 500G System Disk (VMDK, Dynamically Allocated)
- Set network to "Attached to Bridged Adapter"
Base OS Install
- Centos 6.4 x86-64
- English language and keyboard
- hostname: localhost.localdomain (the default)
- if it is localhost it should set it to the dhcp hostname provided.
- Clear "Device MAC address"
- Connect automatically
- IPv4 Settings
- set timezone to america/indiana/indianapolis, clock uses utc
- root password is 'changeme'
- custom layout
- /dev/sda1: 500M ext4 mounted as /boot
- /dev/sda2: (remainder of disk) Physical volume
- Volume Group: vg_avalon
- PVs: /dev/sda2
- LV lv_swap 2G
- LV lv_root (remainder of disk) ext4 mounted as /
- Desktop install
- Reboot / Firstboot
- Leave all of the defaults, except...
- Do Not create a new user
- Log in as root
- do not check "do not show me this again" to the "you are running as root" dialog. Just close it.
- yum update
- open these ports in the firewall:
- clean up eth0 configuration in /etc/sysconfig/network-scripts/ifcfg-eth0:
- remove UUID
- remove any DHCP_CLIENT_ID
- shut down the VM
- at this point the vm is at "baseOS" and can be used as a cloning point
- clone the baseOS image as puppet-YYYYMMDD
- Use the installation notes from https://github.com/avalonmediasystem/avalon-installer
- When setting FACTER_* environment variables, set
- FACTER_avalon_dropbox_password to "changeme"
- FACTER_avalon_hostname to "localhost.localdomain"
- add avalon to the dropbox group
- verify that /var/avalon/dropbox is mode 2775
- clone the puppet image as democontent-YYMMDD
Get the demo fixtures bundle
wget http://dlib.indiana.edu/~cjcolvar/DemoFixturesBatch.tar.gz #We need a better place to serve this from
tar xvzf DemoFixturesBatch.tar.gz
chown -R avalondrop.dropbox DemoFixturesBatch
mv DemoFixturesBatch /var/avalon/dropbox
Monitor progress at http://<whatever>:18080.
Modify /var/www/avalon/current/app/views/catalog/_home_text.html.erb and replace sample content with something like:
<li class="span3"><h5>Featured Video</h5><a href="<%= media_object_path('avalon:1') %>" class="thumbnail" <%= image_tag "thumbnail.name.png", alt: "Featured Video" %></a></li>
<li class="span3"><h5>Featured Video</h5><a href="<%= media_object_path('avalon:2') %>" class="thumbnail" <%= image_tag "thumbnail.name.png", alt: "Featured Video" %></a></li>
<li class="span3"><h5>Featured Video</h5><a href="<%= media_object_path('avalon:3') %>" class="thumbnail" <%= image_tag "thumbnail.name.png", alt: "Featured Video" %></a></li>
Thumbnail images should be stored in /var/www/avalon/current/app/assets/images
Remove source data
rm -rf /var/avalon/dropbox/DemoFixturesBatch
VM Image Prep
- clone the latest democontent image as dist-YYMMDD
- Install avalon-vm-1.0-1.noarch.rpm to install the firstboot changes and tools
- run /usr/share/avalon/dist-prep to prepare the machine for release
- clear the command line history (history -c)
- shutdown the VM
- Export the appliance
- use a 0.9 version OVA
- use a MANIFEST
- copy the OVA to the distribution point
Adding the demo batch increased the size of the VM download from 3.2G to 7.4G. Partially its because we've make derivatives and there's really new content on the VM. But for a bigger reason, any disk space that gets allocated is stored in the image file – the VM doesn't know what's being used and what isn't. Since we download a largish package, untar it, and create a bunch of temp files, the VM disk image has a bunch of unused (from the OS point of view) disk that it still has to keep track of. Future research should include how to 'unuse' the disk space.
"zerofree" should do the trick, when combined with vboxmanager modifyhd <name> --compact