This repository enables the deployment of the noctua editor (which includes minerva, barista, golr and noctua) locally, using self-generated GO-CAM models (in the form of .ttl files).
Note: For production deployment see this readme file
Deploy a version of the Noctua editor (including minerva, barista, golr and noctua locally via docker):
- important files:
- build_images.yaml
- builds all the docker images necessary to spin up a local instance.
- push_images.yaml
- pushes images to dockerhub if planning on staging to a remote machine.
- stage.yaml
- Tasks are executed on staging machine which can be local or remote.
- The stages directory is created on build.
- build_images.yaml
- blazegraph journal
- Solr Index
- Cloned repositories including:
- noctua-form, noctua-landing-page, noctua-models, go-site.
- docker-compose and configuration files are generated from templates.
-
The docker images created by this repository have been successfully tested using:
- MacOs (10.15.3)
- Docker (19.03.5)
- Docker Compose (1.25.2)
- Ansible (2.10.3), Python (3.8.5), docker (4.3.1)
-
Resources:
- Docker should be given at least 3 CPUs and 8G RAM. (on mac see Docker Preferences | Resources)
- python 2.7 should work as well.
There are two ways to install the requirements necessary for building this application stack:
To install miniconda go to url
This will install ansible, docker ansible module, docker-compose, and terraform. See dependencies/bare-metal.yml
conda env create --file dependencies/bare-metal.yml
conda activate noctua_app_stack
# when done
conda deactivate
# delete a conda environment:
conda env remove -n noctua_app_stack
The ansible docker plugin is used to buid docker images.
pip install ansible
pip install docker
The playbook build_images.yaml clones minerva, noctua and amigo git repositories and builds corresponding docker images. The default branch used is master.
Note: To change the branch being cloned, see repo_map in docker-vars.yaml
ansible-playbook -e docker_hub_user=xxxx build_images.yaml
docker image list | egrep 'minerva|noctua|golr'
- These can also be set on command line using the -e flag.
- Barista:
- uri
- username
- password
- Barista:
# on Mac:
export HOST=`ipconfig getifaddr en0`
ansible-playbook -e "host=$HOST" -i "localhost," --connection=local stage.yaml
Two docker-compose files are staged:
- docker-compose-golr.yaml
- Uses a lightweight solr image for golr
- docker-compose-amigo.yaml
- Uses the official geneontology/amigo-standalone for golr
# assuming stage_dir is in current directory and docker-compose-golr.yaml is used:
docker-compose -f stage_dir/docker-compose-golr.yaml up -d
# minerva takes a long time to start up the first time
# Tail minerva logs to see its progress
docker-compose -f stage_dir/docker-compose-golr.yaml logs -f minerva
# Or tail all logs
docker-compose -f stage_dir/docker-compose-golr.yaml logs -f
# When minerva is ready all other services should be up
docker-compose -f stage_dir/docker-compose-golr.yaml ps
- Use
http://localhost:8080
if defaultnoctua_proxy_port
was used
docker-compose -f stage_dir/docker-compose-golr.yaml down
# kill works faster ...
docker-compose -f stage_dir/docker-compose-golr.yaml kill
#delete containers:
docker-compose -f stage_dir/docker-compose-golr.yaml rm -f
If staging the stack to a remote machine:
- Create an account on dockerhub if you do not have one.
- Add a public dockerhub repository named minerva, noctua and golr.
- set docker_hub_user in docker-vars.yaml or simply
- use the -e option when using ansible-playbook command.
- Refer to this document on provisionning an AWS.
- Skip this step if planning on staging locally.
- Refer to this document on provisionning an instance on AWS.
- Skip this step if planning on staging locally.
ansible-playbook -e docker_hub_user=xxxx push_images.yaml