Build CI CD Pipeline with AWS CodeDeploy and AWS CodePipeline to deploy Node.js app | Step By Step
HTML-код
- Опубликовано: 10 июл 2024
- If you wanna learn today how to automate application deployment into AWS EC2 using AWS CodeDeploy and AWS CodePipeline as soon as application new commit code is pushed to GitHub - This aws ci cd pipeline tutorial - Step by Step - is for you!
Topics and steps Discussed:
- How to launch AWS ec2 linux server and ssh to it
- How to deploy express.js app to ec2
- How to install AWS codeDeploy agent
- How to integrate AWS CodeDeploy with GitHub for continuous deployment (ci cd)
- How to integrate AWS CodePipeline with GitHub and AWS - CodeDeploy for continuous deployment(ci cd)
- Demo of AWS CodeDeploy and AWS CodePipeline working together
GitHub Sample Application source code and link for Steps
github.com/saasscaleup/nodejs...
Feel free to follow for more amazing aws tutorial
ruclips.net/channel/1UCKoR...
Want to support my channel? ☕️
www.buymeacoffee.com/scaleupsaas
======= Aws CI CD pipeline tutorial - Step By Step ======
[00:00] Intro - AWS CI CD Pipeline with github CodeDeploy & CodePipeline
[02:25] [Step 1]: Launch new EC2 Linux Instance
[05:34] [Step 2]: Deploy Node.js app manually
[12:23] [Step 3]: Install aws CodeDeploy agent
[14:00] [Step 4]: Create two new Roles with CodeDeploy permission
[16:26] [Step 5]: Setup Aws CodeDeploy
[23:45] [Step 6]: Setup Aws CodePipeline
[25:33] [Step 7]: CI CD Pipeline - Live Demo
============= AWS services ============
- AWS CodeDeploy
- AWS CodePipeline
- AWS EC2
- CI CD Pipeline
#cicd #codedeploy #codepipeline Наука
If you have questions about Build CI CD Pipeline with AWS CodeDeploy and AWS CodePipeline -> Feel Free to Book a Free Consultation Call calendly.com/scale-up-saas/free
this is the 1 of the best cloud trainers that I've come across in a while, i highly recommend this guy
Thanks for sharing! We are really appreciate it 🥰
By the way, if you want to acquire more cloud knowledge and get more cloud training ... We are launching our "AWS Master Course for Beginners" Very soon! and you have the option to get now pre-launch discount price!
check it here:
scaleupsaas.dev/aws-master-course-for-beginners/
Exactly what I was searching for! Thanks 🙏
You are welcome 🤗
Helped me so muchh!!! Thank you 🙏🏼
Happy to hear that 👍😀
Great.need more cicd realtime projects. thank you
Happy to hear that 😀. Going to release CI CD Pipeline with GitHub actions in the next few days …. So keep follow 👍
Awesome content!!
Happy to hear that :).
Thanks
Thanks for sharing. Appreciate.
Thanks for this tutorial. The issue I have is how do I add environment variables that I have in my .env to work when I deployed my app.
Thanks for sharing.
You have many options to work with environment variables. You can add it locally to the server with .env file or you can work with AWS secret manager or system manager parameters store. Let me know if you need more help with that. We will do another tutorial…
Thanks, do we have a tutorial on this?
@@surbhimidha-vz7dk yes. Soon.
You can also enroll to our AWS Master course. Where we sure so much more.
You can find details here: scaleupsaas.dev
great video! I'm having an issue though... the pm2 process is created by the ec2-user but when the script runs try to update with root, so its a different "pm2 instance" and doesnt really update the ec2-user process...
Thanks for sharing. You probably miss the steps where I’m saying that all Linux services need to be available to the ROOT user. Just read the GitHub readme instructions file again and you will know what to do. Keep me posted.
Please subscribe for more amazing content 😎
@@ScaleUpSaaSI think I followed everything, but nvm, I already solved it replacing the script line with this: "sudo -u ec2-user bash -c 'pm2 restart c-server' >> /home/ec2-user/app/deploy.log" and that did the trick. Anyways, your video was AWESOME and did 98% of the job, so THANKS THANKS THANKS
@@ScaleUpSaaS (I bought you 3 coffees... you deserved them, enjoy! and thank you agan!)
Thanks for the support 🙏🙏🙏
We really appreciate it ❤️
Will keep releasing more amazing tutorials.
Any tutorials requests you want us to do?
hi i have a unbuntu ec2 running and i have a basic express/node app ive edited the scrips files and the yml to reflect the name of my app and the directory is their anything else i need edit
Thanks for sharing. Seems like you have been to solve it in your second comment. We are happy for you 🥲
forgot to edit the deploy.yml file, when i create a user what all else needs to be done to get this to work thanks
Thanks for sharing. Appreciated 🙌
what do i need to edit in order to get this to work on my node.js express app, can I just copy over the scripts directory and or the appspect.yml file
You can just do all the rest of the things, but when it come to clone the node js project. Use your clone repository instead :)
Let us know if you need and help.
And follow for more amazing tutorials
the linux instance you launched is the production server am i correct?
Yes. Thanks for sharing!
amazing video! just one thing everything works excet the code deploy, I logged the error and I get :
"InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Missing credentials - please check if this instance was started with an IAM instance profile" I used the same exact roles as you did
Thanks for sharing. Did you use ubuntu or amazon linux os?
@@ScaleUpSaaS thanks for replying! Im using an ubuntu ec2
@@andrespatino1407 I just tried again an everything works for me. Please try again from the beginning. Follow every step. It's need to work for you too :)
i also got the same error. just restart the codedeploy agent.
@@bhagvathquotes5477 Thanks for sharing :)
how can i add .env variables to it?
You can use aws secrets and deployment hooks for that for example :)