Skip to content

Vaskonti/mdp_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example App

A Parking app for demonstration purposes.

Diagram

Pre-requisites

  • Docker and Docker Compose installed
  • PHP 8.2 or higher
  • Composer installed

Technologies used

  • MongoDB for storing cars
  • MySQL for stоring drivers and the vehicle categories they can drive
  • Redis for caching MongoDB aggregations
  • Elasticsearch for indexing cars and searching them
  • Docker for keeping an image of the last successful build
  • Github Actions for a github workflow
    • Cache Composer
    • PHP Stan
    • PHP CS Fixer
    • Yaml validation
    • CliMarkDown
    • Editorconfig checker
    • Snyk
    • SonarCloud
    • Gitleaks
    • Docker build process
    • Manual Approval
  • AWS for deployment
    • VPC
    • ELB
    • ASG
    • DocumentDB
    • RDS
    • ElastiCache
    • CodeDeploy
    • OpenSearch
    • S3
  • Terraform for automation of deployment

Project Setup

  1. Copy the .env.project contents into .env file

    cp .env.example .env

  2. Run the sail environment:

    ./vendor/bin/sail up -d --build

  3. Run the migrations:

    ./vendor/bin/sail artisan migrate

  4. Generate a key:

    ./vendor/bin/sail artisan key:generate

  5. Install all dependencies from composer

    ./vendor/bin/sail composer install

Functionality

Jobs and Workers

  • php send:aggregations - Checks the amount of money and number of cars entered the parking lot for

  • php elastic:index - Indexes all the cars in elasticsearch

Future improvements

  • Improve terraform code
  • Add more tests
  • Find a way to distribute the workers with environment variables remotely

Research done

  • Ansible
  • Terraform
  • AWS
  • Docker
  • Docker Compose
  • Redis
  • MongoDB
  • MySQL
  • Elasticsearch
  • Hashicorp Vault
  • AWS Appconfig
  • AWS CodeDeploy
  • AWS S3