Introduction To Azure DevOps
What is DevOps?
DevOps is the combination of practices, tools, and philosophies that enable rapid development and deployment of enterprise and consumer applications. DevOps began with cloud computing, which made it possible to allocate resources quickly and inexpensively. Cloud maximizes the innovations under DevOps by combining development, testing and deployment tools in the cloud. Traditional It doesn't offer the flexibility that the cloud has to offer while delivering apps that need to be deployed faster and monitored through the development life cycle.
DevOps combines and merges the development team and IT Ops team together to work closely in the application lifecycle. They share their skills and involved from development, through testing into the deployment of the application.
Quality Assurance and Security teams are also tightly integrated and work with the DevOps team.
DevOps team uses practices to automate all development and operations processes. In DevOps, the technology stack and tooling are reliable and evolve quickly and helps engineers to accomplish tasks quickly, for example, continuous deployment of code from GitHub of Visual Studio Team Services or provisioning cloud infrastructure for application deployment. Normally these would have required help from other team but as DevOps integrate these into a single unit this increases development velocity.
Benefits of DevOps:
- Speed: In DevOps microservices and continuous delivery allowed teams to take ownership of services and then release updates to them faster.
- Rapid Delivery: DevOps combines tools and all processes in the cloud so starting from developing the apps and testing it in the cloud by using automated tools and deploying as soon as code commit happens. This enables rapid delivery.
- Reliability: Monitoring and logging practices help you stay informed of performance in real-time.
- Scaling: Infrastructure as code helps you manage your development, testing, and production environments in a repeatable and more efficient manner.
- Improved Collaboration: With DevOps and a single combined platform Developers and Operation teams, collaborate easily. They are no longer isolated from each other and share responsibilities and feedbacks.
- Security: Automated compliance policies, fine-grained controls, and configuration management techniques can define and then track compliance at scale.
Introduction to Azure DevOps:
The Azure platform is full of flexible DevOps workflows. Microsoft provides the following services for DevOps in their Azure cloud platform.
- Visual Studio Team Services: Services for teams to share code, track work, and ship software.
- Visual Studio Mobile Center: Mission control for your mobile apps.
- Visual Studio: Integrated development environment (IDE) from Microsoft.
- HockeyApp: Deploy mobile apps, collect feedback and crash reports, and monitor usage.
- Xamarin in Azure: Xamarin a framework that enables rapid development and testing of mobile apps in the cloud, xamarin can deploy to multiple platforms from a single codebase and xamarin test cloud can test your application in real devices in the cloud.
In addition, the Microsoft Azure cloud platform supports third-party tools like Jenkins, Redhat, Chef, Spinnaker and Terraform.
For more information click: Azure Stack - Cloud Services
Azure On DevOps Infographics:
Azure DevOps Terminology:
- Continuous Integration: Continuous Integration (CI) is the process of automating the build and testing of code every time a team member commits changes to version control. CI keeps the master branch clean and creates a development branch. After testing is completed and the pull request is accepted then changes are committed to the master branch.
- Continuous Delivery: Continuous Delivery (CD) is the process to build, test, configure and deploy from a build to a production environment.
- Infrastructure as Code: Infrastructure as Code (IaC) is the management of infrastructure (networks, virtual machines, load balancers, and connection topology) in a descriptive model, using the same versioning as DevOps team uses for source code. Infrastructure as Code enables DevOps teams to test applications in production-like environments early in the development cycle.
- Micro-services: Microservices are architectural patterns in which applications are divided into smaller components and deployed to perform specific business logic. They communicate over the web using REST APIs.
Azure DevOps Life-cycle:
Azure DevOps life cycle mainly follows two phases.
- Write code, Test, and Debug - During the application development stage, the code for Azure applications is most commonly built locally on a developer’s machine. Microsoft has recently added additional services to Azure Apps named Azure Functions. The azure function is a serverless computing feature that enables developer to build enterprise applications without writing codes and maintain infrastructure.
- Visual Studio Team Services and Git are two popular code collaboration tools for Deploy and Monitor
- Azure App Service for DevOps provides following deployment slots for Continuous integration and deployment of your codebase.
- Local git repository
- Visual Studio Team Services
If your code is open source and hosted in public Github you can use Continuous Integration tools like Travis CI or Circle CI for code testing and deployment.
Azure App Service provides Application Insight for monitoring your app and a comprehensive logging tool, health check, and crash reporting.
Azure DevOps Practice:
- Continuous Flow (Inside-Out) - Collaboration between the development team using tools like git and visual studio team services. Automated integration testing using Jenkins or Travis CI. Continuous delivery using deployment tools like GitHub or visual studio team service.
- Ownership & Visibility (Outside-In) - The team or person must able to address the problem is responsible for it (the owner). This can be a development or platform.
- Planning & Time Management - Understanding the work center and automate all processes using project and time management tools.
- Culture - Build a culture that celebrates all of the aspects of DevOps
Containers in DevOps:
Containers are a type of technology that makes it easier to host applications inside portable environments. A container image is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it: code, runtime, system tools, system libraries, settings. Available for both Linux and Windows-based apps, containerized software will always run the same, regardless of the environment. Containers isolate software from its surroundings, for example, differences between development and staging environments and help reduce conflicts between teams running different software on the same infrastructure.
Benefits of Containers:
- Environment Consistency: Enables portability of the application
- Operational efficiency: Can run multiple application in a single instance
- Developer Productivity: Removes cross-service dependencies and conflicts.
- Version Control: Containers allow you to track versions of your application code and their dependencies.
What is Docker:
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers.
It allows a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. So the application will run in any platform regardless of any customized settings that machines might have that could differ from the machine used for writing and testing the code.
Docker in DevOps:
- Easy Deployment Solution: When you write, test and deploy your application inside containers, the environment does not change at different parts of the delivery chain. That makes collaboration between different teams (developers, testers, and operation) easier because they all are working with the same containerized environment.
- Simplify Updates: Containers help to roll out updates on a constant and streamline basis because they make it easy to apply updates to applications. When your app is distributed into multiple microservices, each one hosted in a separate container, you can update one part of the app by restarting the container without interrupting the rest of the app.
- Multi-Framework Support: Containers enable that agility because they are relatively agnostic toward programming languages and deployment platforms. You can run almost any type of app inside a container, regardless of the language, it is written in.
The chef is a configuration management tool. It uses a Pure-Ruby, domain-specific language (DSL) for writing system configuration "recipes". The chef is used to streamline the task of configuring and maintaining a company's servers and can integrate with cloud-based platforms.
Chef Transforms infrastructure into codes. Chef automates how infrastructure is configured, deployed, and managed across the network, no matter its size.
Also Read: Azure Machine Learning - Cloud Capabilities
Chef with Microsoft Azure:
- The azure marketplace now listed a certified Chef Server 12 image which is ready to be used. This server is preconfigured with the Chef server, the Chef management console, and Chef reporting.
The chef is used to automating the deployments of virtual machines, load balancers and other infrastructures in azure.
- Chef has three main architectural components: Chef Server, Chef Client (node), and Chef Workstation.
- The Chef Server is our management point and there are two options for the Chef Server: a hosted solution or an on-premises solution. We will be using a hosted solution.
- The Chef Client (node) is the agent that sits on the servers you are managing.
- The Chef Workstation is our admin workstation where we create our policies and execute our management commands. We run the knife command from the Chef Workstation to manage our infrastructure.
- There is also the concept of “Cookbooks” and “Recipes”. These are effectively the policies we define and apply to our servers.
Azure DevOps Tutorial:
Creating a web app and enabling continuous integration:
* Sign in to the Azure Portal
* Choose Web + Mobile > Web App. Add icon and enter a name, choose your subscription, and create a new resource group to serve as the container for the service.
* After a few moments, your app service is created.
Click the URL. Notice the variety of available choices for tools and repositories. You can also use the languages and frameworks of your choice including .NET, Java, and Ruby.
The Azure portal makes continuous deployment an easy process that involves only a few simple steps. In the Azure portal, choose settings from the icon for the app service you just created.
Next, configure some settings to enable continuous deployment for the app. Click Deployment Source and then click Choose Source. Notice the variety of options you have for repository sources.
Now here you can choose your GitHub account or your one drive or dropbox or localgit repo to enable continuous integration. You need to authorize azure to access your accounts to retrieve the folders.
Once you choose your project and branch, click ok. You should start to see notifications of a deployment.
Navigate back to GitHub to see the webhook that was created to integrate the source control repo with Azure. The Azure Portal enables integration with GitHub with only a few simple steps.
To demonstrate continuous deployment, we can add some content to the repository. For a simple example, add a sample text file to a GitHub repo. And it will be sync to azure app service source repo.
After committing changes to your repository, you see a new deployment initiate in the portal notifications area. Click Sync if you do not quickly see changes after committing to your repository.
Now we have successfully deployed and enabled continuous integration in azure app service.
Application insight is a tool to monitor the performance and log data of our web applications. It is built on the top of the Application performance management service (APM). Application insight is compatible with most of the runtime stacks in azure app service like node.js, java, .net, and PHP, etc. It includes analytics tools and anomaly detectors for web applications. Application insight can work on both the on-premises app and the cloud app. Application insight can be configured to work with mobile apps by integrating visual studio mobile center and hockeyapp.
We can monitor our azure web app via application insights.
If your application is running as an Azure web service, here's how to switch on monitoring:
* Select Application Insights on the app's control panel in Azure.
* When the Application Insights summary page opens, click the link at the bottom to open the full Application Insights resource.
Also Read: HDInsight Of Azure
Application insight is a tool for the development team. It helps understand application performance by keeping track of logs, events, and crashes. It monitors the followings:
- Page popularity. Response time of application server. It checks if the application failed to perform in peak hours. The loading time of pages and logs, which page is not responding to a specific requests? It also logs peak hours during the day to find out when your apps used most.
- Checks if any external libraries or services making the application irresponsive or any external resource take time for loading.
- Exception reporting and stack trace of both server and browser.
- Session count for application and usage time count.
- Page view count.
- Custom events like file download count or items sold.
- Host diagnostics in container images like docker.
- Load performance in browsers.
- Ajax calls.
Subscribe For Free Demo
Free Demo for Corporate & Online Trainings.