This page contains information about how demo.dspace.org server is setup/configured. This demo.dspace.org server is managed jointly by the DSpace Committer Team. Any Committer can request server access. If major issues occur or something needs to be installed requiring root access, contact Tim Donohue or "sysadmin AT duraspace DOT org" |
Here's an overview of how everything is setup on the 'demo.dspace.org' server:
/home/dspace
):
/usr/lib/jvm/java-1.7.0-openjdk-amd64
(NOTE: We also have Oracle Java 7 installed at /usr/lib/jvm/java-7-oracle
but it is not used by default)~/ant
(installed manually)~/maven
(installed manually)~/pgsql
(compiled from source)~/tomcat
(installed manually)~/dspace-src
~/dspace
~dspace/.profile
~/dspace/webapps/
(configured in Tomcat's server.xml)~/tomcat/webapps/ROOT/index.html
~/.profile
initializes PATH/environment~/bin/
includes various useful scriptsOnly a DuraSpace employee can do the following:
Contact sysadmin@duraspace.org or Tim Donohue if you need any of these tasks performed.
This is how you provide a DSpace Committer with command-line access to this server.
~/.ssh/authorized_keys
file
# Tim Donohue's SSH Key ssh-rsa .... |
ssh dspace@demo.dspace.org |
The 'dspace' user can easily start/stop PostgreSQL and Tomcat using the corresponding service scripts:
sudo service postgresql start sudo service tomcat start sudo service handle-server start sudo service tomcat stop sudo service postgresql stop sudo service handle-server stop |
Obviously, you can get the latest information on the existing Cron jobs by logging into the demo.dspace.org server and running:
crontab -l |
However, here's a brief overview of a few of the more important Cron jobs.
EVERY SATURDAY NIGHT (currently at 23:59 UTC), all existing DSpace content is automatically REMOVED and reset to the AIPs located at ~/AIP-restore/
This is controlled by the ~/bin/reset-dspace-content
script (source code in GitHub)
This is a BASH script that essentially does the following:
~/tmp/data-backup
(This backup is performed just in case something goes wrong and we~/AIP-restore
into DSpace as default content (This also autocreates the demo EPeople and Groups)
~/AIP-restore/reset-dspace-content.log
The set of demo AIPs are all stored in the ~/AIP-restore/
directory.
To update these AIPs, you must use the DSpace AIP Backup & Restore tools as described at:
AIP Backup and Restore
You can regenerate / update these AIPs by doing the following:
scp dspace@demo.dspace.org:~/AIP-restore/* . |
\[dspace\]/bin/dspace packager -r -a -f -t AIP -e [admin-email] -i 10673/0 /full/path/to/SITE@10673-0.zip |
\[dspace\]/bin/dspace packager -d -a -t AIP -e [admin-email] -i 10673/0 -o includeBundles=ORIGINAL,LICENSE -o passwords=true SITE@10673-0.zip |
scp . dspace@demo.dspace.org:~/AIP-restore/ |
Since the "News" sections are editable via the JSPUI, there is a cron job that automatically resets them each night.
It's a rather simple cron job that just copies the original "news-*" files from the ~/dspace-src/
directory:
05 0 * * * cp $HOME/dspace-src/dspace/config/news-* $HOME/dspace/config/ > /dev/null |
Since people have been known to change our demo user passwords on this demo.dspace.org server, we now reset them to the default password every hour.
This functionality is just a simple set of SQL UPDATE commands that are run via the ~/bin/reset-demo-passwords
script.
To ensure we are consistently updating DSpace in the same manner, please perform the following steps when updating any configuration
or making any customization to DSpace.
(If you have updates/suggestions, please let us know – we can change these processes, but we just need to make sure we are all consistently following the same general steps)
The ~/dspace-src/
folder is a Git clone of the DSpace GitHub Repository:
https://github.com/DSpace/DSpace/
In this local Git repository, we are running off of a local branch named "demo". You can see all the branches by running
git branch |
Changes that you wish to keep should be committed to this local "demo" branch.
At any one time, you can compare this 'demo' branch to any version of DSpace. For example, to compare 'demo' to DSpace 1.8.2 run:
cd ~/dspace-src git checkout demo git diff dspace-1.8.2 |
WARNING: If you make direct config edits to ~/dspace/config/ you can expect that |
If you are upgrading to the next stable version of DSpace, you can use git merge
to help you merge all changes.
WARNING THE FOLLOWING IS UNTESTED! PLEASE UPDATE WHEN WE UPGRADE TO 3.0-RC1!!
For Example:
cd ~/dspace-src git checkout demo git merge dspace-3.0-rc1 (UNTESTED! NOT SURE IF THIS WILL WORK - Tim) |
NOTE: You should make sure to pay close attention to whether any Conflicts occurred. If so, you will need to resolve them manually.
cd ~/dspace-src mvn clean package |
WARNING: this overwrites existing configs in ~/dspace/config/
sudo service tomcat stop cd ~/dspace-src/dspace/target/dspace-[version]-build/ ant -Doverwrite=true update sudo service tomcat start |
Also make sure your changes made it to ~/dspace/
(and that you didn't remove previous settings, especially configs)
An easy way to double check config changes is to do a 'diff' of the latest dspace.cfg with the most recent '.old' one.
Assuming your changes are already over in ~/dspace-src/
this is easy...
$ cd ~/dspace-src/ $ git commit [file] # OR, to commit all changed files $ git commit -a |
The kompewter IRC bot is on the server at ~/kompewter
.
It's source code is managed in Peter Dietz's GitHub acct at: https://github.com/peterdietz/jenni
To start kompewter just run:
~/kompewter/jenni |
(This only keeps it alive for the remainder of your SSH session.)
Full instructions available at: http://www.yourkit.com/docs/95/help/profiling_j2ee_remote.jsp |
In order to locate potential memory issues in DSpace, we've installed YourKit on demo.dspace.org at ~/yjp/
.
It can be accessed remotely so that we can perform various Java profiling tasks.
On your local computer: