Book Image

Implementing DevOps with Microsoft Azure

By : Mitesh Soni
Book Image

Implementing DevOps with Microsoft Azure

By: Mitesh Soni

Overview of this book

This book will teach you all about the Visual Studio Team Services and Microsoft Azure PaaS offerings that support Continuous Integration, Continuous Delivery, Continuous Deployment, and execution in the cloud with high availability, disaster recovery, and security. You will first be given a tour of all the concepts and tools that Microsoft Azure has to offer and how these can be used in situations to cultivate the DevOps culture. You’ll be taught how to use and manage Visual Studio Team Services (VSTS) and about the structure of the sample application used throughout the book. You will become familiar with the nitty gritty of Continuous Integration and Continuous Development with VSTS and Microsoft Azure Apps. You will not only learn how to create App service environments, but also how to compare Azure Web Apps and App Service Environments to deploy web applications in a more secure environment. Once you have completed Continuous Integration and created the Platform for application deployment, you will learn more about the final stepping stone in achieving end-to-end automation using approval-based Continuous Delivery and Deployment. You will then learn about Continuous Monitoring, using the monitoring and notification options provided by Microsoft Azure and Visual Studio Team Services.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Dedication
Preface
More from the Author

Preface

DevOps is not just a buzzword now – it is a doctrine or a school of thought to improve application life cycle management processes to make applications effective by utilizing disruptive innovations. It has become a part of a serious discussion in organizations. Hence, a change is required. A change in the culture.

Change is no threat to culture. It only improves the culture using disruptive innovations in recent times.

Often, we make mistakes by focusing too much on the technology or tools, but with DevOps this can be a blunder. This book emphasizes not only the technology but also the organization-specific culture that is more important in cultivating the DevOps culture. DevOps is in an early stage. It is changing the existing culture that invites resistance. It is wise to follow what Socrates said:

"The secret of change is to focus all your energy, not on fighting the old, but on building the new."

In this book, we will cover all the key components of DevOps, such as continuous integration, cloud computing – PaaS (Azure App Service or Azure Web Apps and Azure SQL Database), continuous delivery, and continuous deployment; how to automate build integration, provision resources in Microsoft cloud environment; deploying web application into Microsoft Azure Web Apps / App Service Environments; application monitoring available in Microsoft Azure; and load testing available in VSTS and Apache JMeter. The main objective is to manage frequent releases effectively. By automating repetitive processes, we standardized the management of the application life cycle and avoided error-prone manual processes. We also provided governance to application life cycle management by providing approval-based application deployment to different environments.

For continuous integration and continuous release (continuous delivery and continuous deployment), we have used Visual Studio Team Services (VSTS). The orchestration of end-to-end automation and approval-based workflows is managed by VSTS too.

Let's begin our cultural journey in the land of DevOps using people (development team, QA team, operations team, cloud team, build engineers, and so on), processes (continuous integration, continuous delivery and continuous deployment, continuous testing, and continuous monitoring), and tools (Microsoft stack)!

What this book covers

Chapter 1, Microsoft Azure – Cloud Platform and Services, is all about learning the benefits of PaaS in the DevOps culture, and Microsoft Azure – cloud platform and services. It will cover all the PaaS offerings from Microsoft that are required for deploying a web application. This chapter also covers the basic concepts of Microsoft Cloud that are important for creating, using, and managing platform services effectively for deploying applications.

Chapter 2, Getting Started with Visual Studio Team Services (VSTS), introduces the VSTS and the sample application structure that is necessary to understand before automating the process of building and deploying an application in a desired environment. It also explains how to use VSTS to manage versions of code and integrate VSTS with Eclipse IDE so the check-in process can be managed directly from the IDE.

Chapter 3, Continuous Integration with VSTS, explains how to configure the application code for automated compilation, unit test case execution, and notifying important stakeholders of the status of the build execution in case of failures and success. It also creates a package file and stores it in a shared folder. After this chapter, we will be ready for deployment if the build execution is successful.

Chapter 4, Continuous Development with Microsoft Azure Web Apps, covers App Service (Microsoft Azure Web Apps) in detail. Web Apps is used to deploy an application in the process of continuous delivery and continuous development. It covers how we can create different environments that can be used to deploy web applications. It also covers a brief description of database services and providing secure access to all resources using role-based access, which is significant from the security and governance perspective.

