Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

BRKCLD-1003 (2018)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 83

BRKCLD-1003

A Practical Introduction to
DevOps Practices and Tools

Chris Jackson, Distinguished Systems Engineer


Cisco Spark
Questions?
Use Cisco Spark to communicate
with the speaker after the session

How
1. Find this session in the Cisco Live Mobile App
2. Click “Join the Discussion”
3. Install Spark or go directly to the space
4. Enter messages/questions in the space

cs.co/ciscolivebot#BRKCLD-1003

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Why are you here?

(In this Session)


Ideas

Compare

Sharpen Skills
“[DevOps is] a set of cultural norms and
technical practices that enable this fast flow of
work from dev through test through operations
while preserving world class reliability”

Gene Kim - author of ”The Devops Handbook” and “The


Phoenix Project”

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
Lean

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
The 3 Ways of DevOps

Flow/System
Thinking

Amplified
Feedback Loop

Continuous
Learning and
Experimentation

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Agenda


Why Go Fast
🏃
How To Get To
� 🚵
How To Go Fast Going Fast
Fast Safely

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Why Go Fast?
Improve ability to Respond and Shift
Your organization will never have all of the
1. information to understand how to do better in
the marketplace.

More trials give you more


2. information

Information can lead to improved


3. direction and benefits for customer as
well as the organization.
BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Compete

“If you are doing quarterly releases and your


competitor is doing daily releases you will fall
so far behind”

Adrian Cockcroft – former Netflix Architect


http://a16z.com/2016/09/01/microservices/

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
“Instead of trying to get better at predicting the
future, we should improve our ability to adapt
rapidly and effectively to new information”

Lean Enterprise: How High Performance Organizations Innovate at


Scale

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Highest
Paid
Persons
Opinion

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Waterfall Development Process
Around since the 50s
Sequential Design Approach
Requirements and scope are fixed
Requirements/analysis

Design

Coding

Testing

Maintenance

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
Before Agile Methodologies

Time
Sacrificial
Lamb

Analysis Design Code Test

Half way finished?


50% Complete
100% Unusable
BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Benefits of Agile Development
Time

Analysis

Design

Code

Test

40% Complete
100% Usable Code
BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
Lean and Agile
Lean – Management philosophy to eliminate
waste across all aspects of business
• Derived from Toyota Production System

Agile – Implementation of Lean for


software development
• Short sprints
• Continuous incremental value

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
Lean: Eliminate Waste
• Partially Done Work – Can not Demo, can not release it.
• Extra Features – Should only produce what is being asked for
• Relearning – Reinventing the wheel
• Handoffs – Make sure both parties communicate
• Delays – Anything that causes more time to delivery a value-added activity
• Task Switching – Team members moving from one task to another without
completing the first task properly
• Defects – Erroneous Functionality

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
How To Get To Fast
Operations World
• Care About
• Everything is stable
• Standards
• Templates
• Not getting bothered at 2:00 am

• Success
• Software is stable
• Backup and restore works
• Systems are operating within
defined thresholds

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Developers World
• Care About
• Writing Software
• Working Code
• APIs
• Libraries
• Sprints
• Success
• Software works – Laptop and Test
• Finished Sprint

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Dev Ops
Completed Functions Change Windows
X X X
X
X X X
X X X X X

X X X X
X X
X X X X
X

X X X X
X
X X X X

Change Stability

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Traditional IT service delivery: Slow, manual, and error prone

Requirements
• Define strategy &
required features Architecture
• Ensure service
updates are Development
aligned with
enterprise • Write software /
architecture integrate QA & BAT
underlying
services • Test that
software works OPS
• Pushes updates
to production and
manage service

The more complex a project becomes, the longer the schedule, and the higher the probability
of scope and schedule surprises.

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Lean, Agile, and DevOps Combined

DevOps

Lean Business Principles Agile Development Operations

💡 BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Make Developers Faster

🚴
Extreme Programing (XP)

• Focuses on Software Quality and Responding quickly to


changing customer requirements
• Frequent releases and short dev cycles
• Improve productivity and interaction with customer

• Paired Programing
• Test Driven Development
• Continuous Integration
• Continuous Delivery

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
SCRUM Agile Project Management

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Kanban
• Japanese for “Signal Board”
• 5 Core Principles
• Visualize the workflow
• Limit Work In Process
• Manage Flow
• Make Process Policies Explicit
• Improve Collaboratively

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
Pulling it all together
Lean Business Level

