-
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.
Co-authored-by: HarshCasper <[email protected]>
- Loading branch information
1 parent
d377221
commit f4aba6d
Showing
5 changed files
with
112 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
AWS_DEFAULT_REGION=us-east-1 | ||
AWS_ENDPOINT_URL=http://localhost:4566 | ||
|
||
REDSHIFT_MASTER_USER=dwh_user | ||
REDSHIFT_MASTER_PASSWORD=123456789Test | ||
REDSHIFT_DB_NAME=streaming_db | ||
REDSHIFT_CLUSTER_NAME=redshift-cluster | ||
REDSHIFT_TABLE_NAME=user_health_data | ||
|
||
KINESIS_STREAM_NAME=kinesis-stream | ||
|
||
S3_BUCKET_NAME=firehose-raw-data |
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,90 @@ | ||
name: Deploy on LocalStack | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
env: | ||
AWS_DEFAULT_REGION: us-east-1 | ||
AWS_ENDPOINT_URL: http://localhost:4566 | ||
AWS_ACCESS_KEY_ID: test | ||
AWS_SECRET_ACCESS_KEY: test | ||
|
||
jobs: | ||
cdk: | ||
name: Setup infrastructure using CDK | ||
runs-on: ubuntu-latest | ||
environment: default-env | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Load .env file | ||
uses: xom9ikk/dotenv@v2 | ||
with: | ||
path: ./ | ||
mode: "" | ||
load-mode: strict | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install CDK | ||
run: | | ||
npm install -g aws-cdk-local aws-cdk | ||
cdklocal --version | ||
- name: Set up Python 3.11 | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-dev.txt | ||
- name: Start LocalStack | ||
uses: LocalStack/setup-localstack@main | ||
with: | ||
image-tag: ${{ inputs.release-tag || 'latest'}} | ||
use-pro: 'true' | ||
install-awslocal: 'true' | ||
configuration: DEBUG=1 | ||
env: | ||
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | ||
|
||
- name: Deploy using CDK | ||
run: | | ||
make deploy-localstack | ||
- name: List the resources | ||
run: | | ||
make list-resources-localstack | ||
- name: Run pytests | ||
run: | | ||
make test | ||
- name: Generate a Diagnostic Report | ||
if: failure() | ||
run: | | ||
curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz | ||
- name: Upload the Diagnostic Report | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: diagnose.json.gz | ||
path: ./diagnose.json.gz | ||
|
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 |
---|---|---|
|
@@ -120,7 +120,6 @@ celerybeat.pid | |
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
|
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