All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci...

16
#CiscoLive | #DevNetDay Lionel Hercot, Technical Marketing Engineer @LHercot How to use Ansible with ACI, NAE and MSO All things Ansible for ACI

Transcript of All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci...

Page 1: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

#CiscoLive | #DevNetDay

Lionel Hercot, Technical Marketing Engineer@LHercot

How to use Ansible with ACI, NAE and MSOAll things Ansible for ACI

Page 2: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

Agenda

#CiscoLive | #DevNetDay © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public

• What is Infrastructure as Code?• Ansible & Collections• Cisco DC Networking Collections• How to get started?• Using the ACI Collection• Verifying changes with NAE• Creating a schema in MSO

DEVNET-DC 2

Page 3: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

Infrastructure as code – What/Why/How

• Automate the provisioning and management of the technology stack

• Translate manual tasks into reusable, robust, distributable code

• Rely on practices that have been successfully used for years in software development (version control, automated testing, release tagging, continuous delivery, etc.)

• Benefits: much higher delivery speed; significant reliability boost

DEVNET-DC 3

Page 4: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

What is Ansible?

4DEVNET-DC

• Open-source configuration management tool

• Commercial support from RedHat

• Declarative (when possible) and idempotent

• Can manage a wide range of systems: VMs, network devices, cloud instances, etc.

• Agentless

Page 5: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

What are Ansible Collections?

5DEVNET-DC

Ansible 2.9{rpm, deb, pip}

Ansible 2.10 Base{deb, pip}

Ansible Content{collections}

Ansible 2.10{rpm, deb, pip}

Page 6: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

What are Ansible Collections?

6DEVNET-DC

• A standardized way to organize and package Ansible content

• Include roles, modules, module utilities, plugins, documentation

• Semantic versioning

• Portable and flexible delivery

Page 7: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

How to get started with Collections?

• Install Ansible (v2.9): pip install ansible• Install ACI collection: ansible-galaxy collection install cisco.aci

• Run your playbook: ansible-playbook my-aci-playbook.yml

• Install Ansible (v2.10): pip install ansible

• Run your playbook: ansible-playbook my-aci-playbook.yml

7DEVNET-DC

Page 8: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

Cisco Data Center Networking Collections

Data Center Network Manager

Multi Site Orchestrator

APICControllerCisco NXOS

Network Assurance

Engine

Available Today Coming Soon

65+ modulesin

cisco.aci

30+ modulesin

cisco.mso

80+ modules in

cisco.nxos

3+ modulesin

cisco.nae

Page 9: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

How to start with the ACI Ansible Collections?

• Start simple

• Pick a task you want to automate• Interface Configuration (Fabric Access Policies)• Cookie-cutter Tenant / VRF / EPG templating• EPG to VLAN assignment

• Automate these tasks (individually)• Build on it (stitch them together)

• Verify your changes with NAE

Page 10: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

Let’s do it!

Page 11: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

Working with MSO

Page 12: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

Using ACI and NAE together

Page 13: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

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

What to do now?

• ACI Ansible Modules Documentation Guidehttps://docs.ansible.com/ansible/latest/scenario_guides/guide_aci.html

• Cisco DevNet ACI and Ansible Learning Labshttps://developer.cisco.com/learning/modules/ansible-aci-intro

• Cisco DCN Collection GitHub Reposhttps://github.com/CiscoDevNet/ansible-acihttps://github.com/CiscoDevNet/ansible-mso

https://github.com/CiscoDevNet/ansible-nae

• Cisco Collections on Ansible Galaxyhttps://galaxy.ansible.com/cisco

• Demo Code GitHub Repositoryhttps://github.com/lhercot/ansible-aci-webinar

• What’s new and exciting on Cisco ACI withRed Hat Ansible Collectionshttps://blogs.cisco.com/datacenter/whats-new-and-exciting-on-cisco-aci-with-red-hat-ansible-collections

Page 14: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

© 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public#CiscoLive | #DevNetDay

Cisco Data Center Networking Collections

Data Center Network Manager

Multi Site Orchestrator

APICControllerCisco NXOS

Network Assurance

Engine

Available Today Coming Soon

65+ modulesin

cisco.aci

30+ modulesin

cisco.mso

80+ modules in

cisco.nxos

3+ modulesin

cisco.nae

Page 15: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

Thank you

#CiscoLive | #DevNetDay

Page 16: All things Ansible for ACI...• Install ACI collection: ansible-galaxy collection install cisco.aci • Run your playbook: ansible-playbook my-aci-playbook.yml • Install Ansible

#CiscoLive | #DevNetDay