Laravel EKS Deployment Tools with Helm

Overview

Infra Laravel Deployment

Laravel Kubernetes (EKS) Deployment Tools

Prerequirements

Folder Structure

Compose

Docker Compose for Build Image, eg:

  • Ubuntu (Bastion SSH)
  • Nginx
  • PHPFpm (Laravel App)
  • etc

Core

Infra Services (Network), eg:

  • IGW
  • NAT
  • VPC
  • etc

Helm

HelmChart for Stateful & Others:

  • Stateful
    • MariaDB
    • MySQL
    • PostgreSQL
    • Redis
    • etc
  • Others
    • Fluentd
    • Grafana
    • Jenkins
    • Kibana
    • NGINX
    • PHPFpm
    • etc

Resources

AWS Services, eg:

  • EC2
  • EKS
  • RDS
  • S3
  • etc

Modules (Terraform Submodules)

  • Official Repositories

    ./get-official.sh
    -- or --
    make sub-official
    
  • Community Repositories

    ./get-community.sh
    -- or --
    make sub-community
    

How-to-Use

  • Clone this repository

    git clone [email protected]:zeroc0d3lab-devops/infra-laravel-deployment.git
    
  • Pull Submodule repository

    git submodule update --init --recursive
    -- or --
    make sub-all
    
  • Assume Role for Terraform command

    aws sts assume-role --role-arn arn-role-to-assume --role-session-name AWSCLI
    
  • Terraform Execution

    terraform init
    terraform plan
    terraform apply
    
  • Terraform Cleanup (Remove ALL)

    terraform destroy
    ---
    Notes: PLEASE BEWARE TO USE THIS !!!
    

Deploy HelmChart

  • Set Context to Your Environment
    kubectl config use-context [YOUR_K8S_CONTEXT]
    -- or --
    kubectx [YOUR_K8S_CONTEXT]
    
  • Create Namespace larave-app
    kubectl create namespace laravel-app
    
  • Deploy Stateful HelmChart
    make helmchart-stateful [CHART_NAME]
    ---
    eg:
    make helmchart-stateful mariadb
    
  • Deploy Others HelmChart
    make helmchart-others [CHART_NAME]
    ---
    eg:
    make helmchart-others nginx
    make helmchart-others laravel
    

Cleanup Installation HelmChart

  • Set Context to Your Environment
    kubectl config use-context [YOUR_K8S_CONTEXT]
    -- or --
    kubectx [YOUR_K8S_CONTEXT]
    
  • Cleanup Stateful HelmChart
    make remove-helmchart-stateful [CHART_NAME]
    ---
    eg:
    make remove-helmchart-stateful mariadb
    
  • Cleanup Others HelmChart
    make remove-helmchart-others [CHART_NAME]
    ---
    eg:
    make remove-helmchart-others nginx
    make remove-helmchart-others laravel
    

Tested Environment

Versioning

  • AWS Cli version

    aws --version
    ---
    aws-cli/1.20.1 Python/3.8.5 Darwin/20.6.0 botocore/1.21.1
    
  • Docker version

    docker -v
    ---
    Docker version 20.10.8, build 3967b7d
    
    docker version
    ---
    Client:
      Cloud integration: 1.0.17
      Version:           20.10.7
      API version:       1.41
      Go version:        go1.16.4
      Git commit:        f0df350
      Built:             Wed Jun  2 11:56:22 2021
      OS/Arch:           darwin/amd64
      Context:           default
      Experimental:      true
    
    Server: Docker Engine - Community
      Engine:
        Version:          20.10.7
        API version:      1.41 (minimum version 1.12)
        Go version:       go1.13.15
        Git commit:       b0f5bc3
        Built:            Wed Jun  2 11:54:58 2021
        OS/Arch:          linux/amd64
        Experimental:     false
      containerd:
        Version:          1.4.6
        GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
      runc:
        Version:          1.0.0-rc95
        GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
      docker-init:
        Version:          0.19.0
        GitCommit:        de40ad0
    
  • Docker-Compose version

    docker-compose -v
    ---
    docker-compose version 1.29.2, build 5becea4c
    
    docker-compose version
    ---
    docker-compose version 1.29.2, build 5becea4c
    docker-py version: 5.0.0
    CPython version: 3.9.0
    OpenSSL version: OpenSSL 1.1.1h  22 Sep 2020
    
  • Terraform version

    terraform version
    ---
    Terraform v1.0.9
    + provider registry.terraform.io/hashicorp/aws v3.61.0
    + provider registry.terraform.io/hashicorp/local v2.1.0
    + provider registry.terraform.io/hashicorp/null v3.1.0
    + provider registry.terraform.io/hashicorp/template v2.2.0
    

