GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Abhishek010397/DataStack

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
lambda_function
lambda_function
 
 
modules
modules
 
 
operations-task
operations-task
 
 
Dockerfile
Dockerfile
 
 
NLB-OP.jpg
NLB-OP.jpg
 
 
OP1.jpeg
OP1.jpeg
 
 
OP2.jpeg
OP2.jpeg
 
 
README.md
README.md
 
 
backend.tf
backend.tf
 
 
batch_script.sh
batch_script.sh
 
 
lambda_function.zip
lambda_function.zip
 
 
main.tf
main.tf
 
 
providers.tf
providers.tf
 
 
sandbox.tfvars
sandbox.tfvars
 
 
start.sh.tpl
start.sh.tpl
 
 
startup.sh.tpl
startup.sh.tpl
 
 
variables.tf
variables.tf
 
 

Repository files navigation

DataStack

GitHub workflows can be used to trigger the Infra Deployment in AWS account. Modularisation of Terraform code is made for the below reasons:-

Reusability Organization Collaboration Testing/Isolation Versioning

It contains a bash script called "batch_script.sh" which downloads the files from s3 and then intiates the psql command for data ingestion.

Include are two .tpl files which are basiaclly the userdata which is needed to load up which the VM boots up.

Made use of the Lambda function and integrated it with the s3 for achieving the event invokation inorder to trigger the batch job running int the ec2. The data(rates.sql) ingestion to the PostgreSQL is achieved using the batch_script.sh running in the EC2. SSM SendCommands are being send by lambda function whenever a new object lands to the s3 bucket, due the event notification trigger the lambda function gets trigger and proceeds with ssm:SendCommand to the EC2 instance, the instance is picked up from the ENVIRONMENT section of lambda. Note:- Can make use of ASG also to do this job instead of a single EC2 instance.

Made use of secrets manager to retrieve DB secrets and other paramaters required, can enable a secret rotation as a security best practice.

Made use of ECR to store images.

Tools used here are terraform,Github Actions for Infra deployment And CICD process.

Made use of GitHub-OIDC for authentication in AWS.

Note to run terraform locally

  1. Need the AWS Secret and Access Keys or use an iam role and assume that role.
  2. run terraform init --> make use one updates the backend.tf with appropriate s3 bucket name present in their account.
  3. terraform plan --var-file=sandbox.tfvars
  4. terraform apply --var-file=sandbox.tfvars -auto-approve --> Only if plan seems OK

Below is the curl command result when against the NLB(Network LoadBalancer)

alt-text

About

No description or website provided.

Topics

aws-lambdaaws-nlbaws-rdsaws-ssm-run-commandbash-scriptbatch-scriptdockerfilegithub-actionspostgresqlterraformterraform-module

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.