Config Slicer - nsc-norway/lims GitHub Wiki
Config slicer workflow: See https://genologics.zendesk.com/entries/63401195-Managing-Configurations-with-Config-Slicer
-
Log on to source server (server with configuration to copy)
-
Become the glsjboss user
sudo -u glsjboss -i
-
Move into config slicer directory
cd /opt/gls/clarity/tools/config-slicer/
-
Generate a manifest file. This gives you options of what to export. Name it (-m option) with
manifest-YYYYDDMM-comment.txt
. The API user password is saved in the glsjboss home directory on sandbox, so you don't have to type it -- use the below command. Don't use your own password, as it will be saved in glsjboss's history.
java -jar config-slicer-3.0.17.jar -o example -s sandbox-lims.sequencing.uio.no -u apiuser -p `cat ~/.apiuser-pw` -m manifest-20150415-evaluation-workflow.txt
-
Edit the manifest file in a text editor (vim) and remove everything except the configuration to be copied. If you leave something in that already exists in the destination, this will happen:
- If it is unchanged, the import will succeed
- If it is modified, the import will either fail, or if given the
importAndOverwrite
option it will update the element in question
-
Export the configuration to an XML file: Replace the same options as above + set the name of the XML file to today's date:
java -jar config-slicer-3.0.17.jar -o export -s sandbox-lims.sequencing.uio.no -u apiuser -p `cat ~/.apiuser-pw` -m manifest-20150415-evaluation-workflow.txt -k config-20150415.xml
- Copy the XML file to the destination server(s) you want to configure (do the following for each destination server)
- Log on to the destination server
- Get ready
sudo -u glsjboss -i
andcd /opt/gls/clarity/tools/config-slicer/
- This is the command in the genologics docs, but replacing the user with the apiuser and the password stored in the file:
java -jar config-slicer-<version>.jar -k <configuration-package-file>.xml -o import -s <server> -u apiuser -p `cat ~/.apiuser-pw`
- or -
java -jar config-slicer-<version>.jar -o importAndOverwrite -k <configuration-package-file>.xml -s <server> -u apiuser -p `cat ~/.apiuser-pw`
The second command updates any existing objects with the ones in the configuration file, whereas the first command terminates if there is a conflict.
- Save the log file as a record
mv configslicer.log configslicer-20150415.log
.
Reminder: also copy any scripts if applicable.