Copyright

  • Author: Dwi Fahni Denni (@zeroc0d3)
  • License: Apache v2
You might also like...
Deployer based deployment for WordPress with media and database synchronisation.

deployer-extended-wordpress What does it do? Should I use "deployer-extended-wordpress" or "deployer-extended-wordpress-composer"? Dependencies Instal

A simple php (lumen) app for sharing sensitive text (basically like onetimesecret), but with full end-to-end AES-256-GCM encryption so even the server has no access to the data, and developed with very simple deployment in mind.
A simple php (lumen) app for sharing sensitive text (basically like onetimesecret), but with full end-to-end AES-256-GCM encryption so even the server has no access to the data, and developed with very simple deployment in mind.

A simple php (lumen) app for sharing sensitive text (basically like onetimesecret), but with full end-to-end AES-256-GCM encryption so even the server has no access to the data, and developed with very simple deployment in mind.

Laradeploy offers you to automate deployment using a GitHub webhook.

Introduction Laradeploy offers you to automate deployment using a GitHub webhook. Simple and fast just make a git push to GitHub deploy the new modifi

🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!
🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!

WP React Starter: WordPress React Boilerplate DEPRECATED: WP React Starter was a "research project" of devowl.io for the development of our WordPress

🚀 Zero-downtime deployment out-of-the-box

🚀 Laravel Deployer Looking for the old Laravel Deployer? Click here. Laravel Deployer is no longer the package it used to be. Since that package was

Repository untuk menyimpan tugas Implementasi Dan Deployment Sistem

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.

Nextcloud All In One Beta This is beta software and not production ready. But feel free to use it at your own risk! We expect there to be rough edges

Magento Deployment Scripts

Magento Deployment Scripts Author: Fabrizio Branca This is a collection of scripts used to build/package, deploy and install Magento projects. Import

Shell script for Git module deployment with include/exclude filters.

Deploy multiple Git repositories in an unique folder modgit is a shell script for deploying multiple Git repositories in root folder of any project, w

Magento2 Deployment with Deployer (Skeleton)

MageDeploy2 Base Magento2 Deployment Setup using Robo and Deployer. This is the base project you should base your deployments on. It provides an confi

⚡ Setting up Apache and PHP on AWS with Ansible Playbook Using Ubuntu 22.04 AMI.   Ansible is a simple and powerful automation engine. It is used to help with configuration management, application deployment, and task automation. It makes your applications and systems easier to deploy and maintain . Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using laravel best practices.
Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using laravel best practices.

Laravel API tool kit and best API practices Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using lar

Laravel lsp - Developer tools for easier Laravel development
Laravel lsp - Developer tools for easier Laravel development

Laravel lsp The Laravel/Blade lsp provides: Blade: Diagnostics on missing components + action to create it. Autocomplete for components and their argu

SEO Tools for Laravel
SEO Tools for Laravel

SEOTools - SEO Tools for Laravel and Lumen SEOTools is a package for Laravel 5.8+ and Lumen that provides helpers for some common SEO techniques. Curr

Laravel API starter Kit will provide you with the tools for making API's that everyone will love
Laravel API starter Kit will provide you with the tools for making API's that everyone will love

Laravel API Starter Kit Laravel API starter Kit will provide you with the tools for making API's that everyone will love, API Authentication is alread

A curated list of awesome Laravel bookmarks, packages, tools, articles, tutorials and related resources.

ATTENTION: This list is obsolete and discontinued. Please find a much more comprehensive, much more well-maintained awesome-laravel list at chiraggude

Laravel Inspector, debugging and profiling tools for Web Artisans

Laravel Inspector At a Glance Installation Configuration Usage Messages Timers Redirects Dump and die Exceptions VIEW/AJAX/API requests, how it works

Rinvex Bookable is a generic resource booking system for Laravel, with the required tools to run your SAAS like services efficiently

Rinvex Bookings is a generic resource booking system for Laravel, with the required tools to run your SAAS like services efficiently. It has a simple architecture, with powerful underlying to afford solid platform for your business.

