From fc67e205e0cb4f744319561ccf4b48fbf8764594 Mon Sep 17 00:00:00 2001 From: Josef Skladanka Date: Jan 11 2018 15:55:03 +0000 Subject: Add dbdump usage to readme --- diff --git a/README.md b/README.md index 5536d9d..f0c7527 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,22 @@ set the following value:: You might also need to adjust `reporting_enabled` and `report_to_resultsdb`, depending on your local settings. +## Using real-life data from Fedora Infra dumps + +Sometimes, you might want to check some performance tweaks with real-life data. +The easy solution might be using our daily dumps and a Postgres instance in Docker:: + + docker run --name postgres_resultsdb -e POSTGRES_USER=resultsdb -e POSTGRES_PASSWORD=resultsdb -d -p 65432:5432 postgres + wget https://infrastructure.fedoraproject.org/infra/db-dumps/resultsdb.dump.xz + xzcat resultsdb.dump.xz | docker exec -i postgres_resultsdb psql -Uresultsdb + +Then just change your config (for DEV environment, you can use `conf/settings.py` file) +to contain this db connector:: + + SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://resultsdb:resultsdb@localhost:65432/resultsdb' + +And run as usual. + ## Running test suite You can run the test suite with the following command (with virtualenv