I have been working on a project to automate all things network related. Not only provisioning new stuff but operations as well. I am not going to tell you about the benefits of automation, everybody should know by now.
However, when talking about operations it is important to note that not all operations can be
automated but all operations can be abstracted. What I mean with that is that if you are
peering with someone you still have to perform some action so your system knows who the new peer
is, their IP address, their AS and where are you going to peer with them. However, the operator
doesn’t need to know that it has to go to the inventory system to add the new peer, then go to the
IPAM system to insert the required information and finally configuring the peer on the router. You
could abstract that entire repetitive and error prone workflow with a single command:
in=bma ip=10.0.0.1 as=65100.
As I was exploring how to do operations better ensuring consistency and keeping everybody in the loop I realized that chatops was the answer. So I started working on a simple proof of concept.
ansibleare abstracted by Python
Stackstormallows operators to fire
invoketasks from slack.
The example is very simple, I was just trying to prove the feasibility and the value. As I see it, these are the main benefits:
Some common questions I got :)
ansible? Why not use
Main reason was to be able to perform operations even in the event of stackstorm being down, unreachable,
etc. It’s also an interesting framework for operations used by many people so using
save a lot of work as we can reuse other’s people code and contribute back.
Why abstract playbooks with
We care about operations, not about playbooks. By abstracting
invoke tasks we
can change playbooks and restructure things later on without impacting operations.
Why are the examples so simple?
It’s just a proof of concept so I build something simple that everybody in the networking world could relate to.