A Look Into My World of JSONs
Last week, John Capobianco a respected individual in the NetDev community publicly tweeted that JSON is the key to his network automation solutions.
He had previously told me it was all about the JSONs. I have always also observed that in most of his previous side projects, he was always capturing “Network State.” That keyword would slowly start coming to fruition.
What is a Network State?
Initially, the concept was scruffy. But it makes sense now. Network State refers to the current configuration running on the infrastructure.
On a router, the “Interface Gi 0/0 is up.”
The current IP address at Interface Gi 0/0 is “100.10.20.1 /24”
The AWS EC2 AMI ID is “ami-0362f”
So, it means that JSON data just exposes what is making the infrastructure run. What was configured for this infrastructure to perform what it should do.
📝JSONs in Windows PCs
In a windows OS, you can see JSONs in action. Here is a look at JSON data of a windows PC.
Here, the JSON data is converted into a markdown format.
📝JSONs in Amazon EC 2 Instances
Though, I will not be going deep into Terraform. But, this tool leverages a configuration language called Harshicorp Configuration Language (HCL). HCL acts as a wrapper for JSON configurations.
Let us look at the configuration process from HCL-to-AWS Server On
HCL is configured to switch on a server running an EC2 instance.
HCL is converted to JSON, so then, AWS understands this.
AWS switches on a server running an EC 2 instance.
📝JSONs in a Cisco Router
Here we can see the representation of a router configuration in JSON format.
A JSON data like the one above, or even any other one can be converted to a markdown format like the one below.
Summary
JSON exposes this infrastructure data. And since many infrastructure adopted JSON as the official markup language for representing the configuration of their infrastructure, these different platforms can talk to themselves.
Its all coming together nowww.