Skip to content

adamhcj/assessment2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ assessment2

My Skills

πŸ‘¨β€πŸ’» Description

  • Python flask microservice server connected to mongodb from official docker hub image
  • Containerised with docker
  • Easily deployed with Terraform and docker-compose
  • Deployed on my free-tier aws EC2 instance (t2.micro)
  • http://52.221.192.224:5001/users

πŸ”Œ Terraform running

  1. In terraform/main.tf, edit access_key and secret_key with IAM user credentials that have sufficient privileges
  2. Navigate to terraform folder and open cmd here
  3. Execute these commands:
terraform init
terraform apply

πŸš€ Deployment on Cloud (Amazon Linux 2) (ALL THESE WILL BE DONE BY TERRAFORM, view user data in terraform codes.)

  1. Connect to ec2 instance and access the terminal
  2. Install required dependencies:
  3. sudo yum update
    sudo yum install git
    sudo yum install docker
    sudo yum install docker-compose-plugin
    
  4. Getting git repository folders into ec2 instance:
  5. mkdir assessment2
    cd assessment2
    git clone https://github.com/adamhcj/assessment2.git
    
  6. Deploy docker compose:
  7. sudo docker compose up -d
    
  8. Ensure security groups and network access control list allows for inbound connection to the ec2 instance

πŸ’» Local deployment preview:

With docker compose installed, simply navigate to root directory of this repository, and type:

docker compose up -d

image

About

Past assessment involving Terraform, Docker, Python microservice and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published