Content of this page

Repo

FAO Internal Test: https://bitbucket.org/cioapps/fao-datalab-caliper-docker/src/caliper_internal_test/

BC3: https://bitbucket.org/cioapps/fao-datalab-caliper-docker/src/bc3/ 

Deployment


To deploy the docker caliper instance you can follow the next steps to get it up and running.


  1. Install docker along with docker compose
  2. Clone the bitbucket repository to your deployment machine,

    git clone --branch "<BRANCH_NAME>" --single-branch https://<BITBUCKET_USERNAME>:<BITBUCKET_KEY>@bitbucket.org/cioapps/fao-datalab-caliper-docker.git "<BRANCH_NAME>

    The <BRANCH_NAME> should correspond to the instance type of caliper you want to run, whether caliper_internal_test or caliper_internal_production (not available yet as of 2024-03-08). The <BITBUCKET_USERNAME> and <BITBUCKET_KEY> are the user credentials needed for accessing the repository. For the datalab internal test instance, this repository is cloned at /opt/caliper_internal_test

  3. Recursively update the "<BRANCH_NAME> folder to a non-root user if you git cloned under root. From experience, leaving the folder permissions as root causes permissions issues later on:

    chown -R <NON_ROOT_USER>:< NON_ROOT_USER > <BRANCH_NAME>
  4. Change directory to <BRANCH_NAME>/caliper
  5. Run the following command to bring the caliper services online, docker compose up –detach. This should bring the services up without any issues.
  6. The services should now be available to access at the following links:
    1. SPARQL - http://localhost:8080/caliper/sparql
    2. VocBench - http://localhost:8080/caliper/edit/vocbench3
    3. ShowVoc - http://localhost:8080/caliper/browse/showvoc
  7. On first launch, VocBench and ShowVoc both require an admin account to be created. When you first visit the links to both applications, you will be prompted to create an account on each of the applications.


Note: Prior to deployment, you can increase the memory used by the fuseki server by editing the Dockerfile at caliper/fuseki/Dockerfile and updating line 107, JAVA_OPTIONS="-Xmx2048m -Xms2048m", setting the required number of megabytes that the system can use. In the previous example, 2048 is the default megabyte value.

 

Notes:

 

Also included in the git repository is the caliper.conf file under the nginx folder. This configuration can be used in conjunction with nginx to reverse proxy external connections via a GCP load balancer. In this case, it is recommended to get in touch with someone from CSI to assist with the exposure of the service to external use along with a domain url, e.g. https://datalab.review.fao.org/....

This would require the addition of /caliper and /caliper/* to be added to the load balancer and for requests to these endpoints to be forwarded to the backend service hosting the caliper instance. I am not adding detailed instructions on how to carry out these tasks in this document as only someone who has experience with these tasks should carry them out as there is potential to break other applications utilising the load balancer.

Anyone who is familiar with these tasks would inherently know how to add the endpoints to the load balancer and how to activate the nginx configuration mentioned above.





Write a comment…