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
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
unzipping a new version on top of an old version will just update binary files, leaving data and configuration intact.
Something like:
./build/run dist:zip
should create the .zip
distribution from the checked out source.
Is the way to deal with the templates to have the application create the templates/ directory and its contents at launch if they aren't already there? That would seem to take care of the first-run issue and the on-upgrade issue.