Netops with Emacs and Org mode
Vincent Bernat
Org mode[1] is a package for Emacs to “keep notes, maintain todo lists, planning projects and authoring documents.” It can execute embedded snippets of code and capture the output (through Babel[2]). It’s an invaluable tool for documenting your infrastructure and your operations[3].
Here are three (relatively) short videos exhibiting Org mode use in the context of network operations. In all of them, I am using my own junos-mode[4] which features the following perks:
- syntax highlighting for configuration files;
- commit of configuration snippets to remote devices; and
- execution of remote commands.
Since some Junos devices can be quite slow, commits and remote executions are done asynchronously1 with the help of a Python helper.
In the first video, I take some notes about configuring BGP add-path feature (RFC 7911[6]). It demonstrates all the available features of junos-mode[4].
In the second video, I execute a planned operation to enable this feature in production. The document is a modus operandi and contains the configuration to apply and the commands to check if it works as expected. At the end, the document becomes a detailed report of the operation.
In the third video, a cookbook has been prepared to execute some changes. I set some variables and execute the cookbook to apply the change and check the result.