Azure DevOps Environments for Virtual Machines EXPLAINED

Sdílet
Vložit
  • čas přidán 25. 07. 2024
  • Let's see how we can make even VMs cooler, thanks to Azure DevOps Environments for Virtual Machines.
    We will focus on how we can connect our VMs to Azure DevOps environments and take advantage of it. Because we all know that among all the fun and cooler stuff, Virtual Machines are here to stay.
    This is "Azure DevOps Environments for Virtual Machines EXPLAINED"
    🌟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 Intro: • Azure DevOps Environme...
    ► Azure DevOps Environments Kubernetes: • Why EVERYONE should us...
    ► Azure DevOps: • Azure DevOps
    🎤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: czcams.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 CZcams 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 CZcams: 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 I'll receive a small commission at no additional cost to you.
    As an Amazon Associate, I earn from qualifying purchases.
  • Věda a technologie

Komentáře • 28

  • @CoderDave
    @CoderDave  Před 4 lety +1

    ✨Question of the day✨: How do you deploy to Virtual Machines?
    *SUPPORT THE CHANNEL :*
    Buy me a coffee: www.buymeacoffee.com/CoderDave
    Join my Patreon: www.patreon.com/CoderDave
    PayPal me donation: paypal.me/dabenveg

  • @kaiviti2013
    @kaiviti2013 Před rokem +1

    Thank you!! This was quite helpful in understanding how to transition from Classic Release Pipelines to YAML based CD pipelines that uses the concept of environments. I do have a question though. With the Classic Release pipelines for deployments, Deployment groups/pools are used so you can map for e.g your DEV environment with several VMs to DEV deployment pool and shared amongst several projects using deployment groups in each project. And to be granular on the function of VMs in the DEV environment you can tag them. There is a single Azure Agent running on the node/VM. And for multiple projects/applications you can deploy to same node with that one Azure agent running. However with what you have described for YAML based CD pipelines, you need a VM registered for a particular environment for that project. This means if you have multiple Azure projects that deploy to same node ( e.g a IIS web server running multiple web applications ) do you need to register the same VM with an Azure Agent for each project? It seems very inefficient. Is there some method to have a Environment specific VMs defined at Org level in Azure and be shared amongst all projects environments?

    • @CoderDave
      @CoderDave  Před rokem

      hey there. You are right, deployment groups are only present for Classic Pipelines. if you are using YAML, you need to use Environments. Luckily, you can add multiple VMs to an environment, and each VM can be added to multiple Environments in multiple projects as well, so that is not an issue. You can still use tags etc.
      Check this out: learn.microsoft.com/en-us/azure/devops/pipelines/process/environments-virtual-machines?view=azure-devops

  • @bizulk
    @bizulk Před rokem

    Hello, I already have connected azure agent for build pipelines. I'd like to add these resource to a "sdk deployment" environnement. Is it conflicting with the existing agent ? Can i launch the agent as proposed ?

  • @kieranpatel2192
    @kieranpatel2192 Před 3 lety

    When i go into azure devops i dont see these options to use vm templates ? i checked in pipelines i see nothing like this ??

  • @joeb.1163
    @joeb.1163 Před rokem +1

    Thanks for the video. In a production scenario, where would the vm machine be located? Do you spin off a vm resoure in Azure just for azure devops deployment environment?

    • @CoderDave
      @CoderDave  Před rokem

      That is not necessary. The VM is just your deployment target. You don’t need a specific vm just for the environment. It’s a machine, which can be anywhere (Azure, On-Prem, another cloud), where you deploy your applications to

  • @JigarSangoi1990
    @JigarSangoi1990 Před 4 lety +1

    Is it possible to generate website or app pool name using dynamic prefix and static postfix (may be variables but I m not sure) ?

    • @CoderDave
      @CoderDave  Před 4 lety +1

      Yep absolutely, you can use variables in the pipelines for that, and pass it to the task or script that actually creates websites and app pools in IIS

  • @regojonny
    @regojonny Před 4 měsíci

    good presentation, can I trigger a start Vm in a build pipeline before the build commences for automated tests and then shut the VM after the build pipeline is complete

    • @CoderDave
      @CoderDave  Před 4 měsíci

      Thanks. Yes, definitely. You can add a task before your build step(s) to start a VM, and add a "cleanup step" at the end to shut it down or destroy it

  • @Bldngsw
    @Bldngsw Před 7 měsíci

    The rolling deployment fails if any VM in the pool is offline. Is there any way to circumvent this behavior? I want the deployment to work and just deploy on currently online VMs.

  • @juanreigosa8215
    @juanreigosa8215 Před 2 lety +1

    I'm building an Infrastructure as Code pipeline that provisions team environments using Terraform.
    Stage 1 is a Terraform Plan stage
    Stage 2 is a Terraform Apply stage (vms get created here)
    I was planning to have the newly created vms added to an environment and then do extra server configuration that I need to do on the vms.
    How can I accomplish this?
    Is there an alternative to environment registration code snippet?
    How can I register these newly provisioned vms?

    • @CoderDave
      @CoderDave  Před 2 lety

      Hey, that's a great question. No, the only way to add those VMs to an environment is to run that script on them.
      However, this can be fully automated. I would suggest adding a "config" step/stage to your provisioning workflow that execute the script onto those VMs (via SSH, PowerShell DSC, Chef, or any other config ways you're familiar with)

  • @ankitsrivastava256
    @ankitsrivastava256 Před 3 lety +1

    Hi,
    I have a requirement if you can help .
    I need to deploy some shell scripts and those scripts use some property files which is present in same location.
    I need to deploy these files into Linux VM and then execute that script on that VM using the pipelines.
    I am able to copy files on to the VM but not sure how to execute that script there.

    • @CoderDave
      @CoderDave  Před 3 lety +1

      To execute the script remotely, you have to use the "SSH" task (docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/ssh?view=azure-devops) this will allow to run any command on the target machine(s)

  • @ankitsrivastava256
    @ankitsrivastava256 Před 3 lety +1

    Can you put a yml file in description to deploy into linux VM.
    I do not have VM added to the deployment group.
    Thanks.

    • @CoderDave
      @CoderDave  Před 3 lety

      Sorry I'm not sure I've understood what you mean. Deployment groups and environments don't work together. They're either-or.

    • @ankitsrivastava256
      @ankitsrivastava256 Před 3 lety +1

      @@CoderDave actually i have added linux server in the pipeline environment but i am unable to deploy to linux server. Pipeline is running successfully but in CopyFiles@2 task it shows 0 files. Can you please put yaml file in here.
      Thanks!

    • @CoderDave
      @CoderDave  Před 3 lety

      @@ankitsrivastava256 if it shows 0 files it means that it cannot find any file to copy. I'd recommend you to check:
      - the path you are trying to copy FROM has the files
      - you have the corrent source path in the step
      - if the files are on your git repo, check if you are doing a checkout step (deployment jobs do not do checkout automatically)

  • @TheMVJunior
    @TheMVJunior Před 2 lety

    I'm trying to use a linux VM hosted in other cloud provider, and got stuck while running the shell script provided by Azure. Did you ever tried? Errors that I faced are shell scripts file fails to execute, even executing then manually.

    • @CoderDave
      @CoderDave  Před 2 lety

      Hey. It's been I while since I had to use that script, I don't work very often with VMs. What is the exact error the script is giving you?

    • @TheMVJunior
      @TheMVJunior Před 2 lety

      @@CoderDave "most not run with sudo"=> figured it out that I could set a variable to allows running this command. After this, it returned to some missing configurations in another .sh file.

    • @TheMVJunior
      @TheMVJunior Před 2 lety

      I've just created an user for running the script provided by Azure, and now it's working fine. You know, sometimes IT Guy just needs attention. 😁

    • @CoderDave
      @CoderDave  Před 2 lety +1

      haha good to know you had it working :)