-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #838 from egovernments/rollout-dashbard-indexer
Added rollout dashboard cronjob indexer for sending data to indexer
- Loading branch information
Showing
8 changed files
with
1,144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Database Credentials | ||
DB_HOST=test | ||
DB_SCHEMA=test | ||
DB_USER=test | ||
DB_PWD=tesrt | ||
DB_PORT=5432 | ||
|
||
#mdms call | ||
API_URL= https://localhost:8080/ | ||
TENANT_ID=pb | ||
IFIX_DEP_ENTITY_URL= https://localhost:8080/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
|
||
All notable changes to this module will be documented in this file. | ||
|
||
|
||
## 1.0.0 - 2024-07-02 | ||
Rollouot Dashboard indexer initial version release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM python:3.9-slim-buster | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
libpq-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
WORKDIR /app/cron/ | ||
COPY requirements.txt . | ||
|
||
RUN python3.9 -m pip install --no-cache-dir --upgrade \ | ||
pip \ | ||
setuptools \ | ||
wheel | ||
RUN python3.9 -m pip install --no-cache-dir \ | ||
-r requirements.txt | ||
|
||
COPY app.py app.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
For local setup: | ||
1. install python version3. | ||
refer link for installing python 3 on linux system--> https://computingforgeeks.com/how-to-install-python-on-ubuntu-linux-system/ | ||
2. install pip3 | ||
ex. apt install python3-pip | ||
for version check -> pip3 --version | ||
refer link: https://digit-discuss.atlassian.net/wiki/spaces/DD/pages/1865777171/DIGIT+Internal+Datamart+deployment+steps | ||
3. install required libraries like requests, pandas, psycopg2-binary etc. mentiond in requirnments.txt file using pip command. | ||
ex. pip3 install requests | ||
4. To run the application locally, we have to load the variable from the .env file to environment so that script can use to do so run below command (NOTE: this to run locally, when running on the pod these variables will be loaded from help) | ||
``while read LINE; do export "$LINE"; done < ./.env`` | ||
4. for running app.py use command | ||
ex. python3 app.py | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Written python script collecting for each tenant data from mdms and mgramseva db based on some critria commented in script 'app.py' for each method. | ||
2. Collecting data and dumping data into mgramseva db in 'roll_out_dashboard' table then loading that data into metabase. |
Oops, something went wrong.