Это видео недоступно.
Сожалеем об этом.
Build CI CD Pipeline with GitHub Actions and AWS CodeDeploy to deploy Node.js app | Zero to Hero
HTML-код
- Опубликовано: 31 июл 2024
- If you wanna learn today how to automate application deployment into AWS EC2 using AWS CodeDeploy and GitHub Actions as soon as application new commit code is pushed to GitHub - This aws ci cd pipeline tutorial with github actions - 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 set up github actions
- Demo of AWS CodeDeploy and Github actions 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 actions & aws CodeDeploy
[03:06] [Step 1]: Launch new EC2 Linux Instance
[06:17] [Step 2]: Deploy Node.js app manually
[13:03] [Step 3]: Install aws CodeDeploy agent
[14:42] [Step 4]: Create two new Roles with CodeDeploy permission
[17:09] [Step 5]: Setup Aws CodeDeploy
[23:51] [Step 6]: Setup GitHub Actions For CI / CD Pipeline + LIVE DEMO!
============= AWS services ============
- AWS CodeDeploy
- Github Actions
- AWS EC2
- CI CD Pipeline
#cicd #codedeploy #githubactions
Your AWS DREAM Course coming Live SOON.... 🚀☁
"Mastering AWS Cloud for Beginner - Learn AWS cloud by Building & Deploying scalable web application using 3 different aws architectures"
Now you can:
Pre-Register to the course and get 90% DISCOUNT
or
Get notification once the course is LIVE (Full Price)
Here is everything you need to know:
scaleupsaas.dev/aws-master-course-for-beginners/
One of the best tutorial about ci cd pipeline with github actions. THANKS 🙏
Happy to hear that ❤️😃
One of the best tutorials! So helpful. Thank you!!
Happy to hear that ❤️😃
If you have questions about Build CI CD Pipeline with GitHub Actions and AWS -> Feel Free to Book a Free Consultation Call calendly.com/scale-up-saas/free
OMG, thank you very much, this is absolutely gold.
Thanks for sharing. Appreciate.
this has really helped me, thank you so much 😊
Thanks for sharing. Appreciate.
love it! thanks for sharing
You are welcome :)
thanks for this beautiful tutorial, my friend
Happy you love it ❤️. Let me know if you have any questions and feel free to follow for more amazing tutorial about AWS and full stack web development
תודה!
Thanks for the support 🙏🙏😘😘
מלך!
Thanks. Appreciate 🤘
some tutorials and draining my hope cuz it does not work for some days and in many ways I did but finally i found it, ohh dude thanks sooo much ☺☺.. i subscrib u right now
Thanks for sharing. Appreciate ❤️
Greate, thanks
🙂
Happy it helped you!
Thank you
Thanks for your comment. Please subscribe for more amazing tutorials coming soon
Hard coding the aws security credentials in github is it a good practice?
Do we have any alternative way to configure
It’s a good practice. You can limit the API permission to specific things and that it will work only from a specific IP address. You can also use aws secret. I will upload video soon.
What adjustments do I have to do in order to make it work on an EC2 Ubuntu instance?
Thanks for sharing.
I guess changing the ssh user and few more steps…
Try to follow the instructions. Maybe it will work with ubuntu too
Thanks man. I watched a different tutorial you made for Github actions and it worked ruclips.net/video/EUIU2Gn0fXQ/видео.html @@ScaleUpSaaS
Thank you for laying out all steps in full detail. If I don't want to type commands one by one and instead am interested in writing a User Data shell script using Steps 1, 2, and 3 during the instance launch, how can I go about it?
I think I’m explaining how to do it. You just need to make sure you are a root user.
Feel free to send a email or void a zoom call
Your explanation of building a CI-CD pipeline is excellent. Sorry if I didn't make myself clear. I went through all the steps and created a pipeline to my repo using GitHub Actions. Thanks to you!
But every time I launch a new server instance, I must manually type in all the commands. There is a User Data section while we launch an EC2 instance. How can we build a User Data shell script using the commands you have used to construct the CI-CD pipeline? Along with the User Data script, we may need to modify the appspec.yml scripts to use them each time we launch a new server instance. This will reduce the manual work required during each new instance launch. Would appreciate it if you could create another video on it. Thanks!
Hey 👋. It’s very simple. When you. Tears the server you can paste all the commands you want the server to do for you in the “user_data” section.
If you didn’t find it. Book a free consultation call with me and I will show you :)
can the Github Token be added directly to github actions ? or to the codeDeploy agent?
Hello and thanks for sharing your question. I think only with cloud formation. IAC. but it never recommended to inject secrets and tokens directly. only via masking services like AWS secret, etc...
Hope it's answering your question
i already add secret key for postgres connection in github, but it didnt work in ec2. how to solve it? thanks in advance
Does your Postgres database is working on the same EC2 instance or you have RDS service for that?
@@ScaleUpSaaS my database also in aws. but i solved it. i put .env inside ec2 from ssh and it works. my problem now is change the port to 80 use nginx but the nginx doesnt work when i run the IP without port but is ssh consol the nginx is running so the pm2 aswell, cuz ill make the url name in cloudflare
ohh dude, i did it. i just forget add HTTP in security group. btw thanks sooo much
You got this mate. You are very skilled. 🦾
bro make tutorial ci/cd react app just like this
Thanks for sharing. Appreciate.
@@ScaleUpSaaS i mean u make the tutorial like this but for react js app
Got it. Will add it to my pipeline 😊
what if i have a private github repo?
Thanks for your questions. It's suppose to work too with private Github repo. You can book a consultation call for further assistant and we will be happy to help you!
CodeDeploy agent was not able to receive the lifecycle event. Check the CodeDeploy agent logs on your host and make sure the agent is running and can connect to the CodeDeploy server.
i got this error while ApplicationStop in deployment
please help me
Sorry to hear that it didn't work for you. I will be happy to help you and guide until you we will make it work!. Please send us an email to saasscaleup@gmail.com
had same problem, most likely it got fixed already but if anyone has occurred with it i did sudo service codedeploy-agent stop and then start and do the deployment again, it helped me
@@emsems1910 Thanks for sharing!
@@ScaleUpSaaS no problem
dude, im back again. all works fine but next day i push on github and the github action works fine but in codedeploy its failed and that say "CodeDeploy agent was not able to receive the lifecycle event.", its in 1st event "applicationStrop". i think i have problem with the appspec is it because we don't give the applicationStop ?
Thanks for sharing. Please subscribe for more amazing tutorials.
Regarding your concern please book a consultation call with me over zoom.
I checked again and again. Everything works fine. Please follow the tutorial again.
@@ScaleUpSaaS i did, it was worked fine but after some new deployment it stop working and stack in applicarionStop event
@@ScaleUpSaaS i would like to
Please send me an email.
Getting on ApplicationStart Process or Namespace nodejs not found
application_start.sh
#!/bin/bash
echo 'run application_start.sh: ' >> /home/ubuntu/nodejs/deploy.log
echo 'pm2 restart nodejs' >> /home/ubuntu/nodejs/deploy.log
pm2 restart nodejs >> /home/ubuntu/nodejs/deploy.log
Did you create the nodejs directory?
@@ScaleUpSaaS it's being created on application_install.sh yes?
@@tomy7424 Nope. You need to create it