DevOps Crash Course (Docker, Terraform, and Github Actions)
HTML-код
- Опубликовано: 30 июл 2024
- In this DevOps and Cloud Infrastructure tutorial, you will learn what DevOps is and how to apply some of the most important concepts including:
- Docker containers
- Infrastructure as Code
- Continuous Integration and Continuous Deployment
DevOps Directive RUclips Channel:
/ devopsdirective
Link to application: storybooks.devopsdirective.com
GitHub Repos:
- github.com/bradtraversy/story... (Original)
- github.com/sidpalas/storybooks (Version from video)
NOTE:
After filming I discovered that the set-env command that I used within the Github Action was deprecated due to a security vulnerability (github.blog/changelog/2020-10.... I replaced the usage with the updated method described here (docs.github.com/en/free-pro-t...)
TimeStamps:
0:00 - Intro
1:18 - Project Overview
2:21 - Application Architecture
4:14 - Part 1: Getting the initial project running
7:51 - Part 2: Dockerize the application
9:55 - Docker-compose
11:51 - Aside: Makefiles!
12:31 - Part 3: Terraform (Infrastructure as Code)
17:16 - Setting up Terraform providers
22:21 - GCP Resources
25:55 - Terraform variables
28:23 - Atlas MongoDB Resources
31:42 - Cloudflare Resources
34:33 - Aside: Secrets/credential management
37:21 - Part 4: Deploying Manually
44:25 - Part 5: CI/CD with Github Actions
50:14 - Testing the Github action
51:25 - Separate staging and production
57:22 - Outro Наука
I actually learned a lot myself from this video :) Be sure to checkout the DevOps Directive channel for more DevOps content - ruclips.net/channel/UC4MdpjzjPuop_qWNAvR23JA
Thanks, Brad -- It was fun to build on the application you created and apply these DevOps techniques!
In case people are wondering, the application had no issue with the traffic 😎... Here is a link to the live stream: ruclips.net/video/iS0HkZB3PIU/видео.html
ruclips.net/video/6Jp0pEU5fn8/видео.html
ruclips.net/video/QnAu4Yyg4SA/видео.html
How can someone submit a video to Traversy Media?
HUG OF DEATH xD
@@DevOpsDirective first thank you for this wonderful explained devops real world app walkthrough video. But my question here is how to implement this without having a custom domain ?
I am just loving this content Brad! As someone who recently started getting into software and DevOps during the lockdowns, I really appreciate the videos you've been putting out !! :)
Perfect Pace, explanation and starting point -- what a great focus on the essence of DevOPS and opening up the various resources (Google Cloud, Dockerizing, Git Actions) - Crash Course For Sure!
I haven't even started and I have a good feeling about this... wooohoo!!!
Just was researching into this topic. Glad a video came out on Traversy!
The best single explanation on a fully working DevOps setup with the most fundamental, modern and used tools out there. I don't watch stuff 2+min but this was THE exception. Congrats!
Thanks, Marcos! 🎉
Good afternoon, just wanted to say thank you for the free tutorials you provided. It helped me and others to actually understand something hard for us to understand, especially since some of us are beginners. Some parts of the videos have flaws, it could be just me, but we appreciate the effort of teaching us. God bless you.
Wow I was stuck on the question: "How does docker and therefore the application know when to pick up changes on PR merge" for several days! Thank you so much!
This is so epic !! I finished building the Storybooks project about 2 weeks back !!! Thank you so much Brad and Sid !!
Awesome, @Ankit! I thought it would be cool to work with this project specifically because many of Brad's viewers will already be familiar with it!
This is an amazing crash tutorial, thanks for this information!
Way over my head. I have so much yet to learn. Thanks for posting.
Thanks Sid (and Brad). Great content. Although I couldn't keep up with your pace as I'm new to this topic, I watched this video fully and I think I got to learn a bit about how DevOps sees the task differently. I've subscribed to your channel, Sid. Looking forward to some beginner level contents.
Thanks @Benjamin -- Welcome to the team! :)
Simply insane tutorial... Great work. Thank you
Was looking for that for a long time. Thanks.
Brad is the first big youtube creator to start making DevOps content and he deserves yet again, a lot of respect for that.
The guy is smart and understand where IT's all going :)
Ooooooh yeah baby Brad bringing the goods great way to start my Thursday thank you sir 🤝
the timing could not be more perfect :) thx for all the free knowledge truly amazing the time we live in!
Thanks @Alejo!
Thanks Sid! Terraform is going to save me a ton of time. Also subscribed for more quality DevOps vids like this
Awesome, thanks @DanFlakes!
Nasty tutorial scrambled my brain. This is not about DevOps at all but about how much the presenter know about coding software,
Hey Brad. I want to personally thank you. I've recently landed a job where I'm required to do devops. I have no experience whatsoever in this and it's my first job. Everything is confusing and I'm scared and confused. My friend suggested this video 30 mins after it was uploaded. I hope this video will help me. But even if it doesn't, I want to thank you so much.
congrats man
Good luck -- you got this! 💪
Thank you good video. I would love to see a deeper look at ssl/tls.
what can I say? Super great! Probably the best devops video I have seen
awesome !! content just what i was looking for , thanks
thank you brad, That was an amazing tutorial for Devops!
please can you make Devops video using AWS cloud. Docker, Terraform, and Github Actions with auto scaling
from AWS and please use the database - ( AWS RDS Postgresql).
A Godsend... omg the timing of this is bruhhhhh.... Thank you
Thank you for this awesome video!
man, this is awesome!! Thanks!
That was an amazing tutorial! A lot of stuff that I didn't know and a lot of really useful suggestions.
that makefile thing is pretty cool, gonna use it all the time from now on
👍 -- Makefiles are great!
Thank you for such an amazing tutorial 🙌
@Traversy media thanks for this soo much we need more
More DevOps Brad please! ❤
I concur! 😎
Great Content as always, thanks you so much for sharing it!
You're welcome :) thanks for watching
you are such a nice person. May you live long!
Thank you. This video was very useful for me!
I needed this like a year ago. Great thanks!
Thanks @Максим Семений!
Nice!
Finally DevOps I can understand the lectures lol
Personally I'm very interested on this subject... Thanks Brad! Subscribed to Devops Directive 👍
Thanks Adriano, welcome to the team! 😄
I have learned what I have to learn! Greeaaaat Video. Awesome.
From "unknown unknown" --> "known unknown" --> "known"! 🎉
Best DevOps video ever! Thank you very much for this
Thanks, @Damilare! 🙏
Great! This helps me a lot!
Great content. I was impressed with the pace and detail.
Thanks @Ted!
Great DevOps content. Thanks!
You are welcome @Cuong!
I liked this because its a legit Crash Course, not an hour long 3-in-1 hello world.
May of us dont want yet another hello world doc in video format.
I didnt watch the whole thing, only the first 25mins, but I have my feet wet, if I ever need this (I'm a datascientist; I deploy to Splunk) I have this video and some of the vocab.
This video is excellentfor those of us who are 'working professionals'. I can imagine myself following this watch this on company time, with docs on my 2nd monitor
Nice work 👏 and thank you 🙏
Hi brad as I Iam one of the first to comment there is a good chance that you will see this comment Just wanted to say
THANK YOU
You're very welcome
Cool stuff. I've only really messed with VMs at work in the past. I'm currently learning Docker but not really trying to be a Dev Ops guy since I develop software
Even if you don't use these techniques in your day-to-day, I think learning about them can be really beneficial when building (and especially designing the architecture for) applications!
@@DevOpsDirective For sure. Definitely doesn't hurt to be more knowledgeable either.
Good stuff, Thank you
I could not like this video more! Amazing
Thanks @Jon!
Excellent Training Bro
Wow, what a great video!
Thanks @Koodauskanava! 🙏
Great video, thanks
Thanks, keep it going, especially in GCP :D
Will do! 😎
Great work thank you very much
this was amazing.
Thanks @Azul!
Just right on time again
I am getting Error: Failed to query available provider packages
Did you intend to use mongodb/mongodbatlass?
Next guest the new boston
He is coming back tomorrow
Really!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Yeah I saw that. I'll try :)
@@TraversyMedia Would be glad to have him come back...
Is this bait or for real?
where did you see that he is coming back tomorrow?
amazing, good job...
SO TRUE (re:makefile) “me... doing future me a favor... so that when I come back to this project in 6 months and have no idea what anything is doing...” 🤣 Totally can relate!
Always need to be looking out for future me! 😂
Yay, very-very nice!
The king is working hard for us.
Vote for Traversy Media to win Nevada
Please do more devops tutorial♥️
I did everything right up to 7:46. Then I got this error on my browser:
This site can’t be reached. localhost refused to connect.
Did some googling and searched on StackOverflow, but I still cannot resolve this problem
I kept wondering, what the hack is this DevOps all about. Now I really got it. Thanks.
🎉🎉🎉
Much needed
Beautiful.
Awesome!
Thanks for sharing, very Helpful video. I need to build a reactjs application from scratch with help of AWS S3, EC2 and Terraform. It should sync and deploy using Github actions. Can you pls guide. Any help will be appreciated. :)
Hi Brad any chance that we have spring and spring boot project or course . ❤️
Its not necessary to retag with $(LOCAL_TAG) again in push right?
At least I was able to follow (almost) the first ten minutes or so because I 'm kinda familiar with docker...
Why is downloading the database on a docker container a better option? 4:56
Very cool
Hi there, Im new into programming and planning on getting into a code bootcamp this January. Im just curious, will this be the kind of thing that I will be learning? If not, what level of programming is this whole DevOps thing is? It seems complex but im very intrigued by it.
You probably won't get into many DevOps topics during a bootcamp. While the topics are not necessarily more "advanced" than development, it does help immensely to have a baseline understanding of application development to provide context for the DevOps practices.
That being said, I think it is beneficial to add little bits of DevOps to any project. For example, Dockerizing your application so it is easier to ensure a consistent development environment across a team entire team pays off by ensuring people don't end up with slightly different configurations that cause problems.
@@DevOpsDirective Hey man, thanks a lot for the reply. Since there is minimal coverage of this topic during the bootcamp, do you have any tips on where I can learn the basics of it? Other than this video of course.
@@timhbourne Rather than focusing on DevOps specifically, I often recommend people focus on the foundational skills that make up DevOps. For example, learning about Linux and how to administer a system running Linux is super valuable when starting to apply DevOps practices. The same goes for networking.
If you are looking for more RUclips resources, in this video I recommend 5 channels that teach these types of skills: ruclips.net/video/7NU-DjMYeyk/видео.html
This is great! Though anyone mind pointing me to where I could learn more about the \" thing he mentioned on 42:40
My understanding was that is just turns off the variable expansion nature of double quotes.
Thanks again guys and happy learning!
Good question, you are right about that. In this particular case it was tricky because the string was going from:
CMD Environment variable --> One make target --> Another make target --> Executing w/in the docker run command in bash on the VM
Also, to add even more complexity, Make and bash have slightly different string expansion logic, so when things are passing through so many layers like that it can get confusing. To be honest, I even lost track of what was happening at each of those layers in this case but after a few tries got it to work by escaping the double quotes as shown.
Brutal!
I never clicked so hard in the notification!
Thank you
Brad you should also bring DevmentorLive to your channel . he has a small channel but really great teacher
I know who he is. I have talked with him. We will likely be doing something in the future :)
hey, I am using windows 10 and cannot run the Makefile. what is the alternative to Makefile to run on cross-platform?
You could adapt the commands into something like a powershell script, or you could look into windows subsystem for Linux (docs.microsoft.com/en-us/windows/wsl/install-win10)
Its a good tutorial, but tools like the Docker, at 4:56, he should explain at least the basics on how to use/install docker, and other tools used in this vídeo, so everybody that had never used them before, can follow along with this tutorial without getting stuck, but anyway thankx for the great tutorial Brad and DevOps Directive 😉👍
in 27:00, after I run make terrafom-plan, is this errors? I am being asked of the var-app-name, var-gcp-proj-id etc etc. what is seem to be problem?
You need to create a tfvars file or pass those variables via the command line when you run the terraform-plan command
@@DevOpsDirective Thanks for reply. I have already created tfvars files as I religiously followed your videos. I have already prepare all files you've created in your video, and yet, I am still getting those command line input.
Please advice how to complete your project, this would be me huge leap for my career, if i can setup this project.
Thank you!
Please try to bring bucky as the next guest creator,as he is also returning back!
Great video and a very nice beard. Thank you!
Thanks! 🎅
cool. However Terraform, MongoDB and DNS are create manually at config time. Thus what you put in the pipeline is the app part only. Right?
In the video I ran the terraform apply command manually. This set up the Atlas instance, DNS etc...
If I was creating a setup like this for a company, the terraform commands would be run in an automated pipeline as well.
Guys get Ready new Boston may be joining us soon!!!!!!!!!!!!!!!!!!!!!
17:54 About pinning the version. Wouldn't you want to know about this breaking change? I'd rather have it break on me and make an active decision to ignore the problem (by pinning it) at that point than to find out in 2 years from now that it's going to take me a lot of effort to catch up with all the changes that happened in the meantime.
In my opinion, it is better to pin the versions so that you can make an active choice about when to do the upgrade.
That way I can test things in a non-production setting and ensure they work before testing on production.
Otherwise, murphy's law will cause it to fail unexpectedly at the worst possible time, I will end up getting a PagerDuty at 3am, and have to wake up to fix things! 😂
@@DevOpsDirective But if it breaks at the worst time, then just uncommit the pin version and continue? Perhaps you need multiple pipelines then, where one is purely focussed on compatibility checks.
I look at it from a C++ dev point of view, not so much web, maybe that's the difference. I really want to know of my external dependencies start changing things because if you don't, after a few years it's way too much effort and risk to fix it.
@@ruadeil_zabelin Yeah, for web development where everything is automatically deployed in CI/CD, when things break it is not always apparent exactly why (i.e. which software package is the issue). For Terraform it is a bit easier since it is generally run separate than other application code, but I am just in the habit of pinning (at least to the minor version) whenever possible.
I have been woken up 1 too many times by a PagerDuty alert 😂
---
Your point about C++ development being different makes a lot of sense. If the compiled binary doesn't get shipped immediately then "failing fast" so that you can keep up to date seems like a reasonable approach!
I'm too early for this
Please keep a full fledged video on terraform and aws ,plzzzz
Planning out a whole series on TF. Will hopefully create and release it early next year!
thank you, but no english subtitles ?
Can you guys do a Series about Terraform in depth?
👍 -- I'm planning to do more Terraform content on my channel in the future!
@@DevOpsDirective thank you for responding, I'll be looking forward to this! 👌
@@DevOpsDirective Also to add note, do make the videos in the future like we literal don't know anything. this would make the tutorials way better to adsorb and digest 😁
I'm so excited for this!
Make a video about building J's quiz app with timer for questions and checkbox for multiple choice
And radio button true or false
This is pretty hard stuff
i keep getting the error at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
[nodemon] app crashed - waiting for file changes before starting...
when running npm run dev
@@Dylan-jp4vw Did you update the config.env file w/ the MongoDB connection string and an Oauth client ID + secret?
@@DevOpsDirective yes
@@DevOpsDirective Server running in development mode on port 3000
MongoParseError: Invalid connection string
at parseConnectionString (D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongodb\lib\core\uri_parser.js:547:21)
at connect (D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongodb\lib\operations\connect.js:277:3)
at D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongodb\lib\mongo_client.js:222:5
at maybePromise (D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongodb\lib\utils.js:719:3)
at MongoClient.connect (D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongodb\lib\mongo_client.js:218:10)
at D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongoose\lib\connection.js:712:12
at new Promise ()
at NativeConnection.Connection.openUri (D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongoose\lib\connection.js:709:19)
at Mongoose.connect (D:\Documents\Data Files\Node React\Hello\storybooks
ode_modules\mongoose\lib\index.js:335:15)
at connectDB (D:\Documents\Data Files\Node React\Hello\storybooks\config\db.js:5:33)
at Object. (D:\Documents\Data Files\Node React\Hello\storybooks\app.js:19:1)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
[nodemon] app crashed - waiting for file changes before starting...
NEVERMIND I FORGOT TO CLICK SAVE BEFORE RUHNNING
Do we have to pay for Google cloud platform if we have to use it.
GCP does have a free tier that includes 1 f1-micro compute engine instance, so you should be able to manage with just that.
Storing the secrets in Google Secret Manager costs $0.06/month per active secret version as well.
If you do end up using GCP or any cloud provider I recommend setting up billing alerts so that if something does go wrong and you accidentally provision something that is unexpectedly expensive you will know and can correct it.
I really like the videos that are on the channel
But I only look at those who have English subtitles
If possible please add
In this example you are just running terraform from your machine right? You are not running it from github actions, just deploying right?
That is correct! A nice extension would be adding another github action for automatically applying terraform changes.
I'd love to work az a DevOps
Where is this make coming from?
Make is a tool that is available on many unix based operating system (www.gnu.org/software/make/)