An opinionated Laravel setup using my favourite tools

Opinionated Laravel Template This is a template I use when starting a new Laravel project. It is opinionated and uses the conventions I prefer to work

Releases(1.5.0)
  • 1.5.0(Dec 11, 2022)

    Infra Laravel Deployment - Changelog History

    Laravel Kubernetes (EKS) Deployment Tools

    all contributors tags phpfpm pulls laravel pulls download all view clone issues pull requests forks stars license


    Version 1.5.0

    • All features from version 1.4
    • Added docs from terraform-docs generator
    • Refactoring script dockerhub-build, dockerhub-tag, dockerhub-push
    • Refactoring script ecr-build, ecr-tag, ecr-push

    Version 1.4

    • Refactoring laravel container with additional installation packages & libraries
    • Added AWS-Cli v2 binary
    Source code(tar.gz)
    Source code(zip)
  • 1.4(Nov 29, 2022)

    Infra Laravel Deployment - Changelog History

    Laravel Kubernetes (EKS) Deployment Tools

    all contributors tags phpfpm pulls laravel pulls download all view clone issues pull requests forks stars license


    Version 1.4

    • Refactoring laravel container with additional installation packages & libraries
    • Added AWS-Cli v2 binary

    Version 1.3

    • Revert phpfpm setup listening port to 9000 (default)
    • Set docker-compose laravel bind port 8000 from expose 9000 (default)
    • Set default path work directory laravel container to /usr/share/nginx/laravel
    • Added container nginx 1.23-alpine linked to laravel container
    Source code(tar.gz)
    Source code(zip)
  • 1.3(Nov 27, 2022)

    Infra Laravel Deployment - Changelog History

    Laravel Kubernetes (EKS) Deployment Tools

    all contributors tags phpfpm pulls laravel pulls download all view clone issues pull requests forks stars license


    Version 1.3

    • Revert phpfpm setup listening port to 9000 (default)
    • Set docker-compose laravel bind port 8000 from expose 9000 (default)
    • Set default path work directory laravel container to /usr/share/nginx/laravel
    • Added container nginx 1.23-alpine linked to laravel container

    Version 1.2

    • Added docker image references for PHPFpm (devopscorner/phpfpm)
    • Fixing listening port from 9000 to 8000
    • Added docker-compose container hostname
    • Added healthcheck for phpfpm container in port 8000
    • Change docker configuration laravel to devopscorner/laravel
    Source code(tar.gz)
    Source code(zip)
  • 1.2(Nov 26, 2022)

    Infra Laravel Deployment - Changelog History

    all contributors tags download all view clone issues pull requests forks stars License: CC BY-NC 4.0

    Laravel Kubernetes (EKS) Deployment Tools


    Version 1.2

    • Added docker image references for PHPFpm (devopscorner/phpfpm)
    • Fixing listening port from 9000 to 8000
    • Added docker-compose container hostname
    • Added healthcheck for phpfpm container in port 8000
    • Change docker configuration laravel to devopscorner/laravel

    Version 1.1

    • Upgrade Laravel version 8.x (8.65) to 9.x (9.19 / 9.3.12)
    • Added component Laravel debug with Laravel Telescope
    • Added component Laravel authentification with Laravel Breeze
    • Added container Alpine PHPFpm 7.4-fpm, 8.0-fpm & 8.1-fpm
    Source code(tar.gz)
    Source code(zip)
  • 1.1(Nov 26, 2022)

    Infra Laravel Deployment - Changelog History

    all contributors tags download all view clone issues pull requests forks stars License: CC BY-NC 4.0

    Laravel Kubernetes (EKS) Deployment Tools


    Version 1.1

    • Upgrade Laravel version 8.x (8.65) to 9.x (9.19 / 9.3.12)
    • Added component Laravel debug with Laravel Telescope
    • Added component Laravel authentification with Laravel Breeze
    • Added container Alpine PHPFpm 7.4-fpm, 8.0-fpm & 8.1-fpm

    Version 1.0

    • Refactoring Folder Structure
    • Refactoring Terraform Scripts
      • Core
      • Resources
        • EKS
        • RDS
      • TFState
    • Refactoring Makefile for simplicity running script
    • Upgrade EKS version 1.22 from 1.19
    • Added New Helm Template Global
    • Added New Helm Values using helmfile
    • Added Documentation for Laravel Terraform
      • Plan
      • Cost Review (infracost)
      • Security Analysis
        • checkov
        • terrascan
        • tfsec
    Source code(tar.gz)
    Source code(zip)
  • 1.0(Nov 20, 2022)

    Infra Laravel Deployment

    all contributors tags download all download latest view clone issues pull requests forks stars License: CC BY-NC 4.0

    Laravel Kubernetes (EKS) Deployment Tools


    Version 1.0

    • Refactoring Folder Structure
    • Refactoring Terraform Scripts
      • Core
      • Resources
        • EKS
        • RDS
      • TFState
    • Refactoring Makefile for simplicity running script
    • Upgrade EKS version 1.22 from 1.19
    • Added New Helm Template Global
    • Added New Helm Values using helmfile
    • Added Documentation for Laravel Terraform
      • Plan
      • Cost Review (infracost)
      • Security Analysis
        • checkov
        • terrascan
        • tfsec
    Source code(tar.gz)
    Source code(zip)
  • 0.2.5(Nov 11, 2021)

    Changelog History

    Version 0.2.5

    • Refactoring Helm Template & Values
    • Refresh Submodules Terraform Official & Terraform Community
    • Fixing Makefile script for submodules
    • Added modules RDS
    Source code(tar.gz)
    Source code(zip)
  • 0.2.4(Nov 11, 2021)

  • 0.2.3(Nov 3, 2021)

  • 0.2.2(Nov 3, 2021)

    Changelog History

    Version 0.2.2

    • Refactoring helm template for secret & secret-prod
    • Update docker-compose configuration for added Adminer (Database Administrator) tools
    • Update docker ignore files
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Nov 2, 2021)

    Changelog History

    Version 0.2.1

    • Update helm deployment values & secret.
    • Refactoring docker-compose configuration.
    • Added deployment notes.
    • Added documentation cheatsheet for maintenance database.
    Source code(tar.gz)
    Source code(zip)
