Azure DevOps: Provision API Infrastructure using Terraform - Full Course

Поделиться
HTML-код
  • Опубликовано: 10 июл 2024
  • In this full course, we’ll automatically provision an API on Azure including the infrastructure required to run it, (by defining the infrastructure as code)! You’ll be shown how to do this completely step by step using: .NET Core 3.1, Docker, Docker Hub, Azure DevOps, Terraform and Azure.
    When done, you’ll understand the power of Infrastructure as Code!
    Level: Beginner / Intermediate
    Code on GitHub: github.com/binarythistle/S03E...
    My Book: www.apress.com/gp/book/978148...
    Patreon Site (Exclusive Member Benefits!): / binarythistle
    INTRODUCTION
    - 1:57 Course Overview
    - 5:23 What we'll build
    - 8:22 Benefits of Infrastructure as Code
    - 9:35 Tooling
    API, DOCKER & GIT
    - 10:55 Set up / Scaffold API
    - 12:50 Remove Https Redirection
    - 14:00 Dockerfile: Package with Docker
    - 15:20 Build Docker Image
    - 16:43 Run Docker Image
    - 18:09 Push Docker Image to Docker Hub
    - 19:10 Add .gitignore file to project
    - 19:43 Initialise Local Git Repository
    - 20:25 Create Github Repo and push local repo
    TERRAFORM
    - 22:01 Benefits Terraform
    - 26:28 Write our first Infrastructure as Code (main.tf file)
    - 32:29 Overview of Terraform commands (init, plan, apply & destroy)
    - 33:31 Initialise Terraform Provider (terraform init)
    - 34:00 View the Terraform Plan (terraform plan)
    - 34:36 Security considerations Pt 1
    - 36:30 Provision Resources (terraform apply)
    - 39:00 Add a Container Resource to our main.tf file
    - 41:55 Re-run terraform plan
    - 42:30 Re-run terraform apply
    - 43:25 Test terraform provsioned API
    - 44:00 Security Considerations Pt 2 Service Principal
    - 48:05 Create Service Principal on Azure
    - 54:00 Add Service Principle Environment Variables for User
    - 56:45 Test Service Principle Set up at Command Line
    AZURE DEVOPS (Pt1)
    - 58:36 Create Azure DevOps Project
    - 59:35 Create Service Connections
    - 1:02:45 Create our Azure DevOps Pipeline
    - 1:08:00 Manually Trigger Pipeline (Deploy Docker Image)
    - 1:10:10 Check Out Docker Image was deployed
    - 1:11:42 Trigger Pipeline from Desktop
    AZURE DEVOPS (Pt2)
    - 1:15:21 Configure Pipeline to use Service Principal
    - 1:18:33 Terraform State (terraform.tfstate)
    - 1:21:29 Create Azure storage Account to persist terraform.tfstate
    - 1:27:13 Update main.tf to use Azure Storage backend
    - 1:29:06 Add Terraform to azure-pipelines.yml
    - 1:37:25 Use terraform Destroy to remoeve all resources on Azure
    - 1:39:18 Remove Docker Image from Docker Hub
    - 1:40:20 CHECKPOINT: Clean slate before we run our Pipeline
    - 1:40:43 Push all our code to GitHub to trigger build & provison stages
    - 1:43:10 Provisioning Failure Investigation
    - 1:45:10 Image Versioning Discussion
    - 1:49:21 Idempotency and the need for versioning
    - 1:51:50 Inject build verion in to main.tf
    - 1:55:55 Re-run out pipeline
    - 2:00:25 Test Our API
    FINAL THOUGHTS & ACKNOWLEDGEMENTS
    -2:01:22 Homework
    -2:02:35 Patreon Supporter Credits

