Difference between revisions of "Development environment"
Jump to navigation
Jump to search
(→Setup) |
|||
Line 35: | Line 35: | ||
***<pre>runArchivematicaMCPServer.sh</pre> | ***<pre>runArchivematicaMCPServer.sh</pre> | ||
***<pre>runArchivematicaMCPClient.sh</pre> | ***<pre>runArchivematicaMCPClient.sh</pre> | ||
− | |||
− | |||
− | |||
*To start processing a SIP: | *To start processing a SIP: | ||
Line 49: | Line 46: | ||
=Update= | =Update= | ||
To pull down the latest code commits from the repository, navigate to the directory where Archivematica trunk has been checked out: | To pull down the latest code commits from the repository, navigate to the directory where Archivematica trunk has been checked out: | ||
+ | *Change Directory to the archivematica SVN directory. | ||
+ | <pre>cd ~/archivematica/</pre> | ||
+ | *<pre>cd archivematica/localDevSetup/</pre> | ||
+ | *<pre>./cleanup.sh</pre> | ||
+ | *<pre>cd ~/archivematica/</pre> | ||
*<pre>svn up</pre> | *<pre>svn up</pre> | ||
+ | *<pre>cd archivematica/localDevSetup/</pre> | ||
+ | *<pre>./createLocalDevDirectories.sh</pre> | ||
+ | *Note: changes to the MCP database schema may have occurred. To make these changes to your local database run the following command. | ||
+ | '''THIS WILL ERASE THE DATA ON SIPs CURRENTLY IN YOUR DATABASE.''' | ||
+ | <pre>./recreateDB.sh</pre> | ||
=Troubleshooting= | =Troubleshooting= | ||
Line 63: | Line 70: | ||
*Updates to the Dashboard may require an Apache webserver restart: | *Updates to the Dashboard may require an Apache webserver restart: | ||
**<pre>sudo /etc/init.d/apache2 restart</pre> | **<pre>sudo /etc/init.d/apache2 restart</pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
*If you find a problem running the Dashboard and you want to get a detailed error log to report us, please switch it to debug mode following [http://archivematica.org/wiki/index.php?title=Dashboard#Debug_mode these instructions]. | *If you find a problem running the Dashboard and you want to get a detailed error log to report us, please switch it to debug mode following [http://archivematica.org/wiki/index.php?title=Dashboard#Debug_mode these instructions]. |
Revision as of 15:10, 7 February 2011
Main Page > Development > Development Environment
This page explains how you can configure and use an Ubuntu Linux system to use as a basic Archivematica development environment.
Setup
- Use Subversion to checkout Archivematica code
- If you have commit access, use the private repository
- If you have read-only access, use the public GoogleCode repository
svn checkout http://archivematica.googlecode.com/svn/trunk/ archivematica
- Run localDevSetup scripts.
cd archivematica/localDevSetup/
./installLocalDevRequirements.sh
./createArchivematicaUserAndGroupForLocalDev.sh
./createLocalDevDirectories.sh
cd createDatabases
./postBuildRun.sh
- This will create links in your local Ubuntu environment back to the relevant Archivematica scripts in your SVN checkout, allowing you to run a local Archivematica version which can continue to pull down revision updates from the code repository
- If you have commit access, you can work on the files in the checkout directory, make changes and commit those back to SVN repository, while also running Archivematica locally to test your changes and commits from other developers.
- Additional local environment configuration
- Edit the sudoers file to give archivematica execution rights.
sudo echo "archivematica ALL=NOPASSWD:/bin/mv,/bin/chown,/bin/chmod,/usr/bin/unoconv,/usr/bin/gs" >> /etc/sudoers
- Add Crontab for quarantine check
sudo crontab -e
* * * * * flock -xn /var/lock/quarantine.lock /usr/lib/archivematica/MCPServer/delay/delay.py 60 "/var/archivematica/sharedDirectory/watchedDirectories/quarantined"
In some cases we do some important structural changes in Archivematica that force us to update our development environment deployments. We'll inform our users through the Archivematica mailing list of the needed actions to keep our environments running correctly.
Run
- Start Archivematica MCP Server & Client
- Open a seperate terminal for each and type:
runArchivematicaMCPServer.sh
runArchivematicaMCPClient.sh
- Open a seperate terminal for each and type:
- To start processing a SIP:
- Open Thunar file manager
- if using sample SIPs, 'export' the SIP directory
svn export buildVM/includes/sampledata ~/sampledata
- 'cut' the SIP directory and paste into the AcquireSIP directory
- Open the Firefox browser and type 'localhost' as the address to view SIP processing progress via the Dashboard
- note: until polling is enabled, you will have to hit the browser refresh button to get latest Dashboard updates
Update
To pull down the latest code commits from the repository, navigate to the directory where Archivematica trunk has been checked out:
- Change Directory to the archivematica SVN directory.
cd ~/archivematica/
cd archivematica/localDevSetup/
./cleanup.sh
cd ~/archivematica/
svn up
cd archivematica/localDevSetup/
./createLocalDevDirectories.sh
- Note: changes to the MCP database schema may have occurred. To make these changes to your local database run the following command.
THIS WILL ERASE THE DATA ON SIPs CURRENTLY IN YOUR DATABASE.
./recreateDB.sh
Troubleshooting
- If a SIP processing fails, it will move it to the 'failed' directory which is located:
var/archivematica/sharedDirectory/watchedDirectories/failed
- if ArchivematicaServer freezes (in terminal kill command)
CTRL + \
- if ArchivematicaClient freezes (in terminal kill command)
CTRL + C
- Updates to the Dashboard may require an Apache webserver restart:
sudo /etc/init.d/apache2 restart
- If you find a problem running the Dashboard and you want to get a detailed error log to report us, please switch it to debug mode following these instructions.