Giter Club home page Giter Club logo

azure-deploy-vsts-on-vnet-app-service-environment's Introduction

Overview

To release into an Azure Service Environment that has an Internal load balancer you need to create a VM in your VNET, install a release agent and deploy the code from there. VSTS is used for the build and release process, just part of the release process runs on a VM that is inside a particular VNET. This will work for any deployment inside a VNET, this just demonstrates a website.

Process flow

  • Build definition runs
  • Build definition publishes the website as a server artifact
  • Release process runs
  • Custom agent
  • Deploys the Website into the ASE by downloading the artifacts from TFS

VM

  • Created a VM in the VNET (this machine does not need to be that large or fast: A1 Standard or A2/A3 – you can always resize)

  • Enter a Windows Server VM (you can do Linux, these instructions are for Windows)

  • A market place image: Visual Studio 2015 Community Edition with Azure SDK / Update 3

  • Turned off IE Enhanced Security alt tag

  • Added the role .NET 3.5

alt tag

alt tag

  • Installed Azure PowerShell SDK: https://azure.microsoft.com/en-us/downloads/ (not needed if part of VM)
  • Set-Execution Policy to Unrestricted in PowerShell
  • Update the hosts file (this is not needed if you have proper DNS). You need both the site and the “scm” site. Tjhe "scm" site is the Azure Web App management site.

*** If you are not using an ASE, you can skip these steps. Some people use this article for deploying to a machine in a VNET and not necessary an ASE.

Put the IP address Internal Load Balancer of the ASE in here with your domain of your ASE.

C:\Windows\System32\drivers\etc\hosts (open Notepad in Admin mode) alt tag

Also, you need to import the self-signed SSL into MMC. Start MMC, add the certificates snap in, select computer account, right click on Trusted Root Certificate Authorities and import the PFX with your password.

  • Install Visual Studio (not needed if part of VM)
  • Reboot

VSTS

  • Create a release definition (NOTE: you might need to run the agent on the VM steps below to register)
  • Have a Agent which uses a new Agent pool. The agent poll is called “Julia VNET” since it will be on the VNET that the ASE is on. Click the Manage link to create new agent (2nd screen shot) alt tag

alt tag

  • Deploy the web app (note the C:\VSTSRelease is from the PowerShell script) alt tag

NOTE: If you are using an self-signed SSL, you need this the "allowUntrusted" as an additional argument.

VM

  • Login to the VM
  • Login to VSTS
  • Go the release definition and click the Manage agent link again
  • Download the agent and follow the instructions to install. You have the PAT token, use that for Authentication. alt tag

alt tag

  • Run the agent interactively: .\run.cmd for debugging purposes

VSTS

  • Go to the agent again and enter the capability alt tag

If you look at your release definition it has demands (meaning certain items must be installed on the machine in order to be able to run the tasks you have selected). Not all tasks have this, so this is informational. alt tag

You should be able to run your release definition. alt tag

On the VM you should now see: alt tag

azure-deploy-vsts-on-vnet-app-service-environment's People

Contributors

adampaternostro avatar lukemurraynz avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

apurvc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.