Комментарии • 146

  • @charlesw.61
    @charlesw.61 Год назад +4

    Hey Les, thank you SO MUCH for this tutorial!!!!
    I implemented this for a job opportunity as a DevOps Engineer in order to get familiar with Terraform, and in my 2nd interview I straight up demoed a personal project of mine and with this pipeline/workflow and, literally the very next day I was sent an offer.. and I accepted!
    I'm currently going through a couple more of your other videos and I absolutely LOVE how thorough but still straightforward you are with your explanations. Please, PLEASE, keep this channel going strong as I know it's helping hundreds/thousands of developers/engineers with improving their skillsets (and ultimately, their life in general)!!!
    Many thanks again to you :)

  • @averageoddity86
    @averageoddity86 3 года назад +45

    I learned more from this video in 2 hours than from a week's worth of dredging through documentation and examples. You're great! Love the content!

    • @binarythistle
      @binarythistle  3 года назад +2

      Thanks Drew! Glad you found it useful!

  • @litaninja
    @litaninja 2 года назад +3

    This has to be the most beautiful devops/terraform walkthrough I have come across so far. Thank you.

  • @OmarNg7X
    @OmarNg7X 2 года назад

    Les, you are doing videos of every single thing I need to do with my projects. You're my hero!

  • @F2H16
    @F2H16 2 года назад

    Thanks a ton, my friend Les. I have done the tutorial with you all the way to the end. It's incredible, the way you have broken it down into smaller doable parts. Hats off.

  • @sm9022
    @sm9022 3 года назад +2

    Subbed! Les you should continue to produce tutorials. This by far is the best, if not one of the best, on automating infrastructure with terraform. I very much appreciate the CLI (ground up) to automated approach. This video is well structured and clear!!! Thanks 😊

  • @csmarpuri
    @csmarpuri 3 года назад +1

    There are tonnes of videos on this topic, but none explains so clearly as Les does, makes incredibly easier to understand and am now confident using Terraform and Azure DevOPS, many thanks for all yout time and effort, much appreciated Les

  • @simonfox6646
    @simonfox6646 3 года назад +1

    Thank you from the UK, really enjoyed the content of this video.

  • @danieljayne2906
    @danieljayne2906 2 года назад

    Really appreciate the amount of structure and thought that has gone into this Les. Also appreciate the accent as I'm welsh! Subbed

  • @maxechendu815
    @maxechendu815 2 года назад

    Loving the start haha!
    Great video, very informative! 👌

  • @tedm8492
    @tedm8492 2 года назад

    Les, thank you so much for this video. I come from a primary infrastructure background and I am learning to automate Terraform with Azure Devops for our infrastructure environment. This really cut down the my learning curve by helping me know what to look for.

  • @zulhishamtan4308
    @zulhishamtan4308 3 года назад

    I have learnt so much by following the video step by step.
    Thanks a lot Les....same to you stay safe wherever you are.

  • @9538481966
    @9538481966 3 года назад

    Amazing content on Devops and Azure. Thank you very much for taking time and helping the community.. subscribed :)

  • @pchak007
    @pchak007 4 года назад +19

    The entire architecture was explained with so much details. And I always love how Les takes extra care about security in the infrastructure.. Another good project. Keep it up Les :)

  • @3frockers
    @3frockers 3 года назад +1

    Many thanks and much much appreciation for all your efforts in sharing such knowledgeable sessions. Awesome.

  • @AdrianVrabie
    @AdrianVrabie Год назад

    This Service Principle set up was awesome! Loved it!

  • @aaronmorgan4466
    @aaronmorgan4466 Год назад

    Really great, most helpful and love the 'from the ground up' approach.

  • @chetan19891
    @chetan19891 3 года назад

    Thank you so very much, I was so under confident when I got a similar kind of scenario from a friend.. but feeling confident that I can make infra on the fly with this tutorial's help

  • @ibiawosanya9233
    @ibiawosanya9233 Год назад

    Fantastic follow along course... I literally went from beginner to Pro on Terraform in only 2 hours

  • @mandalorian3836
    @mandalorian3836 3 года назад

    Awesome training. Keep up the great work !

  • @MrGreenpaulo
    @MrGreenpaulo 2 года назад

    Thanks! This tutorial was awesome. Just what I was looking for!

  • @happyshoppi1036
    @happyshoppi1036 7 месяцев назад

    Another Amazing Video on Terraform and full life cycle of Development PRocess Appreciate your efforts

  • @netdevilzzz
    @netdevilzzz 4 года назад

    Les you are awesome! Keep it up, Your channel should have a million subscribers!

  • @danielrobertson3302
    @danielrobertson3302 3 года назад

    Great content, trying to get started with DevOps/Terraform after hammering certs for a couple of years and this should definitely make it easier!

  • @richardruns99
    @richardruns99 3 года назад

    Thanks Les, awesome once again!

  • @gavinbryan123
    @gavinbryan123 4 года назад +1

    Thanks Les, really enjoyed the video. You explain things really well and easy to follow.

    • @binarythistle
      @binarythistle  4 года назад

      Thanks Gavin, that's what I'm aiming for! Cheers, Les

  • @mbkvec
    @mbkvec 3 года назад

    You are genius in a way explaining things step by step slowly - creating issues yourself and resolving it. If any issue happening in my project relating to azure pipeline , terraform and docker first thing I will do is watch this video ( Not the documentation portal) - sure will get the solution quickly.

  • @DudeSkinnyTall
    @DudeSkinnyTall 2 года назад

    The quality and scope of this are just amazing. Instasubbed.

  • @polymorphyson
    @polymorphyson Год назад

    I really learnt a whole lot and enjoyed this video....thumbs up.

  • @pedromartin3766
    @pedromartin3766 3 года назад

    Thanks Les!! really nice video. I’ve just arrived to your channel and I hope to continue learning from you!. More videos with this kind of topics (azure devops, terraform and so on) will be appreciated. For instance, something regarding logic apps and azure functions.

  • @FuzzyDog
    @FuzzyDog 4 года назад

    Like you said; step by step! Awesome tutorial, thank you Les.

  • @raghavbuz
    @raghavbuz 4 года назад +1

    Thanks for sharing. I have used Terraform before but on AWS infrastructure. Now thanks to you, I should be able to do the same for Azure as well. Thanks again !!!

  • @marzzuri
    @marzzuri 4 года назад +1

    Thank you for such a powerful video, many details, and well done.

  • @bboyBoomgaarden
    @bboyBoomgaarden Год назад

    Fantastic video!

  • @chetanesque158
    @chetanesque158 6 месяцев назад

    Very very well done! this is helping me a ton!! :)

  • @marcushill315
    @marcushill315 Год назад

    Subscribed within the first 30 seconds of this video.

  • @lukea3836
    @lukea3836 2 года назад

    18 months on, and 'the computer still say NO' awards for you

  • @hiteshpatel1979ytube
    @hiteshpatel1979ytube 2 года назад

    Thanks a lot Jack. Amazing work!

  • @omiandvijay
    @omiandvijay 2 года назад

    Thanks so much for the course. I really enjoy them and learnt a lot.👍

  • @argeelearner3978
    @argeelearner3978 3 года назад

    Your contact is amazing!! Thank you so much!!

  • @migesualdo
    @migesualdo 3 года назад

    Excellent content!! Thanks a lot!

  • @tazeemn
    @tazeemn 4 года назад +1

    Awesome video. You made it so simple and clear.

  • @TANVEER991164
    @TANVEER991164 Год назад

    very good explanation covering various topics with such easy explanation, thank you.

  • @oluwafemiadeola9938
    @oluwafemiadeola9938 3 года назад

    Brilliant and Enjoyable!

  • @jasonni7640
    @jasonni7640 3 года назад

    I learned a lot from you, thanks so much!

  • @ChanceMinus
    @ChanceMinus 3 года назад

    Fantastic job! Thank you.

  • @TheB1nary
    @TheB1nary 2 года назад

    A MASSIVE help!!! Thank you so much :)

  • @rodrigoborlone3111
    @rodrigoborlone3111 Год назад

    Very good video, excelent work! i learned too much, thanks!

  • @ahmedmragab5056
    @ahmedmragab5056 Год назад

    you got my full attention and commitment in the very first minute. I will continue the Full Course now. Hopefully it will help me hunt the job i desire. great acting skills btw. cheers

  • @coreyp.789
    @coreyp.789 3 года назад

    Very nice. Thanks Les!

  • @hariamr
    @hariamr 4 года назад +1

    Thanks, for this amazing tutorial video!!

  • @bkainth
    @bkainth 11 месяцев назад

    i like the way you started the video

  • @sylvianblade75
    @sylvianblade75 4 года назад +7

    This channel is gold!

  • @mihalichmihalich6328
    @mihalichmihalich6328 2 года назад

    A really cool lesson and example! I did everything step by step, plus I always tried to dig a little deeper. As usual, ideas came during the session. I spent 8 hours on the course. If there is a new version, it would be cool to add work with KeyVault

  • @ahmedrazzak5141
    @ahmedrazzak5141 3 года назад

    Many thanks for the great content you’re the best

  • @LassaadToukabri
    @LassaadToukabri 2 года назад

    Excellent, thank you

  • @juangarduno7464
    @juangarduno7464 3 года назад

    Gracias Les, eres muy didáctico en tu explicación y eso me ayuda mucho a mi, que tengo la intención (porque aun me falta) es consolidarme en el ámbito de Azure DevOps y Terraform.
    Saludos desde la Ciudad de México

  • @dimitristsouvalas6310
    @dimitristsouvalas6310 3 года назад +2

    Thank you for another excellent step by step walkthrough. A few suggestions, presentation wise. Please use the a Light theme in your editor, and a slightly larger font because on smaller screens text is barely legible. Keep up the good work.

  • @marciapelaez4775
    @marciapelaez4775 3 года назад

    The demonstration was very good!! I want to use DevOps just with Terraform.. to deploy all Azure resources.. I will give a try

  • @PaloniAlmoni
    @PaloniAlmoni Год назад

    Thank you so much!

  • @omkarpadwale9404
    @omkarpadwale9404 3 года назад

    Great stuff !! Liked shared and subscribed

  • @sanjeevsjk
    @sanjeevsjk 10 месяцев назад

    Thanks a ton Les! I hope this will be pretty much same with latest .NET 6,7,8 as well.

  • @bittoboy
    @bittoboy 3 года назад

    Cool stuffs!! I need to do my HW now!

  • @tanakacraigkaseke5368
    @tanakacraigkaseke5368 2 года назад

    I love you man!

  • @webdeveloperninja9220
    @webdeveloperninja9220 3 года назад

    Thank you this is great

  • @TurboBailey
    @TurboBailey 4 года назад +1

    Excellent tutorial
    Thank you

  • @temiwale88
    @temiwale88 3 года назад

    Thanks for this Les! You have similar mannerisms with 'sentdex'.

  • @pprometey
    @pprometey Год назад

    Wow, you are also an artist!

  • @adhamelsharkawy_79
    @adhamelsharkawy_79 8 месяцев назад

    Thank you Les, as usual perfect content

    • @asian1nvasion
      @asian1nvasion 8 месяцев назад

      Is the content in this 3+ years old video still relevant? Azure can change a lot in 3 years.

    • @adhamelsharkawy_79
      @adhamelsharkawy_79 8 месяцев назад +1

      it's relevant in Terrafom with minor adjustments@@asian1nvasion

    • @asian1nvasion
      @asian1nvasion 8 месяцев назад

      ​@@adhamelsharkawy_79thanks

  • @chrisbirkenmaier2277
    @chrisbirkenmaier2277 2 года назад +1

    Would love to see the solution to the "homework"!
    Anyway, great tutorial, great teacher. The first, in fact, I would consider supportion on patreon! :)

  • @m1169199
    @m1169199 3 года назад

    I wish all my IT training was given by this Scotchman.

  • @vendodt200
    @vendodt200 3 года назад

    awesome, thanks to share your kwnledge with us

  • @stevenblomify9093
    @stevenblomify9093 2 года назад

    This looks great - it ties together a bunch of stuff I was trying to work through in separate courses.
    When it comes to adding a .gitignore file, the new-ish dotnet command "dotnet new gitignore" is pretty useful - saves scrabbling through old git repos trying to find the perfect template file to copy in ;-)

  • @alirezakhorram9962
    @alirezakhorram9962 2 года назад

    Thanks Les! I have seen a lot of Videos to find out why we need Terraform. This course is the only one and by far the best one that thoroughly explain what it meant for.

  • @peymannaji
    @peymannaji 3 года назад

    Thanks a lot.

  • @HamzehExplains
    @HamzehExplains 4 года назад +1

    Hi Les,
    thanks a bundle for such a great channel.
    Regarding this tutorial, I am wondering how this is related to the previous version you have on your channel back to May 10th, 2019?

  • @MisterFonkey
    @MisterFonkey 2 года назад

    Nice! Who would have thought I would be learning IT from Father Ariandel himself? :)

  • @swatijuneja123
    @swatijuneja123 3 месяца назад

    love all your videos! any chance you planning to make how to deploy AKS cluster in Azure using terraform ?

  • @islam-nuggets
    @islam-nuggets 4 года назад +1

    Angel Les to the rescue again...you are awesome!!!!!!!!!

  • @Rhodair
    @Rhodair 2 года назад +3

    Hey Les, amazing video! One suggestion - it'd be great to have the timestamps on the RUclips bar rather than only description. It's a simple change. RUclips will automatically pick it up from the description if you format it like...
    00:00 Intro
    1:57 Course Overview
    5:23 What we'll build
    You always need a 00:00 timestamp, min of 3 timestamps, and timestamps must be 10 seconds minimum

    • @allthecommonsense
      @allthecommonsense 2 года назад

      What is "the youtube bar"?

    • @Rhodair
      @Rhodair 2 года назад +1

      @@allthecommonsense ah my bad, I meant the timeline bar (just above the Play, Skip, Volume/Mute, etc. buttons)
      based on a video's description, RUclips can automatically place timestamp markers on the bar

  • @kumaransamikkannu7372
    @kumaransamikkannu7372 Год назад

    Hi Les, great video, really appreciate your effort, one thing not clear to me is how Terraform pulls the image from Docker hub, in the code there is no mention of Docker hub credentials?

  • @ayxanalifov2791
    @ayxanalifov2791 4 года назад +1

    Great Course !!! Thanks a lot. Did anybody have this problem in azure pipeline ?
    Error refreshing state: state snapshot was created by Terraform v0.12.29, which is newer than current v0.12.28; upgrade to Terraform v0.12.29 or greater to work with this state
    .
    Run terreform can not be completed... Terreform version in my local machine is Terraform v0.12.29.

  • @TiteufMela
    @TiteufMela Год назад

    Hello,
    thank you for this video, how can i create for example a multiple vms without destroying an existing ones the same storage account?

  • @eliassal1
    @eliassal1 3 года назад +3

    Les, so many thanks for the video. When I run "terraform destory" after finalizing main.tf as per "Use terraform Destroy to remoeve all resources on Azure" session, it destroys nothing and terraform comes back always with "

  • @HiteshTulsaniAtGooglePlus
    @HiteshTulsaniAtGooglePlus 3 года назад

    Regards to your acting skills (1:22) - yes you definitely do a great job - and accordingly, I see your videos on my 65" TV (Big Screen) :D LOL.. Jokes apart, awesome as always - keep it up!

  • @eliassal1
    @eliassal1 3 года назад

    Fantastic and great session, full of details easy to absorb and very interesting method to teach others. One thing I would like to know, I have already done similar things using out-of-the-box Azure devops server, what is the advantages/benefits of using terraform over the other tools?

  • @zafarahmad1356
    @zafarahmad1356 2 года назад

    Thank you very much for such a detailed explanation I was stuck with variable where to define and how to use in pipeline which I see now how, however I am stuck with one other thing right now that how to get the AppInSight InstrumentationKey my project fails with the error Key cannot be null if I run the project from Visual Studio it runs the container if I build it in command line line docker build or even docker compose up or build it fails and says some code need authentication I don't know what to do you seems to be the right person to ask the question I am stuck in it for a week + kindly help or advice if you have done a video on this topic Thanks a lot

  • @newabyuser
    @newabyuser Год назад

    Cool intro

  • @poste1otto
    @poste1otto 2 года назад

    hello Les, great video so far (half way through) and clear explanations. I am having a problem accessing my api (neither with ip or FQDN. It keeps spinning with no answer, would it change anything that my docker image has been built on a Mac M1?) once deployed on ACI and I cant find the reason why. Would you have an idea? Thanks in advance.

  • @rolandsoftwareguy2515
    @rolandsoftwareguy2515 2 года назад

    Your gift is still giving 🤗💛
    I know you've got Patreon but I think you should also add a "Buy me a coffee (or beer)" link 👍
    Re the homework, I can no longer run my api locally - anyone know the answer?

  • @harimanchester7036
    @harimanchester7036 2 года назад

    Great

  • @felixhauer9665
    @felixhauer9665 3 года назад

    If you are having problems with Azure jobs in your DevOps pipeline, you have to create a private project there (and probably change the visibility of your GH project as well). In the free tier, I only had jobs available in private projects.

  • @john_king
    @john_king 3 года назад +1

    Great video - When running your terraform at around 15 mins - which repository is the container image being pulled from? Local or DockerHub. Am trying to replicate your steps but fail on this. Have added in image_registry_credential to main.tf file but no joy.

  • @eliassal1
    @eliassal1 Год назад

    Hi, can you please tell me what machine you are using for writing the code, win, mac or linux? The listener app, on my windows box errors on the line ($"./mainfiles/{provider.ToLower()}") and it indicates "directory name invalid....", when I replace it with ($"..\\..\\..\\mainfiles\\{provider.ToLower()}") it works fine thanks again for your efforts

  • @25_zubairkazi77
    @25_zubairkazi77 2 года назад

    What' if we have double subscription assigned and it fetches 2 hee visual studio?

  • @interestingvideos3894
    @interestingvideos3894 2 года назад

    Do you have perhaps a tutorial which will include API plus azure database? Thanks

  • @manishrao18
    @manishrao18 3 года назад

    Ya, may be the role of "King - Ecbert / Aelle/ Horik" in Vikings. Anyways choice is yours.
    Between, yes your content and effort much appreciate !

  • @deolsalman1
    @deolsalman1 3 года назад

    For running docker is specific version of the windows is required ?, because i am using windows 10 Home and i am getting error message that "Docker server for linux however docker-compose target windows", and for changing it to windows it requires windows pro or windows enterprise.

  • @koushikkc7770
    @koushikkc7770 3 года назад

    Windows os license parameter in azure how to give it in terraform

  • @anandlukade466
    @anandlukade466 3 года назад

    Awesome, you are my master let me know if we can connect over other platform?