How to Adopt Infrastructure as Code
-
Upload
nginx-inc -
Category
Technology
-
view
2.626 -
download
2
Transcript of How to Adopt Infrastructure as Code
![Page 1: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/1.jpg)
MORE INFORMATION AT NGINX.COM
![Page 2: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/2.jpg)
MORE INFORMATION AT NGINX.COM
Who Are We?
Kief MorrisCloud Practice Lead, Thoughtworks
Formerly:• Sr. Technical Architect, Map of Medicine• Hosting Operations Manager, Syzygy• Technical Director, bitBull
Floyd SmithTechnical Marketing Writer
Formerly:• Sr. Technical Writer, Apple• Group Channel Manager, Altavista• Business Site Manager, AOL
Netscape
![Page 3: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/3.jpg)
MORE INFORMATION AT NGINX.COM
• First OSS release in 2004• Company founded in 2011• VC-backed by industry
leaders• 500+ customers• 75+ employees
![Page 4: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/4.jpg)
160 milliontotal sites
running on NGINX
4Source: Netcraft June 2016 Web Server Survey
![Page 5: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/5.jpg)
51%of the Top 10,000
most visited websites
5Source: W3Techs Web Technology Survey
![Page 6: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/6.jpg)
36%of all sites on
Amazon Web Services
6Source: W3Techs December 2013 Web Server Survey
![Page 7: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/7.jpg)
7
![Page 8: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/8.jpg)
Where NGINX Fits
Internet
WebserverServe content from disk
Application GatewayFastCGI, uWSGI, Passenger…
Reverse ProxyCaching, Load Balancing…
HTTP traffic
![Page 9: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/9.jpg)
MORE INFORMATION AT NGINX.COM
Modern Web, Modern Architecture
From Monolithic...Three-tier, J2EE-style
architecturesComplex protocols (HTML, SOAP)
Persistent deploymentsFixed, static Infrastructure
Big-bang releasesSilo’ed teams (Dev, Test, Ops)
...to DynamicMicroservicesLightweight (REST, Messaging)Mutable; Containers, VMsSDN, NFV, CloudContinuous deliveryDevOps Culture
![Page 10: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/10.jpg)
Why DevOps + NGINX =• Software load balancing goes hand-in-hand with cloud
deployments• Variety of load balancing methods gives flexibility
and performance• On-the-fly reconfiguration supports service discovery
and uptime• Application health checks give early warning of
problems• Robust, customizable monitoring increases uptime
10
![Page 11: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/11.jpg)
MORE INFORMATION AT NGINX.COM
OPEN SOURCE PLUSFEATURES
REQUEST ROUTING COMPRESSION LOAD BALANCING APP HEALTH MONITORING GUI VISUALIZATION
SSL EMBEDDED SCRIPT LANGUAGE EDGE CACHE MEDIA STREAMING MONITORING ANALYTICS CONFIGURATION RESTFUL API
What’s Inside NGINX Plus?
11
![Page 12: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/12.jpg)
“NGINX Plus gives us the agility we need to anticipate and meet customers’ needs as they arise –
without fear of compromising availability or performance.”
-Serge Leschinsky, DevOps engineer at MuleSoft
Results Fit right in to current
infrastructure Simplified security Agility Around-the-Clock Support
The Challenge Wanted greater visibility into
customer traffic Needed more configuration
flexibility Too much redundant manual
work
Solution Upgrade from NGINX
to NGINX Plus On-the-fly DNS-based
reconfiguration Enhanced monitoring and
visibility
In Action: MuleSoft moves from open source to NGINX Plus for greater visibility & control
![Page 13: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/13.jpg)
Cloud Practice Lead (UK)DevOps, Continuous Delivery, Agile
Ops
Twitter: @kiefBook: http://oreil.ly/1JKIBVeSite: http://infrastructure-as-code.com
![Page 14: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/14.jpg)
SERVER SPRAWLCreating new servers is the easy part
![Page 15: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/15.jpg)
CONFIGURATION DRIFTServers start out identical
But changes accumulate over time
![Page 16: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/16.jpg)
AUTOMATION FEAR CYCLE
![Page 17: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/17.jpg)
INFRASTRUCTURE AS CODE“Applying software engineering tools and practices to infrastructure”
![Page 18: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/18.jpg)
UNATTENDED AUTOMATION
Tools run on a schedule to apply, re-apply, and update configuration
BENEFITS OF UNATTENDED:
●Discover problems quickly
●Force yourself to fix those problems
●Force yourself to improve your tools and processes
●Discourages “out of band” changes
![Page 19: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/19.jpg)
AUTOMATE SERVER UPDATESAutomation isn’t just for new servers!
Configuration synchronization
Run Chef, Puppet, Ansible, etc. on a schedule
Immutable servers
Apply changes by rebuilding servers
Containerized servers
Apply changes by deploying new container instances
![Page 20: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/20.jpg)
RE-USE & PROMOTE DEFINITIONSRe-use the same definition files across environments for a given application or service
DEV STAGE
PRODPlaybooks, Cookbooks, Manifests,
templates, etc.
![Page 21: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/21.jpg)
TEST INFRASTRUCTURE CHANGESPreventing DevOops
INFRATES
T
DEV TEST
PROD
![Page 22: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/22.jpg)
PIPELINESUsing Continuous Delivery pipelines to manage infrastructure
![Page 23: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/23.jpg)
WHAT?
Terraform, Puppet, etc.
Changes are made and committed to VCS
Tools are run on agents to apply changes to environments
Changes are only promoted after passing tests & authorization
![Page 24: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/24.jpg)
WHY?Validates changes to infrastructure before applying them to production
Confidence for frequent, small improvements to infrastructure
Limit direct changes to infrastructure
![Page 25: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/25.jpg)
TESTINGCorrectness
Security policies
PerformanceStability
![Page 26: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/26.jpg)
GOVERNANCEThe process for applying changes is auditable
Changes can be traced back to commitsAutomation ensures processes are followedAuthorization can be required as needed
![Page 27: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/27.jpg)
VPCSubnet10.0.0.0/16
Security Group1.1.1.0/16 -> :443
DEFINING A SIMPLE ENVIRONMENT
ANSIBLE PLAYBOOKServer configuration
TERRAFORM FILEEnvironment structure
APPLICATION SOURCE
Deployable application
![Page 28: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/28.jpg)
SIMPLE PIPELINE DESIGN
BUILD STAGE
TEST STAGE
QA STAGE
PROD STAGE
Application Ansible Terraform
Deploy application, configuration, and infrastructure
![Page 29: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/29.jpg)
ALIGN INFRASTRUCTURE DESIGN TO TEAMSEnsure teams can make the changes they need easily and safely
![Page 30: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/30.jpg)
COMPLEX ENVIRONMENTSInfrastructure involving multiple teams
![Page 31: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/31.jpg)
FAN-IN PIPELINEServiceA
ServiceB
ServiceC
SYSTEM TEST QA PROD
BUILD
BUILD
BUILD
SERVICE TEST
SERVICE TEST
SERVICE TEST
![Page 32: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/32.jpg)
DECOUPLED PIPELINESServiceA
TESTBUILD
ServiceB
TESTBUILD
ServiceC
TESTBUILD
QA PROD
QA PROD
QA PROD
![Page 33: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/33.jpg)
DEPENDENCIESServiceA
TESTBUILD
ServiceB
QA PROD
TESTBUILD QA PROD
Create test instance of
provider
Implement Consumer
Driven Contract (CDC)
Tests
Use mocks and stubs
![Page 34: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/34.jpg)
ISSUE: SHARED ELEMENTS
NGINX
ServiceAvhost
ServiceBvhost
Shared infrastructure definitions
Service-specific infrastructure
definitions
![Page 35: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/35.jpg)
SHARING ELEMENTSAvoid monoliths - optimize to simplify making changes
NGINX
![Page 36: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/36.jpg)
OUTCOMES ● Quickly provision and evolve infrastructure
● Effortlessly roll out fixes● Keep systems
consistent and up to date
● Spend time on high value work
![Page 37: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/37.jpg)
Book: http://oreil.ly/1JKIBVeSite: http://infrastructure-as-code.comTwitter: @kief
Cloud Practice Lead (UK)
, Continuous Delivery, Agile Ops
![Page 38: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/38.jpg)
Links
38
NGINX
1. MuleSoft case study
2. Doing DevOps blog post
3. How to Manage Your Control Issues
4. Reconfiguring NGINX on the fly
5. nginx.conf 2016
6. All NGINX DevOps blog posts
ThoughtWorks
1. Infrastructure as Code – Amazon
2. Effective DevOps – Amazon
3. State of DevOps survey at ThoughtWorks
4. “Infrastructure as Code” articles at ThoughtWorks
![Page 39: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/39.jpg)
MORE INFORMATION AT NGINX.COM
![Page 40: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/40.jpg)
Questions?
![Page 41: How to Adopt Infrastructure as Code](https://reader036.fdocuments.us/reader036/viewer/2022062311/586f8b0a1a28ab54768b6585/html5/thumbnails/41.jpg)
Thank Younginx.com | @nginx