DevOps with Windows Server 2016

Author: Ritesh Modi  

Publisher: Packt Publishing‎

Publication year: 2017

E-ISBN: 9781786463340

P-ISBN(Paperback): 9781786468550

Subject: F224-39 computer applications;TP316.7 Windows operating system

Keyword: Windows操作系统,自动化技术、计算机技术,电子计算机的应用,经济计划与管理

Language: ENG

Access to resources Favorite

Disclaimer: Any content in publications that violate the sovereignty, the constitution or regulations of the PRC is not accepted or approved by CNPIEC.

Chapter

Preface

Chapter 1: Introducing DevOps

Software delivery challenges

Resistance to change

Rigid processes

Isolated teams

Monolithic design and deployments

Manual execution

Lack of innovation

What is DevOps?

DevOps principles

Collaboration and communication

Flexible to change

Application lifecycle management

Development methodology

Software design

Automating processes and tools

Failing fast and early

Innovation and continuous learning

DevOps practices

Configuration management

Continuous integration

Build automation

Test automation

Application packaging

Continuous deployment

Preproduction deployment

Test automation

Staging environment deployment

Acceptance tests

Deployment to production

Continuous delivery

Continuous learning

Measuring DevOps

Summary

Chapter 2: DevOps Tools and Technologies

Cloud technology

Infrastructure as a Service (IaaS)

Platform as a Service (PaaS)

Software as a Service (SaaS)

Advantages of using cloud computing

Windows Server 2016

Application platform

Windows Server as a hosting platform

Nano servers

Windows Containers and Docker

Hyper-V containers

Nested virtual machines

Enabling microservices

Reduced maintenance

Configuration management tools

Deployment and packaging

Visual Studio Team Services

Source code management service

Team Foundation Version Control

Exploring Git

Build Management service

Executing Build Definitions

Build architecture

Agents, agent pools, and agent queues

Queuing Build Definitions

Configuring a Build definition

Release Management service

Executing release definitions

Release Management architecture

Release definition configuration

Setting up a cloud environment

Visual Studio Team Services

Azure account

Summary

Chapter 3: DevOps Automation Primer

Azure Resource Manager

ARM and ASM

ARM advantages

ARM concepts

Resource providers

Resource types

Resource groups

Resource and resource instances

Azure Resource Manager

Azure Resource Manager architecture

Azure Resource Manager features

Role-Based Access Control

Tags

Policies

Locks

Multi-region

Idempotent

Extensible

Azure Resource Manager templates

Template basics

Parameters

Variables

Resources

Outputs

Expressions and functions

Nested resources

A minimal template

ARM template tools

Authoring tools

Deployment tools

Deployments

PowerShell

PowerShell features

Cmdlets

Pipeline

Variables

Scripts and modules

Azure PowerShell development environment

Pester

Installing Pester

Writing tests with Pester

Pester real-time example

Desired State Configuration

DSC Push architecture

DSC Pull architecture

Pull configuration example

DscLocalConfigurationManager() attribute

ConfigurationRepositoryWeb

Partial Configurations

Pushing LCM Configuration

Summary

Chapter 4: Nano, Containers, and Docker Primer

Virtualization

Containers

Docker

Container host

Container images

Docker Hub/Docker Registry

Installing a Windows Server 2016 Container on Azure

Provisioning Azure virtual machines

Installing Windows Nano Server on Azure

Provisioning Nano Server

Using Docker client

Container life cycle management

Docker run

Docker ps

Docker start

Docker stop

Docker rm

Docker restart

Docker pause

Docker unpause

Image management

Docker build

Docker commit

Docker images

Docker rmi

Docker tag

Monitoring commands

Docker logs

Docker stats

Docker inspect

Docker events

Docker registry management

Docker login

Docker push

Docker pull

Understanding Dockerfile

Docker build command

Shell and Exec instruction forms

Shell form

Exec form

Dockerfile instructions

COMMENT

FROM

MAINTAINER

COPY

ADD

WORKDIR

EXPOSE

ENV

VOLUME

RUN

CMD

ENTRYPOINT

Summary

Chapter 5: Building a Sample Application

Experiencing the application

Application architecture

Preparing development environment

Installing SQL Server Management Studio

Creating Azure SQL Server and SQL database

Creating database tables

Understanding database schema

Setting up Visual Studio solution

Modify web.config connection string

Publish profile for web application

Parameters.xml

Running the sample application

Understanding Visual Studio Solution

Entity Framework

Controllers and Views

Controllers

Views

Configuration management

Unit testing

Unit testing DrugController

Mocking Drug data access class

Drug controller unit tests

Summary

Chapter 6: Source Code Control

Configuration Management

Source Configuration Management

Centralized

Distributed

Visual Studio Team Services

Git 101

Git init

Git clone

Git add

Git commit

Git branch

Git merge

Git remote

Installing Git for Windows on the development environment

Adding Online Pharmacy to the VSTS Git repository using Visual Studio 2015

Managing a Git Repository using VSTS

Submitting code changes to a Git repository

Pulling code changes from a Git repository

Onboarding another developer for the same application

Cloning and adding a solution to the VSTS Git repository

Adding a project to the VSTS Git repository using the command-line tool

Cloning and adding a solution to VSTS Git repository using the Git command-line tool

Summary

Chapter 7: Configuration Management

Infrastructure as Code

Objectives of Infrastructure as Code

Revisiting sample application architecture

Azure Key Vault

