-
Notifications
You must be signed in to change notification settings - Fork 9
Test and production environments
- Install Docker;
- In your command line launch the following commands:
git clone https://github.com/Wikidata/soweego.git
cd soweego
It's useful when you are developing or testing some features. In this environment, you don't need to be afraid of breaking stuff.
It provides you with a MariaDB instance and a BASH shell ready to run soweego CLI commands. You are free to change soweego code while the shell is running, the code is synced.
- In your terminal, move to the project root;
- Launch
./scripts/docker/launch_test.sh
; - You are now in a Docker container BASH shell with a fully working soweego instance;
- Run
cd soweego
; - You are set. To check if it's working, try
python -m soweego
.
Option | Expected Value | Default Value | Description |
---|---|---|---|
-s | directory path | /tmp/soweego_shared |
Tells docker which folder in your machine will be shared with soweego container. |
The test environment comes with a running MariaDB instance. To query it from your terminal:
-
docker exec -it soweego_db_1 /bin/bash
; -
mysql -uroot -hlocalhost -pdba soweego
.
It's useful when you need to run soweego against the Wikimedia database. It is also helpful to run the system against a custom database. Editing the credentials is all you need to do to chose the database. Note: you need access to the Wikimedia infrastructure to run soweego on it.
This environment provides you with a BASH shell ready to run soweego CLI commands. You are free to change soweego code while the shell is running, the code is synced.
- Docker
- Database credentials file, like
${PROJECT_ROOT}/soweego/importer/resources/db_credentials.json
.
- In your terminal, move to the project root;
- Launch
./scripts/docker/launch_prod.sh
; - You are now in a Docker container BASH shell with a fully working soweego instance;
- Run
cd soweego
; - You are set. To check if it's working, try
python -m soweego
.
Option | Expected Value | Default Value | Description |
---|---|---|---|
-s | directory path | /tmp/soweego_shared |
Tells docker which folder in your machine will be shared with soweego container. |
-c | file path | ${PROJECT_ROOT}/soweego/importer/resources/db_credentials.json |
Sets which file in your machine soweego will read for database credentials. |
It's useful when you need to run all the soweego steps. It does not require you to have the project in your machine: it is an already built docker image. Editing the credentials is all you need to do to chose the database.
This environment is a docker container that executes python -m soweego pipeline
command. Obviously, it can be run with custom options.
Note: the code is put into the image during the build process.
- Docker
- Database credentials file, like
${PROJECT_ROOT}/soweego/importer/resources/db_credentials.json
.
- In your terminal, move to the project root;
- Launch
./scripts/docker/launch_pipeline.sh
; - The script will ask you some parameters.
- The pipeline is now running!
Option | Expected Value | Default Value | Description |
---|---|---|---|
-s | directory path | /tmp/soweego_shared |
Tells docker which folder in your machine will be shared with soweego container. |
target (argument, not an option) | one of the available targets name (atm. musicbrainz, discogs. imdb) | None | Tells soweego which database will go through the whole process. |
--validator / --no-validator | No value needed. The option you choose among the two is the value itself. | --no-validator | Tells soweego to run or not the validator step. |
--importer / --no-importer | No value needed. The option you choose among the two is the value itself. | --importer | Tells soweego to run or not the importer step. |
--linker / --no-linker | No value needed. The option you choose among the two is the value itself. | --linker | Tells soweego to run or not the linker step. |
--upload / --no-upload | No value needed. The option you choose among the two is the value itself. | --upload | Tells soweego to upload or not the computed links among wikidata and the target to wikidata. |