Continuous Delivery with Windows and .NET
تحویل مداوم، مجموعه ای از روشها و رویکردهای خوش تعریف برای منتشر نمودن نرم افزار به شکلی قابل اطمینان است. قلب تحویل مداوم، خودکار سازی بیلد کردن، تست کردن و استقرار برنامه است که شامل پیکربندی خودکار دستگاهها و محیطی برای تست کردن و زمان اجرا است.
سازمانها به طور فزاینده ای به سیستمهای نرم افزاری متکی هستند تا سرویس دهی، فروش و عملیات خود را قدرت بخشند؛ بنابراین انتشار مکرر و سریع نسخههای قابل اطمینان برای پاسخ گویی به نیازهای جدید و تغییرات ضروری به نظر میرسد.
امروزه همهی نرم افزارهای هستهی مایکروسافت، قابل اسکریپت نویسی با پاورشل هستند و در سال ۲۰۱۶ و پس از آن، برای کار تیمی با ویندوز و NET. میتوانند از پاورشل و APIهای HTTP REST در پکیجهای نرم افزاری ، محصولات مایکروسافت، فروشندگان شخص ثالث و جامعهی متن باز استفاده کنند.
بیشتر تکنولوژیها و روشها برای Continuous Delivery معمولا بین سیستم عاملهای مختلف یکسان هستند، اما بعضی چیزها برای ویندوز و NET. احتیاج به توجه ویژه ای دارند.
For Windows and .NET developers, Continuous Delivery (CD) is no longer just a theory, but a very practical option. With this concise book, you’ll learn how to use modern Windows and .NET software with third-party and open source tools to automate the frequent software builds, testing, and deployments that CD prescribes.
Although CD has become a well-defined set of practices and approaches to releasing software in a reliable way, many tools commonly used for CD aren’t natively available for Windows. But new and forthcoming features in Windows Server 2016 and Visual Studio 2015 are designed with CD in mind. The tips and advice in this book will help you pursue CD for Windows- and .NET-based software.
Specifically, you’ll learn about:
Version control practices, technologies, and branching options
Options for Continuous Integration servers, version control systems, build automation, and package management for Windows and .NET
Tools that work well for visualizing and orchestrating a CD deployment pipeline
Infrastructure automation, using a test-first approach with Vagrant virtual machines and Microsoft Azure, and—coming soon—Docker for Windows-specific workloads
The tricky bits: making changes to your organization and practices beyond adopting the technologies and techniques already discussed
Table of Contents
Foreword
Preface
Who Should Read This Book
The Structure of the Book
Acknowledgments
1. Introduction to Continuous Delivery
What Continuous Delivery Is Not
The Importance of Automation for Continuous Delivery
Why Is Continuous Delivery Needed?
Why Windows Needs Special Treatment
Terminology Used in This Book
2. Version Control
Key Version Control Practices
Version Control Technologies
Git
Mercurial
Subversion
TFS
Branching Options
Pull Requests
Feature Toggles
Use NuGet for Dependencies
Do Not Store Packages in Version Control
Use NuGet to Manage Internal Dependencies
Summary
3. Continuous Integration
CI Servers for Windows and .NET
AppVeyor
Bamboo
BuildMaster
GoCD
Jenkins
TeamCity
TFS Build / VSO
Build Automation
Build Automation Tools
Integrating CI with Version Control and Ticket Tracking
Patterns for CI Across Multiple Teams
Architecture Changes for Better CI
Summary
4. Deployment Pipelines
Mapping Out a Deployment Pipeline
Tools for Deployment Pipelines
GoCD
Octopus
TeamCity
VSO
Other Tools
Deployment Techniques
Use Blue-Green Deployment for Seamless Deploys
Canary Deployments
Postdeployment Checks
Smoke Tests
Decouple File Delivery from Code Availability
Script a Rollback Procedure Too
Automated Testing of Database Changes
Database Unit Testing
EF Code-First Migrations
FluentMigrator
Flyway
Redgate Tools
SSDT
Other
Summary
5. Monitoring, Metrics, and APM
Performance Counters Are Insufficient
Record Application Metrics
APM Tools Can Complement Monitoring
Use Developer Metrics Tooling
Aggregate Application and Windows Event Logs from All Machines
Summary
6. Infrastructure Automation
Shared Versus Dedicated Infrastructure
Using a Test-First Approach to Infrastructure
Patching and OS Updates
Summary
7. The Tricky Bits of Continuous Delivery
Organizational Changes
Architectural Changes (SOA/Microservices)
Operational Features
Summary
A. Bibliography
B. Case Studies