Difference between revisions of "Build a virtual appliance 0.7"

From Archivematica
Jump to navigation Jump to search
 
Line 50: Line 50:
 
3. Open firefox and navigate to http://localhost, go through the qubit installer for the database settings all defaults will work.
 
3. Open firefox and navigate to http://localhost, go through the qubit installer for the database settings all defaults will work.
  
4. Aside from some icon placement you now have a fully functional version of archivematica!
+
4. Add the cron job to delay the unquarantine for the desired amount of time in minutes. Replace the '1' with the desired quarantine time in minutes.
 +
<pre>
 +
#sudo crontab -e
 +
#add this line
 +
* * * * * flock -xn /var/lock/quarantine.lock /usr/lib/archivematica/MCPServer/delay/delay.sh 1 "/var/archivematica/sharedDirectory/watchedDirectories/quarantined" "/var/archivematica/sharedDirectory/watchedDirectories/unquarantine/."
 +
</pre>
 +
 
 +
5. Aside from some icon placement you now have a fully functional version of archivematica!
  
 
==Create a .raw file==
 
==Create a .raw file==

Latest revision as of 14:09, 24 November 2010

Main Page > Development > Build a virtual appliance

Below are instructions for building your own Archivematica virtual appliance. This allows you to create intermediate or branch releases to test and use your own modifications.

Requirements[edit]

  • Ubuntu server 10.04
  • vmbuilder requires KVM which requires a virt compatible processor however, you do not need virt support for vmbuilder
  • At least 2GB of ram

Software Requirements[edit]

subversion (SVN)

sudo apt-get install subversion

vmbuilder

sudo apt-get install ubuntu-vm-builder

A local apt-proxy. We recomend apt-cacher-ng.

sudo aptitude install apt-cacher-ng
sudo gedit /etc/apt-cacher-ng/acng.conf

change the port.. whatever its set to..(3142 defuault) to 9999 Restart the service for changes to take effect.

sudo /etc/init.d/apt-cacher-ng restart

Pre Build[edit]

1. check out the source

svn checkout http://archivematica.googlecode.com/svn/trunk/ archivematica-read-only

2. Run the build script: This script will set the vmbuilder execscript to archivematica.sh and create the selected type VM. Note the rootSize is the size of the vm disk to build in MB.

 
cd archivematica-read-only

Post Build[edit]

1. boot your virtual machine. For KVM its under ubuntu-kvm, for other examples please see Virtual_appliance_instructions.

kvm -m 528 -smp 1 -drive file=disk0.qcow2 

2. From inside the machine open a terminal and run the post build script: This will create the necessary databases, and tables.

cd ~/postBuildScripts
./postBuildRun.sh

3. Open firefox and navigate to http://localhost, go through the qubit installer for the database settings all defaults will work.

4. Add the cron job to delay the unquarantine for the desired amount of time in minutes. Replace the '1' with the desired quarantine time in minutes.

#sudo crontab -e
#add this line
* * * * * flock -xn /var/lock/quarantine.lock /usr/lib/archivematica/MCPServer/delay/delay.sh 1 "/var/archivematica/sharedDirectory/watchedDirectories/quarantined" "/var/archivematica/sharedDirectory/watchedDirectories/unquarantine/."

5. Aside from some icon placement you now have a fully functional version of archivematica!

Create a .raw file[edit]

1. A raw file can be used to run the virtual appliance directly from a USB key or to install it directly on dedicated hardware without a virtualization layer.

2. after running vmbuilder you will be left with a qcow2 image. Run the following command:

kvm-img convert -f qcow2 -O raw disk0.qcow2 archivematica.raw

3. See Build a Live USB disk for instructions on using the .raw file to create a bootable USB key version of Archivematica