Infrastructure as Code: Step 2 - Shell Script to Provision Ubuntu

Поділитися
Вставка
  • Опубліковано 21 жов 2024
  • This is a continuation of the previous videos in the series that provide all the details that you needed to know to securely deploy your Laravel application to the cloud using Amazon AWS. The previous videos took you through the step-by-step process as we manually completed all the steps required to deploy Laravel to AWS.
    This series introduces the concept of "Infrastructure as Code". I transform the previous 7 step manual process into an automated and repeatable 4 step process. Here are the four videos in this Infrastructure as Code series:
    Step 1 - Amazon AWS CloudFormation - • Infrastructure as Code... (April 19, 2024)
    I create an Amazon AWS CloudFormation template that you can use to easily provision the complete stack (VPC, private and public subnets, EC2) that spans multiple AZs.
    Step 2 - Shell Script to Provision Ubuntu - • Infrastructure as Code... (April 23, 2024)
    Running a single provisioning script completes the provisioning of Unbuntu to prepare it for supporting the Laravel application. This single script aggregates all the individual command lines that we ran to install the ubuntu packages (e.g., zip, unzip...) and applications (e.g., nginx, php, composer...).
    Step 3 - Application Management Platform - • Infrastructure as Code... (April 26, 2024)
    The platform supports the following four commands:
    appList: list all the applications
    appNew: create a new application
    appCreate: provision and deploy an application
    appDelete: delete an application
    With these four commands, you can quickly install and manage multiple applications onto a single Ubuntu server.
    Step 4 - Zero Down Time Deployments - • Infrastructure as Code... (April 30, 2024)
    The platform also supports a "deploy" command that can be run from any deployment user's session. This kicks off a deployment / build processes and results in a "zero down time" deployment of a new release.
    Links:
    DevOps Repo - github.com/rcr...
    Helpful Gist for CloudFormation Template - gist.github.co...
    #laravel #aws #vpc #ec2 #route53
    #ubuntu #nginx #php #composer #npm #sqlite #mysql
    #technologysandbox

КОМЕНТАРІ • 4

  • @bye835
    @bye835 2 місяці тому +1

    Thanks, helpful videos

  • @SergejOleskevic
    @SergejOleskevic 6 місяців тому +1

    Thank you! I watch every video on your channel 😊
    What is the main benefit of using this way of automation compared to the Docker?

    • @thetechnologysandbox
      @thetechnologysandbox  6 місяців тому

      Thanks for watching…I appreciate it! This is a great question.
      I don’t think it is a either Docker or the provisioning script. When I created the Docker Starter Kit for Laravel (github.com/rcravens/docker_starter_for_laravel) the provisioning code is in the dockerfile for PHP. when you compare these you will find a lot of the same code (e.g., using apt to install PHP…). To write things once and use everywhere, I could imagine the dockerfile git cloning the dev ops repo and running the provisioning script inside the container. That would allow you to maintain a “one code base for ubuntu provisioning”.
      On the other hand, the provisioning completed in this video is a “monolithic” application where in the docker starter kit, i split that up into multiple services….PHP, nginx, mysql, redis all had their own docker service. That is where we will end up in this “deploy laravel to AWS” series as we start to explore the best options for scaling (coming soon). So eventually, the infrastructure will better match what is in the Docker starter kit.
      Hope that helps!