-
Notifications
You must be signed in to change notification settings - Fork 2
Building
The CAM-KP-API project is written in Scala. The build tool used to execute numerous development tasks is the Scala Build Tool (SBT).
cam-kp-api$ sbt compile
cam-kp-api$ sbt Test/compile
cam-kp-api$ sbt IntegrationTest/compile
cam-kp-api$ sbt docker:stage docker:publishLocal
cam-kp-api$ CAM_KP_LOG_LEVEL=debug sbt docker:stage docker:publishLocal
cam-kp-api$ sbt test
cam-kp-api$ sbt IntegrationTest/test
cam-kp-api$ docker run -p 8080:8080 -it renciorg/cam-kp-api:0.1
Note that the version used in these examples may not reflect the latest build version.
Before deploying, the version number of cam-kp-api needs to be updated in:
- build.sbt
- application.conf
The following will build a Docker image with the specified version/tag & push it to hub.docker.com.
sbt 'set version := "0.2-trapi-1.3"' docker:stage docker:publish
The Helm Chart templates are located here: https://github.com/helxplatform/translator-devops/tree/develop/helm/cam-kp-api
To deploy to the 'translator-dev' namespace on the RENCI Sterling Kubernetes cluster:
KUBECONFIG=/home/jdr0887/.kube/kubeconfig-sterling-jdr0887-jdr0887 helm upgrade --install --debug -n translator-dev -f /home/jdr0887/cam-kp-api-dev-values.yaml cam-kp-api-dev helm/cam-kp-api/
If the cam-kp-api-dev Pod already exists (meaning you already ran the above command) & you want to deploy a new version straight from Docker, just delete the Pod & Kubernetes will grab the configured version from Docker Hub.
The backend triplestore is generated by https://github.com/ncats-tangerine/cam-pipeline and is accessible at https://cam-kp-sparql[-dev].apps.renci.org/sparql (but note that the development version is only accessible within the RENCI VPN).