Frequently Asked Questions
How to Autodeploy a Context in CSIP.
There are two steps required:
- ) Build with a new feature
- build and test locally.
- commit and push
- hit 'Build Now' in the Jenkins project
e.g. Job: csip-report
builds csip-report##0.1.6-2.1.37.war
- ) Deploy to a platform
e.g. "8092"
- Note the version on Jenkins
e.g. "0.1.6-2.1.37"
- Edit/create ~/<project>/deploy/<platform>/csip.sh, and create configuration file.
e.g. edit: "~/csip-report/deploy/8092/csip.sh":
action=deploy
version=0.1.6-2.1.37
create: "~/csip-report/deploy/8092/0.1.6-2.1.37.json"
valid actions are: deploy, undeploy, reconfig, disable
- commit and push
- hit 'Build Now' on Jenkins
- wait ~1 minute for the new version on the VMs to show up. Check the service config page on all VMs
How to install a CSIP war in Tomcat?
JDK 1.8 and Tomcat version 8 must be installed on a sever. The following steps must be performed to install the CSIP service WAR file.
- Copy csip-xxxx.war into the <TCROOT>/webapps folder, e.g.
cp csip-lmod.war /opt/apache-tomcat-8.0.20/webapps
- Check the availability of all services. The http://<HOST>/<context> URL should show all available services for that context. Use a browser to hit the URL, e.g.
http://localhost:8080/csip-lmod
- Check the availability of an individal service. Pick an individual service fron the previous list and copy that URL into the browser. It should give the request parameter for an individual service, e.g.
http://localhost:8080/csip-lmod/d/residue/1.0
1) Copy the service configuration into the TC webapps folder, before you deploy. Give it the same name as the war file.
cp csip-lmod.json /opt/apache-tomcat-8.0.20/webapps
2) Copy the war file into the webapps folder to auto deploy it. Tomcat will load the context and the service will pick up the
json file on startup.
cp csip-lmod.war /opt/apache-tomcat-8.0.20/webapps
-or-
Adjusting the configuration on a running service, put the config parameter (e.g. a db connect string) in a file, e.g. conf.json and
submit it with a HTTP/POST request to the http://<HOST>/<context>/c/conf URL.
file 'conf.json':
{
"lmod.db": "jdbc:sqlserver://lmod-db:1433;databaseName=lmod_v1;user=lmod-rw;password=managements"
}
POST it with some tool (e.g. curl)
curl -X POST \
-H "content-type: application/json" \
-H "accept: application/json" \
-d @conf.json \
"http://localhost:8080/csip-lmod/c/conf"
How to check the current configuration.
The current service context configuration can be checked and changed using a HTTP/GET.
To get the list of current variables, use the url http://<HOST>/<context>/c/conf in a browser, e.g.
http://localhost:8080/csip-lmod/c/conf