Skip to main content

How to Operate the Infrastructure

 

 

Stopping HADatAc

To stop all of the HADatAc services deployed with Docker i.e. Blazegraph, Solr and the Play application, type

docker-compose stop

To tear down the services e.g. to completely remove the containers, type

docker-compose down

This will still keep in place the various Docker Volumes that were attached to the Docker Containers. The volumes include a volume containing the Solr data, the Blazegraph data, the HADatAc configuration directory, and the directory containing all of the CSV files.By keeping these volumes in tact, you can re-build HADatAc without losing any of the data already ingested.

If you wish to completely remove the HADatAc instance, you can type

docker-compose down -v

and all of the volumes will be destroyed as well.

Re-building HADatAc

If changes are made to HADatAc, you will want to re-compile the source code inside of the Docker Container. To do this, you simply run the following commands.

docker-compose down
docker-compose build
docker-compose up -d

This will remove the old HADatAc containers, re-build them and then bring them back up. No data or configuration file changes will be lost though, since those are stored in Docker Volumes as previously discussed.

Editing HADatAc Configuration Files in a Built/Running Container

The various configuration files for HADatAc are stored inside of a Docker Volume. This means that the conf directory is independent of the running HADatAc Docker container. So, if you tear down the containers with a down command, the conf directory will still be present as an independent Docker volume with any changes you may have made.

Then, when you bring the HADatAc Docker container back up, the previous conf Docker volume will be attached to the conf directory inside of the new container, with any changes you made still present.

When you are already running HADatAc, the conf Docker volume has already been created. So, in order to edit the various configuration files of an already built HADatAc Docker instance, you will need to first run HADatAc and access the Bash terminal.

docker-compose up -d docker-compose exec hadatac bash

Once you are inside of the container and at the Bash terminal, type the following commands.

cd conf
[vi or nano or pico] <config filename>

make any changes, and then save the file

After you have edited the files, you will need to exit the Bash terminal and restart HADatAc.

Inside of the HADatAc Bash terminal, type the following

exit

From your local machine now, type the following

docker-compose restart

This will restart HADatAc causing it to use the new configuration files.

Viewing Log Files

To view the logs files of the HADatAc play app, you can type docker-compose logs hadatac. If you wish to attach to the logs and see log messages as they are produced, you can type

docker-compose logs -f hadatac

To view Solr or Blazegraph logs, you can type

docker-compose logs solr

and

docker-compose logs blazegraph

respectively.

Accessing the Bash Terminal of the HADatAc Container

To access a Bash terminal of the Docker Container that is running the HADatAc Play application, you can type

docker-compose exec hadatac bash

(make sure it is running first with docker-compose up -d). This will bring you into a Bash terminal inside of the container in the directory where the application code is stored.