Real Time DevOps Project | Use Terraform Jenkins AWS to deploy REST API
Ғылым және технология
▬▬▬▬▬▬ 🚀 Membership ▬▬▬▬▬▬
Join this channel to get access to perks:
/ @rahulwagh
▬▬▬▬▬▬ 🚀 Courses ▬▬▬▬▬▬
1. Terraform - • HashiCorp Terraform As...
2. Ansible - • Ansible for Beginners:...
3. Prometheus & Grafana - • Getting started with P...
4. Helm Chart - • Complete Helm Chart Tu...
5. Hashi Corp vault - • HashiCorp Vault Instal...
▬▬▬▬▬▬ 🚀 Timestamp ▬▬▬▬▬▬
0:00 Introduction
02:40 GitHub repo walkthrough
03:26 Jenkins Setup
07:15 Subnet Setup
16:45 Internet Gateway setup
18:47 Route Table setup
26:02 EC2 instance and Jenkins setup
47:52 Load balancer setup
52:34 Hosted zone setup
01:10:45 Deploy REST API Application
Welcome to this step-by-step tutorial on deploying a Python Flask application on AWS using Jenkins, Terraform, and MySQL RDS. In Part 1, we set up Jenkins on an EC2 instance in the eu-west-1 region, and in Part 2, we deployed our Flask app to eu-central-1 with a MySQL RDS database.
🔗 Project Overview:
1. Jenkins Setup: Learn how to automate your CI/CD pipeline by provisioning Jenkins on an EC2 instance in the eu-west-1 region using Terraform.
2. Flask App Deployment: Deploy a Python Flask application on EC2 instances in the eu-central-1 region, ensuring high availability with a load balancer.
3. Database Configuration: Utilize MySQL RDS for your app's data storage, providing a scalable and managed database solution.
🌐 Custom Domain and HTTPS:
Application URL: Visit our live Flask app at jhooq.org with a custom domain for a professional touch.
Jenkins Subdomain: Access Jenkins securely at jenkins.jhooq.org for continuous integration and deployment management.
🌍 AWS Services Used:
1.Regions: eu-west-1 (Jenkins) and eu-central-1 (Flask App and MySQL RDS)
2. Load Balancer: Achieve scalability and fault tolerance for your Flask app with an AWS Elastic Load Balancer.
3. Route 53 and ACM: Implement a custom domain using Route 53 and ensure secure communication with ACM for HTTPS.
🛠️ Code and Configuration:
Find all the Terraform scripts and configuration files on our GitHub repository
👉 GitHub Repository:
1. DevOps Python Flask - github.com/rahulwagh/devops-p...
2. Terraform Jenkins - github.com/rahulwagh/terrafor...
3. Python Flask REST API - github.com/rahulwagh/python-m...
🔧 Follow Along:
1. Set up Jenkins for CI/CD in eu-west-1.
2. Deploy Python Flask app with MySQL RDS on eu-central-1.
3.Configure custom domain and subdomain with Route 53 and ACM.
📚 Resources:
👍 Like, Share, Subscribe, and hit the Bell icon for more DevOps tutorials!
#DevOps #AWS #Terraform #Jenkins #Flask #MySQL #CI/CD
Пікірлер: 165
Hi Rahul. All your videos are awsome and easy to understand. Please keep creating on various topics….. AWS, Spring related..,etc
Excellent work 👏👏👏...This is a very helpful project to clear the Terraform concepts...Hoping many more videos like this ...Thank you 🙏🙏🙏
@RahulWagh
4 ай бұрын
More to come!
Hi Rahul, It's a beneficial video to clear the drought regarding the terraform module. Thanks again for your effort to make such kind of video.
@RahulWagh
6 ай бұрын
You are most welcome
Hey Rahul sir I recently found your Yt channel the teachings that you are providing are very helpful very grateful to you.
@RahulWagh
6 ай бұрын
So nice of you
More projects of any kind, please your explanations are clear as day, + kudos for having all the code in the github Terraform, ansible, k8s, aws, helm usage is appreciated the more real-life scenarios are covered the better thank you for your effort, it is much appreciated also cool quality sound and montage, I'm feeling like I'm in a classroom with you, also helps to comprehend
@RahulWagh
4 ай бұрын
So glad to hear that you are liking the quality. There will more you will see in upcoming days similar projects but keeping the things as simple as possible
Thanks Rahul for sharing such a nice explanation. This really helped a lot for learning to setup a website from scratch.
@RahulWagh
6 ай бұрын
Glad it was helpful!
I really appreciated the clear and concise explanation provided during the demo. Thank you for your valuable contribution to the Tech community and looking forward to see more such informative contents from you. Keep Inspiring.
@RahulWagh
2 ай бұрын
Glad you enjoyed it!
Hello Rahul, you have explained the concept beautifully. thanks and keep it up the good work.
@RahulWagh
4 ай бұрын
So nice of you
Excellent presentation, valuable content, I've checked randomly as I was looking for the same to revise my learnings with project hands-on.
@RahulWagh
6 ай бұрын
Glad it was helpful!
@chowdhurypoly22
2 ай бұрын
@@RahulWagh I want to learn DevOps will you teach me
Excellent content just find randomly, keep up your great work.
@RahulWagh
6 ай бұрын
Much appreciated!
Awesome and very important video. Thank you Sir for this video.
@RahulWagh
6 ай бұрын
Most welcome
Always waiting for your new content upon AWS. It's a fabulous Project upon AWS, tf, jenkins. Waiting for EKS + ClodFormation, production issues related in-depth explanation from you, please!...Thank you
@RahulWagh
6 ай бұрын
Much appreciated! And more to come
Bravo Rahul thank you!
@RahulWagh
3 ай бұрын
You are welcome
Thankyou for your efforts it's helping Manny more..
@RahulWagh
5 ай бұрын
So nice of you
Hi Rahul, your explanation method is awesome...in detail, you always try to cover all points including small points....which is useful for new DevOps...
@RahulWagh
6 ай бұрын
Thanks a ton
Excellent Project ..Thank u So Much
@RahulWagh
4 ай бұрын
You are most welcome
Superb work!!!.........Appreciate the effort sir
@RahulWagh
3 ай бұрын
Thanks a ton
very informative , thanks for the such valuable content.
@RahulWagh
6 ай бұрын
Glad you liked it!
Sir, thank you for your valuable content. Could you consider creating a video on deploying a 3-tier microservices architecture using Kubernetes with Terraform? It would be great for those with some DevOps or Kubernetes background looking for more hands-on experience. I'm fine with it even if there's a charge for this in-depth material.
I really inspired by your knowledge ❤ Your explain very well ..!!
@RahulWagh
5 ай бұрын
Glad to hear that
Loving your content The way you explain is great and waiting for more such content😊
@RahulWagh
3 ай бұрын
More to come!
Thank you Rahul
@RahulWagh
3 ай бұрын
You are welcome
Exlent explanation....❤🎉
@RahulWagh
6 ай бұрын
You are welcome
Hi Rahul, very nice project, I enjoy all your handson a lot and your documentation quality is excellent,I never miss your video. Can you create a video on handling logs from kubernetes cluster via ELK ?
@RahulWagh
6 ай бұрын
Hi Sachin glad you enjoyed the sessions, i will add it to my list hopefully you will see in future on the topic of ELK and k8s cluster
Really very good content and enjoyed it how you segregated all tf portion
@RahulWagh
6 ай бұрын
Glad you enjoyed
AWesome explanation 😄
@RahulWagh
4 ай бұрын
Glad you liked it
Hi Rahul, I have statred watching you. Your content is very useful in the current market and easy to understand. If you can Create content on AI and Ml also. Thanks for your effort.
Waiting for your lectures 😊
@RahulWagh
6 ай бұрын
Today there is one long session on real time devops project including terraform, jenkins, ec2 deployment. Hope you will learn something new there
wow, nice thank you so much for sharing , liked and subscribed
@RahulWagh
6 ай бұрын
Thanks for visiting
Hi Rahul,It is really helpful for me. I request you to create one more project like this with Kubernetes.
@RahulWagh
5 ай бұрын
Noted
Thank you so much rahul and kindly do one project on deploying application into eks,aks or gke with terraform from scratch
Thank you Rahul Sir, you videos are just Amazing, i also found one more channel like your's who is providing amazing video , rajesh-devops channel
@RahulWagh
6 ай бұрын
Ohh glad to hear that I hope you liked the other sessions as well
The same architecture can we do it in EKS ? and add data source Prometheus and Grafana for monitoring .Do we need to do any other changes in the complete setup to implement this w.r.t EKS and monitoring and Ansible for deployment
Hi Rahul, your videos are providing a lot of value for my learning, please can you create a video on *AWS-API-Gateway* as part of your AWS Series
@RahulWagh
4 ай бұрын
It is in the list and you will see in upcoming weeks
@kiranbakale8207
4 ай бұрын
@@RahulWagh thank you for your reply
Nice session
@RahulWagh
6 ай бұрын
Glad you liked it😊
It's really informative! Can you please upload a whole terraform course?
@RahulWagh
5 ай бұрын
It is already there - kzread.info/dash/bejne/gXyuvJmEpczVfaQ.html
excellent content
@RahulWagh
5 ай бұрын
Glad you enjoyed it
Excellent
@RahulWagh
5 ай бұрын
Thank you! Cheers!
Rahul sir, awesome and helpful content. Your explanation and outstanding as well. Just one constructive criticism: Sometimes smile a bit or bring a little grin. You look very very serious all the time.
@RahulWagh
2 ай бұрын
Hahaha- yeah it is bit hard to change the tone once you start explaining the stuff
Tq so much bro
@RahulWagh
6 ай бұрын
Welcome
Thankyou sir
@RahulWagh
6 ай бұрын
Welcome
Rahul your tf, k8, ansible , prometheus, vedios giving me best knowledge , requesting do vedio on like compplete project which is complex project like - from source code -to- deploying, and all these are done prom pipeline only like crating , deployoing in k8 .. and use services like r53, HA, load balancer, multi region setup, edge nodes, proxy and reverse proxy set up, master slave configuratin for jenkins and k8 , data base .. like this we are expecting complex project from you, any way your content is really appreciate, till now i see three persons youtube giving good content ( you, piyush goyal, deekshit, mr devops)
@RahulWagh
6 ай бұрын
So glad to know that you really liked the content. I try to put my best but surely in upcoming weeks and months you will see more real time projects
@ggggggg1177
6 ай бұрын
thank you, will wait for that vedio project
Great
@RahulWagh
3 ай бұрын
You are welcome
One suggestion , Please make" is_external = false" into "is_internal = true" to avoid any confusions :)
Heavy ⭐⭐⭐⭐⭐
@RahulWagh
3 ай бұрын
you are welcome
rahul, how do you upgrade k8 version like from 1.26 to 1.27 in organization level, how i can say in interview?
@rahul wagh inside diagram you have connected IGW with subnet which is wrong
@RahulWagh
6 күн бұрын
That’s correct it should have been on vpc level it was a miss from me
Thank you so much Rahul for this end-end project deployment on AWS.I would like to know that the services used in this project can be created on free tier account or is it chargeble?
@RahulWagh
Ай бұрын
Some of them are chargeable it is not entirely free
Can you also show the private authentication with github repo and jenkins .
It has been a crystal clear explanation :) But I got a doubt Thank you very much. I have subscribed to your channel and looking forward to learning more from you :) Since you automated all the works from infra creation, rds to python application deployment, How did you get rds host name inside the python application to connect to rds instance? hostname we get after deploying rds instance right ? If I am not wrong. Did I miss anything to catch ? 🤔
@RahulWagh
4 ай бұрын
You didn’t miss anything. I copied the host name which could’ve been automated with terraform output variable. But still there are a lot of things which still needs to be automated in this project which are hard to cover 😊
Hi Rahul, Check out 28:41 You are allowing all ipv4 to access port 22. Don't you think it's a security issue to 22 open for all traffic? Regards, Manju
@RahulWagh
6 ай бұрын
Thats correct ideally i should not allow or put 0.0.0.0 on port 22 it will be open to everyone, ideally the port 22 should be controlled and should only be accessed the within the company network.
rahul, in real time how we get AMI , is it custom AMI or general AMI that provided by aws?
@RahulWagh
6 ай бұрын
In real time you can implement some filter to fetch the AMI by searching it. But for this devops project i am using the existing AMI provided by the AWS
@ggggggg1177
6 ай бұрын
in onrganizatin , are we use custom AMI or ami that provide by aws?@@RahulWagh
What might be the appropriate cost for infra on AWS in terms of rupees
@RahulWagh
6 ай бұрын
It can vary a lot based on ec2 instances size and other services. I would say it can cost somewhere 10-15 usd a day which equates to roughly 850-1300 INR but still I can’t give you the exact estimates
Gr8
to deploy a api what should we need to use lamda or ec2??
@RahulWagh
6 ай бұрын
Lambda should be my preferred choice but you need to set up API gateway. But there are multiple options you have to implement the APIs on AWS cloud and it totally depends on the your environment and what your company is using
i have one scenario at Indian timing after 09:30 p.m need to stopped all running instance , early morning after 07:30 a.m all stoped instance need to run so how we can achieve in terraform , we don't want to create any schedular.Kindly help us
@anuragrai8292
2 ай бұрын
Implement scheduler using lambda
Apart from ssh Keygen & bucket name anything else we have to do manually?
@RahulWagh
6 ай бұрын
No only those two are manual rest is infra as a code
@RahulWagh
6 ай бұрын
No only those two are manual rest is infra as a code
@RahulWagh
6 ай бұрын
No only those two are manual rest is infra as a code
Bro I have dodut where and when to use functions in terraform such as length element count prefix ..etc . can you help me with that please
Hi Rahul Wagh, Could you upload a video about Spot Instance and Spot fleet in AWS Please. No videos available for spot instance in youtube.
rahul, how i get cert ficate managere, i have .online domain , is it possible for this type of domain also to get certificate from aws? i tried it but did not get it from aws.
@RahulWagh
6 ай бұрын
I think it should be possible with .online damain. You might be missing something with the configuration
If possible can you please make a full video on EKS?
@RahulWagh
6 ай бұрын
Thanks for your comment surely I will add it into my list
it was really great course .Sir may i know do u provide and devops course with aws then i will be enrolled.i love it this content and i really want to have one course like this. thank u sir
@RahulWagh
5 ай бұрын
Hi you can join my you tube premium membership for more in depth sessions which I am planning on upcoming weeks -
@RahulWagh
5 ай бұрын
Here is link to join - kzread.info/dron/7p4oXcPbgk_yTSHK7QlkSg.htmljoin
Hi sir, facing issues while implementing the directory structure. When i try to create a module block in root/main.tf it doesn't detect variables declared in ./networking/main.tf The /networking module is having no errors in itself. Directory structure: | |-networking -main.tf (vpc config) -variables.tf | |-main.tf (calling module) |-terraform.tfvars (variable values)
bro can i suggest one thing make a project on whatever small mern app it is take it make a docker image , and now use the same pipleine(terraform,jenkins,EC2) that you used in this above video and deploy it will surely blow up as lots of peoples are looking for a reusable ci/cd pipeline for their MERN apps as the Market is saturated for these MERN engineers plus it will be good for me too😅 ,plus just keep a little test case to show how the test case passes resulting to build in jenkins.Can you do this pleaseeeeeeeeee.
@RahulWagh
6 ай бұрын
Surely I will add it to my list 😊 for the MERN stack
Hi Rahul, so in real time the set up would be similar right??
@RahulWagh
2 ай бұрын
Yes exactly
@raviteja5112
2 ай бұрын
@@RahulWagh can i use this in my resume.. as a task ?
hi @rahul, I would like to join your youtube channel, may I know the difference between, beginner, intermediate and pro member ship
Hello Rahul, Do you have any video to create vpc with github, jenkins and terraform. I am looking for something which can teach us from scratch. Appreciated if you can help. Thank you
@RahulWagh
4 ай бұрын
I have a terraform aws series but that is only for my community members where you will see terraform and vpc creation. If interested click on the join button on any of my video
@user-yo3ut5st2p
4 ай бұрын
Thank you for your help, but may be letter. Right now my mentor wants me to focus on Githib, Jenkins with Terraform. Please let me know if you planning to make a video on this project. Thank you. @@RahulWagh
Hi Rahul do you conduct courses
@RahulWagh
6 ай бұрын
Hi Dhirendra unfortunately at the moment no I am not conducting any courses
how can you manage work and making video. much appreciated
@RahulWagh
6 ай бұрын
Hi Satyam glad you asked the question. Sometimes it is really hard to take the time for preparing the video. But over the time you improve. For me it took around 3 years to reach here but i must say you have to be consistent with your work.
@satyam70
6 ай бұрын
@@RahulWagh Yes you are right, i also teach AWS and DevOps, but making videos for KZread is not an easy task. i have only 9 video up
@RahulWagh
6 ай бұрын
Keep it up hopefully you will be able to upload more
Hi sir do you have live session? I want to join the session
@RahulWagh
5 ай бұрын
Not at the moment but you can join my KZread membership for more premium content only for my KZread member community
Hi Rahul, I follow your videos and they are amazing. I am having issues for the first time when following your video. I keep on getting error when pass the command Terraform init. I tried multiple things to debug this. My last resort is to leave a comment here. I am having issues in the first step and I cant go forward Error: Failed to get existing workspaces: Unable to list objects in S3 bucket "dev-proj-1-jenkins-remote-state-bucket-danyal" with prefix "env:/": operation error S3: ListObjectsV2, https response error StatusCode: 301, RequestID: **, HostID: ***, requested bucket from "eu-west-1", actual location "us-east-1"
Think about this tutorial 🙏, can I do that with a free aws account ?
@RahulWagh
4 ай бұрын
No you have to pay for the charges all services are not free
hello sir how to be a member to view your videos please
@RahulWagh
6 ай бұрын
You can join from here - kzread.info/dron/7p4oXcPbgk_yTSHK7QlkSg.htmljoin
I want to learn DevOps will you teach
@RahulWagh
2 ай бұрын
It’s hard for me to 1-to-1 teaching because of my time constraints
@chowdhurypoly22
2 ай бұрын
@@RahulWagh we are two if you help us then we will be grateful to you and we will pay
any real time devsecops project, pls give a link
@RahulWagh
3 ай бұрын
This is the one I have at the moment. But you can refer to Route53 and ACM video those are really good to go through-
where are you from sir
@RahulWagh
5 ай бұрын
I live in Sweden
Sir, ssans ly ly k bolo ek saans me pura bol k koi k bhi dimag me pura nhi chale jaye ga.
@RahulWagh
4 ай бұрын
Happy to listen to your suggestions if you could be more elaborative on your experience while learning from the channle
Sir project name and decrimination
@RahulWagh
3 ай бұрын
Sorry I couldn’t get your comment
Hlo sir most of time you place a your face in 30℅ of the screen area and we are not interested to see your face as we want to concentrate on the code. So pls make a small circle on one corner and put you live face there because it taking out our attention
@RahulWagh
2 ай бұрын
Thanks for the feedback
great video very helpful
@RahulWagh
7 күн бұрын
You are welcome
Guys, please subscribe this channel. he is providing real project scenario.
@RahulWagh
3 ай бұрын
Glad to now you are enjoying the content
Great video One question if you are creating ton of ec3 instances how can be automated ste step of private and public key?
@RahulWagh
6 ай бұрын
Yes you can automate and even parameterized the ssh key generation for multiple ec2 instances
@donandreas0209
6 ай бұрын
@@RahulWagh would be great viedeo this automation, example olso for just 2 vm and how store the key to some sure and compliant keyvault Thank
getting this error . [31m│[0m [0m[1m[31mError: [0m[0m[1mFailed to get existing workspaces: Unable to list objects in S3 bucket "dev-proj-1-remote-state-bucket-123456": operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: K9YQDQ7Q8BHCYXSP, HostID: JYiDGOhtsBr3GimrpPgExYZyn4/nRNd23PAWx/TlmNXijDshN8IyqVgJjOssxiYJ9sFpEslY5ef3y+9A8RsNag==, api error AccessDenied: Access Denied[0m [31m│[0m [0m