-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/adding-pre-commit
- Loading branch information
Showing
17 changed files
with
160 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Add env variables here | ||
TESTING= | ||
DATASET_ID= | ||
DATASET_LOCATION= | ||
DEBUG= | ||
SLACK_TOKEN= | ||
SLACK_CHANNEL= | ||
ENVIRONMENT= | ||
DATASET_ID= | ||
TABLE_ID= | ||
GOOGLE_APPLICATION_CREDENTIALS= | ||
DATASET_LOCATION= | ||
SLACK_CHANNEL= | ||
SLACK_TOKEN= | ||
TABLE_ID= | ||
TESTING= |
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,10 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
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
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 |
---|---|---|
@@ -1,47 +1,50 @@ | ||
# gcp-budget-alerts-service | ||
The micro-service is for tracking and monitoring the spending amount at the GCP service. This micro-service elevates an alert whenever the overall budget surpasses or meets predefined thresholds. | ||
|
||
The microservice is for tracking and monitoring the spending amount at the GCP service. This microservice elevates an alert whenever the overall budget surpasses or meets predefined thresholds. | ||
|
||
## Architecture | ||
|
||
 | ||
<h6 align="center">Architecture for the Alert Service</h6> | ||
|
||
<h6 align="center">Architecture for the Alert Service</h6> | ||
|
||
## Installation Guideline | ||
|
||
### Prerequisite | ||
|
||
1. pyenv | ||
2. python 3.8 | ||
3. A Slack App for delivering messages on the channel. [Setup Guideline](./SLACKAPP.md) | ||
|
||
### Steps | ||
|
||
1. Clone the repository | ||
```sh | ||
git clone https://github.com/Sachinbisht27/gcp-budget-alerts-service.git | ||
``` | ||
```sh | ||
git clone https://github.com/Sachinbisht27/gcp-budget-alerts-service.git | ||
``` | ||
2. Switch to project folder and setup the vertual environment | ||
```sh | ||
cd gcp-alerts | ||
python -m venv venv | ||
``` | ||
```sh | ||
cd gcp-alerts | ||
python -m venv venv | ||
``` | ||
3. Activate the virtual environment | ||
```sh | ||
source ./venv/bin/activate | ||
``` | ||
```sh | ||
source ./venv/bin/activate | ||
``` | ||
4. Install the dependencies: | ||
```sh | ||
pip install -r requirements-dev.txt | ||
``` | ||
```sh | ||
pip install -r requirements-dev.txt | ||
``` | ||
5. Set up your .env file by copying .env.example | ||
```sh | ||
cp .env.example .env | ||
``` | ||
```sh | ||
cp .env.example .env | ||
``` | ||
6. Add/update variables in your `.env` file for your environment. | ||
7. Run the following command to get started with pre-commit | ||
```sh | ||
pre-commit install | ||
``` | ||
```sh | ||
pre-commit install | ||
``` | ||
8. Start the server by following command | ||
```sh | ||
functions_framework --target=handle --debug | ||
``` | ||
```sh | ||
functions_framework --target=handle --debug | ||
``` |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
from google.cloud import bigquery | ||
|
||
|
||
client = bigquery.Client() | ||
|
||
|
||
|
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from .slack_service import * | ||
from .budget_service import * | ||
from .slack_service import * |
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
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
Oops, something went wrong.