Deploy a production instance¶
In production, AskOmics is deployed with docker and docker-compose. We provide docker-compose.yml
templates to deploy your instance.
Prerequisites¶
Install git
# Debian/Ubuntu
apt install -y git
# Fedora
dnf install -y git
Install docker
:
Install docker-compose
:
# Debian/Ubuntu
apt install -y docker-compose
# Fedora
dnf install -y docker-compose
Deployment¶
Download templates¶
First, clone the flaskomics-docker-compose repository. It contain template files to deploy your AskOmics instance.
git clone https://github.com/askomics/flaskomics-docker-compose.git
This repo contains several directories, depending on your needs
cd flaskomics-docker-compose
ls -1
Two directories are used for production deployment
standalone
: deploy AskOmics with all its dependencies for a standalone usagefederated
: deploy AskOmics with all its dependencies for a federated usage (Ask external endpoint such as NeXtProt)
Choose one of this directory depending of your needs
cd federated
Configure¶
First, edit the docker-compose.yml
file. You can change the following entries:
services
>askomics
>image
: Use the latest image tag. Example:askomics/flaskomics:3.2.1
services
>virtuoso
>image
: Use the latest image tag. Example:askomics/virtuoso:7.2.5.1
services
>nginx
>ports
: You can change the default port if80
is already used on your machine. Example:"8080:80"
Virtuoso¶
Then, configure virtuoso by editing virtuoso.env
Edit VIRT_Parameters_NumberOfBuffers
and VIRT_Parameters_MaxDirtyBuffers
following rules described here.
Warning
Change the DBA_PASSWORD
if you plan to expose the virtuoso endpoint.
Nginx (web proxy)¶
Nginx is used to manage web redirection. Nginx configuration is in two files: nginx.conf
and nginx.env
. If you want to access the virtuoso endpoint, uncomment the virtuoso
section in nginx.conf
AskOmics¶
AskOmics configuration is set using enviroment variables. This variables are set in askomics.env
. All entry if the askomics.ini
file can be overrided in this file using
All properties defined in askomics.ini
can be configured via the environment variables in askomics.env
. The environment variable should be prefixed with ASKO_
and have a format like ASKO_$SECTION_$KEY
. $SECTION and $KEY are case sensitive. E.g. property footer_message
in the askomics
section should be configured as ASKO_askomics_footer_message=Welcome to my AskOmics!
Warning
Change ASKO_flask_secret_key
and ASKO_askomics_password_salt
to random string
Configuration¶
AskOmics configuration is stored in config/askomics.ini
file.
-
flask
debug
(true
orfalse
): Set to true if you run AskOmics in development mode, or for debug purposesecret_key
(string): AskOmics secret key for session.session_timeout
(int): timeout for the session cookie (in minutes)
-
celery
broker_url
(url): Redis or RabitMQ urlresult_backend
(url): Redis or RabitMQ url
-
askomics
debug
(true
orfalse
): Display debug log in consoledebug_ttl
(true
orfalse
): Keep converted rdf file. Set the to true can fill you disk, active only for debug purposereverse_proxy_path
(string): proxy path if AskOmics is accessible under a subpathsubtitle
(string): Subtitle, displayed on the browser tabfooter_message
(string): Custom message displayed on the AskOmics footerdisplay_commit_hash
(true
orfalse
): diplay the commit hash of the current version in the AskOmics footerdata_directory
(path): where AskOmics store the datadatabase_path
(path): Path to the sqlite databasenpreview
(int): Number of line displayed during integrationpassword_salt
(string): Password saltdefault_locked_account
(true
orfalse
): Lock new accountdisable_integration
(true
orfalse
): Disable integration to non admin usersquota
(size): Default quota for new users
-
virtuoso
triplestore
(string): Triplestore used. Can be virtuoso, fuseki or coreseendpoint
(url): Triplestore endpoint urlupdatepoint
(url): Triplestore updatepoint urlfuseki_upload_url
(url): If triplestore is fuseki, set the fuseki upload urlusername
(string): Triplestore credential: usernamepassword
(string): Triplestore credential: passwordload_url
(url): AskOmics url accessible from the triplestoreupload_method
(string): upload method fir virtuoso. Can be load or insertchunk_size
(int): Number of RDF triples to upload in one timeblock_size
(int): Size of location bocksize for positionable entitiesserialization_format
(string): RDF serialization format. Can bent
,turtle
orxml
default_graph
(string): Triplestore default graphusers_graph
(string): User base graphprefix
(url): Default AskOmics prefixnamespace
(url): Default AskOmics namespacepreview_limit
(int): Number of line to be previewed in the results pageresult_set_max_rows
(int): Triplestore max row. Must be the same as SPARQL[ResultSetMaxRows] in virtuoso.ini config
-
federation
query_engine
(string): Query engine to use, can be corese or fedxendpoint
(url): Federated query engine endpoint urllocal_endpoint
(url): Triplestore url, accessible from the federated query engine
-
sentry
server_dsn
(url): Sentry url for the serverfrontend_dsn
(url): Sentry url for the frontend