Hey thanks for this. I can't wait until your next video on Nornir
@RogerPerkin
4 жыл бұрын
Glad you enjoyed it, I am really looking forward to making some more videos!
@AdrianLopez-sc6zw
4 жыл бұрын
Kool this is muuuch better than ansible,. This way I can compare clusters of spine and leaf switches with unamed bgp sessions.. or just do basic prefixes monitoring on mpls or Mac addresses. I love it !!!
@Madmandrd
Жыл бұрын
With Nornir 3.30 it doesn't work ImportError: cannot import name 'netmiko_send_command' from 'nornir.plugins.tasks' (C:\Python\Python39\lib\site-packages ornir\plugins\tasks\__init__.py
@updatemanojalliswell4186
3 жыл бұрын
Can nornir be used to automate stuff other than Cisco like zte lmg. In my organisation we have lan switch and access equipment of zte. I want to automate that stuff.
@casanave1
3 жыл бұрын
do you mean ZTP, zero touch provisioning (AKA PNP)?
@gauthamkrishna9369
4 жыл бұрын
Hi Roger , In my organization , we usually have to log into to a gateway switch first and then log into the Cisco router , is this also possible for automation?
@AdrianLopez-sc6zw
4 жыл бұрын
Yep, though you need to install nonir on that jump server and use your credentials
@hperezcu
4 жыл бұрын
@@AdrianLopez-sc6zw that is the problem usually the customer doesn't has access to add modules neither install anything in the jumpbox,. I guess he is asking for something like proxy or transport , that connect in the jumbox and then from there without install anything go to the other 2 hop
@afara2000
2 жыл бұрын
@@hperezcu Typically you have an automation or management server or VM preferably Ubuntu with SSH access to all your network devices and place your Nornir/Python/Ansible or any other automation tool including your cron scripts to run at scheduled times. But you do need to have secure remote access to that server.
@vittok
3 жыл бұрын
Is there a way to mask password in defaults.yml?
@casanave1
3 жыл бұрын
nope... scary, right
@networkgeek5091
4 жыл бұрын
i am getting [Errno 2] No such file or directory: 'hosts.yaml' can anyone help
@Tomas-yq6ko
3 жыл бұрын
check your working directory. If you're running your .py file in a different folder other than where the hosts.yaml is you could get that error.
@networkgeek5091
3 жыл бұрын
@@Tomas-yq6ko ya I figured it out 😁...anyway thankyou
@casanave1
3 жыл бұрын
I'd be interested in a time to execute comparisons across 100 to 1000 devices using Nornir, with it's continued dependence on Python, vs. well-written code using a performant language such as Rust, C++, or GoLang. I understand that Python is used to keep the barrier to entry low, but wondering why "professional developers" are writing persistent code in a language with established low-scalability and performance. I feel that this is coupled with continued dependence on SSH as the control channel when RestCONF has growing availability. Nornir looks like the 1990's rusty car that someone just added a $2000 speaker system to.
@EhsanVessal
3 жыл бұрын
Because generally speaking it's not "professional developers" who are writing the code for network automation, but the network engineers themselves. The NetEng's won't generally have a rigorous background in programming languages, and the professional developers don't have a very deep understanding of the network protocols and configurations. So Python works perfect because of it's low barrier to entry as you mentioned. In fact some even deem Python itself as too much of a barrier to entry, and that's why an orchestration tool like Ansible has become popular in the networking field. Furthermore, I don't think it has anything to do continued dependence on SSH. How do you intend to use RESTConf? Make your API calls manually and individually using Postman, or using Curl commands on a linux box? Not very efficient. But you can couple RESTConf with Python and make a full-fledged script that configures an entire network device in a few minutes, and you can even throw Nornir on top of RESTConf in your Python script to configure multiple devices at once.
@casanave1
3 жыл бұрын
@@EhsanVessal Thanks for the reply EV. The issue I have is vendors such as Cisco pushing the occupation of DevOPS or NetDevOPS on a foundation of Python. It's one thing to write scripts to accomplish tasks in a more efficient way. Python is a great language for immediate gratification scripts to solve issues at limited scale. I would expect a network engineer that wants to pick up efficiencies to go this route. It's another thing for a company to invest Network DevOps professionals and they create "permanent code" to be used by a company or companies with a scripting language such as Python. As far as API calls go, most modern Languages support calling APIs from code, so no need to manually invoke or call via Linux scripts. Even Python has this with Flask, only handicapped by Pythons known challenges with parallelism/multi-threading efficiencies. This is what makes up your modern microservice framework architecture, where you frontend things for your networking team, likely React or Angular Javascript driven, with your microservices behind it to: store data in databases, make API calls to ticketing systems such as ServiceNow or FreshDesk, NMS platforms such as DNA Center, SolarWinds, Nagios, or ManageEngine. Not meaning this to bash those perusing Python. I hope to create thought on comparing and expecting companies writing "permanent code" to reach outside of Python. The dirty secret is that it is driven by laziness and time to market driven alone. Using Python prevents the need to write packages/modules needed to connect to and parse many vendors API and CLI outputs. And I get that too, getting solutions to "now" problems out as soon as possible. So, I want to see the most performant and scalable code from professional developers, i.e., companies and people getting hired to focus on development of software for Network OPS, AKA Net DevOPS. I am hoping that we as "engineers" are questioning if we doing things at the best quality and scalability possible. This would be the same mindset that's taking us from the CLI to Ansible, Python, and now Nornir. Just as Ansible or Nornir with Python can be a force multiplier, a more performant language and code writing maturity may further scale these efficiencies.
@EhsanVessal
3 жыл бұрын
@@casanave1 You make some good points, but there are some assumptions I would like to address. 1) On the idea of companies hiring professional developers to focus on network software, that's just simply not the case for the vast majority of enterprises out there. Most companies don't have the budget to dedicate to completely focused NetDevOps teams. Remember that network infrastructure is generally a sunk cost for most enterprises out there, so unless your software is generating revenue for the company, many companies will be averse to spend resources on dedicated NetDevOps teams. Only the largest companies with giant IT budgets might be able to stomach it. Which leads to: 2) Again, most NetDevOps are done on an ad-hoc basis by infrastructure engineers who have solid understanding of underlying network protocols, but don't necessarily have a good grasp of best practices when it comes to programming. Generally they are doing the network automation without much direction. So this idea of a "permanent code" approved by the company doesn't really exist in my view. 3) Cisco generally isn't pushing Python as the NetDevOps de facto standard. Cisco would love nothing more than to lock you in on their own automation offerings, such as their SD-ACCESS, SD-WAN, and ACI solutions. Why code when they've already provided an integrated automation solution for you? Other vendors have similar offerings. These are my views as a Network Engineer who works at a Fortune 500 without a software engineering background.
@casanave1
3 жыл бұрын
@@EhsanVessal I agree with you overall. I work for a company with team members solely dedicated to NetDevOPS. That's where my perspective comes from, an MSP/ISP type environment that has lived the scalability nightmare of Python in practice on large scale deployments. On the other hand, Cisco and others are pushing the idea of certified professionals that companies should lean on for establishing these practices. As to if Cisco is pushing Python on DevOps, please review their exam criteria and the only programming language discussed - multiple tools, but only one language: - 200-901 DEVASC Exam: DevNet Associate: 5.7 Identify the workflow being automated by a Python script that .... - 350-901 DEVCOR: 5.5 Construct Python scripts that ... - 300-910 DEVOPS: 5.5 Construct Python scripts that .... - 350-401 ENCOR Exam (CCNP and CCIE Prereq): 6.1 Interpret basic Python components and scripts Then there's the why code when there is integrated solutions.... The truth is that there's no vendor neutral solution; so, if you want to offer your company or customers the best wired and wireless network, at the best price, and with the fastest and most predictable deployment possible, you're building something. This goes for needing niche answers from your network if your company does something that's not the "norm," has the biggest revenue capture for the selling vendors. If you are only a Cisco show for wired and wireless access, and only do "me-too" things that falls into the vanilla networking, go with the vendor tool of choice. You'll have them to worry about maintaining it, so just need those deep pockets to pay for their tools and accept that you are boxed into how they feel you should do things. That's not always a bad thing. Again, thanks for the dialog. I know my views are slanted and most people are not in the >15K LAN switch management or worried about rolling out some 100-250 greenfield sites per-year business. I'm going to push automation to the limits, because we have to for competitive edge and survivability in my line of work. Complex data parsing jobs taking 45-min with multithreaded Python efforts vs 3min GoLang matters at my scale; so, not always an apples to apples comparison for what every network engineering team is dealing with. That said, anyone who has been a network engineer can appreciate getting the boss off your back sooner, getting answers sooner or at all, because your scripts get answers in 1/10th the time as the old scripts. That's what I am bringing up. We as engineers should always look for better and faster answers to problems. At some point and some scale, the tools have to change.
@iaingeddes7159
3 жыл бұрын
@@casanave1 Pretty late in coming to this, but I've also got experience with huge global networks and the role of automation. Starting with the easiest ... why Python? The answer is just simplicity. Nice python code reads like sentences and so it's not hard to get started. Sure it's harder to use for parallel programming than something like Go, but the reality is that this is a problem that you resolve once, and that complication is then just abstracted away. You just have your "run concurrent" function call and no-one ever thinks about it again! Comparing the amount of time taken for a parallel activity across even 10,000 devices between languages is almost completely academic. If you're operating your network properly then you don't have such large numbers of devices requiring a single policy or configuration line, you would regionalise operations in some way so that you're not bringing everything back to a single point of failure. Even if you were to do that, the biggest 'cost' is logging into the network device, and having the relevant dáta returned. The 'speed' of Python isn't the limitation for this piece. Obviously when it comes to crunching the data there is a penalty (vs a compiled language) but there are also other packages to help with that. I'll confess that I've not come across the limitations that you mention. There are libraries for interacting via API and/or NetConf from most vendors. Nornir doesn't force SSH, it's there as s an abstraction. Taking the complexity and turning it into a simple command wrapped around some yaml files. So why is SSH still so popular? Because it makes sense to the person automating what they're doing at the command line! It also offers a low barrier to entry and doesn't require the hardware to be running a version of code that even knows what an API is!
Пікірлер: 21