Azure DevOps Environments EXPLAINED

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ค. 2024
  • Let's start our journey into Azure DevOps Environments. And check the other video on Kubernetes Environments with Azure Pipelines below.
    Azure Pipelines is a great tool for doing Continuous Integration and Continuous Deployment, and now we can target Environments during the Release phase.
    The question is: why should I use an environment to deploy my application?
    Let's answer that together.
    🌟EXCLUSIVE CONTENT🌟
    Do you want to access exclusive content, live chats and Q&As, polls, and even 1:1 calls with me? Join my Patreon: / coderdave
    🆘 NEED HELP? 🆘
    Book a 1:1 Consultation with CoderDave: geni.us/cdconsult
    🙏🏻SUPPORT THE CHANNEL🙏🏻
    Buy me a coffee: www.buymeacoffee.com/CoderDave
    PayPal me donation: paypal.me/dabenveg
    💬JOIN THE COMMUNITY
    ► Website: coderdave.io
    ► Discord: geni.us/cddiscord
    ► Newsletter: coderdave.io/newsletter
    ► Blog: dev.to/n3wt0n
    ► GitHub: github.com/n3wt0n
    ► Twitter: / davidebenvegnu
    ► Facebook: / coderdaveyt
    🎥VIDEOS
    ► Azure DevOps Environments for Kubernetes: • Why EVERYONE should us...
    ► Azure Pipelines Classic vs YAML: • Azure Pipelines: Class...
    ► Azure DevOps Environments for Virtual Machines: • Azure DevOps Environme...
    ⏲TIMESTAMPS
    0:00 Intro
    0:58 What are Environments
    1:35 Why to use Environments
    2:04 Azure DevOps Environments Creation
    3:21 How to use an Environment
    4:30 Automatic Environment Creation
    7:03 Approvals and Checks
    11:12 Environments Security
    14:02 Final notes
    🎤PODCAST: geni.us/cdpodcast
    ❓QUESTIONS?
    Have a question about DevOps, Cloud, Coding, or Anything Else? Post in comments section of this video!
    🔴SUBSCRIBE to CoderDave here: th-cam.com/users/CoderDave?sub...
    _______________
    👕GET MY MERCH: geni.us/cdmerch
    🔮TOOLS I USE
    ► Twingate - Connect to your Private Resources SECURELY: geni.us/twingate
    ► TubeBuddy - #1 TH-cam channel Management tool (FREE): www.tubebuddy.com/CoderDave
    ► Moosend - Free Newsletter and Automation Platform: geni.us/moosend
    📸🖥️GEAR AND SOFTWARE
    ► Music - Epidemic Sound (Get 30 days free): epidemicsound.com/referral/zf...
    ► Editing - Adobe Premiere Pro: geni.us/AdobeVideo
    ► Gear I Use for TH-cam: kit.co/CoderDave/gear-i-use-f...
    ► Gear I Use for Streaming: kit.co/CoderDave/gear-i-use-f...
    ► My Computer Setup: kit.co/CoderDave/main-compute...
    ► Full office setup: github.com/n3wt0n/work-from-h...
    Disclaimer:
    Some product links are affiliate links which means if you buy something Il receive a small commission at no additional cost to you.
    As an Amazon Associate, I earn from qualifying purchases.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 101

  • @akhilreddy6355
    @akhilreddy6355 2 ปีที่แล้ว +1

    Really the way ur explaining is relentless ..thankfull for ur updates.om azure

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Always happy to be helpful :)

  • @ibrahemtaha8177
    @ibrahemtaha8177 3 ปีที่แล้ว +4

    Many Thanks for sharing brother!!! Amazing!!
    Please consider making full courses for Azure \ Azure Devops
    I'll be the first one to click on all the ads as a support! :D

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      haha thanks man! Appreciated!

  • @arturogonzalez7744
    @arturogonzalez7744 3 ปีที่แล้ว +1

    Thanks Dave, great video.

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      Glad you enjoyed it

  • @themuls529
    @themuls529 2 ปีที่แล้ว

    Excellent presentation. Clear explanation.

  • @phanuwatwattanapraya7998
    @phanuwatwattanapraya7998 3 ปีที่แล้ว +1

    Thank you so much for the video

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      Thanks for the support ☺️

  • @Chatsworth1979
    @Chatsworth1979 3 ปีที่แล้ว +1

    SUBSCRIBED! You've got some great vids, thanks so much for uploading all the tech info, like candy to a kid in a tech store. : - )

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      Thank you. I try my best to help... happy to know my videos are helpful ☺️

  • @CoderDave
    @CoderDave  4 ปีที่แล้ว +2

    ✨ *Question of the day* : Do you use Environments in the new YAML Pipelines experience?
    GET HELP ON DEVOPS: geni.us/cdconsult
    SUPPORT THE CHANNEL :
    Buy me a coffee: www.buymeacoffee.com/CoderDave
    PayPal me donation: paypal.me/dabenveg

  • @FrameBassman
    @FrameBassman 4 ปีที่แล้ว

    Best explanation!

    • @CoderDave
      @CoderDave  4 ปีที่แล้ว

      Thank you. The second video of this series, about Azure DevOps Environments for Kubernetes, is coming next Tuesday😉

  • @lakesandy5278
    @lakesandy5278 4 ปีที่แล้ว

    Looking forward to the next video in the series

    • @CoderDave
      @CoderDave  4 ปีที่แล้ว +1

      Thanks. It will come soon, and it will be about using Environments with AKS and Kubernetes

  • @mihai_chindris
    @mihai_chindris 2 ปีที่แล้ว

    great explanation! thanks!

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Glad it was helpful!

  • @aminigam
    @aminigam ปีที่แล้ว

    Super !!

    • @CoderDave
      @CoderDave  ปีที่แล้ว

      Thank you! Cheers!

  • @bizulk
    @bizulk ปีที่แล้ว

    Thanks for this presentation. I have been in trouble to manage my build agent environnement (SDK). To deploy it, I used a stage in my build pipeline executed on condition. It seems that even my build agent are physical I can use it to manage the pool deployment with the advantage of traceability. Do we manage those deploy management the same way as the others (I mean in a git repo) ?

  • @georgezviadgoglodze7810
    @georgezviadgoglodze7810 2 ปีที่แล้ว +1

    Great work Dave as usual. So technically speaking "Release Pipelines" are obsolete?

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Thanks! I wouldn't say they are obsolete, but they "serve a different purpose". In the release pipelines you still get some things you do not have in YAML, like post-deployment approvals and gates (even tho the latter ones are almost matched already in YAML). And some of the triggers are different as well, for example in Release Pipelines you can have artifacts coming from GitHub Releases... But yes, YAML Pipelines get Environments... ;)

  • @PeterMolokwu
    @PeterMolokwu ปีที่แล้ว

    Thanks for this video, made a lot of sense, just one question though, can you make a video on environment where the deployment target is a private AKS cluster? Tried connecting now got some errors.

    • @CoderDave
      @CoderDave  ปีที่แล้ว

      I will, thanks for the suggestion. Stay tuned

  • @kathiravang.3272
    @kathiravang.3272 4 ปีที่แล้ว +1

    Thank you for devops series . Can you cover trigger portion as well with yaml . Something like when a image push to azure container registry, a trigger should be listening in yaml and then stage should run and finally deploy to K8 automatically. I know how to do that will classic ui. But looking to do same with YAML

    • @CoderDave
      @CoderDave  4 ปีที่แล้ว +1

      Thanks for the suggestion, I will definitely plan for it. Stay tuned ;)

    • @CoderDave
      @CoderDave  4 ปีที่แล้ว +1

      Hi, I know it's been a while but I finally have that video out: th-cam.com/video/FHnPJ8FBjLM/w-d-xo.html Let me know what you think!

  • @pablofernandez5086
    @pablofernandez5086 3 ปีที่แล้ว +1

    Helo Dave! Many thanks for your content, I´ve been researching and by far you are the one that best explain it (around Azure Pipelines) I have one question, I develope some content in Python to run on daily basis (it has to do API calls, and move data). I have configured on a Linux machine (using cron jobs). I would like to move it to Azure Devops, I would like to be able to change the code in Repos and that Devops change it in the Virtual Machine and keep it running. I am little bit lose, even I don´t know if Pipelines is done for this or for other stuff like apps.

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +2

      Hi Pablo. First of all, thanks for your compliments. I try my best to produce high quality content.
      About your question, what you mentioned can absolutely be done with Pipelines. To respond automatically to a push to your repo you can use the normal CI trigger in pipelines (from master or from another branch if you want). Then, to deploy the code to a VM you can use the deployment step (can be done via SSH, File Copy, or other methods... those depend on how you want to deploy). I'd recommend you using the YAML pipelines for this, so you can take advantage of the "Environments for Virtual Machines", I have some examples in this video here: th-cam.com/video/zBr7cl6ASMQ/w-d-xo.html

    • @pablofernandez5086
      @pablofernandez5086 3 ปีที่แล้ว

      CoderDave Manu thanks dave!!

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      You’re more than welcome.

    • @pablofernandez5086
      @pablofernandez5086 3 ปีที่แล้ว +1

      @@CoderDave Thank you Dave! I´ve finally have my code linked to Azure DevOps and now everytime that I update my code, it is updated in my Virtual Machine. I have one last doubt which I would like to know your opinion. I am working mainly with data, no apps, mainly my scrips are used for ask for data to multiple source, wrap them, clean data and upload to somewhere. In the Virtual Machine I am doing that with a cron job which is schedule to run every day or every hour. I have the feeling that Pipelines are more to release the code, am I wrong? Which is your opinion around that? I can create a cron job in the virtual machine pointing to the relase but what I would like is keep all under the same place, because it could be more workable. I think that is a question for people that is working on data and would like to use DevOps for that kind of Scripts. Thanks in advance for your help and work, and sorry for so many questions...

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      Yes, Pipelines is more a CICD service, however it could be used as a sort-of automation engine as well. If you want to have everything managed by Pipelines (so you don;t have to manually create and maintain the cron job, for example) I would have a pipeline with a schedyle trigger (which btw accept the same cron syntax) and I'll have it executing the data loading/massaging script on the host vis SSH or anything like it

  • @aloufin
    @aloufin 3 ปีที่แล้ว +2

    What tool are you using to draw on screen while recording?

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +3

      Hey. I'm using ZoomIt: docs.microsoft.com/en-us/sysinternals/downloads/zoomit

  • @krishnaimadabattuni2649
    @krishnaimadabattuni2649 3 ปีที่แล้ว +2

    can you please explain about task group and variable groups?

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +3

      I'll try my best to make a video about it. Stay tuned ;)

  • @nikko110782
    @nikko110782 2 ปีที่แล้ว +1

    Hello, I add the environment in Yaml file as you described but I have the following "Unexpected property environment". what is missing?

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Good question. No, it does not. If the branch is not updated, then the auto-merge wo';t happen until you update it.

  • @joeb.1163
    @joeb.1163 ปีที่แล้ว +1

    Is a vm or kubernetes resource required for the YML release pipeline?

    • @CoderDave
      @CoderDave  ปีที่แล้ว

      No no it’s is not. Can deploy to anything and runs directly in azure DevOps

  • @pralay1991
    @pralay1991 3 ปีที่แล้ว +1

    Hello Dave, I am a developer among team of 5. Each have a branch to work on. I need to deploy into certain VMs and test my code before raising a Pull Request to main branch. Should i create a personal pipeline then each member has to create multiple. Repeated pipeline or can we trick the common pipeline to jst create a environment

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      What I would do is creating 5 Environments (one for each team member) in Azure DevOps, and then create only 1 Pipeline. I would then have a conditional in the Pipeline that, depending on the branch it is doing CI from (one of the 5 you mentioned) deploys to the correct environment

  • @ritwikc5612
    @ritwikc5612 4 ปีที่แล้ว +2

    Would this be useful while creating classic pipelines for Database?

    • @CoderDave
      @CoderDave  4 ปีที่แล้ว +1

      While this would be certainly useful for Database deployments, unfortunately environments are not available in Classic Pipelines but only in YAML Pipelines

  • @pg8605
    @pg8605 2 ปีที่แล้ว +1

    Nice explanation. I do not get why you can define pool though like in docs examples

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Thanks :) I'm not sure what you mean, can you clarify your question?

  • @saripallicreations
    @saripallicreations ปีที่แล้ว +1

    Hi,
    Can you show me how to create environment for Classic cli pipeline,
    you did in Yaml please share a link which create for classic cli.

    • @CoderDave
      @CoderDave  ปีที่แล้ว +1

      Unfortunately I cannot. Environments are a feature only of YAML Pipelines, Classic Pipelines cannot use Environments

    • @saripallicreations
      @saripallicreations ปีที่แล้ว

      @@CoderDave thankyou for confirmation..

  • @tsaibabu4u
    @tsaibabu4u 4 ปีที่แล้ว +1

    Did you find a way to create these environments by using CLI or REST API ?

    • @CoderDave
      @CoderDave  4 ปีที่แล้ว

      Unfortunately, both the REST APIs and the CLI don't currently support managing environments.

  • @ReinaldoSerrao
    @ReinaldoSerrao ปีที่แล้ว +1

    Ok, but how do I configure Environments with classic pipelines (GUI)? I have added the Deployment Agent but it does not have an element to specify the Environment.... How can I do it?

    • @CoderDave
      @CoderDave  ปีที่แล้ว

      Hey there, as I mentioned in the video, Environments are available only in YAML Pipelines, not in Classic

  • @RavindraKumar-to4zl
    @RavindraKumar-to4zl 2 ปีที่แล้ว +1

    Hi.. I am looking forward to have something on.. how we can migrate azure devops pipelines into Jenkins. Please guide

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว +1

      Hi. I'm sorry but in many years of being into DevOps I've never had to do a migration from Azure DevOps Pipelines to Jenkins. :) it is usually the opposite (from Jenkins to AzDO Pipelines). I did a quick search and I haven't found anything, so I guess the only way is manually re-writing everything in Jenkins

  • @indianentrepreneur3784
    @indianentrepreneur3784 3 ปีที่แล้ว +1

    @CoderDace : Hello Sir
    I have Laravel project installed in VM(PHP laravel), how i can setup ci/cd with that. please help

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      Hey, I would start with looking the the Environments for VMs in azure pipelines. I have a entire video about that 😉 here it is: th-cam.com/video/zBr7cl6ASMQ/w-d-xo.html

  • @GrenadeApple3
    @GrenadeApple3 3 ปีที่แล้ว +1

    Do you use one environment for multiple apps or one environment per app? For example: dev-app1, dev-app2 etc. or just one "dev" environment for all?

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      I would normally use on environment per app. Unless multiple apps use the same resources . Let me explain... differently from what we used to do on prem , in cloud with PaaS (where I normally deploy) resources are usually tied to a single application. So an environment for me would be, for example, a pool of App Service or a K8S namespace... which I normally use for a single app

    • @GrenadeApple3
      @GrenadeApple3 3 ปีที่แล้ว +1

      @@CoderDave Thanks for the answer and video, very helpful. I use app services in this case. 😁

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      More than welcome ☺️

    • @ClAddict
      @ClAddict 2 ปีที่แล้ว

      Having a hard time picturing how this is supposed to scale. I manage 62 services each deploying to 16 different regions each with the ability to deploy independently. That would mean just shy of 1000 rows in that environment table to manually set up and maintain permissions for.
      And that’s not counting anything before production deployments, I’ve got 40 devs each with their own ability to deploy their 62 services. Not to mention I have to share my ADO Project with over 150 other teams who are in 50+ regions with their own set of microservices. Finding my 1000 environments would be darn near impossible.
      Classic isn’t great at my scale when it comes to releases, but pipeline deployments seems like a nonstarter. Is there something I’m missing?

  • @maheshkandharkar3911
    @maheshkandharkar3911 6 หลายเดือนก่อน

    I am using VMSS agent(windows) in my azure devops pipeline and it has powershell script to run the code but i am getting az-accounts module not found. how i can fix it your assistance much appreciated.

    • @CoderDave
      @CoderDave  5 หลายเดือนก่อน

      You can check if that module is installed with
      Get-InstalledModule Az.Accounts -AllVersions
      If it is, try to unistall it and reinstall it with
      Uninstall-Module -Name Az.Accounts
      Install-Module -Name Az.Accounts

  • @priyankadodti1880
    @priyankadodti1880 ปีที่แล้ว +1

    Hi, very well explained. I have one question, Can we have 2 different environments (eg Dev/Test) share the same resource? If yes, can we have different approvals/checks for each?

    • @CoderDave
      @CoderDave  ปีที่แล้ว

      Yes, absolutely. Remember that the "Environment" in AzDO is just a logical representation of your resources

  • @6freeborn
    @6freeborn 11 หลายเดือนก่อน +1

    How do You create an Environment and the environment is an App Service?

    • @CoderDave
      @CoderDave  11 หลายเดือนก่อน

      There is no specific environment for App Service. Just create a generic one

  • @saikrishnaboddu4966
    @saikrishnaboddu4966 2 ปีที่แล้ว +1

    can you please refer the git repo link which you have used as code

    • @CoderDave
      @CoderDave  ปีที่แล้ว

      sorry, I don't have that repo anymore

  • @gregdvorkin
    @gregdvorkin 3 ปีที่แล้ว +1

    Do you have a demo for associating Azure DevOps releases, release pipelines, etc, with Work items / Boards? How to utilize that setting "report results to work item or to boards'? Anyone else can help?
    There are 2 links sections on Work Item form - Deployment and Development. It is more or less clear how data appear under "Development". I cannot reproduce the "Deployment" data.

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +2

      I was looking to make that video already, because those settings can be confusing. Stay tuned because that will happen soon 😉 if I can, already next week!

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +2

      The video on this is coming out next Tuesday :) Don't mis it!

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      Hey @gregdvorkin, here you have the video explaining all those settings: th-cam.com/video/EHbPpQNoBvI/w-d-xo.html
      Let me know what you think

  • @webdeveloperify
    @webdeveloperify 2 ปีที่แล้ว +1

    Hi Dave, I need one help. My pipeline is failing against timeout issue because it is taking more than 1 hour for the process to be completed. It is a heavy solution that gets npm packages from internet as well as in Artifacts. After it needs to build 35 modules in order to build binaries. Can you please help here what can be done. Can some default functionality be used. Thank you in advance for the help.

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      One thing I can think of is using a cache to retrieve your npm packages, instead of going to retrieve them from internet every time (see this th-cam.com/video/HfJcN9gWleM/w-d-xo.html)

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Same approach can probably be used for modules. Also, I wonder if there is a way you can build those things in parallel using multiple jobs

  • @luissuarez7623
    @luissuarez7623 2 ปีที่แล้ว +1

    there a way to link an environment to a release pipeline deployment?

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว +1

      I’m afraid not. Environments are usable only with YAML Pipelines

    • @luissuarez7623
      @luissuarez7623 2 ปีที่แล้ว +1

      @@CoderDave oh :( So for deployments we need to decided to use YAML environments or the release pipeline, right? We can't mix both.

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว +1

      Well, you could mix (there are ways to kick a YAML Pipeline from a Release Pipeline and viceversa) but I would recommend sticking to a single approach. Both have pros and cons 😅

  • @medusaskull9625
    @medusaskull9625 2 ปีที่แล้ว

    What has you deployed to any of the target machines?

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      Sorry, not sure I understand the question 😬

    • @medusaskull9625
      @medusaskull9625 2 ปีที่แล้ว +1

      @@CoderDave sorry for the unclear question. I don't see you deploy anything to any target resources in this demo? Can you copy files to target machines or run command on target machines? For example, change a configuration or create/delete folder etc...

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว +1

      Yes yes, I believe in the demo I haven't actually deployed anything to keep that simple and less time consuming, but you can of course deploy in the normal way as you would usually do, but you get all the cool stuff from the environments.
      I made another video using environments specifically for virtual machines, check it out if you want: th-cam.com/video/zBr7cl6ASMQ/w-d-xo.html

    • @medusaskull9625
      @medusaskull9625 2 ปีที่แล้ว

      @@CoderDave I still don't see in this new video where you actual push software code or run any code on target machines to do anything so call deploment. What you are actually doing is just executing empty tasks.

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      You just replace the “empty tasks” with whatever you use for deployment. It should be a “Copy File” task, and ssh or powershell task, etc… that would depend on what you actually have to achieve 😀

  • @mothernature6146
    @mothernature6146 3 ปีที่แล้ว +1

    can anyone share how to add .env and .env.production to your dev and prodution pipelne ?

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      Hi. What is your use case?

    • @mothernature6146
      @mothernature6146 3 ปีที่แล้ว +1

      @@CoderDave have 2 pipelines one for development and another is for production. how can i attach .env and .env.production file to development and production environment so when i release it will take particular envirorment get deployed to appcenterfor tester to test

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว

      Thanks for the details. There’s a lot to discuss about this, won’t fit in YT comments 😄 why don’t you join my Discord server (link in the video description) and ask the question again there in the AzDO questions section so we can discuss about it 😉

  • @davidrosado7366
    @davidrosado7366 3 ปีที่แล้ว +1

    Good video. One observation: I did not have any pipeline defined nor knowledge of pipelines yet and it threw me off when you cut and pasted an existing pipeline into the environment... I had to stop the video and jump into another video where I could learn about creating a pipeline :(

    • @CoderDave
      @CoderDave  3 ปีที่แล้ว +1

      Hey, sorry to hear that. Yes, that video was targeting people that already have knowledge about Pipelines, becuase the concept of Environments build on top of the Pipelines.

  • @jaylee3941
    @jaylee3941 2 ปีที่แล้ว

    Typical DevOps tuition. 1. Shows us how to create environment - great. 2. Here is a pipeline I already created? How do we follow along - we cannot.

    • @CoderDave
      @CoderDave  2 ปีที่แล้ว

      While is true that I’ve used an already created pipeline (the video is about environments, not pipelines per se 😀), I showed the relevant parts of the pipeline needed to work with the other environment.
      Environments are an “advanced” feature of Pipelines, so working with them requires some degree of experience with Pipelines. If you are new to Pipelines, I’d advice you to check some other videos before this one 😉