python 3.11.2
redis 6.0.16
kafka 0.7.1
$ python3 -m venv venv
$ source venv/bin/activate
$ python3 -m pip install -r requirements.txt
Be careful, if you call your virtual environment by a different name, you will need to modify the build.sh
script.
$ chmod +x build.sh
$ ./build.sh
$ cat scripts/cron.sh
$ crontab -e
$ vim data/credentials.json
$ vim data/api-project.json
$ vim vars.py
$ ln -s dwdm.tg_bot.send.service /etc/systemd/system/dwdm.tg_bot.send.service
$ ln -s dwdm.tg_bot.listen.service /etc/systemd/system/dwdm.tg_bot.listen.service
$ systemctl daemon-reload
$ systemctl enable dwdm.tg_bot.listen.service
$ systemctl start dwdm.tg_bot.listen.service
$ systemctl enable dwdm.tg_bot.send.service
$ systemctl start dwdm.tg_bot.send.service
This system consists of four Python scripts designed for data synchronization, comparison, and patching tasks. Each script serves a unique purpose but contributes to a comprehensive data management workflow.
- Purpose: Compares data between reference and probe datasets.
- Key Features:
- Fetches data from Google Tables and an MCP server.
- Compares data based on specific columns.
- Generates styled comparison reports.
- Sends reports to recipients via Telegram.
- Purpose: Uploads data from an MCP server to a Redis database.
- Key Features:
- Connects to a Redis database using configurable credentials.
- Retrieves data about Ciena 6500 and Ciena WS devices from the MCP server.
- Uploads device information to Redis with expiration settings.
- Purpose: Compares and patches client data between Google Tables and the MCP server.
- Key Features:
- Fetches client data from Google Tables and the MCP server.
- Compares data to identify discrepancies.
- Patches discrepancies in client data when found.
- Sends reports and notifications via Telegram.
- Purpose: Performs data cleanup tasks on client data.
- Key Features:
- Fetches client data from Google Tables and the MCP server.
- Identifies and handles data inconsistencies.
- Cleans up empty or incorrect client entries.
- Generates reports on cleanup activities.
To utilize the functionality of these scripts, ensure that the required dependencies and configurations are correctly set up for each script. You can execute each script using Python.
Refer to the individual README files for each script for detailed instructions on setup and usage.