Operational Insights

Desired State Configuration Pull Server

Azure storage account

Azure virtual machines and containers

Azure public load balancer

Azure SQL

Security considerations

Storing secrets and credentials

Secure login to Azure subscription

Storage account keys and shared access signature tokens

Network Security Groups and firewalls

The IT administrator and deployment role

Steps for deployment for an IT administrator

PreCreate.ps1

GeneralServices.json

Parameters

Variables

Resources

Microsoft.OperationalInsights/workspaces

Microsoft.KeyVault/vaults

Microsoft.KeyVault/vaults secrets

Outputs

Steps for deployment of the operator or release pipeline

UploadScriptFiles.ps1

Test-ARMTemplate.ps1

New-TemplateDeployment.ps1

OnlineMedicine.parameters.json

OnlineMedicine.json

[Parameters]

Parameters

Variables

Resources

Microsoft.Compute/availabilitySets

Microsoft.Storage/storageAccounts

Microsoft.Network/virtualNetworks

Microsoft.Network/networkSecurityGroups

Microsoft.Network/publicIPAddresses

Microsoft.Network/networkInterfaces

Microsoft.Compute/virtualMachines

Microsoft.Compute/virtualMachines/extensions – CustomScriptExtension

Microsoft.Compute/virtualMachines/extensions – MicrosoftMonitoringAgent

Microsoft.Network/publicIPAddresses – for load balancer

Microsoft.Network/loadBalancers

Microsoft.Network/publicIPAddresses – web application public IP addresses

Microsoft.Network/networkInterfaces – web application NICs

Microsoft.Compute/virtualMachines – web application virtual machines

Microsoft.Compute/virtualMachines/extensions – CustomScriptExtension

Microsoft.Compute/virtualMachines/extensions – MicrosoftMonitoringAgent

Microsoft.Sql/servers, databases, firewallRules

Outputs

Summary

Chapter 8: Configuration Management and Operational Validation

Steps for deployment through the release pipeline

PullServer.ps1

IISInstall.ps1

ContainerConfig.ps1

dockerfile

lcm.ps1

ChangeConnectionString.ps1

PreparePesterEnvironment.ps1

Execute-Pester.ps1

Environment unit tests

Unit testing availability set

Unit testing virtual networks

Unit testing Network Security Groups

Unit testing load balancer

Unit testing Azure SQL

Unit testing Azure SQL Firewall

Unit testing the count of virtual machines

Unit testing virtual machine 01

Unit testing virtual machine 02

Unit testing the DSC Pull Server virtual machine

Unit testing the DSC Pull Server operating system

Unit testing the web application operating system

Environment operational validation

The operational validation folder structure

The operational validation of the web application on the first virtual machine

The operational validation of the web application on the second virtual machine

The operational validation of the web application using an Azure load balancer

Unit and operational validation tests

Summary

Chapter 9: Continuous Integration

Continuous integration

Why continuous integration?

Fail fast and often

High confidence and cadence

Better collaboration

Reduction of technical debt

Principles of Continuous Integration

Automation

Single repository

Fast execution

Reporting

Security

Continuous integration process

Types of continuous integration

Scheduled builds

Continuous build

Gated builds

Integration with source code configuration management

Integration with work item management

Build definition

Defining variables

Build activities

NuGet installer activity

Visual Studio Build activity for the OnlinePharmacy project

Visual Studio Build activity for the OnlinePharmacy test project

The Visual Studio Test activity for OnlinePharmacy project binaries

Replace Tokens activity for updating the web application's name

Archive Files activity for deployment.zip

Copy and Publish Build Artifacts activity

Build options

Repository

Triggers

General, retention, and history

Build pipeline execution

Summary

Chapter 10: Continuous Delivery and Deployment

Understanding releases

Release management

Continuous delivery

Continuous deployment

Why continuous delivery and deployment?

Detecting deployment issues early

Eliminating surprises and risks

Reducing cost of change

Pushing frequent changes to production

Removing risky manual deployments

Moving away from human dependency

The principles of continuous deployment

Automation as an enabler

Infrastructure as Code

Shortened execution time

Reporting

Secure deployments

Continuous deployment process

Continuous delivery process

Alternate strategies

Using Azure automation for DSC Pull Server

Using Docker hub/Docker registry

Using Docker compose

Using Docker management tools such as Swarm or Kubernetes

Types of releases

Scheduled releases

Continuous deployment

Azure Resource Manager service endpoint

Release pipeline definition

Variables configuration

Artifacts configuration

Triggers configuration

General, retention, and history

Release environments

Preparation environment

Azure file copy task

Azure PowerShell

Test environment

Azure PowerShell – test ARM template deployment

Azure PowerShell – deploy test environment

PowerShell – prepare Pester environment

Copy files – copy operational validation module

Azure PowerShell – execute Pester and operational validation tests

Production environment

Azure PowerShell – test ARM template deployment

Azure PowerShell – deploy test environment

PowerShell – prepare Pester environment

Copy Files – copy operational validation module

Azure PowerShell – execute Pester and operational validation tests

Release pipeline execution

Release pipeline strategies

[A/B testing]

A/B testing

Blue/Green deployments

Canary releases

Summary

Chapter 11: Monitoring and Measuring

Application Insights

Provisioning

Changes to sample application

Application Insights dashboard

Operational Insights

Provisioning

OMS agents

Search

Solutions

Summary

Index

The users who browse this book also browse


No browse record.