Chapter 5, Azure App Service Environments, is bit more theoretical, but covers a premium service of Microsoft Azure platform that can be used for specific use cases that Azure Web Apps may not be able to handle effectively. It not only covers creating ASEs but also provides a detailed comparison of Azure Web Apps and ASE to enhance security. Security is one of the most important parts of application life cycle management, and hence this service increases the value in the context of DevOps.

Chapter 6, Continuous Delivery to Azure Web Apps and ASE Using VSTS, presents how to deploy an application in Azure Web Apps and App Service Environment using VSTS. It also includes the security and governance aspect while deploying is different environments to ensure that only authorized persons can perform the deployment operation, and the process has to be verified. This chapter will cover end-to-end automation visualization for deploying an application in the PaaS offering of Microsoft Azure.

Chapter 7, Continuous Monitoring in Cloud Platform, covers another stepping stone in achieving end-to-end automation, and that is continuous monitoring. We cover the importance of it in different ways to monitor and troubleshoot Azure Web Apps and ASE so we can ensure that the application remains issue-free and highly available.

What you need for this book

This book assumes that you are familiar with at least the Java programming language. Knowledge of core Java and JEE is essential if you want to gain better insights from this book. Having a strong understanding of the deployment of a web application in application servers such as Tomcat will help you to understand the flow quickly.

As the application development life cycle will cover a lot of tools in general, it is essential to have some knowledge of repositories, as well as IDE tools such as Eclipse, and build tools such as Ant and Maven. Knowledge of code analysis tools will make your job easier in configuration and integration; however, it is not vital to perform the exercises given in the book. Most of the configuration steps are mentioned clearly.

You will be walked through the steps required to get familiar with VSTS, Microsoft Azure Web Apps, Microsoft Azure App Service Environments, and Microsoft Azure SQL Database.

For Microsoft Azure, you can use a one month trial access. VSTS also comes with a trial account with some restrictions.

Who this book is for

This book is specially aimed at developers, technical leads, testers, and operational professionals, who are the target readers and will want to jump start Microsoft Azure PaaS offerings such as App Services and SQL Database to host applications. Readers are aware of the issues faced by development and operations teams as they are stakeholders in the application life cycle management process. The reasons to jump start Microsoft Azure PaaS and VSTS are to understand the importance of their contribution to continuous integration, automated test case execution, and continuous delivery for effective application life cycle management.

No prior experience with continuous integration, cloud computing, continuous delivery, and continuous deployment is assumed. You may be a novice or be experienced with continuous integration tools such as Jenkins and Atlassian Bamboo.

This book covers continuous integration, cloud computing, continuous delivery, and continuous deployment for a sample Spring-based application. The main objective is to see end-to-end automation and implement it on the Microsoft technology stack that can be extended further based on the understanding gained from this book.

Conventions

 In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can achieve this using the <ipSecurity> element."

A block of code is set as follows:

<configuration>
  <system.webServer>
    <security>
      <ipSecurity allowUnlisted="true" denyAction="NotFound">
        <add allowed="true" ipAddress="xxx.xxx.xxx.xxx"      
          subnetMask="255.xxx.xxx.xxx"/>
      </ipSecurity>
    </security>
  </system.webServer>
</configuration>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

<configuration>
  <system.webServer>
    <security>
      <ipSecurity allowUnlisted="true" denyAction="NotFound">
<add allowed="true" ipAddress="xxx.xxx.xxx.xxx"
          subnetMask="255.xxx.xxx.xxx"/>
      </ipSecurity>
    </security>
  </system.webServer>
</configuration>

 

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "To create a resource group, click on Resource groups in the left-hand sidebar menu."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

  1. Log in or register to our website using your e-mail address and password.
  2. Hover the mouse pointer on the SUPPORT tab at the top.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box.
  5. Select the book for which you're looking to download the code files.
  6. Choose from the drop-down menu where you purchased this book from.
  7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR / 7-Zip for Windows
  • Zipeg / iZip / UnRarX for Mac
  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Implementing-DevOps-with-Microsoft-Azure. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/ImplementingDevOpswithMicrosoftAzure_ColorImages.pdf.

 

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.