Automated build using Jenkins
This only works once the project has been checked into the NCIEVS repository
- Navigate to https://evs-jenkins.nci.nih.gov/jenkins/job/_default/job/_lower/job/_Protege/
- Choose protege_build
- On the left side, select "Build With Parameters"
- Select the tag to be built from the "BUILD_OR_TAG" option list and click the "Build" button
- Wait until the build is complete
- If the build is successful, got back to https://evs-jenkins.nci.nih.gov/jenkins/job/_default/job/_lower/job/_Protege/
- Choose protege_deploy_dev (or protege_deploy_qa if applicable)
- Select "Build With Parameters"
- The version you selected in step 4 should automatically be populated in the "BUILD_OR_TAG" option list. Click the "Build" button
- Wait until the build is complete
Manually building a new Protege version on Dev
This step should only need to be performed during early snapshots, before code is checked into the NCIEVS source repository.
- You will be notified of the new build number. For example: nci-1.00v
- On the dev machine go to /local/project and create a directory "mkdir nciedittab-dev-1.00v"
- Enter the directory and checkout the project from git "git clone https://github.com/ncievs/nci-protege5.git"
- The clone will create a directory "nci-protege5". Enter into the scripts subdirectory "cd nci-protege5/scripts/"
- Run the build script, passing in the version number "./build.sh nci-1.00v ncievs". Occasionally we may need to build from another server. The developer should notify when this is necessary.
- Review the output for errors or build failures.
- Shutdown the protege server and explanation server (See below)
- Navigate to /local/content/protege/
- Move the protegeserver directory to a backup and create an empty folder in its place
- "mv protegeserver protegeserver-bak"
- "mkdir protegeserver"
- Repeat the backup step for explanationserver and protegedesktop
- Copy the new protegeserver into the empty server directory "cp -r /local/project/nciedittab-dev-1.00v/nci-protege5/scripts/nci-protege5/protege-server/target/server-distribution/server/* ./protegeserver/"
- Copy the new protegedesktop into the empty desktop directory "cp -r
/local/project/nciedittab-dev-1.00v/nci-protege5/scripts/nci-protege5/protege/protege-desktop/target/protege-5.1.1-SNAPSHOT-platform-independent/Protege-5.1.1-SNAPSHOT/* ./protegedesktop"
Shutdown/Startup of Services
The main server and explanation services are part of a single application. The server is controlled by scripts in the protege/scripts directory
Shutdown
- Navigate to /local/content/protege/scripts/
- To shutdown the protegeserver: "./shutdown.sh"
Startup
- Navigate to /local/content/protege/scripts/
- To startup protege server: "./run-background.sh"
- Do "tail ../logs/protserv-console.txt" to check that the protege server is running.
Packaging Server for Deployment to Upper Tier
- Navigate to /tmp/protege and remove any files and folders there
- Copy up server directory - cp -R /local/content/protege/protegeserver .
- Package into tarball with version number - tar -cvzf protege-server-deployment-<version>.tar.gz protegeserver
- Copy tarball to /priv-file-repo/protege/deployment
- Move any previous versions to /priv-file-repo/protege/archive/deployment-package
Packaging Client for Deployment
There is a script called package.sh that will perform all of the below. You pass in the version of the protege build number as a parameter "./package.sh <version>"
- Navigate to /local/project/protegeClientPackage
- Remove any previous zip files and version directories but leave everything else.
- i.e. remove nci-protege5_V<previous> and nci-protege5_V<previous>.zip
- Create directory nci-protege5_V<current>
- Copy in the desktop client "cp r /local/content/protege/protegedesktop/* ./nci-protege5_V<current>"
- Copy the jre and run scripts into the new directory
cp -r ./jre<version> ./nci-protege5_V<current>/
cp run.* ./nci-protege5_V<current>/
cp removeOldPlugins.bat ./nci-protege5_V<current>/
cp -rf bookmark ./nci-protege5_V<current>/
cp .fileprefs ./nci-protege5_V<current>/
Create a zip "zip -r nci-protege5_V<current>.zip nci-protege5_V<current>"
Deployment
The .fileprefs copied into the package should have most of the below configured. Plugins will likely need to be updated (Step 3).
- Unzip the protege package in your chosen directory
- Run the bat or sh file
- Do NOT immediately accept download of plugins.
- Go to Launcher/Preferences then the plugins tab. Make sure you are pointed to the correct plugins location.
- Go to File/Check for plugins and select all plugins
- Restart protege
- Set up Lucene - Go to File/Preferences and choose Lucene in the General tab
- Set up Pellet - Go to File/Preferences, the Reasoner tab and the Pellet sub-tab.
- Select Remote as the reasoner type
- Enter the server address for pellet
- Optional - restart Protege
- Choose "File Open from Protege Server". Enter the credentials and wait.
- Once open, go to Lucene tab and wait for it to index.
- Once indexing done go to Reasoner on the menu and select "Pellet" as the reasoner.
- Under Reasoner on the menu select "Start Reasoner"