Skip to content
This repository has been archived by the owner on Dec 3, 2021. It is now read-only.

New Lesson: Ansible for Network Automation #97

Closed
Mierdin opened this issue Oct 13, 2018 · 18 comments
Closed

New Lesson: Ansible for Network Automation #97

Mierdin opened this issue Oct 13, 2018 · 18 comments

Comments

@Mierdin
Copy link
Member

Mierdin commented Oct 13, 2018

Need to add a lesson covering Ansible

@ffreitasalves
Copy link

Could you provide more information on this issue, please?

@Mierdin
Copy link
Member Author

Mierdin commented Oct 20, 2018

Apologies, I write that in a hurry. Updated....just a lesson idea

@Mierdin Mierdin changed the title Ansible New Lesson: Ansible for Network Automation Oct 23, 2018
@shahbhoomi
Copy link
Contributor

shahbhoomi commented Oct 29, 2018

@Mierdin
@ShrutiVPawaskar and I are working on this issue and we are planning to include the following in this lesson. Can you please take a look at our stages and give us your feedback/suggestions?

Part 1: Intro to Ansible

  • What is Ansible?
  • Ansible Structure
  • Ansible Terminology e.g. tasks, handlers,variables
  • Your First Playbook

Part 2 Ansible Junos Modules

  • junos_facts
  • junos_command
  • junos_config
  • junos_system
  • junos_user
  • junos_vlan

Part 3 : Ansible Juniper.junos role

  • juniper_junos_config
  • juniper_junos_ping
  • juniper_junos_table
  • juniper_junos_rpc

@Mierdin
Copy link
Member Author

Mierdin commented Jan 25, 2019

@shahbhoomi Sincere apologies for not responding earlier. I think we still need a general Ansible lesson though, before diving into Juniper specifics. The above feels like a bit of a commercial - I think there's a place for it, but perhaps after making sure the user has seen a bit more of the basics.

Also note that https://github.com/nre-learning/antidote/issues/152 was opened recently (I closed it in lieu of this one since this has been open for some time), so @ntwrkguru and @dgjnpr may also have thoughts here.

@mmellin
Copy link

mmellin commented Feb 23, 2019

Hello, I'm interested in contributing here. I've been learning Ansible myself and am reading through the NRE contribution documents. If I get a few free cycles and learn a little more about NRE lessons, I can post a draft lesson plan and get feedback.

@Mierdin Are there any Ansible specifics you'd like to see covered?

@Mierdin
Copy link
Member Author

Mierdin commented May 15, 2019

I've recently become aware of several parties working on this that haven't chimed in here yet. I highly recommend that if you're currently working on this, that you comment here now, to avoid duplicate work.

@manasasu
Copy link

manasasu commented Jun 27, 2019

Hi @Mierdin .Just wanted to check if this issue is still open and if there are multiple contributors, we can collaborate.
This is my draft plan for ansible -
What is Ansible and why is it used
What are control and managed nodes
Creating modules and tasks
Creating inventory with variables
Creating your first playbook using YAML for fetching and updating device configuration
Converting playbook into a role

@Mierdin
Copy link
Member Author

Mierdin commented Jun 28, 2019

I am quite sure that there are other parties working on this at this point. I will try to direct them here, but IMO this is something that is going to be well-served in the near future.

@ntwrkguru
Copy link

I’ve not had time to get the antidote and all set up in a local dev environment, and likely won’t anytime soon. 😢

Otherwise I’d contribute, despite the fact that I hate ansible for network management. But, people love it, so may as well include it.

@hillstreetblues
Copy link

Hi @manasasu we've been working in a team of two to build a lesson for this. It's almost finished with the following structure.

  1. Introduction
  • Briefly what/why is Ansible (+control/managed nodes)
  • Setting up your inventory
  1. Tasks and Modules
  • Brief explanation
  • Using modules in ad-hoc command
  • A very basic playbook (doing the same ad-hoc command in a playbook)
  1. Your first playbook
  • Originally we had built it to deploy two web server but since speaking with Mierdin swapped the focus to network devices. Currently playing around with NAPALM for Ansible and sorting out what can be done. On a non-vm environment we have tested get_facts and changing and configuration and comparing the difference which is what we hope to show in the lesson. When trying to do this on virtual devices I have been having a couple issues but just need to get past the errors.

For collaboration maybe we could get together and have a look at the current state of each of our lessons, we could compare and see what to merge together. One thing I could do with help on the most is troubleshooting an sftp problem I have been having when Ansible connects to a vqfx.

@ntwrkguru
Copy link

@hillstreetblues When you say napalm, are you referring to using the core Ansible modules? If so, I would recommend >2.5 to use the vendor-neutral "magic" of the network_cli connection type.

Do you have a fork that you're working in? Maybe I can take a look also.

@mmellin
Copy link

mmellin commented Jun 28, 2019 via email

@manasasu
Copy link

@hillstreetblues I have just started working on it. It would be great if you could share your fork and I could do some modifications to it or try to troubleshoot any errors you are facing.

@hillstreetblues
Copy link

@mmellin @manasasu

Onto just writing lesson content at the moment which shouldn't take long to finish. Once its written I will share my fork and we can propose changes.

Having issues using Napalm as an ad-hoc command where I don't have these problems when using a playbook. Have you seen something like this before?

@manasasu
Copy link

manasasu commented Jul 8, 2019

@hillstreetblues Could you give us more details about the problem. What error does it throw up? Can you paste the ad-hoc command used?

@hillstreetblues
Copy link

Hey @manasasu I had to make sure my connection was defined as local in my playbook as I couldn't parse this in the ad-hoc command. I have been away but I am back on this. I will post more details on any errors I come up against for the future.

@Mierdin
Copy link
Member Author

Mierdin commented Jan 16, 2020

Hello all. I'm noticing this conversation has died off. This is one of the most-requested lessons, and it seems like there's a lot of interest in working on it as well, but I haven't seen this manifest in a pull request to date.

From what I've read in the above thread, there are potentially three lessons in play here, going from the more fundamental, to the more specific:

  • General Ansible Learning
  • Ansible for Networking
  • Ansible for Junos (wherein we explore the numerous junos-specific Ansible modules)

We're working with the Red Hat folks to look at getting some of the content in their existing workshops into the NRE Labs curriculum, and I feel like their content sits firmly in the second realm - it's definitely applied to networking, but it's also very multi-vendor, which is a good fit for this curriculum.

Our plan for v1.1.0 is to land a single lesson that converts their earliest workshop materials into a few stages as a proof-of-concept, with the ultimate goal of converting all of their workshop material into a lesson. I would expect that this work is done within the next week or so.

Naturally, if anyone in this thread is days or weeks away from dropping a dope Ansible PR in this repo, please let me know - I intend to not render anyone's hard work obsolete. 😄 That said, even if not, there's still room to contribute Ansible content along the lines of the other two main areas I outlined above, and of course, improving any existing content.

Thanks so much for the thoughts and work thus far - and I hope this makes sense. If you have any questions please let me know.

@Mierdin
Copy link
Member Author

Mierdin commented Jan 28, 2020

Hello all - just wanted to give an update on this lesson. We have merged #289, which means that we now have a generic, multi-vendor "Ansible for Networking" lesson. Whoo!

I'm going to close this issue, but as I mentioned before, I do still think there's room for more Ansible content. Not just additional stages to what was implemented in #289 (which is still planned, likely to happen in following releases) but other lessons that take a different approach. I opened #298 to track the idea of a Junos-specific lesson, since I know there's a ton to talk about wrt those integrations.

@Mierdin Mierdin closed this as completed Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants