Top Banner
Stuart Clark Network Automation Evangelist Cisco Devnet What it means for network engineers, and why we should care? NetDevOps Style Configuration Management for the Network
22

NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

May 28, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

Stuart Clark Network Automation Evangelist Cisco Devnet

What it means for network engineers, and why we should care?

NetDevOps Style Configuration Management for the Network

Page 2: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Virlutils Network Simulation

• What are Infrastructure as Code and Configuration Management?

• Benefits of Configuration Management

• Recipes, Manifests, Playbooks, and the Tools

• Configuration Management with Ansible Example

Game Plan

2

Page 3: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• virlutils makes it easy to start a network simulation

• virlutils is written in Python

• https://github.com/CiscoDevNet/virlutils

“virl up” Network Simulation Done Right

3

Page 4: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Agentless

• Currently popular in network community• ie Lots of examples!

• Written in Python

• Simple to install and get started!

But explore other options as well!

Why Ansible for the Network?

4 LINX102

Page 5: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Ansible Playbook• Run roles against relevant groups

• Ansible Roles• Align to network roles

• Inventory File• List network devices• Logically group for configuration

• Variable Files• Device specific details• General group details

”Network as Code” with Ansible for Configuration Management

5

Page 6: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Physical Topology• “Core” – IOS XE Routers• “Distribution” – NX-OS Switches• “Access” – NX-OS Switches

• Network has been cabled already

• Management access to devices enabled• No other configuration completed

Starting Network Topology

6

Page 7: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Layer 3 Links between Core/Dist• OSPF Area 0 Routing Configured

• Distribution configured for VPC Domain

• Layer 2 port-channel trunk to access

• Set of VLANs Configured• SVIs at Distribution with HSRP Configured

Desired Network Configuration

7

Page 8: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

What are Infrastructure as Code and Configuration Management?

Page 9: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

“Infrastructure as Code (IaC) is the process of managing and provisioning computer data centers through machine-readable definition files...”

Infrastructure as Code… huh?

9

https://en.wikipedia.org/wiki/Infrastructure_as_Code

Page 10: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Store network configuration in source control systems (ie git)• Use ”machine readable” formats like YAML, JSON,

XML

• Treat the source control as single source of truth • Develop, test, and deploy to prod from same

source

• Deploy configuration using programmatic APIs and tooling• Limit manual network configuration• Explore “Configuration Management” tooling.

Some Principals of ”Network as Code”

10

Page 11: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• No more hand to hand combat configuration management

• Configuration Management today is about the “tools”

Mechanism = Automation

11

Consistency + Scale

Success!

Page 12: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• The software and version installed

• System attributes like name, address, ownership, etc

• Feature specific configurations

Characteristics = Desired State

12

Page 13: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

Benefits of Configuration Management

Page 14: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

Quickly Provision Infrastructure

14

Sequential and Manual

Page 15: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

No More Snowflakes

15

System Variation

Page 16: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

Version Controlled Infrastructure

16

Organic Configuration

Page 17: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

Infrastructure as Code

Version Controlled Infrastructure

17

Page 18: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Open Source Foundation

• Automation and Orchestration

• Idempotent Behavior

• Facts, lots of facts

• Modules and Libraries

Commonalities of Configuration Management Tools

18

Page 19: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

Matrix of Common Info and Terms

19

Ansible Puppet Chef SaltStackLanguage Python + YAML Ruby Based Ruby Python

Managed NodeRequirements

Agentless Traditionally Agent Based

Agent Based Agent Based “minions”

CentralizedManagement

Any computer can be “controller” Optional “Tower”

Puppet Master Chef Server Salt Master

What you create Playbook / Roles

Manifest / Module

Recipe / Cookbook

Pillar / Include

Page 20: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• What are Infrastructure as Code and Configuration Management?

• Benefits of Configuration Management

• Recipes, Manifests, Playbooks, Oh My! The Tools

• Configuration Management with Ansible Example

What did we cover?

20

Page 21: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

• Resources• Network Automation with Ansible

(ansible.com)• Network Automation wtih Salt

(saltstack.com)• Network Automation with Puppet

(puppet.com)• Network Automation with CFEngine

(cfengine.com)

• DevNet Learning Labs• Introduction to Ansible• Using Ansible with NX-OS Devices• Introduction to ACI and Ansible• Home Lab: Using Ansible from your Desktop

OS

• Blogs and Videos• What does "Network as Code" Mean?• Automating Cisco ACI with Ansible Eliminates

Repetitive Day-to-Day Tasks

• NetDevOps Video Module

What do do next?

21

Page 22: NetDevOps Style Configuration Management for the Network · (ansible.com) • Network Automation wtih Salt (saltstack.com) • Network Automation with Puppet (puppet.com) • Network

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

Got more questions? Stay in touch!

[email protected]@bigevilbeardhttp://github.com/bigevilbeard

@CiscoDevNetfacebook.com/ciscodevnet/ http://github.com/CiscoDevNet

Stuart Clark developer.cisco.com