#3 Task 0: Preparations
Opened 3 years ago by frantisekz. Modified 3 years ago

  • Install Fedora

  • Install bunch of packages:

sudo dnf install podman git python3-psycopg2 python3-pip python3-pycurl python3-koji python3-igraph python3-virtualenv
  • Clone the oraculum repository:
git clone https://pagure.io/fedora-qa/oraculum.git && cd oraculum
  • Create a virtual env:
virtualenv --system-site-packages oraculum-client
  • Enter the virtualenv:
source oraculum-client/bin/activate
# HINT: you can exit the env by calling 'deactivate'
  • Install the remaining deps:
pip3 install --user -r requirements.txt
  • Create a database container:
podman run --name pg_oraculum -e POSTGRES_USER=oraculum -e POSTGRES_PASSWORD=fedora -p 5432:5432 -d postgres
# HINT: the database wouldn't start automatically after a reboot, you can list all the containers with:
# podman container list --all
# and start the one you need with podman start <id>
  • Copy out the example config and change the database path:
cp conf/settings.py.example conf/settings.py
# Edit the conf/settings.py, changing SQLALCHEMY_DATABASE_URI to something like this should work:
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://oraculum:fedora@127.0.0.1:5432/oraculum'

# and set MOTD_PASSWORD to something like:
MOTD_PASSWORD = 'fedora'

# save the file
  • Start the db init:
DEV=true python3 run_cli.py init_db
  • Start oraculum:
DEV=true python3 runapp.py

Hint: most of the oraculum functionality won't work with this setup (mostly due to missing redis and oraculum workers), but it should suffice for work on oraculum-client for now.


Log in to comment on this ticket.

Metadata