DevOps Tutorial - Laravel Deployment Automation CI\CD using AWS RDS EC2 S3 CodeDeploy BitBucket

preview_player
Показать описание
Laravel Automated Deployment (CI\CD) using AWS RDS EC2 S3 CodeDeploy BitBucket and Bash

In this tutorial, were going to learn how to set up Continuous integration and delivery for any Laravel project using AWS and Bitbucket.

To accomplish this, we will be using
• AWS EC2 Instance – to host our production server (optional + staging)
• AWS RDS Instance – to run MySQL 8 Server for our Laravel project
• AWS S3 Bucket – to store our revisions
• AWS CodeDeploy – to run deployments
• AWS Server Manager – to store and populate our .env file
• Bitbucket – to store our code repository and run pipelines
• Bash – to create our scripts

Follow us
Chapters
0:00 Introduction
1:35 Demo
3:49 Disclaimer
5:51 Step 1 [Bitbucket] Create Repository
6:43 Step 2 [Bitbucket] Push Laravel Project
8:28 Step 3 [Bitbucket] Create Pipeline
9:57 Step 4 [Bitbucket] Pipeline - Build Server
18:31 Step 5 [Bitbucket] Pipeline - Build Laravel Project
25:13 Step 6 [Bitbucket] Pipeline - Lint + Automated Testing
28:12 What is AWS IAM?
29:17 Step 7 [AWS IAM] Create User Group
30:32 Step 8 [AWS IAM] Create User - For Bitbucket
32:03 Step 9 [AWS IAM] Create Service Role - For EC2 Instance
33:25 Step 10 [AWS S3] Create S3 Bucket
35:08 Step 11 [AWS EC2] Create EC2 Instance
37:04 Step 12 [AWS RDS] Create RDS - MySQL Server
39:15 Step 13 [AWS EC2] Install CodeDeploy Agent
43:52 Step 14 [AWS CodeDeploy] Create Service Role
45:18 Step 15 [AWS CodeDeploy] Create Application
45:56 Step 16 [AWS CodeDeploy] Create Deployment Group
49:11 Step 17 [Bitbucket] Pipeline - Install AWS CLI
53:51 Step 18 [Bitbucket] Pipeline - Add Environment Vars
57:15 Step 19 [Bitbucket] Pipeline - Deploy to Production #1
1:20:27 Step 21 [AWS EC2] Configure Production Server
1:23:06 Step 22 [AWS EC2] Systems Manager
Рекомендации по теме
Комментарии
Автор

Great work here using AWS and Bitbucket. You should follow a standard naming convention; everything else looks fine to me. Maybe I could give it a try with a Drupal project instead of Laravel.

hosseindaliran
Автор

Great 👍 tutorial i learned a lot from this. Thx q very much

thearasnguon
Автор

Great tutorial! Would love to see a version with digitalocean :)

fabsync
Автор

Thanks for making this video you cleared many of my doubts regarding deploy scrips and adding .env

Definitely gonna use those scripts

blank
Автор

i would like to encrypt my php code before i deploy to GCR that uses the code in a pod. Is it posible to do that on the pipeline?

ISPever
Автор

sudo service codedeploy-agent status
Unit codedeploy-agent.service could not be found.


sudo service codedeploy-agent start
Failed to start codedeploy-agent.service: Unit codedeploy-agent.service not found.

bernardchisumo
Автор

Great great job Emad. 👏👏👏
Can you make a video for Bitbucket the same Laravel project with Docker AWS Deploy.
Dockering production deploy.
THX !!!!

botelladelasheras
Автор

Thank you for this useful video, but I want to understand why didn't deploy the pipeline with AWS CodePipeline instead of the bitbucket pipeline.

aliabdelrahman
Автор

Can you make a video for GitLab CI/CD with the same Laravel project

AdityaSingh-loue
Автор

I'm having trouble with laravel 9's vite and node version of php:8.0-fpm (node js = v12.22.12)... Is there any way I could work around this problem? They seem to recommend updating node to at least v16, but I'm not sure how to do it in this particular scenario... (Just starting out with docker/devops/CICD) Should I uninstall and reinstall node in a script? Though most users say this isn't a good approach...

daedalusrasmus
Автор

Awesome vid, very helpful and detailed. Is there a way to have the project in S3 for the CodeDeploy but not have history saved in S3 each time, maybe a lifecycle process to remove old commits? Maybe I'm asking the wrong question.

tomcr
Автор

first thank you for excellent tutorial and explanation.
I am doing a similar implementation but I require that the ec2 instance have 2 projects, one for the master branch and the other for testing with the development branch.
This is possible?
Thanks!

sbtiancz
Автор

The pipeline is triggered only when committing to master? Is it triggered when making commits to a branch? Is it triggered when merging a branch into master?

Nuketech
Автор

Hi can you tell me how can i run npm run dev for laravel mix on aws

adnankhan-wdbq
Автор

This is great tutorial, thank you.... AHT Cloud is there any tool similar to codedeploy that I can use in digital ocean

shedrack
Автор

What's the point of making bitbucket piplines for AWS? also there are tons of solutions including AWS CodePipeline.

nikawritescode
Автор

How to implement pipelines on Docker ?

nizzm
Автор

Please help make DevOps with java springboot more, thanks

phalpisey
Автор

the image quality of this video is extremely bad

Pb-pjft