HASCO is an ontology describing how instruments are used to acquire and collect data in support of scientific studies. The ontology has essential concepts for describing studies, study objects like subjects, instruments, instrument elements like detectors and items, instrument deployments enabling the use of instruments to acquire data, and a comprehensive semantic description of data in the context of studies and instrument deployments.
It is an API for handling HASCO-based knowledge graphs. The canonical representation of instruments and instrument elements are stored in RDF inside of the Fuseki triple store embedded in HASCOAPI.
- HASCOAPI's host machine requires the installation of
gitanddocker - Using
git clone, clone HASCOAPI from github - Edit
/hascoapi/conf/application.confand replace the variablepac4.jwt.secretvalue with another random string of around 40 characters. This is the JWT API token that needs to be shared with the REP application (https://github.com/HADatAc/rep) - Using
docker build ., build HASCOAPI images - Using
docker-compose up -d, run HASCOAPI
- log into HASCOAPI hosting machine
- Go to hascoapi folder:
cd /hascoapi - Bring down hascoapi containers:
docker-compose down - Delete current images and old containers:
docker-compose system prune -a - Update current code:
git pull - Restart hascoapi:
docker-compose up -d
- log into HASCOAPI hosting machine
- Go to hascoapi folder:
cd /hascoapi - Bring down hascoapi containers:
docker-compose down - Delete triplestore volume:
docker volume rm hascoapi_hascoapi-fuseki-data - Restart hascoapi:
docker-compose up -d
In the example below, we named the backup file with the backup date. This can be any date and it may also include the time of the backup.
- log into HASCOAPI hosting machine
- Go to hascoapi folder:
cd /hascoapi - Bring down hascoapi containers:
docker-compose down - Go to home folder:
cd ~ - Generate the backup file:
docker run --rm --volumes-from hascoapi_fuseki -v $PWD:/bkp ubuntu bash -c "tar -zcvf /bkp/fuseki-data_17Aug2023.tar.gz" - Use sftp to copy the backup file
/bkp/fuseki-data_17Aug2023.tar.gzout of the host machine
- Use sftp to copy a backup file, e.g.,
/bkp/fuseki-data_17Aug2023.tar.gzinto the HASCOAPI host machine - log into HASCOAPI hosting machine
- Go to hascoapi folder:
cd /hascoapi - Bring down hascoapi containers:
docker-compose down - Go to home folder:
cd ~ - Restore the backup file:
docker run --rm --volumes-from hascoapi_fuseki -v $PWD:/bkp ubuntu bash -c "tar -zxvf /bkp/fuseki-data_17Aug2023.tar.gz"