These are the instructions for creating an end-user VM from scratch.
There is a bug in VirtualBox with IPv6 handling over a bridged network. When the bug is present the top transfer speeds for IPv6 are around 18kb/s. Since RHEL (and derivatives) prefer IPv6 when looking up hosts, it is not uncommon to get an IPv6 host address for updates. To disable IPv6 on the guest add these lines to /etc/sysctl.conf. VirtualBox 4.2.12 was supposed to fix it but I'm not sure it has.
|
create script /usr/local/bin/fix_dropbox_permissions with this content:
#!/bin/bash chown -R avalon:dropbox /var/avalon/dropbox find /var/avalon/dropbox -type f -exec chmod 664 "{}" ";" find /var/avalon/dropbox -type d -exec chmod 2775 "{}" ";" |
and set the mode to 755.
set the cronjob to run every minute by adding this line:
* * * * * /usr/local/bin/fix_dropbox_permissions |
Get the demo fixtures bundle
cd /tmp wget http://www.avalonmediasystem.org/downloads/DemoFixturesBatch.tar.gz tar xvzf DemoFixturesBatch.tar.gz chown -R avalon:dropbox DemoFixturesBatch chmod -R g+w DemoFixturesBatch mv DemoFixturesBatch /var/avalon/dropbox |
Monitor progress in Matterhorn (at http://<whatever>:18080 using the default username/password) or within Avalon.
Download the demo content thumbnails
cd /tmp wget http://www.avalonmediasystem.org/downloads/DemoFixturesThumbnails.tar.gz tar -xzvf DemoFixturesThumbnails.tar.gz chown -R avalon:avalon DemoFixturesThumbnails mv DemoFixturesthumbnails /var/www/avalon/current/app/assets/images |
Modify /var/www/avalon/current/app/views/catalog/_home_text.html.erb and replace sample content with something like:
<ul class="thumbnails"> <li class="span3"><h5>Featured Video</h5><a href="<%= media_object_path('avalon:1') %>" class="thumbnail" ><%= image_tag "DemoFixturesThumbnails/organClip.jpg", alt: "Featured Video" %></a></li> <li class="span3"><h5>Featured Video</h5><a href="<%= media_object_path('avalon:2') %>" class="thumbnail" ><%= image_tag "DemoFixturesThumbnails/lunchroomManners.jpg", alt: "Featured Video" %></a></li> <li class="span3"><h5>Featured Audio</h5><a href="<%= media_object_path('avalon:3') %>" class="thumbnail" ><%= image_tag "DemoFixturesThumbnails/mahler.jpg", alt: "Featured Audio" %></a></li> </ul> |
The values "avalon:1" to "avalon:3" should be changed to the appropriate container IDs
Reload the avalon application by running
touch /var/www/avalon/current/tmp/restart.txt |
and verify the changes are correct.
Remove source data
rm /tmp/DemoFixturesBatch.tar.gz rm -rf /var/avalon/dropbox/DemoFixturesBatch |
clean up anything that's left over from the build process
rm -rf /root/Downloads/* /var/avalon/dropbox/* /home/makerpm/rpmbuild /opt/staging /root/avalon-installer-flat /root/flat.tar.gz yum clean all swapoff /dev/mapper/vg_avalon-lv_swap; dd if=/dev/zero of=/dev/mapper/vg_avalon-lv_swap bs=1M; mkswap /dev/mapper/vg_avalon-lv_swap |
deleted files still take up space on the disk image. The disk image (as of 4/24/13) is roughly 12G in size, with 7.8G of actual data. Write zeros to a file until the disk is full to clear out the sectors which are unallocated but had data at one point. Since the .VDI image is sparsely allocated, the disk image size will actually grow less that 1G even though nearly 500G has been written.
dd if=/dev/zero of=/tmp/foo bs=1M oflag=direct; rm /tmp/foo |
On the host run:
VBoxManage modifyhd avalon-vm-disk-YYMMDD.vdi --compact |
VM Settings:
Name | Value |
---|---|
Name | avalon-vm |
Product | Avalon Media System |
Product-URL | http://www.avalonmediasystem.org |
Version | R2 |