Skip to content

diogoab/app-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

App-Storage

Getting Started

Prerequisites

Kindly ensure you have the following installed on your machine:

Running the Application

Part One

  1. Clone the repository
$ git clone https://github.com/diogoab/app-storage.git
  1. Check into the cloned repository
$ cd app-storage/terraform-s3
  1. export your AWS variables
$ export AWS_ACCESS_KEY_ID="your-aws-access-key"
$ export AWS_SECRET_ACCESS_KEY="your-secret-key"
$ export AWS_DEFAULT_REGION="your-region"
  1. let´s fly!:
$ terraform init
  1. for security roll plan
$ terraform plan
  1. Finally create your bucket
$ terraform apply

Part Two

  1. Create a bucket with TF, navegate up folder, search app folder and update name on the app.py file on line 10.
cd ../app-storage
  1. Run the docker!
docker-compose up -d
  1. Navigate to http://localhost:5000/storage

Hey, is You advanced User? So:

Run the next stage

kubectl create secret generic aws-secret --from-literal=AWS_ACCESS_KEY=access-key --from-literal=AWS_SECRET_KEY=secret-key --from-literal=AWS_DEFAULT_REGION=us-east-1
  • before
kubectl apply -f deployment.yaml

kubectl get pods
  • if LB doesn't go up, run this
 kubectl port-forward --address 0.0.0.0 <name-your-pod> 5000:5000

p.s: remember to change the image name first, line 35

How to monitor this

  • Use the stack Prometheus and Grafana with cadvisor for monitor Docker containers Dockprom

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published