I am trying to create a deployment plan for my web application in Azure which can support 2 environments (Dev/Staging). Basically, I want the code checked in by developers to be deployed to the Dev machine end of the day. And then the latest Dev changes to be merged with staging branch and if no merge conflict happened a new publish goes to staging machine. Can anyone help me where to start and what feature in azure i can use to server this?
You could use Azure Devops to trigger scheduled builds (at the end of the day) to perform the routine you are describing. you could also use releases and trigger them automatically from the builds that happen on a schedule.
You would also need to deploy vsts agents on the machines or allow for vsts agents to somehow talk to the machines to upload code to them
Related
We have created a pipeline to restart multiple VM services in correct order. Within Azure Logic App I can create a release, but want to deploy the same release daily. How can I do this in Logic Apps?
I current use logic apps to shutdown and start VMs daily as they are not used during silent hours but need to deploy restart services pipeline regularly.
From the picture you can see it only creates release not deploys it. I need it to only deploy to CL04 stage daily not all three stages and really don't need a new release every day, just redeploy release 7 to the same environment that the start VM logic app is running on daily.
but want to deploy the same release daily.
You can achieve this if you use Recurrence Trigger in your Logic app workflow.
For complete information you can go through this document.
I'm working on an API in core3.1. We have a build pipeline that builds and unit tests any change for any branch. And release pipelines for development and master branches. These deploy to designated app services in Azure.
Now we would like a release pipeline for feature branches. So what we want is a pipeline that can dynamically created app-services per feature branch and deploy to that app service. And preferably dynamically delete the app-service when the branch is deleted.
Just to clarify, the proces how we would like it:
a developer creates feature branch and pushes it >
the build pipeline builds it >
an app service gets created automatically >
stuff gets deployed to that app service >
developers work on the branch and changes get build and deployed to the app service like normal >
at some later point a developer deletes branch >
app service gets deleted automaticcaly
Is there any way to accomplish this? Maybe there is a standard way?
Feature branches are located in a subfolder, e.g. "feat/feature-branch-name".
I'm fairly new to Azure and DevOps.
Any help is appriciated. Thanks in advance.
You should follow the practice of Infrastructure as Code (IaC) and use ARM templates in your pipeline to create/update/delete your Azure resources. You can also use the built-in tasks available in Azure DevOps to deploy your ARM templates.
I'm trying to create a CI/CD pipeline for an example prototype. Thus, I've started simple enough to test my infrastructure - I'm using an almost untouched boilerplate of ASP.NET Framework Web App (targeting 4.6.1). The steps I've completed are:
App is deployed to an Azure App Service.
Its version control is hosted with Azure DevOps.
A build pipeline with the following tasks has been created, set-up and tested if it executes (tasks and their order, come from a template):
Azure Deployment Options/Settings are bound to the repository DevOps, thus builds are also displayed in Azure, and should be deployed there if successful.
The Build Pipeline is bound to the correct repository inside DevOps
Builds get triggered by pushing to the master branch
The next step was to verify that a broken build, because of failed tests or any other reason is not deployed to production in Azure. I've created a failing test for this reason.
And this is where I'm left stumped. Builds do fail as expected and the "App Service Deploy" task is skipped, because the build tasks before it have a failure:
And yet those broken builds still get deployed to Azure and to production without even waiting for the pipeline to finish. I'm verifying that a change has actually happened with small visual updates.
Build started and finished in Azure as soon as a push occurs before the pipeline in DevOps is fully traversed (or even started, if finding an agent takes longer):
(DevOps still not finished):
What am I doing wrong here? Am I understanding the pipeline wrong? Have I missed a set-up step somewhere? I'm lost.
Edit: As asked by Josh, here's my trigger as well:
Edit 2.2 A bit more clarification of my deployment options in my App Service in Azure, related to Daniel's comments:
This turned out to be the issue.
This is the only option I'm allowed to choose when tying my deployment to DevOps. I'm not allowed to choose a pipeline, just a project and a branch. In a tutorial I've compared with, the settings are the same (at least in this menu), but the build does not get triggered from the repository, but expects the pipeline to reach the appropriate step first, which is why I haven't considered it to be the culprit. Is there some additional setting up, I've missed to do, to indicate that it must look for a pipeline, rather than fire straight away from branch changes?
The deployment you have set up in the Azure portal is tied to source control only, not your build definition. So every time you commit to source control, two things happen that are totally disconnected from each other and start in parallel since they listen to the same repository for changes:
A build fires off in the pipeline.
The Azure website is updated with the version you just pushed to source control, since its deployment options are bound to it.
Remove #2 and your problem will go away. You set the App Service you want updated in the pipeline, you don't need an additional hook in the App Service itself.
I'm wanting to run the Azure Webjobs dashboard locally on our own server to track a task using the webjob framework that isn't running in Azure (running as a service on a local machine).
Previously there was a website project in the azure-webjobs-sdk repository but since moving to .NET Standard 2.0, the dashboard project has been deleted.
Where can I find this codebase? Is it decommissioned? Is there an alternative way to achieve my goal of a locally run dashboard?
You can still find it in the v2.x branch, which is still active. But indeed, it was not carried to the v3 code base.
For 'traditional' WebJobs, there is no current plan to deprecate the dashboard form the v2 branch. So you can continue to run that locally as you did before.
On the other hand, for Azure Functions, the focus is now on App Insights instead of the WebJobs dashboard.
I basically want to do a auto swap between staging and production on azure cloud services.
Basically I have a QA environment that needs a fixed IP address for the QA people to test after a developer finishes a task. Because in staging sometimes the ip changes due to some problems that can occur on the TFS builds I want to be able to have a fixed address for the QA team to access without having to click swap manually.
When you do a VIP SWAP between Production and Staging deployments. The VIPs of both deployments will be EXCHANGED. So Production will become staging and staging will be become Production by IP swap.
If you want your new Staging deployment(previously Production) hold all the latest bits of your application, then you have to re-deploy the application to new staging. This process can be automated through PowerShell. Below resources can be helpful for you to get started with automating deployment process.
To create a new deployment using PowerShell
Run PowerShell script in TFS build process
My first question would be why the staging deployment/slot is having those problems?
If the need is to programmatically perform the VIP swap, I'd think you could add some custom logic to do so via the Windows Azure service management API. Add this into your build definition perhaps (e.g. execute via PowerShell).