IT Level Agile
Software Project and
Scrum Kanban Team Management
Software Engineering
Practices Extreme Programming

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 30
Make Operations Faster


Infrastructure as Code
(Configuration Management)
• Writing high level code that automates the provisioning and deployment of
infrastructure components
• Not just script writing or infrastructure automation
• Uses software development practices
• Versioning control
• Design Patterns
• Testing

• Infrastructure is DEFINED by the code


• Vagrant, Puppet, Chef, Ansible, Docker, ect

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
Application Evolution is Driving Technology Adoption

Containers

VMs Serverless

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 33
What is a Microservice?
• A small and focused piece of software
• Stateless loosely coupled
• Language and technology independent
• Highly scalable and fault tolerant

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Immutable Infrastructure

• Immutable : Unchanging over time or unable to be changed

• Once you instantiate something, it never changes


• Instead you replace it with a newly built instance
• Only works in a true cloud environment with API control over all aspects of
Configuration and Monitoring

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 36
Immutable Infrastructure Stack
Mutable Server

App v1 App v2 App v2


OS v1 OS v1 OS v2

Build Patch App Patch OS

App v1 App v2 App v2

OS v1 OS v1 OS v2

Immutable Server
BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
Infrastructure as Code vs Immutable Delivery Model

• VM = 2-5 minutes • Container 500ms


• Software Entropy • New instantiation each time with latest
packages
• Infrastructure as code upwards
of 10 minutes to restore • Immutable delivery model 2-3 secs

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 38
Go Fast Safely
What About Security?
• Lots of Dev and Ops, no mention of security
• Configuration management tools (Puppet, Chef, Ansible) can help standardize
controls but not replace security expertise
• Must be inserted into the DevOps process (not a bolt on!)

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
DevOps Security Efforts

• Rugged Software – Integrating Security into software development


• Gauntlt

• OWASP AppSec Pipeline


Project

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 41
Continuous Deployment

Unit Tests

Deploy
Code Source Build
Develop to
Commit Control Trigger
Deploy Report Publish to Production
release
to Test & repository
Env Notify

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 42
Security within Continuous Deployment

Tests

Deploy
Code Source Build
Develop to
Commit Control Trigger
Deploy Publish to Production
Automatic Report release
to security & repository
Test test Notify
SCA
Test

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
Don’t Check Passwords into Github
TLS all the things
• TLS/SSL can now be free
• Encrypt between Microservices

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 45
Communication
• Integration with Development Environment
• Code commits should appear
• Chat with History
• Team Rooms
• Kanban Board
• Multi-Platform Clients
• “Chat-Ops”

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 46
Going Fast
Devops Periodic Table

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 48
Continuous Integration

Configuration Management

Collaboration

Working Environment

Source/Image Control

PaaS

IaaS

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 49
Developer Fast
Need a Developer Platform

APIs

Programmable Tool Ecosystem Available

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 51
Private IaaS

Cost
81% of Enterprises are planning or
already have moved to an OpenStack
Private Cloud*
Performance Control
Data
Sovereignty

65% have found it difficult…*

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 52
Overview of Cisco Metacloud Solution

Configure
Capacity and
Planning Remote private cloud engineering
Network
and operations with SLAs

Platform Platform
Updates Cisco Installation
Metacloud™ Delivered “as a service”
Solution

Maintenance 24x7
Coordination Monitoring
In your data center, on your hardware
Problem
Mitigation

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 53
Need a Place to Store Code
• A place to store current and past versions of code
• Ability to merge, branch, fork
• Ability to see who has changed which file
• Highly available service
• Ability to revert to prior versions
• Public or Private / OnPrem / OffPrem
• Social

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 54
Why Containers
• Micro-services Architecture
• Small loosely coupled and purpose built services
• Efficient Distribution/packaging vehicle

• Better aligning to the Dev and Ops of DevOps


• Puppet, Chef, Ansible are popular with Ops but not Devs
• Containers are equally popular with both
• Containers create a natural segmentation of effort
• Devs inside the container, Ops outside the container

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 55
The Impact of Containers on DevOps
• Guaranteed consistency for CI/CD
• Simplified light weight image files
• Only what the app needs and nothing else
• What is built on a laptop will work the same in production
• Open community built best of breed containers
• Public container repository - Docker Hub
• SPEED
• Deploy in seconds instead of minutes

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 56
Dev+Ops Fast
Developers are like Goldilocks

