Go to file
2020-02-26 11:37:59 +01:00
app poster 2020-02-26 11:37:59 +01:00
migrations Add secure filename for modesl and services 2020-02-17 14:57:24 +01:00
nginx-proxy set file upload size the proper way 2020-02-05 17:20:06 +01:00
tests Add some tests 2019-07-09 15:41:28 +02:00
.gitignore Add Code for ssl 2020-01-09 16:27:55 +01:00
.gitlab-ci.yml Update 2019-11-04 15:06:54 +01:00
config.py Add sql alchemy engine options to common configurations. 2020-01-07 11:32:46 +01:00
CorpusAnalysisClient.js.md Update 2020-02-03 13:38:08 +01:00
dind_swarm_setup.sh Update dind swarm script. 2020-01-03 10:27:55 +01:00
dind_swarm.yml let nginx proxy route swarm viz container 2020-01-29 11:00:18 +01:00
docker-compose.yml set file upload size the proper way 2020-02-05 17:20:06 +01:00
docker-entrypoint.sh Add reverse proxy 2020-01-09 15:13:47 +01:00
Dockerfile Style Dockerfile 2020-01-29 11:45:14 +01:00
nopaque.env.tpl Update 2020-02-03 13:38:08 +01:00
nopaque.py Cleanup 2020-01-20 09:08:42 +01:00
notes.txt Update landing page 2020-02-17 12:01:36 +01:00
README.md Add some infos to the readme 2020-02-13 14:35:55 +01:00
requirements.txt Remove gunicorn from requirements.txt 2020-01-08 16:02:28 +01:00

Opaque

Opaque is a virtual research environment (VRE) bundling OCR, NLP and additional computer linguistic methods for research purposes in the field of Digital Humanities.

Opaque is designed as a web application which can be easily used by researchers to aid them during their research process.

In particular researchers can use Opaque to start OCR jobs for digitized sources. The text output of these OCR jobs can then be used as an input for tagging processes (POS, NER etc.).

As a last step texts can be loaded into an information retrieval system to query for specific words, phrases in connection with linguistic features.

Dependencies

  • cifs-utils
  • Docker
  • Docker Compose

Configuration and startup

  1. Create Docker swarm:

The following part is for users and not the development team. The development team uses a script which sets up a local development swarm.

The generated computational workload is handled by a Docker swarm. A swarm is a group of machines that are running Docker and joined into a cluster. It consists out of two different kinds of members, managers and workers. Currently it is not possible to specify a dedicated Docker host, instead Opaque expects the executing system to be a swarm manager of a cluster with at least one dedicated worker machine. The swarm setup process is described best in the Docker documentation.

The dev team can use dind_swarm_setup.sh. If the workers cannot join the manager node. Try opening the following ports using the ubuntu firewall ufw:

sudo ufw allow 2376/tcp \
&& sudo ufw allow 7946/udp \
&& sudo ufw allow 7946/tcp \
&& sudo ufw allow 80/tcp \
&& sudo ufw allow 2377/tcp \
&& sudo ufw allow 4789/udp

sudo ufw reload && sudo ufw enable
sudo systemctl restart docker
  1. Create a network storage: The dind_swarm_setup.sh script handles this step for the dev team aswell.

A shared network space is necessary so that all swarm members have access to all the data. To achieve this a Samba can be used.

# Example: Create a Samba share via Docker
# More details can be found under https://hub.docker.com/r/dperson/samba/
$ sudo mkdir -p /srv/nopaque/storage
$ docker run \
    --name opaque_storage \
    -v /srv/nopaque/storage:/srv/nopaque/storage \
    -p 445:445 \
    dperson/samba \
      -p \
      -s storage.nopaque;/srv/nopaque/storage;no;no;no;nopaque \
      -u nopaque;nopaque

# Mount the Samba share on all swarm member nodes with the following code
$ sudo mkdir /mnt/nopaque
$ sudo mount --types cifs --options gid=${USER},password=nopaque,uid=${USER},user=nopaque,vers=3.0 //<YOUR IP>/storage.nopaque /mnt/nopaque
  1. Download Opaque
$ git clone https://gitlab.ub.uni-bielefeld.de/sfb1288inf/opaque.git
$ cd opaque
$ docker-compose pull
  1. Configure your instance: For production environments it is recommended to activate and secure the Docker HTTP API. You can read more here.
$ cp nopaque.env.tpl nopaque.env
$ <YOUR EDITOR> nopaque.env # Fill out the empty variables within this file.
  1. Start your instance
# Execute the following 3 steps only on first startup
$ docker-compose run web flask db upgrade
$ docker-compose run web flask insert-initial-database-entries
$ docker-compose down

$ docker-compose up
  1. Alter Database Models
$ docker-compose run web flask db migrate
$ docker-compose run web flask db upgrade