Giter VIP home page Giter VIP logo

devopscorner / laravel-eks-deployment Goto Github PK

View Code? Open in Web Editor NEW
22.0 3.0 3.0 11.02 MB

Laravel Kubernetes (EKS ver-1.23) Deployment Tools with Helm

Home Page: https://devopscorner.id

License: Apache License 2.0

Makefile 7.66% HCL 28.74% Shell 15.56% Mustache 10.19% Dockerfile 7.45% PHP 17.97% Blade 6.36% Smarty 2.68% Python 3.33% JavaScript 0.06%
laravel laravel-framework helm docker docker-compose cicd aws aws-eks kubernetes devopscorner eks helmfile eks-cluster terraform phpfpm alpine alpine-phpfpm

laravel-eks-deployment's Introduction

Infra Laravel Deployment

Laravel Kubernetes (EKS) Deployment Tools

all contributors tags download all download latest view clone issues pull requests forks stars license


Available Tags

Containers Pulls
Container devopscorner/phpfpm Tags phpfpm pulls
Container devopscorner/laravel Tags laravel pulls

Prerequirements

Folder Structure

docs

Index Documentation, see here for detail

compose

Docker Compose for Build Image, eg:

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

helm

HelmChart, Template, Helmfile Values:

  • charts
    • stateful
      • mariadb
      • mysql
      • postgresql
      • redis
      • etc
    • others
      • fluentd
      • grafana
      • jenkins
      • kibana
      • nginx
      • phpfpm
      • etc
  • helmfile
    • laravel-template.yml
    • laravel-values.yml
    • manifest-laravel-secret.yml
    • mariadb-values.yml
  • templates
    • api
    • backend
    • configmap
    • frontend
    • secretref
    • stateful
    • svcrole
    • helm-pack-lab.sh
    • helm-push-lab.sh

terraform/environment

Teraform AWS Providers, eg:

  • Core
  • TFState
  • Resources
    • Budget
    • EKS
    • RDS

terraform/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]:devopscorner/laravel-eks-deployment.git
    
  • Get all Terraform modules

    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

  • Docker version

    docker -v
    ---
    Docker version 20.10.17-rd, build c2e4e01
    
    docker version
    ---
    Client:
      Version:           20.10.17-rd
      API version:       1.41
      Go version:        go1.17.11
      Git commit:        c2e4e01
      Built:             Fri Jul 22 18:31:17 2022
      OS/Arch:           darwin/amd64
      Context:           default
      Experimental:      true
    
    Server: Docker Desktop 4.14.1 (91661)
    Engine:
      Version:          20.10.21
      API version:      1.41 (minimum version 1.12)
      Go version:       go9.7
      Git commit:       3056208
      Built:            Tue Oct 25 18:00:19 2022
      OS/Arch:          linux/amd64
      Experimental:     false
    containerd:
      Version:          1.6.9
      GitCommit:        1c90a442489720eec95342e1789ee8a5e1b9536f
    runc:
      Version:          1.1.4
      GitCommit:        v1.1.4-0-g5fd4c4d
    docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0
    
  • Docker-Compose version

    docker-compose -v
    ---
    Docker Compose version v2.11.1
    
  • AWS Cli

    aws --version
    ---
    laravel/2.8.7 Python/3.9.11 Darwin/21.6.0 exe/x86_64 prompt/off
    
  • Terraform Cli

    terraform version
    ---
    Terraform v1.3.5
    on darwin_amd64
    - provider registry.terraform.io/hashicorp/aws v3.74.3
    - provider registry.terraform.io/hashicorp/local v2.1.0
    - provider registry.terraform.io/hashicorp/null v3.1.0
    - provider registry.terraform.io/hashicorp/random v3.1.0
    - provider registry.terraform.io/hashicorp/time v0.7.2
    
  • Terraform Environment Cli

    tfenv -v
    ---
    tfenv 2.2.2
    

Copyright

  • Author: Dwi Fahni Denni (@zeroc0d3)
  • License: Apache v2

laravel-eks-deployment's People

Contributors

actions-user avatar dependabot[bot] avatar snyk-bot avatar zeroc0d3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.