App Team IaaS PaaS CaaS

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 58
Platform as a Service

Multi-Cloud

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 59
docker run –p 80:80 –d –name app app

Container

Port 80

Operating System Port 80

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 60
for i in $(seq 3); do docker run –P –d –name app$i app; done

Container: Container: Container:


app1 app2 app3

Port 80 Port 80 Port 80

OS Port: 32769 OS Port: 32771 OS Port: 32773

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 61
for j in $(seq –w 8); do ssh vm0$j for i in $(seq 3); \
do docker run –P –d –name app$j$i app; done; done

vm01 vm02 vm03 vm04

vm05 vm06 vm07 vm08

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 62
4 Challenges

Ports

Dynamic Efficiency

Placement

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 63
Solutions Emerge

Mesos Kubernetes Docker Swarm

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 64
Docker Datacenter

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 65
Cisco UCS Integrated
FlexPod Infrastructure
with OpenStackfor Containers Target Q3
2015
Red Hat Enterprise Linux OpenStack Platform 6 (Juno Release)
Cisco UCS with Enterprise Ready FlexPod with
Docker Datacenter •1.xPrivate Cloud Infrastructure as a Service Docker Datacenter 2.x
• New and existing FlexPod customers for production
Design
deployments – NetApp FASchoices
and E-Series Storage
• Customer Benefits
• Scalable
FlexPod robustness Architecture
provided with OpenStack HA hardening
• Block and Object Storage now with File Sharing in a later update
• High performing object storage with NetApp E-Series
Jointly Engineered
• Instantaneous VM image cloning with Data ONTAP FlexClone
• Supports Dev/Test environments and in-house applications
• Delivered
Simplified Red by Partners
Hat install saves time, up and running faster

NetApp Docker
© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8

Single point of support Vol Plugin

Container and Microservices Solutions on Cisco UCS Integrated Infrastructure

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 66
Languages

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 67
What’s on your Laptop?
• Development takes place on laptop
• Keep Local environment as close to production environment
• But still allow for desktop experience

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 68
Editors

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 69
Operations Fast
Continuous Integration, Delivery, and Deployment
• Continuous Integration: Merging of development work with code base constantly
so that automated testing can catch problems early.
• Continuous Delivery: Software package delivery mechanism for releasing code
to staging for review and inspection.
• Continuous Deployment: Relies on CI and CD to automatically release code into
production as soon as it is ready. Constant flow of new features into production

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 71
Evolution of CI/CD platforms
Classic Mode Emerging Mode
• Centralized Configuration • Configuration pushed into the
Repositories not centralized
• Responsibility of CI/CD
administrator • Responsibility of Developers
• Examples: • Examples:
• Jenkins, Microsoft TFS • Drone.io, Travis CI, Circle CI

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 72
Monitoring, Logging, Alerting

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 73
Seeing it all happen
5
Changes Kick off
Test Build Test Environment
Environment
4 6

1
Developer Drone runs
Pulls From Multiple Tests
3 Integration,
Trunk Continuous
Integration Server Smoke, etc.
Developer
pushes
7 Reports back test
results
commits

8
9
If tests pass
Deploy code to Production
Continuous
artifact repository
2 Artifact
Delivery
Repository
Make incremental
changes on local
environment and unit
tests
BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 75
Agenda


Why Go Fast
🏃
How To Get To
� 🚵
How To Go Fast Going Fast
Fast Safely

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Further Reading

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 77
Q&A
Cisco Spark
Questions?
Use Cisco Spark to communicate
with the speaker after the session

How
1. Find this session in the Cisco Live Mobile App
2. Click “Join the Discussion”
3. Install Spark or go directly to the space
4. Enter messages/questions in the space

cs.co/ciscolivebot#BRKCLD-1003

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Please complete your Online Complete Your Online
Session Evaluations after each
session
Session Evaluation
• Complete 4 Session Evaluations
& the Overall Conference
Evaluation (available from
Thursday) to receive your Cisco
Live T-shirt
• All surveys can be completed via
the Cisco Live Mobile App or the
Communication Stations
Don’t forget: Cisco Live sessions will be available
for viewing on-demand after the event at
www.ciscolive.com/global/on-demand-library/.

© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Continue Your Education
• Demos in the Cisco campus
• Walk-in Self-Paced Labs
• Tech Circle
• Meet the Engineer 1:1 meetings
• Related sessions

BRKCLD-1003 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 81
Thank you

You might also like