ТЕМА: Martes por la tarde http://st-loius.nef2.com
Tampa : microsoft tfs - Kabrinskiy Eduard 5 років 3 місяців тому #29933
|
Eduard Kabrinskiy Vsts branching - Eduard Kabrinskiy
<h1>Vsts branching</h1> <p>[youtube]</p> Vsts branching <a href="remmont.com">News new</a> Vsts branching <h1>Vsts branching</h1> <p>GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.</p> <h3>GitHub is where the world builds software</h3> <p>Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.</p> <h2> azure-devops-docs / docs / repos / git / git-branching-guidance.md</strong> </h2> <ul> <li>Go to file T</li> <li>Go to line L</li> <li>Copy path</li> </ul> <p>Adopt a Git branching strategy</h1></p> <p>Distributed version control systems like Git give you flexibility in how you use version control to share and manage code. Your team should find a balance between this flexibility and the need to collaborate and share code in a consistent manner.</p> <p>Team members publish, share, review, and iterate on code changes through Git branches shared with others. Adopt a branching strategy for your team. You can collaborate better and spend less time managing version control and more time developing code.</p> <p>The following branching strategies are based on the way we use Git here at Microsoft. For more information, see How we use Git at Microsoft.</p> <p>Keep your branch strategy simple</h2></p> <p>Keep your branch strategy simple. Build your strategy from these three concepts:</p> <p><ul> <li>Use feature branches for all new features and bug fixes.</li> <li>Merge feature branches into the main branch using pull requests.</li> <li>Keep a high quality, up-to-date main branch.</li> </ul> </p> <p>A strategy that extends these concepts and avoids contradictions will result in a version control workflow for your team that is consistent and easy to follow.</p> <p>Use feature branches for your work</h3></p> <p>Develop your features and fix bugs in feature branches based off your main branch. These branches are also known as <em>topic branches</em>. Feature branches isolate work in progress from the completed work in the main branch. Git branches are inexpensive to create and maintain. Even small fixes and changes should have their own feature branch.</p> <p style="clear: both"><img src="github.com/MicrosoftDocs/azure-devops-do...featurebranching.png" /></p> <p>Creating feature branches for all your changes makes reviewing history simple. Look at the commits made in the branch and look at the pull request that merged the branch.</p> <p>Name your feature branches by convention</h4></p> <p>Use a consistent naming convention for your feature branches to identify the work done in the branch. You can also include other information in the branch name, such as who created the branch.</p> <p>Some suggestions for naming your feature branches:</p> <p><ul> <li>users/username/description</li> <li>users/username/workitem</li> <li>bugfix/description</li> <li>features/feature-name</li> <li>features/feature-area/feature-name</li> <li>hotfix/description</li> </ul> </p> <p>. moniker range=">= tfs-2018"</p> <blockquote><p>[!NOTE] For information on setting policies to enforce a branch naming strategy, see Require branch folders.</p></blockquote> <p>Use feature flags to manage long-running branches</h4></p> <p>Learn more about using feature flags in your code.</p> <p>Review and merge code with pull requests</h3></p> <p>The review that takes place in a pull request is critical for improving code quality. Only merge branches through pull requests that pass your review process. Avoid merging branches to the main branch without a pull request.</p> <p>Reviews in pull requests take time to complete. Your team should agree on what's expected from pull request creators and reviewers. Distribute reviewer responsibilities to share ideas across your team and spread out knowledge of your codebase.</p> <p>Some suggestions for successful pull requests:</p> <p><ul> <li>Two reviewers is an optimal number based on research.</li> <li>If your team already has a code review process, bring pull requests into what you're already doing.</li> <li>Take care assigning the same reviewers to a large number of pull requests. Pull requests work better when reviewer responsibilities are shared across the team.</li> <li>Provide enough detail in the description to quickly bring reviewers up to speed with your changes.</li> <li>Include a build or linked version of your changes running in a staged environment with your pull request. Others can easily test the changes.</li> </ul> </p> <p>Keep a high quality, up-to-date main branch</h3></p> <p>The code in your main branch should pass tests, build cleanly, and always be current. Your main branch needs these qualities so that feature branches created by your team start from a known good version of code.</p> <p>. moniker range=">= tfs-2015"</p> <p>Set up a branch policy for your main branch that:</p> <p><ul> <li>Requires a pull request to merge code. This approach prevents direct pushes to the main branch and ensures discussion of proposed changes.</li> <li>Automatically adds reviewers when a pull request is created. The added team members review the code and comment on the changes in the pull request.</li> <li>Requires a successful build to complete a pull request. Code merged into the main branch should build cleanly.</li> </ul> </p> <blockquote><p>[!TIP] The build pipeline for your pull requests should be quick to complete, so it doesn't interfere with the review process.</p></blockquote> <p>Use release branches to coordinate and stabilize changes in a release of your code. This branch is long-lived and isn't merged back into the main branch in a pull request, unlike the feature branches. Create as many release branches as you need. Keep in mind that each active release branch represents another version of the code you need to support. Lock release branches when you're ready to stop supporting a particular release.</p> <p>Use release branches</h3></p> <p>Create a release branch from the main branch when you get close to your release or other milestone, such as the end of a sprint. Give this branch a clear name associating it with the release, for example <em>release/20</em>.</p> <p>Create branches to fix bugs from the release branch and merge them back into the release branch in a pull request.</p> <p style="clear: both"><img src="github.com/MicrosoftDocs/azure-devops-do...ranching_release.png" /></p> <p>Port changes back to the main branch</h3></p> <p>Make sure that fixes land in both your release branch and your main branch. One approach is to make fixes in the release branch, then bring changes into your main branch to prevent regression in your code. Another approach (and the one employed by the Azure DevOps team) is to always make changes in the mainline, then port those to the release branch. You can read more about our Release Flow strategy.</p> <p>In this topic, we'll cover making changes in the release branch and porting them into mainline. Use cherry-picking instead of merging so that you have exact control over which commits are ported back to the main branch. Merging the feature branch into the main branch can bring over release-specific changes you don't want in the main branch.</p> <p>Update the main branch with a change made in the release branch with these steps:</p> <p><ol> <li>Create a new feature branch off the main branch to port the changes.</li> <li>Cherry-pick the changes from the release branch to your new feature branch.</li> <li>Merge the feature branch back into the main branch in a second pull request.</li> </ol> </p> <p style="clear: both"><img src="github.com/MicrosoftDocs/azure-devops-do...sebranching_main.png" /></p> <p>This release branch workflow keeps the pillars of the basic workflow intact: feature branches, pull requests, and a strong main branch that always has the latest version of the code.</p> <p>Why not use tags for releases?</h3></p> <p>Other branching workflows use Git tags to mark a specific commit as a release. Tags are useful for marking points in your history as important. Tags introduce extra steps in your workflow that aren't necessary if you're using branches for your releases.</p> <p>Tags are maintained and pushed separately from your commits. Team members can easily miss tagging a commit and then have to go back through the history afterwards to fix the tag. You can also forget the extra step to push the tag, leaving the next developer working from an older version of the code when supporting the release.</p> <p>The release branch strategy extends the basic feature branch workflow to handle releases. Your team doesn't have to adopt any new version control process other than the cherry-pick to port changes.</p> <p>You can handle multiple deployments of your code in the same way you handle multiple releases. Create a clear naming convention, such as <em>deploy/performance-test</em>, and treat the environment branches like release branches. Your team should agree on a process to update deployment branches with the code from your main branch. Cherry-pick bug fixes in the deployment branch back to the main branch. Use the same steps as porting changes from a release branch.</p> <p>An exception to this recommendation is if you're using a form of continuous deployment. Use Azure Pipelines when working with continuous deployment to promote builds from your main branch to your deployment targets.</p> <h2>Vsts branching</h2> <h3>Vsts branching</h3> <p>[youtube]</p> Vsts branching <a href="remmont.com">Latest news</a> Vsts branching <h4>Vsts branching</h4> This repo is the home of the official Azure DevOps documentation for Microsoft. GitHub Issues filed in this repository should be for problems with the documentation. - MicrosoftDocs/azure-devops-docs <h5>Vsts branching</h5> Vsts branching <a href="remmont.com">Vsts branching</a> Vsts branching SOURCE: <h6>Vsts branching</h6> <a href="dev-ops.engineer/">Vsts branching</a> Vsts branching #tags#[replace: -,-Vsts branching] Vsts branching#tags# breaking news |
|
|
Адміністратор заборонив доступ на запис.
|
Downey : azure devops secret variable - Kabrinskiy Eduard 5 років 3 місяців тому #29993
|
Кабринский Эдуард - Octopus azure - Кабринский Рдуард
<h1>Octopus azure</h1> <p>[youtube]</p> Octopus azure <a href="remmont.com">Breaking news</a> Octopus azure <h1>Discover, Collaborate, Deliver</h1> <h2>Learning Starts from Sharing – Automate the possible</h2> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...00_howtobuildo22.png" /></p> <h1>How to Build Octopus Deploy in Microsoft Azure (High Availability)</h1> <p>If your team is working on a P1 and S1 issue which impacts the business a lot. During this time if your deployment and configuration management tools are not available to push the application fixes into production then cost to the company is huge. Building a high availability deployment tool are normally ignored or at bottom of backlog in many organisations. This blog post is more about how to build a highly available octopus deploy and be in peace. There are 5 parts to this (Not all the sections will be relevant to everyone). This blog post will give you an overview of how to build an Octopus HA setup in Azure and its not a detailed walk through. If you need more information Please contact me.</p> <p><ol> <li>Building appropriate networks</li> <li>Creating required global resources (Traffic Manager profiles and Storage Account)</li> <li>Provision of database servers and databases</li> <li>Deploying octopus deploy Leader node</li> <li>Deploying octopus deploy follower nodes</li> </ol> </p> <p>Below is the list of 5 prerequisites required before getting started</p> <p><ol> <li>Azure subscription</li> <li>Basic understanding of Azure Resource manager templates</li> <li>Prior knowledge about octopus deploy</li> <li>PowerShell experience</li> <li>Working knowledge on Windows servers</li> </ol> </p> <p>All the templates are available in GitHub under this location github.com/mani0070/OctopusHA</p> <h2>Building Networks</h2> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...100_howtobuildo1.png" /></p> <p>We are going to build two virtual networks in the Microsoft Azure one in North Europe and another in West Europe. But you can use the same template to build more networks as long as you don’t have overlapping address. Since this is a bootstrap script which is to build the infrastructure of deployment tools I’m using PowerShell to execute the scripts. You can choose the address range you want to. You need to make sure you stick to the address space defined by RFC1918</p> <p>10.0.0.0/8 – Class A</p> <p>172.16.0.0/12 – Class B</p> <p>192.168.0.0/16 – Class C (Typically it’s a home router network)</p> <p>We are using Class B in our demo. You can update the parameter as per your choice (github.com/mani0070/OctopusHA/tree/master/dinetworks)</p> <p>Update the appropriate resource group name and the parameters files (Default one is EUN or use EUW) in the Deploy-AzureResoruceGroup.ps1 script</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...100_howtobuildo2.png" /></p> <p>Now, we are ready to deploy the network on both the regions , before that please login to the azure subscription, you can refer to the script github.com/mani0070/azure-packer/blob/ma...zuresubscription.ps1</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...100_howtobuildo3.png" /></p> <p>Now we have provisioned the Virtual Networks and Public IP address. Refer the screenshots below</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...100_howtobuildo4.png" /></p> <p>The same applicable to EUW.</p> <h2>Creating Traffic Manager Profiles and Storage Accounts</h2> <p>In this section, we will be creating Traffic Manager profiles with appropriate Endpoint and Storage account we will be using it as a file share and to update the custom installation scripts. Since it’s a global resources deployment we are going to target against North Europe only. The code is available under this link github.com/mani0070/OctopusHA/tree/master/diglobalresources</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...100_howtobuildo5.png" /></p> <p>Execute the below command once you have cloned the above repo.</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...100_howtobuildo6.png" /></p> <p>Validate in the portal as shown below</p> <p style="clear: both"><img src="i0.wp.com/dinventive.com/blog/wp-content...100_howtobuildo7.png" /></p> <h2>Creating the Azure SQL Database Server and Database</h2> <p>In this Section, we are going to create the azure Sql database to use with Octopus Server (github.com/mani0070/OctopusHA/tree/master/didatabase )</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...100_howtobuildo8.png" /></p> <p>Run the Deploy Scripts as shown below</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...100_howtobuildo9.png" /></p> <p>Validate the Resource Portal in Azure</p> <p style="clear: both"><img src="i0.wp.com/dinventive.com/blog/wp-content...00_howtobuildo10.png" /></p> <h2>Installing Octopus Server Leader Node</h2> <p>In this Section, we are going to build the octopus server from the arm template and install Octopus using the custom script extension. Install Script is taken from octopus’s repo and modified to suit the HA setup. We are going to build the first node (Leader) in the North Europe</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...00_howtobuildo11.png" /></p> <p>Upload the Install-Octopus Script to the Storage account you prefer to use. This Template Execution might take longer and the other ones we did until now. Have a cup of coffee which things are happening behind the screen.</p> <p style="clear: both"><img src="i0.wp.com/dinventive.com/blog/wp-content...00_howtobuildo12.png" /></p> <p>This Template will Apply the NSG rules , associate the public IP address</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...00_howtobuildo13.png" /></p> <p>Now, you can see Node1 Leader is available via Its own DNS and also Via Traffic Manager URL</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...00_howtobuildo14.png" /></p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...00_howtobuildo15.png" /></p> <p>Next Step is to get the Master Key (Login to the actual Node)</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...00_howtobuildo16.png" /></p> <p>Now, Apply the HA License on the Portal before building more nodes.</p> <h2>Installed the Octopus Server Follower Nodes</h2> <p>This is similar process as we did for the leader node, the only difference is it’s a follower node and this node will be built in the Europe west Region.</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...00_howtobuildo17.png" /></p> <p>Note: Make sure the Configure-OctopusDeployNode.ps1 script is available in the storage account.</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...00_howtobuildo18.png" /></p> <p>Note: If the Node is not up and running. The main reason could be network mapping may not be happened. Please restart the VM and redeploy the arm template.</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...00_howtobuildo19.png" /></p> <p>Now, the same is available via traffic manager</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...00_howtobuildo20.png" /></p> <p>Now, you can build more nodes if you wanted to. As an example, I’m going to add the third node</p> <p>Only the highlighted values need to be updated to build the additional nodes</p> <p style="clear: both"><img src="i1.wp.com/dinventive.com/blog/wp-content...00_howtobuildo21.png" /></p> <p>There nodes now. Happy Deployments .</p> <p style="clear: both"><img src="i2.wp.com/dinventive.com/blog/wp-content...00_howtobuildo22.png" /></p> <p>There are lot of different ways this can be done for example Convert the installation scripts as a DSC and also build the template as linked ones the lot more.</p> <p>Again on Azure SQL Database you can enable GEO-Replication</p> <p>Build the automatic failover and also you might want to have the intelligence to automatically update the connection string during the failover of sql database.</p> <p>But all I’m saying here is, its a good place to start and add-on.</p> <p>Happy to listen to the feedback</p> <h3>Leave a Reply <small>Cancel reply</small></h3> <p>You must be logged in to post a comment.</p> <p>This site uses Akismet to reduce spam. Learn how your comment data is processed.</p> <h2>Octopus azure</h2> <h3>Octopus azure</h3> <p>[youtube]</p> Octopus azure <a href="remmont.com">Headline news</a> Octopus azure <h4>Octopus azure</h4> Discover, Collaborate, Deliver Learning Starts from Sharing – Automate the possible How to Build Octopus Deploy in Microsoft Azure (High Availability) If your team is working on a P1 <h5>Octopus azure</h5> Octopus azure <a href="remmont.com">Octopus azure</a> Octopus azure SOURCE: <h6>Octopus azure</h6> <a href="dev-ops.engineer/">Octopus azure</a> Octopus azure #tags#[replace: -,-Octopus azure] Octopus azure#tags# Эдуард Кабринский local news |
|
|
Адміністратор заборонив доступ на запис.
|
St. Loius (Saint Louis) : confluence devops - Kabrinskiy Eduard 5 років 3 місяців тому #30061
|
Эдуард Кабринский - Terraform azure devops - Рдуард Кабринский
<h1>Terraform azure devops</h1> <p>[youtube]</p> Terraform azure devops <a href="remmont.com">American news headlines</a> Terraform azure devops <h1>Infrastructure Automation with Terraform and Azure DevOps Pipeline Templates</h1> <p style="clear: both"> <img style="float: left; margin: 0 10px 5px 0;" src="csprodstorage001.blob.core.windows.net/contributors/luke.jpg" />Luke Orellana on January, 06, 2020</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/i.../terraform-azure.png" /></p> <p>Infrastructure as Code is considered a best practice when managing infrastructure in the cloud. Tools like Terraform are becoming increasingly popular due to their ease of use and multi cloud nature. However, adopting the Infrastructure as Code model can become hectic and unmanageable if not organized strategically.</p> <p>With designing any automated process, simplicity is key to creating long lasting solutions. In Azure DevOps, one way of simplifying code for Terraform configurations is by using pipeline templates to represent our infrastructure.</p> <p>Each value in the template parameters is used to customize our configuration which is then built dynamically during the build pipeline. We can go from the traditional repository structure of storing our Terraform configuration files in folders to representing our infrastructure with pipeline template parameters:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...ditionalvsSimple.png" /></p> <p>Structuring our source code repositories this way allow us to scale our solution much easier and provides some of the following benefits:</p> <p><ul> <li>No more one-off changes can be made to Terraform configuration files since all configurations are built dynamically during the build pipeline and will all be the same. This prevents issues where team members are making changes to one system’s Terraform configuration causing us to have separate one-off configurations to maintain.</li> <li>We can now separate our Terraform code from the team that deploys the configurations. All the Terraform modules and files are stored in another repository which we can limit access to and allow just our Terraform team to manage them.</li> <li>Change tracking of infrastructure resources is much more simplified now since we are just looking at template parameter value changes in a single file.</li> <li>Each deployment is going to be more consistent since we are using the same base Terraform configurations in each deployment. This also allows us to treat our Terraform configurations as cattle.</li> </ul> </p> <p>In this guide, we will use the Azure DevOps Demo Generator to import an Azure DevOps project. This project has been pre-configured to deploy Azure Container Instances with Terraform using pipeline templates as code. We will deploy some resources to our Azure subscription and review the innerworkings of this concept.</p> <h2>Prerequisites</h2> <p>Before you begin this guide you’ll need the following:</p> <p><ul> <li>An Azure Subscription, you can get started with a free account.</li> <li>An Azure DevOps Organization. The basic plan is free for the first 5 users.</li> </ul> </p> <h2>Step 1 — Importing the Project with Azure DevOps Demo Generator</h2> <p>First, we are going to import an Azure DevOps template project into our Azure DevOps organization. This will allow us to get started as fast as possible. To get started, navigate to the Azure DevOps Demo Generator website.</p> <p>Sign in with your Azure DevOps account. Select <strong>Accept</strong> to authorize the Azure DevOps Demo Generator application to access your account. Now we are ready to import our template. Select <strong>Choose Template</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/ChooseTemplate.png" /></p> <p>A pop-up window will appear, choose the <strong>Private</strong> tab and select the <strong>GitHub</strong> option. Paste in the following GitHub URL which hosts the template for our project:</p> <p>Next, select <strong>Submit</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/GitHubTemplate.png" /></p> <p>Select your organization from the drop-down menu and type in a name for the new project that we are creating. In the example I will be naming the project <strong>TemplateAsCode</strong>. <strong>Check</strong> the box for <strong>The extension(s) are offered to you…</strong> and select <strong>Create Project</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/CreateProject.png" /></p> <p>Notice that the <strong>Replace Tokens</strong> and <strong>Terraform</strong> <em>extensions</em> are required for this project. Extensions are add-ons for Azure DevOps that provide an enhancement to the service. In this case we will be using the Replace Tokens extension to build our Terraform configuration files during the build pipeline. Additionally, we are using the Terraform extension as well to easily deploy our configurations to Azure. These two extensions will automatically be installed when we import the project via the Azure DevOps Demo Generator.</p> <p>Finally, after the import is successful, we will get the following message. Select <strong>Navigate to Project</strong> to be directed straight to our new project:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...ImportSuccessful.png" /></p> <p>In the next step we will review the innerworkings of the project that we just imported.</p> <h2>Step 2 — Reviewing the Template as Code Design</h2> <p>Let’s look at how the code repositories for this project are set up. On the left-hand side select <strong>Repos</strong> then choose <strong>Files</strong>. By selecting the drop down, we can see that there are two source code repositories or <em>repos</em> in our project. Select the <strong>ACI</strong> repo:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/SelectRepo.png" /></p> <p>The <strong>ACI</strong> repo for this project contains the infrastructure code for the Azure Container Instances in our Azure environment with folders for Development and Production. In this project, instead of creating a repository for each application, or one for Dev and Prod, we are creating a repository for each cloud service or component. This allows for our infrastructure deployments to be simplified and as “cookie cutter” as possible which really shines with large environments. The environment size and business needs will really play a role on the most effective repo structure design. But, for this demonstration we are going to go this route to keep things simple.</p> <p>The pipelineconfig.yml is our build pipeline yaml file. If we look at the contents of this file, we can see it starts with the resources section. This is sourcing the code from our 2nd repo, <strong>templates</strong>, and allows us to use that repo code in our build pipeline. Next, is the stages section which contains our job and tasks for building the Terraform configurations. In the template section we are calling the template that we want to build which is pointing to the aci-prod-sampleapp2.yml file. When we deploy this pipeline, it will deploy the components in that template file which we will look at next:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/ACI.png" /></p> <p>The other three yaml files in the <strong>ACI</strong> repo represent the Azure Container Instance infrastructure in our Production and Development environments. If we look at aci-prod-sampleapp2.yml , we can see that it’s a series of pipeline templates sourcing from the <strong>templates</strong> repo. The template parameters are what is making up the configuration of our components, in this example we have two templates, one for the resource group and one for the actual ACI component. Breaking up the resource group and the ACI resource into separate templates allows us to deploy more than one ACI resource to a resource group:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...veinfrastructure.png" /></p> <p>In our <strong>templates</strong> repo we can see our two yaml files for our pipeline templates along with a Terraform folder. This folder is where we keep our “templatized” terraform configuration files. These files contain generic Terraform configuration files with variables that are surrounded by a double “_”. This tells our Replace Tokens task, which runs during the build pipeline, to replace any strings in our container.tf and main.tf files that are surrounded by “__” with it’s respective environment variable. So __CPU__ will be replaced by the CPU environment variable that we declare in the pipeline template:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...erraformtemplate.png" /></p> <p>When looking at the azure-aci-rg.yml template, we can see at the top we are listing our parameters and then setting those as environment variables in the task. Next is the [email protected] task. We are copying the Terraform configuration template file, main.tf , from the \Terraform\ACI directory of our source control repo to our $(Build.ArtifactStagingDirectory) . This is where we are building our Terraform files to produce as an <em>artifact</em>. An artifact, from a developer perspective, typically contains the compiled binaries and libraries used to run an application. These application files are then deployed to an environment in the release pipeline. With our IaC build pipeline, our Terraform configuration files are the artifacts in this case; and we will be deploying them with the release pipeline. In the last task we run the [email protected] task to swap out the variables surrounded by __ with our associated environment variable. This entire template allows us to take in parameter values and generate a Terraform configuration file from it:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates.png" /></p> <p>If we look at the azure-aci-container.yml template, we can see the same structure as azure-aci-rg.yml . Since Azure Container Instances require many more values to create than a resource group, we have many more parameters declared at the beginning and in the [email protected] task, where we declare our environment variables. The key difference in this template is the extra [email protected] task at the end that renames the container.tf file to the name of the ACI resource. This allows us to create additional ACI resources in the same Terraform configuration by providing a unique name to the configuration file, so we don’t copy over any files:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates2.png" /></p> <p>Now that we’ve reviewed our two repos, let’s wrap our head around the workflow in this build pipeline. Our pipelineconfig.yml file is our build pipeline file, which references the desired infrastructure yml file to build such as aci-prod-sampleapp1.yml . This file then points to several pipeline templates located in the <strong>templates</strong> repository which each build out the Terraform configuration files according to the parameter values specified in aci-prod-sampleapp1.yml . Finally, once our Terraform configuration files are built, they are published as an artifact which will then be used by our release pipeline to deploy to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/buildflowchart.png" /></p> <p>In the next step we are going to deploy the Azure Container Instance infrastructure described in the aci-prod-sampleapp2.yml file.</p> <h2>Step 3 — Deploying Resources</h2> <p>First, let’s run our build pipeline. On the left-hand side select <strong>Pipelines</strong> to expand the options underneath it. Then, once again, select <strong>Pipelines</strong> to see our build pipelines. Select <strong>Terraform-ACI-CI</strong> and select <strong>Run pipeline</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/runbuildpipeline.png" /></p> <p>Select <strong>Run</strong> in the pop-up window to start our build pipeline. It will run for a minute or so and the artifacts will then be generated for our sampleapp2 infrastructure. We can view these artifacts by selecting <strong>1 published</strong> under the <strong>artifacts</strong> section:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/artifacts.png" /></p> <p>We can see our Terraform configuration files for both ACI resources are there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/terraformartifacts.png" /></p> <p>Let’s deploy the infrastructure to our Azure subscription by running the release pipeline, but first we need to edit the release pipeline to configure a connection to our Azure subscription. On the left hand side expand <strong>Pipelines</strong> and select <strong>Releases</strong>. We can see our <strong>Terraform-ACI-CD</strong> pipeline has been imported, select <strong>Edit</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasepipeline.png" /></p> <p>Under our <strong>Build</strong> stage select <strong>1 job, 5 tasks</strong> to edit our tasks to include our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasetask.png" /></p> <p>Select the first task <strong>Set up Azure Storage Account…</strong> and click on the drop-down box under <strong>Azure subscription</strong>. A list of subscriptions associated with your tenant will appear in this box. Select one that you would like to deploy the example Azure Container Instances too and select <strong>Authorize</strong>. You may be prompted to login to your Azure account. This process will create a Service Principal account in your Azure tenant and assign permissions to that subscription with that account. Azure DevOps will set this up as a service connection and use that to connect to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription1.png" /></p> <p>Next, we need to configure the remaining Terraform tasks with the same Azure service connection. The new connection that we made should now show up in the drop-down menu under <strong>Available Azure service connections</strong>. Select this for all 3 of the Terraform tasks that say <strong>some settings need attention</strong> this is because they are missing their Azure subscription settings:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription2.png" /></p> <p>Once complete, select <strong>Save</strong> at the top. Now we are ready to deploy our infrastructure. Select <strong>Create Release</strong> and then select <strong>Create</strong> to initiate the release pipeline. We will see a new message in green indicating that the release has been created. Select <strong>Release-1</strong> to view the release process for deploying the ACI resources into our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasecreated.png" /></p> <p>We will see that the release is running and can view the different steps of our release pipeline. This is a typical pipeline for deploying Terraform code, we provision a storage account to store our Terraform state, run a terraform init to initialize our Terraform environment and connect to our remote state (azure storage account in this case). Then we run a terraform plan to verify our configuration files have no issues. Finally if all the previous tasks are successful we run our terraform apply -auto-approve to deploy the infrastructure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releaserunning.png" /></p> <p>Once our release has run successfully, we will see a <strong>Succeeded</strong> message:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasesucceeded.png" /></p> <p>If we look in our Azure portal, we can see the resources are in fact there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources.png" /></p> <p>Next, we will add another ACI resource to our sampleapp2 application and redeploy our configuration with a pull request.</p> <h2>Step 4 — Modifying Resources with Pull Request</h2> <p>We need to set up a branch policy for our <strong>master</strong> branch, this will allow us to automatically kick off a build if a Pull Request is initiated. To do this expand <strong>Repos</strong> and select <strong>Branches</strong>. On the <strong>master</strong> branch select the <strong>…</strong> all the way on the right side and select <strong>Branch policies</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/selectbranches.png" /></p> <p>Select <strong>+ Add build policy</strong>. In the pop-up window, select our build pipeline <strong>Terraform-ACI-CI</strong> and keep the defaults for everything else. Select <strong>Save</strong> to create the build policy:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/branchpolicy.png" /></p> <p>Now we are ready to submit a Pull Request and trigger a new build. Let’s create a new branch to make our changes in. In the <strong>ACI</strong> repository select the dropdown labeled <strong>master</strong> and select <strong>+ New Branch</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/newbranch.png" /></p> <p>In our example we will name the new branch <strong>deploysampleapp2</strong>. Select <strong>Create</strong>. We are now actively using the new branch we just created in Azure DevOps. Select the aci-prod-sampleapp2.yml file and select <strong>Edit</strong> to edit the file. We are going to add another ACI resource by adding in another ACI template with the required parameters:</p> <p>Next, select <strong>Commit</strong> to save our changes:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editpipelineconfig.png" /></p> <p>Select <strong>Commit</strong> again. Now there will be a pop up for a pull request, select <strong>Create a pull request</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequest.png" /></p> <p>In the next window we can write in some information on our pull request and description. This provides great documentation for our deployments:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestdescription.png" /></p> <p>Select <strong>Create</strong>, and in the next windows select <strong>Set auto-complete</strong>. This will complete the Pull Request if our build runs successfully:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestrunning.png" /></p> <p>Then select <strong>set auto-complete</strong> again to confirm. Our build pipeline is now running with the changes from our new branch. If the build is successful, our branch will merge with the master branch with our new changes. Also note, if we look back at our pull request history, we can see a very simple outline of the new infrastructure that was added. This is one of the benefits of using the template parameters to define our infrastructure. Our pull requests get much easier to review:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/simplepullrequest.png" /></p> <p>Now let’s go ahead and deploy our new resources. Expand <strong>Pipelines</strong> on the left-hand side and select <strong>Releases</strong>. Then select the <strong>Terraform-ACI-CD</strong> pipelines and select <strong>Create Release</strong>. Select <strong>Create</strong> to start deploying.</p> <p>In our second release our additional ACI resource will be deployed. Once the release has been completed, we can double check in the Azure portal:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources2.png" /></p> <h3>Conclusion</h3> <p>In this article we imported a project that utilizes pipeline templates to generate Terraform configurations during the build pipeline. We also successfully deployed Azure Container Instance resources from these pipeline templates and even added additional resources using a Pull Request.</p> <p>As you can see, this model can greatly simplify Infrastructure as Code environments and provide greater management and consistency. However, keep in mind that this strategy might not fit all scenarios. For example, a tiny environment might not need to go this far with only a few resources. They may be fine with just a few repositories with Terraform configurations stored inside them. Also, an extremely complex environment could be too limited by the templatized configurations and may require a much more complex set up.</p> <p>The Infrastructure as Code model can become difficult to manage at large scale, using pipeline templates instead of treating our Terraform config files like sheep prevents us from creating snowflake infrastructure and allows us to scale our infrastructure rapidly and in a stable way.</p> <p>For more information on Azure DevOps templates be sure to check out Microsoft’s documentation. Also, if you’re interested in learning more about Terraform take a look at their website for more material.</p> <p><strong>Luke Orellana</strong> is a VMware vExpert who's been immersed in the IT Infrastructure realm since 2005. He's been creating technical blog content and guest speaking at Webinars throughout the years. His technology passions are Cloud and DevOps tools. As a life long learner Luke’s objective is to discover ways to automate tedious and troublesome tasks and to share his findings with others.</p> <h2>Terraform azure devops</h2> <h3>Terraform azure devops</h3> <p>[youtube]</p> Terraform azure devops <a href="http://remmont.com">Recent news</a> Terraform azure devops <h4>Terraform azure devops</h4> Infrastructure as Code is considered a best practice when managing infrastructure in the cloud. <h5>Terraform azure devops</h5> Terraform azure devops <a href="http://remmont.com">Terraform azure devops</a> Terraform azure devops SOURCE: <h6>Terraform azure devops</h6> <a href="https://dev-ops.engineer/">Terraform azure devops</a> Terraform azure devops #tags#[replace: -,-Terraform azure devops] Terraform azure devops#tags#[/b] [b]Eduard Kabrinskiy[/b] [url=http://remmont.com]news today[/url][email protected] task. Next is the task. We are copying the Terraform configuration template file, main.tf , from the \Terraform\ACI directory of our source control repo to our $(Build.ArtifactStagingDirectory) . This is where we are building our Terraform files to produce as an <em>artifact</em>. An artifact, from a developer perspective, typically contains the compiled binaries and libraries used to run an application. These application files are then deployed to an environment in the release pipeline. With our IaC build pipeline, our Terraform configuration files are the artifacts in this case; and we will be deploying them with the release pipeline. In the last task we run the [email protected] task to swap out the variables surrounded by __ with our associated environment variable. This entire template allows us to take in parameter values and generate a Terraform configuration file from it:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates.png" /></p> <p>If we look at the azure-aci-container.yml template, we can see the same structure as azure-aci-rg.yml . Since Azure Container Instances require many more values to create than a resource group, we have many more parameters declared at the beginning and in the [email protected] task, where we declare our environment variables. The key difference in this template is the extra [email protected] task at the end that renames the container.tf file to the name of the ACI resource. This allows us to create additional ACI resources in the same Terraform configuration by providing a unique name to the configuration file, so we don’t copy over any files:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates2.png" /></p> <p>Now that we’ve reviewed our two repos, let’s wrap our head around the workflow in this build pipeline. Our pipelineconfig.yml file is our build pipeline file, which references the desired infrastructure yml file to build such as aci-prod-sampleapp1.yml . This file then points to several pipeline templates located in the <strong>templates</strong> repository which each build out the Terraform configuration files according to the parameter values specified in aci-prod-sampleapp1.yml . Finally, once our Terraform configuration files are built, they are published as an artifact which will then be used by our release pipeline to deploy to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/buildflowchart.png" /></p> <p>In the next step we are going to deploy the Azure Container Instance infrastructure described in the aci-prod-sampleapp2.yml file.</p> <h2>Step 3 — Deploying Resources</h2> <p>First, let’s run our build pipeline. On the left-hand side select <strong>Pipelines</strong> to expand the options underneath it. Then, once again, select <strong>Pipelines</strong> to see our build pipelines. Select <strong>Terraform-ACI-CI</strong> and select <strong>Run pipeline</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/runbuildpipeline.png" /></p> <p>Select <strong>Run</strong> in the pop-up window to start our build pipeline. It will run for a minute or so and the artifacts will then be generated for our sampleapp2 infrastructure. We can view these artifacts by selecting <strong>1 published</strong> under the <strong>artifacts</strong> section:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/artifacts.png" /></p> <p>We can see our Terraform configuration files for both ACI resources are there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/terraformartifacts.png" /></p> <p>Let’s deploy the infrastructure to our Azure subscription by running the release pipeline, but first we need to edit the release pipeline to configure a connection to our Azure subscription. On the left hand side expand <strong>Pipelines</strong> and select <strong>Releases</strong>. We can see our <strong>Terraform-ACI-CD</strong> pipeline has been imported, select <strong>Edit</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasepipeline.png" /></p> <p>Under our <strong>Build</strong> stage select <strong>1 job, 5 tasks</strong> to edit our tasks to include our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasetask.png" /></p> <p>Select the first task <strong>Set up Azure Storage Account…</strong> and click on the drop-down box under <strong>Azure subscription</strong>. A list of subscriptions associated with your tenant will appear in this box. Select one that you would like to deploy the example Azure Container Instances too and select <strong>Authorize</strong>. You may be prompted to login to your Azure account. This process will create a Service Principal account in your Azure tenant and assign permissions to that subscription with that account. Azure DevOps will set this up as a service connection and use that to connect to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription1.png" /></p> <p>Next, we need to configure the remaining Terraform tasks with the same Azure service connection. The new connection that we made should now show up in the drop-down menu under <strong>Available Azure service connections</strong>. Select this for all 3 of the Terraform tasks that say <strong>some settings need attention</strong> this is because they are missing their Azure subscription settings:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription2.png" /></p> <p>Once complete, select <strong>Save</strong> at the top. Now we are ready to deploy our infrastructure. Select <strong>Create Release</strong> and then select <strong>Create</strong> to initiate the release pipeline. We will see a new message in green indicating that the release has been created. Select <strong>Release-1</strong> to view the release process for deploying the ACI resources into our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasecreated.png" /></p> <p>We will see that the release is running and can view the different steps of our release pipeline. This is a typical pipeline for deploying Terraform code, we provision a storage account to store our Terraform state, run a terraform init to initialize our Terraform environment and connect to our remote state (azure storage account in this case). Then we run a terraform plan to verify our configuration files have no issues. Finally if all the previous tasks are successful we run our terraform apply -auto-approve to deploy the infrastructure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releaserunning.png" /></p> <p>Once our release has run successfully, we will see a <strong>Succeeded</strong> message:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasesucceeded.png" /></p> <p>If we look in our Azure portal, we can see the resources are in fact there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources.png" /></p> <p>Next, we will add another ACI resource to our sampleapp2 application and redeploy our configuration with a pull request.</p> <h2>Step 4 — Modifying Resources with Pull Request</h2> <p>We need to set up a branch policy for our <strong>master</strong> branch, this will allow us to automatically kick off a build if a Pull Request is initiated. To do this expand <strong>Repos</strong> and select <strong>Branches</strong>. On the <strong>master</strong> branch select the <strong>…</strong> all the way on the right side and select <strong>Branch policies</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/selectbranches.png" /></p> <p>Select <strong>+ Add build policy</strong>. In the pop-up window, select our build pipeline <strong>Terraform-ACI-CI</strong> and keep the defaults for everything else. Select <strong>Save</strong> to create the build policy:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/branchpolicy.png" /></p> <p>Now we are ready to submit a Pull Request and trigger a new build. Let’s create a new branch to make our changes in. In the <strong>ACI</strong> repository select the dropdown labeled <strong>master</strong> and select <strong>+ New Branch</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/newbranch.png" /></p> <p>In our example we will name the new branch <strong>deploysampleapp2</strong>. Select <strong>Create</strong>. We are now actively using the new branch we just created in Azure DevOps. Select the aci-prod-sampleapp2.yml file and select <strong>Edit</strong> to edit the file. We are going to add another ACI resource by adding in another ACI template with the required parameters:</p> <p>Next, select <strong>Commit</strong> to save our changes:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editpipelineconfig.png" /></p> <p>Select <strong>Commit</strong> again. Now there will be a pop up for a pull request, select <strong>Create a pull request</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequest.png" /></p> <p>In the next window we can write in some information on our pull request and description. This provides great documentation for our deployments:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestdescription.png" /></p> <p>Select <strong>Create</strong>, and in the next windows select <strong>Set auto-complete</strong>. This will complete the Pull Request if our build runs successfully:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestrunning.png" /></p> <p>Then select <strong>set auto-complete</strong> again to confirm. Our build pipeline is now running with the changes from our new branch. If the build is successful, our branch will merge with the master branch with our new changes. Also note, if we look back at our pull request history, we can see a very simple outline of the new infrastructure that was added. This is one of the benefits of using the template parameters to define our infrastructure. Our pull requests get much easier to review:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/simplepullrequest.png" /></p> <p>Now let’s go ahead and deploy our new resources. Expand <strong>Pipelines</strong> on the left-hand side and select <strong>Releases</strong>. Then select the <strong>Terraform-ACI-CD</strong> pipelines and select <strong>Create Release</strong>. Select <strong>Create</strong> to start deploying.</p> <p>In our second release our additional ACI resource will be deployed. Once the release has been completed, we can double check in the Azure portal:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources2.png" /></p> <h3>Conclusion</h3> <p>In this article we imported a project that utilizes pipeline templates to generate Terraform configurations during the build pipeline. We also successfully deployed Azure Container Instance resources from these pipeline templates and even added additional resources using a Pull Request.</p> <p>As you can see, this model can greatly simplify Infrastructure as Code environments and provide greater management and consistency. However, keep in mind that this strategy might not fit all scenarios. For example, a tiny environment might not need to go this far with only a few resources. They may be fine with just a few repositories with Terraform configurations stored inside them. Also, an extremely complex environment could be too limited by the templatized configurations and may require a much more complex set up.</p> <p>The Infrastructure as Code model can become difficult to manage at large scale, using pipeline templates instead of treating our Terraform config files like sheep prevents us from creating snowflake infrastructure and allows us to scale our infrastructure rapidly and in a stable way.</p> <p>For more information on Azure DevOps templates be sure to check out Microsoft’s documentation. Also, if you’re interested in learning more about Terraform take a look at their website for more material.</p> <p><strong>Luke Orellana</strong> is a VMware vExpert who's been immersed in the IT Infrastructure realm since 2005. He's been creating technical blog content and guest speaking at Webinars throughout the years. His technology passions are Cloud and DevOps tools. As a life long learner Luke’s objective is to discover ways to automate tedious and troublesome tasks and to share his findings with others.</p> <h2>Terraform azure devops</h2> <h3>Terraform azure devops</h3> <p>[youtube]</p> Terraform azure devops <a href="http://remmont.com">Recent news</a> Terraform azure devops <h4>Terraform azure devops</h4> Infrastructure as Code is considered a best practice when managing infrastructure in the cloud. <h5>Terraform azure devops</h5> Terraform azure devops <a href="http://remmont.com">Terraform azure devops</a> Terraform azure devops SOURCE: <h6>Terraform azure devops</h6> <a href="https://dev-ops.engineer/">Terraform azure devops</a> Terraform azure devops #tags#[replace: -,-Terraform azure devops] Terraform azure devops#tags#[/b] [b]Eduard Kabrinskiy[/b] [url=http://remmont.com]news today[/url][email protected] task. We are copying the Terraform configuration template file, main.tf , from the \Terraform\ACI directory of our source control repo to our $(Build.ArtifactStagingDirectory) . This is where we are building our Terraform files to produce as an <em>artifact</em>. An artifact, from a developer perspective, typically contains the compiled binaries and libraries used to run an application. These application files are then deployed to an environment in the release pipeline. With our IaC build pipeline, our Terraform configuration files are the artifacts in this case; and we will be deploying them with the release pipeline. In the last task we run the task to swap out the variables surrounded by __ with our associated environment variable. This entire template allows us to take in parameter values and generate a Terraform configuration file from it:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates.png" /></p> <p>If we look at the azure-aci-container.yml template, we can see the same structure as azure-aci-rg.yml . Since Azure Container Instances require many more values to create than a resource group, we have many more parameters declared at the beginning and in the [email protected] task, where we declare our environment variables. The key difference in this template is the extra [email protected] task at the end that renames the container.tf file to the name of the ACI resource. This allows us to create additional ACI resources in the same Terraform configuration by providing a unique name to the configuration file, so we don’t copy over any files:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates2.png" /></p> <p>Now that we’ve reviewed our two repos, let’s wrap our head around the workflow in this build pipeline. Our pipelineconfig.yml file is our build pipeline file, which references the desired infrastructure yml file to build such as aci-prod-sampleapp1.yml . This file then points to several pipeline templates located in the <strong>templates</strong> repository which each build out the Terraform configuration files according to the parameter values specified in aci-prod-sampleapp1.yml . Finally, once our Terraform configuration files are built, they are published as an artifact which will then be used by our release pipeline to deploy to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/buildflowchart.png" /></p> <p>In the next step we are going to deploy the Azure Container Instance infrastructure described in the aci-prod-sampleapp2.yml file.</p> <h2>Step 3 — Deploying Resources</h2> <p>First, let’s run our build pipeline. On the left-hand side select <strong>Pipelines</strong> to expand the options underneath it. Then, once again, select <strong>Pipelines</strong> to see our build pipelines. Select <strong>Terraform-ACI-CI</strong> and select <strong>Run pipeline</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/runbuildpipeline.png" /></p> <p>Select <strong>Run</strong> in the pop-up window to start our build pipeline. It will run for a minute or so and the artifacts will then be generated for our sampleapp2 infrastructure. We can view these artifacts by selecting <strong>1 published</strong> under the <strong>artifacts</strong> section:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/artifacts.png" /></p> <p>We can see our Terraform configuration files for both ACI resources are there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/terraformartifacts.png" /></p> <p>Let’s deploy the infrastructure to our Azure subscription by running the release pipeline, but first we need to edit the release pipeline to configure a connection to our Azure subscription. On the left hand side expand <strong>Pipelines</strong> and select <strong>Releases</strong>. We can see our <strong>Terraform-ACI-CD</strong> pipeline has been imported, select <strong>Edit</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasepipeline.png" /></p> <p>Under our <strong>Build</strong> stage select <strong>1 job, 5 tasks</strong> to edit our tasks to include our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasetask.png" /></p> <p>Select the first task <strong>Set up Azure Storage Account…</strong> and click on the drop-down box under <strong>Azure subscription</strong>. A list of subscriptions associated with your tenant will appear in this box. Select one that you would like to deploy the example Azure Container Instances too and select <strong>Authorize</strong>. You may be prompted to login to your Azure account. This process will create a Service Principal account in your Azure tenant and assign permissions to that subscription with that account. Azure DevOps will set this up as a service connection and use that to connect to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription1.png" /></p> <p>Next, we need to configure the remaining Terraform tasks with the same Azure service connection. The new connection that we made should now show up in the drop-down menu under <strong>Available Azure service connections</strong>. Select this for all 3 of the Terraform tasks that say <strong>some settings need attention</strong> this is because they are missing their Azure subscription settings:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription2.png" /></p> <p>Once complete, select <strong>Save</strong> at the top. Now we are ready to deploy our infrastructure. Select <strong>Create Release</strong> and then select <strong>Create</strong> to initiate the release pipeline. We will see a new message in green indicating that the release has been created. Select <strong>Release-1</strong> to view the release process for deploying the ACI resources into our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasecreated.png" /></p> <p>We will see that the release is running and can view the different steps of our release pipeline. This is a typical pipeline for deploying Terraform code, we provision a storage account to store our Terraform state, run a terraform init to initialize our Terraform environment and connect to our remote state (azure storage account in this case). Then we run a terraform plan to verify our configuration files have no issues. Finally if all the previous tasks are successful we run our terraform apply -auto-approve to deploy the infrastructure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releaserunning.png" /></p> <p>Once our release has run successfully, we will see a <strong>Succeeded</strong> message:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasesucceeded.png" /></p> <p>If we look in our Azure portal, we can see the resources are in fact there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources.png" /></p> <p>Next, we will add another ACI resource to our sampleapp2 application and redeploy our configuration with a pull request.</p> <h2>Step 4 — Modifying Resources with Pull Request</h2> <p>We need to set up a branch policy for our <strong>master</strong> branch, this will allow us to automatically kick off a build if a Pull Request is initiated. To do this expand <strong>Repos</strong> and select <strong>Branches</strong>. On the <strong>master</strong> branch select the <strong>…</strong> all the way on the right side and select <strong>Branch policies</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/selectbranches.png" /></p> <p>Select <strong>+ Add build policy</strong>. In the pop-up window, select our build pipeline <strong>Terraform-ACI-CI</strong> and keep the defaults for everything else. Select <strong>Save</strong> to create the build policy:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/branchpolicy.png" /></p> <p>Now we are ready to submit a Pull Request and trigger a new build. Let’s create a new branch to make our changes in. In the <strong>ACI</strong> repository select the dropdown labeled <strong>master</strong> and select <strong>+ New Branch</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/newbranch.png" /></p> <p>In our example we will name the new branch <strong>deploysampleapp2</strong>. Select <strong>Create</strong>. We are now actively using the new branch we just created in Azure DevOps. Select the aci-prod-sampleapp2.yml file and select <strong>Edit</strong> to edit the file. We are going to add another ACI resource by adding in another ACI template with the required parameters:</p> <p>Next, select <strong>Commit</strong> to save our changes:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editpipelineconfig.png" /></p> <p>Select <strong>Commit</strong> again. Now there will be a pop up for a pull request, select <strong>Create a pull request</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequest.png" /></p> <p>In the next window we can write in some information on our pull request and description. This provides great documentation for our deployments:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestdescription.png" /></p> <p>Select <strong>Create</strong>, and in the next windows select <strong>Set auto-complete</strong>. This will complete the Pull Request if our build runs successfully:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestrunning.png" /></p> <p>Then select <strong>set auto-complete</strong> again to confirm. Our build pipeline is now running with the changes from our new branch. If the build is successful, our branch will merge with the master branch with our new changes. Also note, if we look back at our pull request history, we can see a very simple outline of the new infrastructure that was added. This is one of the benefits of using the template parameters to define our infrastructure. Our pull requests get much easier to review:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/simplepullrequest.png" /></p> <p>Now let’s go ahead and deploy our new resources. Expand <strong>Pipelines</strong> on the left-hand side and select <strong>Releases</strong>. Then select the <strong>Terraform-ACI-CD</strong> pipelines and select <strong>Create Release</strong>. Select <strong>Create</strong> to start deploying.</p> <p>In our second release our additional ACI resource will be deployed. Once the release has been completed, we can double check in the Azure portal:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources2.png" /></p> <h3>Conclusion</h3> <p>In this article we imported a project that utilizes pipeline templates to generate Terraform configurations during the build pipeline. We also successfully deployed Azure Container Instance resources from these pipeline templates and even added additional resources using a Pull Request.</p> <p>As you can see, this model can greatly simplify Infrastructure as Code environments and provide greater management and consistency. However, keep in mind that this strategy might not fit all scenarios. For example, a tiny environment might not need to go this far with only a few resources. They may be fine with just a few repositories with Terraform configurations stored inside them. Also, an extremely complex environment could be too limited by the templatized configurations and may require a much more complex set up.</p> <p>The Infrastructure as Code model can become difficult to manage at large scale, using pipeline templates instead of treating our Terraform config files like sheep prevents us from creating snowflake infrastructure and allows us to scale our infrastructure rapidly and in a stable way.</p> <p>For more information on Azure DevOps templates be sure to check out Microsoft’s documentation. Also, if you’re interested in learning more about Terraform take a look at their website for more material.</p> <p><strong>Luke Orellana</strong> is a VMware vExpert who's been immersed in the IT Infrastructure realm since 2005. He's been creating technical blog content and guest speaking at Webinars throughout the years. His technology passions are Cloud and DevOps tools. As a life long learner Luke’s objective is to discover ways to automate tedious and troublesome tasks and to share his findings with others.</p> <h2>Terraform azure devops</h2> <h3>Terraform azure devops</h3> <p>[youtube]</p> Terraform azure devops <a href="http://remmont.com">Recent news</a> Terraform azure devops <h4>Terraform azure devops</h4> Infrastructure as Code is considered a best practice when managing infrastructure in the cloud. <h5>Terraform azure devops</h5> Terraform azure devops <a href="http://remmont.com">Terraform azure devops</a> Terraform azure devops SOURCE: <h6>Terraform azure devops</h6> <a href="https://dev-ops.engineer/">Terraform azure devops</a> Terraform azure devops #tags#[replace: -,-Terraform azure devops] Terraform azure devops#tags#[/b] [b]Eduard Kabrinskiy[/b] [url=http://remmont.com]news today[/url][email protected] task to swap out the variables surrounded by __ with our associated environment variable. This entire template allows us to take in parameter values and generate a Terraform configuration file from it:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/templates.png" /></p> <p>If we look at the azure-aci-container.yml template, we can see the same structure as azure-aci-rg.yml . Since Azure Container Instances require many more values to create than a resource group, we have many more parameters declared at the beginning and in the task, where we declare our environment variables. The key difference in this template is the extra [email protected] task at the end that renames the container.tf file to the name of the ACI resource. This allows us to create additional ACI resources in the same Terraform configuration by providing a unique name to the configuration file, so we don’t copy over any files:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates2.png" /></p> <p>Now that we’ve reviewed our two repos, let’s wrap our head around the workflow in this build pipeline. Our pipelineconfig.yml file is our build pipeline file, which references the desired infrastructure yml file to build such as aci-prod-sampleapp1.yml . This file then points to several pipeline templates located in the <strong>templates</strong> repository which each build out the Terraform configuration files according to the parameter values specified in aci-prod-sampleapp1.yml . Finally, once our Terraform configuration files are built, they are published as an artifact which will then be used by our release pipeline to deploy to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/buildflowchart.png" /></p> <p>In the next step we are going to deploy the Azure Container Instance infrastructure described in the aci-prod-sampleapp2.yml file.</p> <h2>Step 3 — Deploying Resources</h2> <p>First, let’s run our build pipeline. On the left-hand side select <strong>Pipelines</strong> to expand the options underneath it. Then, once again, select <strong>Pipelines</strong> to see our build pipelines. Select <strong>Terraform-ACI-CI</strong> and select <strong>Run pipeline</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/runbuildpipeline.png" /></p> <p>Select <strong>Run</strong> in the pop-up window to start our build pipeline. It will run for a minute or so and the artifacts will then be generated for our sampleapp2 infrastructure. We can view these artifacts by selecting <strong>1 published</strong> under the <strong>artifacts</strong> section:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/artifacts.png" /></p> <p>We can see our Terraform configuration files for both ACI resources are there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/terraformartifacts.png" /></p> <p>Let’s deploy the infrastructure to our Azure subscription by running the release pipeline, but first we need to edit the release pipeline to configure a connection to our Azure subscription. On the left hand side expand <strong>Pipelines</strong> and select <strong>Releases</strong>. We can see our <strong>Terraform-ACI-CD</strong> pipeline has been imported, select <strong>Edit</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasepipeline.png" /></p> <p>Under our <strong>Build</strong> stage select <strong>1 job, 5 tasks</strong> to edit our tasks to include our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasetask.png" /></p> <p>Select the first task <strong>Set up Azure Storage Account…</strong> and click on the drop-down box under <strong>Azure subscription</strong>. A list of subscriptions associated with your tenant will appear in this box. Select one that you would like to deploy the example Azure Container Instances too and select <strong>Authorize</strong>. You may be prompted to login to your Azure account. This process will create a Service Principal account in your Azure tenant and assign permissions to that subscription with that account. Azure DevOps will set this up as a service connection and use that to connect to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription1.png" /></p> <p>Next, we need to configure the remaining Terraform tasks with the same Azure service connection. The new connection that we made should now show up in the drop-down menu under <strong>Available Azure service connections</strong>. Select this for all 3 of the Terraform tasks that say <strong>some settings need attention</strong> this is because they are missing their Azure subscription settings:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription2.png" /></p> <p>Once complete, select <strong>Save</strong> at the top. Now we are ready to deploy our infrastructure. Select <strong>Create Release</strong> and then select <strong>Create</strong> to initiate the release pipeline. We will see a new message in green indicating that the release has been created. Select <strong>Release-1</strong> to view the release process for deploying the ACI resources into our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasecreated.png" /></p> <p>We will see that the release is running and can view the different steps of our release pipeline. This is a typical pipeline for deploying Terraform code, we provision a storage account to store our Terraform state, run a terraform init to initialize our Terraform environment and connect to our remote state (azure storage account in this case). Then we run a terraform plan to verify our configuration files have no issues. Finally if all the previous tasks are successful we run our terraform apply -auto-approve to deploy the infrastructure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releaserunning.png" /></p> <p>Once our release has run successfully, we will see a <strong>Succeeded</strong> message:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasesucceeded.png" /></p> <p>If we look in our Azure portal, we can see the resources are in fact there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources.png" /></p> <p>Next, we will add another ACI resource to our sampleapp2 application and redeploy our configuration with a pull request.</p> <h2>Step 4 — Modifying Resources with Pull Request</h2> <p>We need to set up a branch policy for our <strong>master</strong> branch, this will allow us to automatically kick off a build if a Pull Request is initiated. To do this expand <strong>Repos</strong> and select <strong>Branches</strong>. On the <strong>master</strong> branch select the <strong>…</strong> all the way on the right side and select <strong>Branch policies</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/selectbranches.png" /></p> <p>Select <strong>+ Add build policy</strong>. In the pop-up window, select our build pipeline <strong>Terraform-ACI-CI</strong> and keep the defaults for everything else. Select <strong>Save</strong> to create the build policy:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/branchpolicy.png" /></p> <p>Now we are ready to submit a Pull Request and trigger a new build. Let’s create a new branch to make our changes in. In the <strong>ACI</strong> repository select the dropdown labeled <strong>master</strong> and select <strong>+ New Branch</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/newbranch.png" /></p> <p>In our example we will name the new branch <strong>deploysampleapp2</strong>. Select <strong>Create</strong>. We are now actively using the new branch we just created in Azure DevOps. Select the aci-prod-sampleapp2.yml file and select <strong>Edit</strong> to edit the file. We are going to add another ACI resource by adding in another ACI template with the required parameters:</p> <p>Next, select <strong>Commit</strong> to save our changes:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editpipelineconfig.png" /></p> <p>Select <strong>Commit</strong> again. Now there will be a pop up for a pull request, select <strong>Create a pull request</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequest.png" /></p> <p>In the next window we can write in some information on our pull request and description. This provides great documentation for our deployments:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestdescription.png" /></p> <p>Select <strong>Create</strong>, and in the next windows select <strong>Set auto-complete</strong>. This will complete the Pull Request if our build runs successfully:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestrunning.png" /></p> <p>Then select <strong>set auto-complete</strong> again to confirm. Our build pipeline is now running with the changes from our new branch. If the build is successful, our branch will merge with the master branch with our new changes. Also note, if we look back at our pull request history, we can see a very simple outline of the new infrastructure that was added. This is one of the benefits of using the template parameters to define our infrastructure. Our pull requests get much easier to review:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/simplepullrequest.png" /></p> <p>Now let’s go ahead and deploy our new resources. Expand <strong>Pipelines</strong> on the left-hand side and select <strong>Releases</strong>. Then select the <strong>Terraform-ACI-CD</strong> pipelines and select <strong>Create Release</strong>. Select <strong>Create</strong> to start deploying.</p> <p>In our second release our additional ACI resource will be deployed. Once the release has been completed, we can double check in the Azure portal:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources2.png" /></p> <h3>Conclusion</h3> <p>In this article we imported a project that utilizes pipeline templates to generate Terraform configurations during the build pipeline. We also successfully deployed Azure Container Instance resources from these pipeline templates and even added additional resources using a Pull Request.</p> <p>As you can see, this model can greatly simplify Infrastructure as Code environments and provide greater management and consistency. However, keep in mind that this strategy might not fit all scenarios. For example, a tiny environment might not need to go this far with only a few resources. They may be fine with just a few repositories with Terraform configurations stored inside them. Also, an extremely complex environment could be too limited by the templatized configurations and may require a much more complex set up.</p> <p>The Infrastructure as Code model can become difficult to manage at large scale, using pipeline templates instead of treating our Terraform config files like sheep prevents us from creating snowflake infrastructure and allows us to scale our infrastructure rapidly and in a stable way.</p> <p>For more information on Azure DevOps templates be sure to check out Microsoft’s documentation. Also, if you’re interested in learning more about Terraform take a look at their website for more material.</p> <p><strong>Luke Orellana</strong> is a VMware vExpert who's been immersed in the IT Infrastructure realm since 2005. He's been creating technical blog content and guest speaking at Webinars throughout the years. His technology passions are Cloud and DevOps tools. As a life long learner Luke’s objective is to discover ways to automate tedious and troublesome tasks and to share his findings with others.</p> <h2>Terraform azure devops</h2> <h3>Terraform azure devops</h3> <p>[youtube]</p> Terraform azure devops <a href="http://remmont.com">Recent news</a> Terraform azure devops <h4>Terraform azure devops</h4> Infrastructure as Code is considered a best practice when managing infrastructure in the cloud. <h5>Terraform azure devops</h5> Terraform azure devops <a href="http://remmont.com">Terraform azure devops</a> Terraform azure devops SOURCE: <h6>Terraform azure devops</h6> <a href="https://dev-ops.engineer/">Terraform azure devops</a> Terraform azure devops #tags#[replace: -,-Terraform azure devops] Terraform azure devops#tags#[/b] [b]Eduard Kabrinskiy[/b] [url=http://remmont.com]news today[/url][email protected] task, where we declare our environment variables. The key difference in this template is the extra task at the end that renames the container.tf file to the name of the ACI resource. This allows us to create additional ACI resources in the same Terraform configuration by providing a unique name to the configuration file, so we don’t copy over any files:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/templates2.png" /></p> <p>Now that we’ve reviewed our two repos, let’s wrap our head around the workflow in this build pipeline. Our pipelineconfig.yml file is our build pipeline file, which references the desired infrastructure yml file to build such as aci-prod-sampleapp1.yml . This file then points to several pipeline templates located in the <strong>templates</strong> repository which each build out the Terraform configuration files according to the parameter values specified in aci-prod-sampleapp1.yml . Finally, once our Terraform configuration files are built, they are published as an artifact which will then be used by our release pipeline to deploy to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/buildflowchart.png" /></p> <p>In the next step we are going to deploy the Azure Container Instance infrastructure described in the aci-prod-sampleapp2.yml file.</p> <h2>Step 3 — Deploying Resources</h2> <p>First, let’s run our build pipeline. On the left-hand side select <strong>Pipelines</strong> to expand the options underneath it. Then, once again, select <strong>Pipelines</strong> to see our build pipelines. Select <strong>Terraform-ACI-CI</strong> and select <strong>Run pipeline</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/runbuildpipeline.png" /></p> <p>Select <strong>Run</strong> in the pop-up window to start our build pipeline. It will run for a minute or so and the artifacts will then be generated for our sampleapp2 infrastructure. We can view these artifacts by selecting <strong>1 published</strong> under the <strong>artifacts</strong> section:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/artifacts.png" /></p> <p>We can see our Terraform configuration files for both ACI resources are there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/terraformartifacts.png" /></p> <p>Let’s deploy the infrastructure to our Azure subscription by running the release pipeline, but first we need to edit the release pipeline to configure a connection to our Azure subscription. On the left hand side expand <strong>Pipelines</strong> and select <strong>Releases</strong>. We can see our <strong>Terraform-ACI-CD</strong> pipeline has been imported, select <strong>Edit</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasepipeline.png" /></p> <p>Under our <strong>Build</strong> stage select <strong>1 job, 5 tasks</strong> to edit our tasks to include our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editreleasetask.png" /></p> <p>Select the first task <strong>Set up Azure Storage Account…</strong> and click on the drop-down box under <strong>Azure subscription</strong>. A list of subscriptions associated with your tenant will appear in this box. Select one that you would like to deploy the example Azure Container Instances too and select <strong>Authorize</strong>. You may be prompted to login to your Azure account. This process will create a Service Principal account in your Azure tenant and assign permissions to that subscription with that account. Azure DevOps will set this up as a service connection and use that to connect to Azure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription1.png" /></p> <p>Next, we need to configure the remaining Terraform tasks with the same Azure service connection. The new connection that we made should now show up in the drop-down menu under <strong>Available Azure service connections</strong>. Select this for all 3 of the Terraform tasks that say <strong>some settings need attention</strong> this is because they are missing their Azure subscription settings:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/addazuresubscription2.png" /></p> <p>Once complete, select <strong>Save</strong> at the top. Now we are ready to deploy our infrastructure. Select <strong>Create Release</strong> and then select <strong>Create</strong> to initiate the release pipeline. We will see a new message in green indicating that the release has been created. Select <strong>Release-1</strong> to view the release process for deploying the ACI resources into our Azure subscription:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasecreated.png" /></p> <p>We will see that the release is running and can view the different steps of our release pipeline. This is a typical pipeline for deploying Terraform code, we provision a storage account to store our Terraform state, run a terraform init to initialize our Terraform environment and connect to our remote state (azure storage account in this case). Then we run a terraform plan to verify our configuration files have no issues. Finally if all the previous tasks are successful we run our terraform apply -auto-approve to deploy the infrastructure:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releaserunning.png" /></p> <p>Once our release has run successfully, we will see a <strong>Succeeded</strong> message:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/releasesucceeded.png" /></p> <p>If we look in our Azure portal, we can see the resources are in fact there:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources.png" /></p> <p>Next, we will add another ACI resource to our sampleapp2 application and redeploy our configuration with a pull request.</p> <h2>Step 4 — Modifying Resources with Pull Request</h2> <p>We need to set up a branch policy for our <strong>master</strong> branch, this will allow us to automatically kick off a build if a Pull Request is initiated. To do this expand <strong>Repos</strong> and select <strong>Branches</strong>. On the <strong>master</strong> branch select the <strong>…</strong> all the way on the right side and select <strong>Branch policies</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/selectbranches.png" /></p> <p>Select <strong>+ Add build policy</strong>. In the pop-up window, select our build pipeline <strong>Terraform-ACI-CI</strong> and keep the defaults for everything else. Select <strong>Save</strong> to create the build policy:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/branchpolicy.png" /></p> <p>Now we are ready to submit a Pull Request and trigger a new build. Let’s create a new branch to make our changes in. In the <strong>ACI</strong> repository select the dropdown labeled <strong>master</strong> and select <strong>+ New Branch</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/newbranch.png" /></p> <p>In our example we will name the new branch <strong>deploysampleapp2</strong>. Select <strong>Create</strong>. We are now actively using the new branch we just created in Azure DevOps. Select the aci-prod-sampleapp2.yml file and select <strong>Edit</strong> to edit the file. We are going to add another ACI resource by adding in another ACI template with the required parameters:</p> <p>Next, select <strong>Commit</strong> to save our changes:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/editpipelineconfig.png" /></p> <p>Select <strong>Commit</strong> again. Now there will be a pop up for a pull request, select <strong>Create a pull request</strong>:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequest.png" /></p> <p>In the next window we can write in some information on our pull request and description. This provides great documentation for our deployments:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestdescription.png" /></p> <p>Select <strong>Create</strong>, and in the next windows select <strong>Set auto-complete</strong>. This will complete the Pull Request if our build runs successfully:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/pullrequestrunning.png" /></p> <p>Then select <strong>set auto-complete</strong> again to confirm. Our build pipeline is now running with the changes from our new branch. If the build is successful, our branch will merge with the master branch with our new changes. Also note, if we look back at our pull request history, we can see a very simple outline of the new infrastructure that was added. This is one of the benefits of using the template parameters to define our infrastructure. Our pull requests get much easier to review:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/simplepullrequest.png" /></p> <p>Now let’s go ahead and deploy our new resources. Expand <strong>Pipelines</strong> on the left-hand side and select <strong>Releases</strong>. Then select the <strong>Terraform-ACI-CD</strong> pipelines and select <strong>Create Release</strong>. Select <strong>Create</strong> to start deploying.</p> <p>In our second release our additional ACI resource will be deployed. Once the release has been completed, we can double check in the Azure portal:</p> <p style="clear: both"><img src="https://csprodstorage001.blob.core.windows.net/blog/azureresources2.png" /></p> <h3>Conclusion</h3> <p>In this article we imported a project that utilizes pipeline templates to generate Terraform configurations during the build pipeline. We also successfully deployed Azure Container Instance resources from these pipeline templates and even added additional resources using a Pull Request.</p> <p>As you can see, this model can greatly simplify Infrastructure as Code environments and provide greater management and consistency. However, keep in mind that this strategy might not fit all scenarios. For example, a tiny environment might not need to go this far with only a few resources. They may be fine with just a few repositories with Terraform configurations stored inside them. Also, an extremely complex environment could be too limited by the templatized configurations and may require a much more complex set up.</p> <p>The Infrastructure as Code model can become difficult to manage at large scale, using pipeline templates instead of treating our Terraform config files like sheep prevents us from creating snowflake infrastructure and allows us to scale our infrastructure rapidly and in a stable way.</p> <p>For more information on Azure DevOps templates be sure to check out Microsoft’s documentation. Also, if you’re interested in learning more about Terraform take a look at their website for more material.</p> <p><strong>Luke Orellana</strong> is a VMware vExpert who's been immersed in the IT Infrastructure realm since 2005. He's been creating technical blog content and guest speaking at Webinars throughout the years. His technology passions are Cloud and DevOps tools. As a life long learner Luke’s objective is to discover ways to automate tedious and troublesome tasks and to share his findings with others.</p> <h2>Terraform azure devops</h2> <h3>Terraform azure devops</h3> <p>[youtube]</p> Terraform azure devops <a href="http://remmont.com">Recent news</a> Terraform azure devops <h4>Terraform azure devops</h4> Infrastructure as Code is considered a best practice when managing infrastructure in the cloud. <h5>Terraform azure devops</h5> Terraform azure devops <a href="http://remmont.com">Terraform azure devops</a> Terraform azure devops SOURCE: <h6>Terraform azure devops</h6> <a href="https://dev-ops.engineer/">Terraform azure devops</a> Terraform azure devops #tags#[replace: -,-Terraform azure devops] Terraform azure devops#tags#[/b] [b]Eduard Kabrinskiy[/b] [url=http://remmont.com]news today[/url][email protected] task at the end that renames the container.tf file to the name of the ACI resource. This allows us to create additional ACI resources in the same Terraform configuration by providing a unique name to the configuration file, so we don’t copy over any files:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/templates2.png" /></p> <p>Now that we’ve reviewed our two repos, let’s wrap our head around the workflow in this build pipeline. Our pipelineconfig.yml file is our build pipeline file, which references the desired infrastructure yml file to build such as aci-prod-sampleapp1.yml . This file then points to several pipeline templates located in the <strong>templates</strong> repository which each build out the Terraform configuration files according to the parameter values specified in aci-prod-sampleapp1.yml . Finally, once our Terraform configuration files are built, they are published as an artifact which will then be used by our release pipeline to deploy to Azure:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/buildflowchart.png" /></p> <p>In the next step we are going to deploy the Azure Container Instance infrastructure described in the aci-prod-sampleapp2.yml file.</p> <h2>Step 3 — Deploying Resources</h2> <p>First, let’s run our build pipeline. On the left-hand side select <strong>Pipelines</strong> to expand the options underneath it. Then, once again, select <strong>Pipelines</strong> to see our build pipelines. Select <strong>Terraform-ACI-CI</strong> and select <strong>Run pipeline</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...runbuildpipeline.png" /></p> <p>Select <strong>Run</strong> in the pop-up window to start our build pipeline. It will run for a minute or so and the artifacts will then be generated for our sampleapp2 infrastructure. We can view these artifacts by selecting <strong>1 published</strong> under the <strong>artifacts</strong> section:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/artifacts.png" /></p> <p>We can see our Terraform configuration files for both ACI resources are there:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...rraformartifacts.png" /></p> <p>Let’s deploy the infrastructure to our Azure subscription by running the release pipeline, but first we need to edit the release pipeline to configure a connection to our Azure subscription. On the left hand side expand <strong>Pipelines</strong> and select <strong>Releases</strong>. We can see our <strong>Terraform-ACI-CD</strong> pipeline has been imported, select <strong>Edit</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...treleasepipeline.png" /></p> <p>Under our <strong>Build</strong> stage select <strong>1 job, 5 tasks</strong> to edit our tasks to include our Azure subscription:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/editreleasetask.png" /></p> <p>Select the first task <strong>Set up Azure Storage Account…</strong> and click on the drop-down box under <strong>Azure subscription</strong>. A list of subscriptions associated with your tenant will appear in this box. Select one that you would like to deploy the example Azure Container Instances too and select <strong>Authorize</strong>. You may be prompted to login to your Azure account. This process will create a Service Principal account in your Azure tenant and assign permissions to that subscription with that account. Azure DevOps will set this up as a service connection and use that to connect to Azure:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...uresubscription1.png" /></p> <p>Next, we need to configure the remaining Terraform tasks with the same Azure service connection. The new connection that we made should now show up in the drop-down menu under <strong>Available Azure service connections</strong>. Select this for all 3 of the Terraform tasks that say <strong>some settings need attention</strong> this is because they are missing their Azure subscription settings:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...uresubscription2.png" /></p> <p>Once complete, select <strong>Save</strong> at the top. Now we are ready to deploy our infrastructure. Select <strong>Create Release</strong> and then select <strong>Create</strong> to initiate the release pipeline. We will see a new message in green indicating that the release has been created. Select <strong>Release-1</strong> to view the release process for deploying the ACI resources into our Azure subscription:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/releasecreated.png" /></p> <p>We will see that the release is running and can view the different steps of our release pipeline. This is a typical pipeline for deploying Terraform code, we provision a storage account to store our Terraform state, run a terraform init to initialize our Terraform environment and connect to our remote state (azure storage account in this case). Then we run a terraform plan to verify our configuration files have no issues. Finally if all the previous tasks are successful we run our terraform apply -auto-approve to deploy the infrastructure:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/releaserunning.png" /></p> <p>Once our release has run successfully, we will see a <strong>Succeeded</strong> message:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...releasesucceeded.png" /></p> <p>If we look in our Azure portal, we can see the resources are in fact there:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/azureresources.png" /></p> <p>Next, we will add another ACI resource to our sampleapp2 application and redeploy our configuration with a pull request.</p> <h2>Step 4 — Modifying Resources with Pull Request</h2> <p>We need to set up a branch policy for our <strong>master</strong> branch, this will allow us to automatically kick off a build if a Pull Request is initiated. To do this expand <strong>Repos</strong> and select <strong>Branches</strong>. On the <strong>master</strong> branch select the <strong>…</strong> all the way on the right side and select <strong>Branch policies</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/selectbranches.png" /></p> <p>Select <strong>+ Add build policy</strong>. In the pop-up window, select our build pipeline <strong>Terraform-ACI-CI</strong> and keep the defaults for everything else. Select <strong>Save</strong> to create the build policy:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/branchpolicy.png" /></p> <p>Now we are ready to submit a Pull Request and trigger a new build. Let’s create a new branch to make our changes in. In the <strong>ACI</strong> repository select the dropdown labeled <strong>master</strong> and select <strong>+ New Branch</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/newbranch.png" /></p> <p>In our example we will name the new branch <strong>deploysampleapp2</strong>. Select <strong>Create</strong>. We are now actively using the new branch we just created in Azure DevOps. Select the aci-prod-sampleapp2.yml file and select <strong>Edit</strong> to edit the file. We are going to add another ACI resource by adding in another ACI template with the required parameters:</p> <p>Next, select <strong>Commit</strong> to save our changes:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...itpipelineconfig.png" /></p> <p>Select <strong>Commit</strong> again. Now there will be a pop up for a pull request, select <strong>Create a pull request</strong>:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/pullrequest.png" /></p> <p>In the next window we can write in some information on our pull request and description. This provides great documentation for our deployments:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...questdescription.png" /></p> <p>Select <strong>Create</strong>, and in the next windows select <strong>Set auto-complete</strong>. This will complete the Pull Request if our build runs successfully:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...llrequestrunning.png" /></p> <p>Then select <strong>set auto-complete</strong> again to confirm. Our build pipeline is now running with the changes from our new branch. If the build is successful, our branch will merge with the master branch with our new changes. Also note, if we look back at our pull request history, we can see a very simple outline of the new infrastructure that was added. This is one of the benefits of using the template parameters to define our infrastructure. Our pull requests get much easier to review:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/b...implepullrequest.png" /></p> <p>Now let’s go ahead and deploy our new resources. Expand <strong>Pipelines</strong> on the left-hand side and select <strong>Releases</strong>. Then select the <strong>Terraform-ACI-CD</strong> pipelines and select <strong>Create Release</strong>. Select <strong>Create</strong> to start deploying.</p> <p>In our second release our additional ACI resource will be deployed. Once the release has been completed, we can double check in the Azure portal:</p> <p style="clear: both"><img src="csprodstorage001.blob.core.windows.net/blog/azureresources2.png" /></p> <h3>Conclusion</h3> <p>In this article we imported a project that utilizes pipeline templates to generate Terraform configurations during the build pipeline. We also successfully deployed Azure Container Instance resources from these pipeline templates and even added additional resources using a Pull Request.</p> <p>As you can see, this model can greatly simplify Infrastructure as Code environments and provide greater management and consistency. However, keep in mind that this strategy might not fit all scenarios. For example, a tiny environment might not need to go this far with only a few resources. They may be fine with just a few repositories with Terraform configurations stored inside them. Also, an extremely complex environment could be too limited by the templatized configurations and may require a much more complex set up.</p> <p>The Infrastructure as Code model can become difficult to manage at large scale, using pipeline templates instead of treating our Terraform config files like sheep prevents us from creating snowflake infrastructure and allows us to scale our infrastructure rapidly and in a stable way.</p> <p>For more information on Azure DevOps templates be sure to check out Microsoft’s documentation. Also, if you’re interested in learning more about Terraform take a look at their website for more material.</p> <p><strong>Luke Orellana</strong> is a VMware vExpert who's been immersed in the IT Infrastructure realm since 2005. He's been creating technical blog content and guest speaking at Webinars throughout the years. His technology passions are Cloud and DevOps tools. As a life long learner Luke’s objective is to discover ways to automate tedious and troublesome tasks and to share his findings with others.</p> <h2>Terraform azure devops</h2> <h3>Terraform azure devops</h3> <p>[youtube]</p> Terraform azure devops <a href="remmont.com">Recent news</a> Terraform azure devops <h4>Terraform azure devops</h4> Infrastructure as Code is considered a best practice when managing infrastructure in the cloud. <h5>Terraform azure devops</h5> Terraform azure devops <a href="remmont.com">Terraform azure devops</a> Terraform azure devops SOURCE: <h6>Terraform azure devops</h6> <a href="dev-ops.engineer/">Terraform azure devops</a> Terraform azure devops #tags#[replace: -,-Terraform azure devops] Terraform azure devops#tags# Eduard Kabrinskiy news today |
|
|
Адміністратор заборонив доступ на запис.
|
Gresham : vsts yaml build - Eduard Kabrinskiy 5 років 3 місяців тому #30126
|
Эдуард Кабринский - Azure devops github integration - Кабринский Рдуард
<h1>Azure devops github integration</h1> <p>[youtube]</p> Azure devops github integration <a href="remmont.com">World breaking news</a> Azure devops github integration <h1>Wyam, Azure DevOps and GitHub Pages</h1> <p>Publishing a static site with a static content generator can be fully automated. In this case I'm using Wyam, a static site generator, GitHub Pages for hosting and Azure DevOps for build and deployment. Of course there are a ton of other ways to do this, but right now I'll show you the way that I chose to use.</p> <p>This post will mainly focus on automated build and deployment, since there are a lot of great online resources on how to setup Wyam on your local machine.</p> <h1>GitHub setup</h1> <p>As I said, I'm using GitHub Pages to host my site. You can use it for free for any static website. By default GitHub Pages supports Jelyll with some out of the box themes and plugins. I used Jekyll in the past, but I found Wyam easier to work with.</p> <p>To create a personal blog on GitHub Pages, you should create a Git repository named yourusername.github.io . When you do this, GitHub will automatically create the site for you, and use the master branch for the site content. So once you created the repository, don't use the master branch, but create a new branch that will contain your working files. I named my working branch source .</p> <p>Perform the following commands after you created the repository on GitHub to setup the branches.</p> <p>Make sure you <strong>don't</strong> include README and .gitignore when creating the repository on GitHub</p> <p>These command will clone the repository from GitHub, create a new branch named source , push the new branch to GitHub and makes source the default branch. You can check whether you are on the source branch with this command:</p> <h2>.gitignore</h2> <p>In the next steps we'll start creating the site. In this process some files will be created that we don't want in our Git repository. To automate this you can create a file named .gitignore in your project root and add these contents:</p> <h1>Setup Wyam</h1> <p>First install Wyam if you haven't already done this. You can find how to install Wyam in the Wyam Documentation.</p> <p>Now move into your working directory ( yourusername.github.io ) and create a new Wyam project. In this case I'll demonstrate how to create a blog since I think this is the most common use case.</p> <p>This will scaffold a new Wyam site with the blog recipe. More about Wyam recipes can be found here. Since this post is mostly about automated build and deployment, I won't go into any further detail on setting up a Wyam site.</p> <p>You can preview the site with:</p> <p>This will not only start up a lightweight server, but it will also keep track of your changes and automatically update them. This way you can keep your site running while writing and see the changes in real time.</p> <p>You can build a site with:</p> <p>This will build the site. The site contents are located in the output directory.</p> <p>Since the output directory is in the .gitignore file, it won't be committed to your git repository. This is intentionally. We'll build the output directory fully automated on Azure DevOps later on.</p> <p>Now that you've seen your site works it is time to deploy it.</p> <h1>Azure DevOps Setup</h1> <p>If you haven't already created an account on Azure DevOps you should do so now. It is completely free for small projects. Once you have an account you can create a new project. I've called mine johanvergeer.github.io . Creating an account and a new project is such a straight forward process I won't go into any detail on those.</p> <h2>Azure Pipelines on GitHub Marketplace</h2> <p>For the easiest integration between Azure DevOps and GitHub you should get the Azure Pipelines application on the GitHub Marketplace. Setup a plan and link your Azure DevOps project.</p> <p>This will create a default yaml file named azure-pipelines.yml . We'll change this file later on to match our needs.</p> <p>Before we start working on the azure-pipelines.yml file, we will create a Cake build script for our site. The advantage of using this Cake build script is that it can be reused on other locations.</p> <p>Create a file named build.cake with the following contents:</p> <p>Now you should install the bootstrapper by running the following in PowerShell.</p> <p>Before doing a build, you should create 2 environment variables: GITHUB_USERNAME and GITHUB_ACCESS_TOKEN .</p> <p>Be aware that the GITHUB_ACCESS_TOKEN is visible to anyone that has access to your environment variables.</p> <p>Once you created the build file and installed the bootstrapper you can build, preview and deploy.</p> <p>This last command should have deployed your Wyam site to GitHub Pages, so it's time to check whether it worked.</p> <p>We'll use this Cake script to build the site on Azure DevOps, so make sure it works before you continue.</p> <p>The beauty of this way of creating a build script is that once it works on your machine, it will also work on any other device or CI server.</p> <h2>azure-pipelines.yml</h2> <p>Now it's time to start creating our azure-pipelines.yml file so we can build our site on Azure DevOps. This is where the part comes in that might seem hard at first, but is very easy once you get the hang of it, so bear with me. I'll be going trough the azure-pipelines.yml file step by step and I'll show you the full file at the end.</p> <h3>Agent</h3> <p>In the first part of our file we'll define the Agent that will be used. All possible agents are listed on the Microsoft website.</p> <h3>Triggers</h3> <p>Next we're going to describe when a build pipeline should be triggered. If you're interested you can read more about Build Pipeline Triggers on the Microsoft website. For now we'll keep it fairly simple.</p> <p>In the snippet above we described that all changes in the source branch should trigger a build, except when only the .gitignore or README.md are changed.</p> <h3>Steps</h3> <p>In this build pipeline we're going to define two steps. In the first step the site will be built using the Cake script. In the second step the output files will be deployed to GitHub Pages.</p> <h4>Deploy the site</h4> <p>In this first and only step we'll build and deploy the site, using the Cake plugin. Install this plugin and add the following snippet to azure-pipelines.yml as a child of steps:</p> <p>In the script we set the target parameter to Deploy , which is equivalent to running .\build.ps1 -target Deploy on the command line. Furthermore we make the environment variable GITHUB_ACCESS_TOKEN reference the githubAccessToken secret variable we'll set in the next step. The GITHUB_USERNAME can be set to a static value, or you can use a variable on <em>Azure DevOps</em>.</p> <h5>GitHub Access Token</h5> <p>Next to the variables we defined before, this script also contains a secret, $(githubAccessToken) . The GitHub access token can be created in GitHub settings --> Developer Settings --> Personal Access Tokens . Click <em>Generate new token</em>, enter a <em>Token description</em> and select only the <em>repo</em> scope. Click <em>Generate token</em> and copy this token to a safe location.</p> <p>This GitHub access token has to be added as a variable in Azure DevOps. Go to the pipeline and click <em>Edit</em>. The variables might be hard to find for the untrained eye. Right of the <em>Run</em> button, click the three dots and click <em>Variables</em>. Click <em>+ Add</em>. Name should be githubAccessToken and the value should be the access token you copied from GitHub before. Next to the value you can click a padlock icon, which will make the value a secret.</p> <h3>The final file</h3> <p>One this I ofter miss when reading a tutorial is the full picture. So here is the full <em>azure-pipelines.yml</em> file.</p> <h1>Let's Deploy</h1> <p>Now that we're all setup, all we need to do is push to our GitHub repo, which will be picked up by Azure DevOps and a build will start.</p> <h2>Azure devops github integration</h2> <h3>Azure devops github integration</h3> <p>[youtube]</p> Azure devops github integration <a href="remmont.com">Latest news today</a> Azure devops github integration <h4>Azure devops github integration</h4> Wyam, Azure DevOps and GitHub Pages Publishing a static site with a static content generator can be fully automated. In this case I'm using Wyam, a static site generator, GitHub Pages for hosting <h5>Azure devops github integration</h5> Azure devops github integration <a href="remmont.com">Azure devops github integration</a> Azure devops github integration SOURCE: <h6>Azure devops github integration</h6> <a href="dev-ops.engineer/">Azure devops github integration</a> Azure devops github integration #tags#[replace: -,-Azure devops github integration] Azure devops github integration#tags# Kabrinskiy Eduard current news |
|
|
Адміністратор заборонив доступ на запис.
|
Missouri : azure devops hosted agents - Eduard Kabrinskiy 5 років 3 місяців тому #30145
|
Эдуард Кабринский - Azure devops swimlanes - Eduard Kabrinskiy
<h1>Azure devops swimlanes</h1> <p>[youtube]</p> Azure devops swimlanes <a href="remmont.com">Today's news headlines in english</a> Azure devops swimlanes <h1>Azure DevOps: Ultimate tool to manage infrastructure-as-a-code</h1> <p>Azure DevOps is the complete package and management tool to plan and track tasks and teams, version control of your code, automate deployments, testing, documentation, and much more. Sometimes it is overlooked by infrastructure professionals as the primary tool to manage Microsoft Azure. Azure DevOps can be the single location to manage all your subscriptions as infrastructure-as-a-code (IaaC) and save you time and money using an integrated tool with the Microsoft platform.</p> <p>In this article, we are going to have an organization in Azure DevOps and a single project to manage the entire environment using ARM templates and scripts. Although we are not going into the technical details in this article, we plan to use resource groups to combine all resources of any given project/service workload as a single unit. We are going to have a repo for each application/service, which will match with a resource group.</p> <h2>Defining the process used in your Azure DevOps project</h2> <p>When creating a new project, the cloud administrator has the option to choose what is going to be the process to be used in the Azure Boards. These are the processes available by default: Agile, Basic, CMMI, and Scrum options.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-00-870x1024.png" /></p> <p>The process will define how the work items and their structure will be available to the project’s team. For example, when using Basic, the work items available are Epic, Issue, and Task. If we select Agile, then we will have these following work items: Epic, Feature, User Story, Task, Bug, and Issue.</p> <h2>Getting started with Azure Boards</h2> <p>Everything starts with work items (Item 2). We are using the Basic process, so we have three types of work items: Epic, Issue, and Task.</p> <p>The Epic work item can be used to represent milestones, and an Epic can have multiple issues associated with it. Finally, an issue can contain multiple Tasks related to it. That defines the structure of how you want to label and organize work items using the Basic process.</p> <p>In our scenario, we are going to create an Epic for Hub-CoreNetwork Deployment, App6 Deployment, and Firewall Deployment. My preference is to use short names for Epics and use that same name as part of the name for the Issue work Item. By doing that, we can understand the hierarchy at a single glance.</p> <p>For example, we may have different Epics, and a common Issue could be Update documentation/Wiki. It would be hard for me to know which documentation is the Task without looking further into the properties of the Issue. Keep that in mind and see how comfortable you are with your naming convention.</p> <p>To start creating work items, click on <strong>Boards, Work Items</strong>. Click on <strong>New Work Item</strong> and select the desired work item.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-01-1024x523.png" /></p> <p>The work items are beneficial when you are adding some pressing tasks that need to be addressed. However, there are better and more organized ways to add work items to your team. In the example below, we are creating an Epic that will install Azure Automation on all subscriptions that we have available.</p> <p>Each work item type has its fields that can be customized based on your requirements, and the out-of-the-box fields allow plenty of interaction with other components (Repos, Pipelines, Wiki), ability to attach documents, review status of every single task, assigns tags, follow, etc.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-02-1024x452.png" /></p> <p>The Boards area has several features, and we are going to do a brief overview of some cool features about this view. First, to get there, click on <strong>Boards</strong> (Item 1) and then click on <strong>Boards</strong> (Item 2).</p> <p>There are two possible views of our work items, which are Epics and Issues. We are going to select Issues (Item 3), and a list of all available Issues will be listed under the To Do column.</p> <p>The New Item button (Item 5) allows easy creation of Issues (because that is the current view), and we can expand any given Issue and add tasks using the Add Task link (Item 6), which helps when grouping together Issues and Tasks related to it.</p> <p>In this same view, we can drag and drop the Issues between the columns that we have defined, and that will update the State of the given Issue automatically.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-03-1024x601.png" /></p> <p>One of the advantages when using Boards over the work items is that the structure of parent and children is done automatically when we open the Issue 18 (CoreNetwork: Design Session with the team, for example).</p> <p>We will have the related work area of the properties of that Issue with the proper parent (Epic) and child (Tasks) properly configured. You can do similar things with work items. However, it requires more labor to organize the Tasks.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...20/01/1086-15-04.png" /></p> <p>We configured the board slightly differently from the default view. First, we have a column called Vendor (Item 7), and we are going to use that to assign Issues that are assigned to a vendor. The other item is the swimlanes (Item 4), which creates some priority visualization to the team. All Issues should be addressed, but the resource can pick one that is more pressing to the business or overall importance.</p> <p>To configure swim lanes, click on <strong>Settings</strong> and then click on the <strong>Swimlanes</strong> tab and define them there. To set an additional column, click on <strong>Columns</strong> and make the proper changes. Click on <strong>Save</strong> and <strong>Close</strong> to apply the changes.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-05-1024x730.png" /></p> <h2>Working with Backlog and Sprints</h2> <p>At this moment, we have pretty much all our work items being created by either work items or Boards. Make sure that you feel comfortable creating your work items and organizing them the best way that fits your business needs.</p> <p>To plan what to do, when, who, and how is the utilization of your resources. We need to start organizing, and Azure DevOps makes it easier by using Sprints and Backlogs.</p> <p>First, let’s go to Backlogs (Item 1), and a list of all Issues (again, you can select the view between Issues and Epic) will be listed (Item 4). On the right side (item 3), we will have a list of all existing Sprints with their start and end dates, we can also create a new sprint by clicking on <strong>New Sprint</strong> (Item 3).</p> <p>We can move Issues (including their child Tasks) to any given Sprint by dragging and dropping. The Issues that you see on the left side are the ones that are still located in the Backlog. As soon as we move them to a Sprint, they will be removed from the backlog view and they will be found in the specific Sprint.</p> <p>To see all issues on any given Sprint, click on it.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-06-1024x455.png" /></p> <p>Although the Backlogs help a lot to organize tasks, if I can’t see all the work items in their hierarchy it is hard for me to keep track of the structure. It is doable when you have a few items, but when you start having hundreds, it becomes harder to manage.</p> <p>We can always enable parents on the <strong>View Options</strong> button, and that is a game-changer.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...20/01/1086-15-07.png" /></p> <p>The results provide a complete view of the structure, having Epic, Issue, and Tasks in a single glance (Item 1). For those Issues not assigned to an Epic, they will show up as unparented Issues.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-08-1024x503.png" /></p> <p>In the Sprint section, make sure that you are on the Taskboard (Item 1) and the first column on the left we will have the Issues assigned to the current Sprint. We can move the tasks between To Do, Doing, and Done.</p> <p>The current Sprint is defined in Item 2, and we can use that area to switch among existing Sprints. We also have a small picture with the graphical information on the Burndown Trend. When we have proper tasks configured, including assigned to, the time required to complete the task, activity, and so forth, we can see the Work Details page (we can enable it by clicking on <strong>View Options</strong>).</p> <p>The Work Details is a great tool to see how the work for the current Sprint is being distributed among the team and for how much time.</p> <p style="clear: both"><img src="techgenix.com/tgwordpress/wp-content/upl...6-15-09-1024x732.png" /></p> <h2>Azure DevOps as your planning and tracking management tool: Only the beginning</h2> <p>We haven’t even scratched the surface on planning and tracking using Azure DevOps as your management tool. There are plenty more features and capabilities available that will not fit in a single article.</p> <h2>Azure devops swimlanes</h2> <h3>Azure devops swimlanes</h3> <p>[youtube]</p> Azure devops swimlanes <a href="remmont.com">National news</a> Azure devops swimlanes <h4>Azure devops swimlanes</h4> Azure DevOps is a complete management tool for planning and tracking almost everything to do with your Azure environment. <h5>Azure devops swimlanes</h5> Azure devops swimlanes <a href="remmont.com">Azure devops swimlanes</a> Azure devops swimlanes SOURCE: <h6>Azure devops swimlanes</h6> <a href="dev-ops.engineer/">Azure devops swimlanes</a> Azure devops swimlanes #tags#[replace: -,-Azure devops swimlanes] Azure devops swimlanes#tags# Eduard Kabrinskiy latest news |
|
|
Адміністратор заборонив доступ на запис.
|
Waco : azure devops github integration - Kabrinskiy Eduard 5 років 3 місяців тому #30270
|
Эдуард Кабринский - Azure devops dynamics 365 - Кабринский Рдуард
<h1>Azure devops dynamics 365</h1> <p>[youtube]</p> Azure devops dynamics 365 <a href="remmont.com">Latest current news</a> Azure devops dynamics 365 <h1>Using Azure DevOps for managing your Dynamics 365 Business Central projects</h1> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_09.jpg" /></p> <p>All the people that were on my Dynamics 365 Business Central Development courses for Microsoft Italy (and that will be in the next months) already knows that one of the topic that I always I try to emphasize is related to source code management .</p> <p><em>Source Code Management</em> (SCM) is a must to have when working with AL (code is now on files and not inside the database as in C/AL) and you absolutely need to have a good SCM system in place inside your organization.</p> <p>Normally during my courses I provide a practical overview of two systems:</p> <p>Normally I emphasize the SCM features of these two platforms (GIT support etc) and how you can manage projects and repositories (pull, push, branches etc) directly from Visual Studio Code. Both are great platforms for SCM with GIT. For free , <em>GitHub</em> provides unlimited public repositories but no private repositories, while <em>Azure DevOps</em> gives you unlimited public and private repositories for teams with a maximum of 5 people (over that number you have to pay for users).</p> <p>When people asks me what I prefer or what I recommend, I’ve no doubts on the answer: <strong>Azure DevOps</strong>.</p> <p>I think that for working in teams inside a company (so not only for open source projects), <em>Azure DevOps</em> is much better and it offers many more features that GitHub. The main differences in my opinion is expecially related to project management and testing/pipelines.</p> <p>I’m not an Azure DevOps guru for sure, but I want to talk here a bit about many interesting Azure DevOps features that you can start using from today for managing your Dynamics 365 Business Central development projects.</p> <p>To start, first of all you have to open a new project in Azure DevOps, select the project visibility (public or private), the Version Control system (GIT or TFS) and the Work Item Process you want (Agile, Scrum etc):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_01.jpg" /></p> <p>When the project is created, you can go to the project page and start to invite your team’s members:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_02.jpg" /></p> <p>When the project is created, a GIT repository is created online for you (and from here you can clone it locally etc., I don’t talk about that now).</p> <p>As a project manager, the first thing you can do is to click on <strong>Backlogs</strong> and create a backlog for your project (product backlog corresponds to your project plan, the roadmap for what your team plans to deliver). Here you can create phases and tasks and assign that tasks to users:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_03.jpg" /></p> <p>On the right side of the <em>Backlog</em> page you have the <strong>Sprint</strong> panel. With Scrum methodology, teams plan and track work at regular time intervals, referred to as a <em>sprint cadence</em>. You define sprints to correspond to the cadence your team uses. You can select a Sprint, define the starting and ending date and then assign activities from Backlog to a specific Sprint by dragging the activities (here for example I assign the <em>Customer Category Development</em> activity to the Sprint 2):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_04.jpg" /></p> <p>After scheduling activities and sprints, you have also other interesting views. If you click on <strong>Work Items</strong>, you can see the work items status (only work items assigned to you, all work items etc):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_05.jpg" /></p> <p>If you click on <strong>Boards</strong>, you can have a board of your project (view of your project tasks as card ordered by status where you can move tasks by using drag & drop in order to change their status):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_06.jpg" /></p> <p>If you select <strong>Sprints</strong> you can see details of every sprint (iteration path) defined in your project. Here you can have a <em>Taskboard</em> view and you can see the sprint backlog and capacity:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_07.jpg" /></p> <p>From here you can monitor the progress of every sprint.</p> <p>Another interesting feature that I use quite often is what is called the <strong>Delivery Plan</strong>. <em>Delivery plans</em> display work items as cards along a timeline or calendar view and this is very useful to see expected release dates or delivery dates for your team activities. <em>Delivery Plans</em> are not a standard feature and to have them you need to download and install a Microsoft’s DevOps extension from the marketplace (click on the bag icon on top right corner of your page). The extension is the following (Microsoft, please add it as default in a project workspace):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_08.jpg" /></p> <p>When installed, you have a new menu called <strong>Plans</strong> on the left and by clicking on it you can see your project delivery plan on a timeline:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_09.jpg" /></p> <p>The coolest part is that all these project management features are available in a single tool and are totally integrated with the development tools you use every day (alias Visual Studio Code).</p> <p>Just as a quick example, I can click on <strong>Repos</strong> and clone the GIT repository to a local folder on my machine:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_10.jpg" /></p> <p>You can choose where to create the repository and in few seconds you have a local GIT repository connected to your Azure DevOps repo:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_11.jpg" /></p> <p>To use Azure DevOps repositories with Visual Studio Code, you need to install the <em><strong>Azure Repos Extension for Visual Studio Code</strong></em>:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_12.jpg" /></p> <p>Yu can connect to your Azure DevOps repository by using the <em>Team:Signin</em> command:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_13.jpg" /></p> <p>For authentication, select the following method:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_14.jpg" /></p> <p>When connected, you can start work with your AL project. You’re working on a GIT repository, so every time you modify a file the GIT icon in Visual Studio code alerts you that you have some pending changes. When you’re ready to go with your work, you can click on the GIT icon in Visual Studio Code, select the 3 dots icon and then click on <em>Associate Work Items</em>:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_15.jpg" /></p> <p>This is not mandatory, but if you work with work items and sprints I recommend to do so because with this feature you can associate your commit to a work item (you can select to the work items assigned to you):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_16.jpg" /></p> <p>When the work item is selected, you can commit your changes (file by file or entirely for every modified files) by clicking the <em>Commit</em> icon (you can see the branch you’re working on in the bottom left corner):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_17.jpg" /></p> <p>Now you can push the modification to the remote repositoy on Azure DevOps:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_18.jpg" /></p> <p>Now, if you go to Azure DevOps and select <strong>Repos</strong> –> <strong>Commits</strong> you can see your commit phase:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_19.jpg" /></p> <p>If you have to perform large code modification/implementation, you can work with <strong>branches</strong>. You can create a new branch directly from Visual Studio Code by clicking on the branch name in top left corner:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_20.jpg" /></p> <p>When you push your code modification on the new branch remotely, a message appears:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_21.jpg" /></p> <p>By clicking OK, your newly created branch is published online. You can see it on Azure DevOps on the <strong>Branches</strong> page (here you can see your branches and also all the other branches published by other team members):</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_22.jpg" /></p> <p>When the work on the branch is finished, you need to merge it to the master branch. To do so, you need to create a <em>pull request</em> and you can do that directly from Visual Studuo Code:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_23.jpg" /></p> <p>This action will open the <strong>New Pull Request</strong> page in Azure DevOps. Here you can create your pull request:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_24.jpg" /></p> <p>All pull requests are visible in the <strong>Pull requests</strong> page:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_25.jpg" /></p> <p>You can select a pull request, review it (see code modifications and so on) and then approve it:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_26.jpg" /></p> <p>When the pull request is approved, click <em><strong>Complete</strong></em>. Now you can select to mark linked work items as completed and to delete (or not) the branch that you’re merging to the master:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_27.jpg" /></p> <p>Click on <strong><em>Complete merge</em></strong> to start the merging phase. When the pull request is completed, you receive a notification:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_28.jpg" /></p> <p>Your master branch is updated and the result is graphically displayed on <strong>Commits</strong>:</p> <p style="clear: both"><img src="demiliani.files.wordpress.com/2018/12/azuredevops_29.jpg" /></p> <p>This is a quick introduction on how to manage a code lifecycle management for your Dynamics 365 Business Central development projects with Azure DevOps. As you can see, all is perfectly automated and managed by a single platform. This works with Visual Studio Code but obviously also with Visual Studio and other project types (like .NET applications etc.). The platform permits a complete team working between developers and project managers/testers/consultants in a single unified platform. I highly recommend to give Azure DevOps a try, it’s really a great tool.</p> <p>With Azure DevOps you can do also other things like Pipelines, Test Plans and Artifacts, but it will be another story…</p> <h2>Azure devops dynamics 365</h2> <h3>Azure devops dynamics 365</h3> <p>[youtube]</p> Azure devops dynamics 365 <a href="remmont.com">American news headlines</a> Azure devops dynamics 365 <h4>Azure devops dynamics 365</h4> All the people that were on my Dynamics 365 Business Central Development courses for Microsoft Italy (and that will be in the next months) already knows that one of the topic that I always I try to emphasize is related to source code management. Source Code Management (SCM) is a must to have when working with… <h5>Azure devops dynamics 365</h5> Azure devops dynamics 365 <a href="remmont.com">Azure devops dynamics 365</a> Azure devops dynamics 365 SOURCE: <h6>Azure devops dynamics 365</h6> <a href="dev-ops.engineer/">Azure devops dynamics 365</a> Azure devops dynamics 365 #tags#[replace: -,-Azure devops dynamics 365] Azure devops dynamics 365#tags# Эдуард Кабринский world news |
|
|
Адміністратор заборонив доступ на запис.
|
Час відкриття сторінки: 0.090 секунд

