You are not logged in. Click here to log in.

Application Lifecycle Management

Search In Project

Search inClear

Development FAQ #6849/HEAD / v120
Tags:  not added yet

How to Autodeploy a Context in CSIP.

There are two steps required:

  1. ) Build with a new feature
    1. build and test locally.
    2. commit and push
    3. hit 'Build Now' in the Jenkins project
             e.g. Job: csip-report
             builds csip-report##0.1.6-2.1.37.war
              
  2. ) Deploy to a platform
             e.g. "8092"
            
    1. Note the version on Jenkins
             e.g. "0.1.6-2.1.37"
              
    2. 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
    3. commit and push
    4. hit 'Build Now' on Jenkins
    5. 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.

  1. Copy csip-xxxx.war into the <TCROOT>/webapps folder, e.g.
       cp csip-lmod.war /opt/apache-tomcat-8.0.20/webapps
    

  2. 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
    

  3. 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
    

How do I configure a service?

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