Nornir vs Ansible: Which Automation Tool Is Better?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey everyone my name is john and i'm a network automation enthusiast as well as a trainer for cbt nuggets so if you're just beginning your network automation journey it can feel a little bit daunting to say the least so what i want to talk to you about today is a question which i receive fairly regularly on twitter youtube linkedin and that relates to two very similar but also very different automation solutions for your network so what i thought i would do would be to dive into some of the benefits features and drawbacks of both to help you decide how you might want to begin your network automation journey okay so the two automation solutions which i want to talk to you about today are ansible and normier but what actually are they now ansible is a network automation configuration tool and it's often built as the entry point for network automation and the reason for that is simple as in literally simple ansible is simple by design and it's supposed to be easy to use out of the box this is its big attraction now ansible has the concept of a playbook and you can think of a playbook as a little file with a bunch of instructions and within these instructions you detail your network configuration so say you want to push out a loopback configuration or an ntp server configuration you're going to specify that within your playbook ansible's playbooks are written in a domain specific language called yaml non-layer on the other hand is very similar to ansible and that you would use normally for the same reasons you would use ansible that is configuration management but the key distinction here is that normally it has the concept of a run book and these run books are written in python so what are some of the benefits and drawbacks of both well first let's look at ansible so the first big benefit of using ansible is the fact that it does use yaml and yaml is very human readable in fact most people even with little to no coding experience can probably eyeball an ansible playbook and get a good sense of what it's trying to do so if you're new to network automation or you'll need a team of network engineers who don't have much programming experience ansible simple and readable solutions could be a very good starting point for you the second reason to use ansible is that ansible is the most popular network configuration tool on the market therefore a lot of people are using it therefore it has a lot of community support so if you're having a problem trying to find a solution there's a fair good chance you can go onto a forum or a slack channel or a reddit page and find someone to give you good advice or perhaps even a template or the exact playbook you need to solve your problem the third reason to learn ansible is the ansible's popularity translates to market value simply put ansible is everywhere so if you start a job and your employer is implementing network automation there's a high chance the ansible is going to be part of that solution so it's a really good idea for you to have familiarity with the tool so that you can excel in your job you can kind of imagine ansible as kind of like the ccna for network automation you're going to see in job lessons everywhere and everyone knows it okay so all of this seems pretty great so why should you bother learning another network automation solution well first let's look at narnia now the first reason to learn normier is that nornir as a pure python-based automation solution is a lot more flexible than ansible now what typically happens is the ansible works pretty great in the beginning but one should begin to need a little bit more complexity a little bit more sophisticated logic trying to code that logic and yaml becomes a little bit of a nightmare and the analogy i like to use is that trying to code on yaml is like trying to do gymnastics and a suit of armor it's just not designed for it now normier on the other hand being python based has full access to the entire python ecosystem and what tends to happen is that these nightmare scenarios and ansible can be solved pretty easily and elegantly by using just a few lines of python code with nornear you're going to be able to automate a lot more things now the second reason to learn nor near is that normal has much better performance than ansible it's just way faster now if you're automating on the scale of maybe 10 devices then honestly the speed differential is going to be pretty negligible but as you scale up the effect just becomes exponential so that if you're automating on the scale of maybe 500 devices implementing a normal solution could cut your execution time by half and as you scale up again to maybe ten thousand devices normal speed advantage just becomes more and more apparent now the third reason to learn normier is that normier has much better debugging capabilities than ansible this is huge what tends to happen is that when your playbook goes wrong with antimode you might have a very difficult time trying to track down exactly what went wrong now normally being python based is very explicit in its handling of errors and you're going to have a much easier time trying to find those bugs now the fourth reason to learn normier is probably the biggest one and that is by learning normal you're simply learning python which is a much more beneficial transferable and valuable skill to learn rather than just simply working with a domain specific language such as yaml so if you're thinking long term learning normier will be very good for your skill set and your career so to recap if you're completely new to network automation then using ansible is going to be a great starting point for you it requires no python knowledge and you can just dive right in just be aware that though should your solution require a little bit more advanced logic then trying to code that logic within yaml can become pretty cumbersome and pretty confusing pretty quickly now nor near on the other hand can very often solve these problems very easily and elegantly as it has access to all of python's libraries and features just be aware that though learning normier does require a little bit of a steeper learning curve so if you're asking me what i would choose if i could only pick one then i would choose nornier due to its outstanding flexibility and performance but ultimately both are great tools and i honestly believe that you will increase both your skill set as well as your job prospects by learning both so if you found this content useful helpful or interesting then hit that like button subscribe and let us know what you think in the comments below and i'll see you soon
Info
Channel: CBT Nuggets
Views: 4,875
Rating: undefined out of 5
Keywords: network automation, nornir python examples, nornir python, nornir network automation, ansible vs python, python vs ansible, nornir python automation framework, ansible cisco, network automation ansible, network automation cisco, network automation python, ansible vs python for network automation, ansible network automation, ansible for network engineers, ansible vs python scripts, python vs ansible for network automation, ansible network automation cisco
Id: uQAaA_-lb7k
Channel Id: undefined
Length: 6min 31sec (391 seconds)
Published: Tue Sep 29 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.