Customization
It is unlikely that the features of the archiver appliance match your requirements exactly over a period of time. Here are some of the existing ways that you can customize the archiver appliance (without forking from the existing source tree).
If you identify other ways in which we can allow for customization of the archiver appliance to suit your needs, please let the collaboration know and we’ll try to accommodate.
Site specific builds
The archiver appliance offers you the ability to customize the WAR files generated by the build in these ways.
Note
Han maintains a set of scripts for site specific installs. This is an excellent starting off point for folks who wish to build their own deployment bundles. This is tested against CentOS; but should be easily extensible for other distributions.
The
src/sitespecificfolder contains materials specific to your site. You can use the environment variableARCHAPPL_SITEIDto control which set of sitespecific files are included in the generated WARS.When you set this environment variable, you should see a message
Building the archiver appliance for the site{.sample}YourSite{.variable}If this variable is not set, by default, we use the material in the
testssite.The quickstart package
archappl_vx.x.x.tar.gzavailable in the Downloads is also built to thetestssite.The files in the
src/sitespecific/YourSite/classpathfilesare added to theWEB-INF/classesof the generated WAR files and should be accessible in the code usingservletContext.getResourceAsStream("/WEB-INF/classes/<<fileName>>")If you do not set the
ARCHAPPL_POLICIESenvironment variable, thepolicies.pyfor your site is discovered this wayYou can generate WAR with
policies.pyspecific to your site by setting theARCHAPPL_SITEID.Or you can unpack the WAR files within the container and override the default
policies.pywith your own during deployment.
If you do not set the
ARCHAPPL_APPLIANCESenvironment variable, theappliances.xmlis discovered in a similar fashion.There is also a site specific properties file called
archappl.propertiesthat is discovered in a similar fashion. The properties in this file are used to control some of the other customizations of the archiver appliance.
$ ls -ltr src/sitespecific/ total 0 drwxr-xr-x 3 mshankar cd 28 Jun 21 10:40 tests drwxr-xr-x 3 mshankar cd 45 Sep 9 16:03 slacdev $ export ARCHAPPL_SITEID=slacdev $ gradle > Configure project : [ant:echo] Building the archiver appliance for the site slacdev
The archiver appliance uses gradle for its builds, and Apache Ant for site specific build steps. As part of the gradle build process, you have the opportunity to call an ant script that is as part of the
src/sitespecificfolder. Thebuild.xmlin thesrc/sitespecificis called (if it exists) after the compile and staging tasks and before the WAR is packed. This lets you replace default collateral (like images, phone numbers in messages etc) with your own collateral in the generated WAR file(s).For simple site specific content changes like replacing the images or the contact text in the home page, please see this document.
Policies
For information on creating and configuring a policies file, see Create your policies file.