Skip to main content

A webapp to query datanommer

Project description

datagrepper

Datagrepper is a web application and JSON API to retrieve historical messages sent via Fedora Messaging. Datanommer is a seperate project and service that consumes messages from the Fedora Messaging queue and puts them in a database. These messages is what datagrepper queries.

Datagrepper is curently running in production at https://apps.fedoraproject.org/datagrepper/

Development Environment

Vagrant allows contributors to get quickly up and running with a datagrepper development environment by automatically configuring a virtual machine.

The datagrepper Vagrant environment configures configures and enables a datanommer service and database. The datanommer instance is configured to be empty when first provisioned, but to consume messages from the stage Fedora Messaging queue.

Install vagrant

To get started, run the following commands to install the Vagrant and Virtualization packages needed, and start the libvirt service:

$ sudo dnf install ansible libvirt vagrant-libvirt vagrant-sshfs vagrant-hostmanager
$ sudo systemctl enable libvirtd
$ sudo systemctl start libvirtd

Checkout and Provision

Next, check out the datagrepper code and run vagrant up:

$ git clone https://github.com/fedora-infra/datagrepper
$ cd datanommer
$ vagrant up

Interacting with your development datagrepper

After successful provisioning of the Datagrepper vagrant setup, the datagrepper web application will be accessible from your host machine's web browser at

http://datagrepper.test:5000/

Using the development environment

SSH into your newly provisioned development environment:

$ vagrant ssh

The vagrant setup also defines 4 handy commands to interact with the service that runs the datagrepper flask application:

$ datagrepper-start
$ datagrepper-stop
$ datagrepper-restart
$ dataprepper-logs

Additionally, the following commands are also available for interacting with the datanommer service:

$ datanommer-consumer-start
$ datanommer-consumer-stop
$ datanommer-consumer-restart
$ datanommer-consumer-logs

Running the tests

Datanommer is comprised of 3 seperate modules in this single repository. There is a handy script in the top directory of this repo to run the tests on all 3 modules:

$ ./runtests.sh

However, tests can also be run on a single module by invotking tox in that modules' directory. For example:

$ cd datanommer.models/
$ tox

Note, that the tests use virtual environments that are not created from scratch with every subsequent run of the tests. Therefore, when changes happen to dependencies, the tests may fail to run correctly. To recreate the virtual envrionments, run the tests commands with the -r flag, for example:

$ ./runtests.sh -r

or

$ cd datanommer.models/
$ tox -r

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datagrepper-1.0.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

datagrepper-1.0.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file datagrepper-1.0.0.tar.gz.

File metadata

  • Download URL: datagrepper-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.9 Linux/5.15.12-100.fc34.x86_64

File hashes

Hashes for datagrepper-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9306e86d0cd933932f83304edc0842adf718b636c2cf64e477145667e1156403
MD5 8f74e53c074150e412e5e2d6bc7c2ab0
BLAKE2b-256 2d038f924cd8866fffe2f77b9ce12e65d6d9992e83a7338e93c6b4aa41690a3a

See more details on using hashes here.

Provenance

File details

Details for the file datagrepper-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: datagrepper-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.9 Linux/5.15.12-100.fc34.x86_64

File hashes

Hashes for datagrepper-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f9c265adefb314de7f1f1e3ae173a89df0a3f4f903db3982e5c090edffcfd40
MD5 d466130ba1faee56bd8406d8c9e51770
BLAKE2b-256 35d225040342730a51107969fa0ece9c76a00095ce2d0e638dac01cc062450d2

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page