Skip to content

Instantly share code, notes, and snippets.

@tingletech
Last active December 14, 2015 15:39
Show Gist options
  • Save tingletech/5109201 to your computer and use it in GitHub Desktop.
Save tingletech/5109201 to your computer and use it in GitHub Desktop.

ArchivesSpace binary distribution

The .jar file distribution requires that users type a complex java command line to start the application.

Proposal: distribute a .zip file that contains the .jar as well as some wrapper scripts to start up the server.

Assumes either java 6 or java 7 is on the $PATH or %PATH%.

This is what you would get when you unpack the file:

archivesspace/
├── archivesspace.jar         # jar file version of archivesspace         
├── archivesspace.bat         # windows batch file
├── archivesspace.sh          # bash script for OS X and linux
├── config                    # directory to hold local config.rb
│   └── config.rb
├── data                      # keep application working data here
│   ├── derby
│   └── solr
├── log                       # log files from running java -jar redirected here
└── templates                 # ideally _template.erb.html could be overridden at run time

Running

The wrapper script will supply all the java command line options, set up log files.

The script should work like an init.d script.

archivesspace.sh start 

For windows, the .bat (or .cmd?) should work with RunAsService

http://stackoverflow.com/a/415453/1763984 run a batch file as a windows service

bash script for linux and OS X should use a cross platform technique to fork and detach from the tty.

nohup ./myscript 0<&- &> my.admin.log.file &

http://stackoverflow.com/a/10908325/1763984

# double background your script to have it detach from the tty
# cf. http://www.linux-mag.com/id/5981 
(./program.sh &) & 

http://stackoverflow.com/a/3430969/1763984

Upgrades

unzipping a new version on top of an old version will just update binary files, leaving data and configuration intact.

Creation

Something like:

./build/run dist:zip

should create the .zip distribution from the checked out source.

@anarchivist
Copy link

I also like this idea and @dltj's suggestion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment