There are 2 services:
monitor_producer
for checking web urls statuses and pushing them to kafka.monitor_consumer
for getting data from kafka and saving them in PostgreSQL.
make lint
- run linter
make up
- start local services: kafka, psql, etc.
make test
- run local tests, based on local services. Run after you launched local services with make up
.
-
sudo apt install libpq-dev python3-dev
- -install the prerequsisites for building the psycopg2 package. -
pip install -r requirements.txt
- install required modules. -
Create
config/kafka.json
file. There isconfig/kafka_example.json
an example. -
Create
config/psql.json
file. There isconfig/psql_example.json
an example. -
Add ssl certs for kafka to
config/ssl/kafka
.
So, your config file should look like:
-config/
--ssl/
----ca.pem
----service.cert
----service.key
--kafka.json
--pgsql.json
Run make start_producer
to run producer app.
Run make start_consumer
to run consumer app.