Owner
DevOps Corner Indonesia
E-Learning & Development Tools
DevOps Corner Indonesia
🐼 Framework agnostic package using asynchronous HTTP requests and PHP generators to load paginated items of JSON APIs into Laravel lazy collections.

Framework agnostic package using asynchronous HTTP requests and generators to load paginated items of JSON APIs into Laravel lazy collections.

Andrea Marco Sartori 61 Dec 3, 2022
Online tool to convert `curl` requests to Laravel `Http` requests

curl Converter Another bit of automation from Shift to convert curl requests to Laravel Http requests. This project is a WIP. You may follow along wit

Laravel Shift 66 Dec 17, 2022
DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

DooTask is a lightweight open source online project task management tool that provides various document collaboration tools, online mind mapping, online flowcharting, project management, task distribution, instant IM, file management and other tools.

kuaifan 3k Jan 5, 2023
A Laravel package to speed up deployment by skipping asset compilation whenever possible.

Airdrop for Laravel Read the full docs at hammerstone.dev/airdrop/docs. Hammerstone Airdrop for Laravel is a package that speeds up your deploys by sk

Hammerstone 160 Nov 24, 2022
Deployer is a PHP Application deployment system powered by Laravel

Deployer is a PHP Application deployment system powered by Laravel 5.5, written & maintained by Stephen Ball.

Stephen Ball 886 Dec 15, 2022
Laravel Feature Flags allows instant, zero-deployment toggling of application features.

Dynamic Feature Flags for Laravel Laravel Feature Flags allows instant, zero-deployment toggling of application features. The state of each feature fl

Coding Labs 35 Oct 4, 2022
A deployment tool written in PHP with support for popular frameworks out of the box

Deployer A deployment tool written in PHP with support for popular frameworks out of the box. See deployer.org for more information and documentation.

Deployer 9.7k Jan 1, 2023
The PHP Deployment Tool

Magallanes What's Magallanes? Magallanes is a deployment tool for made with PHP for PHP applications; it's quite simple to use and manage. For more in

Andrés Montañez 685 Dec 25, 2022
Deployer is a free and open source deployment tool.

Deployer Deployer is a PHP Application deployment system powered by Laravel 6.0, written & maintained by Stephen Ball. Check out the releases, license

Stephen Ball 886 Dec 15, 2022