Live data from Hacker News

Automate Your Network

github.com

31–35 of 35 posts

Re: Automate Your Network

#31
post #18
post #13

Earlier quoted context omitted.

There's a push and pull; ansible and terraform both have some facilities for doing what you describe, but of course if you're using both tools, then you wind up where you are, needing yet another layer of abstraction common to both. In the book, the author presents an approach for storing the object state and organizing the repository for ansible purposes in what is at least as sensible a way as any other I've seen.…

I'm not using both. The first version of my tool used Ansible. The second version used Terraform. They were written 4 years apart. My users are not devops savvy. They use runbook forms to call into my API giving them a very simple UI that requires almost zero input. The object model includes lifecycling so certain attributes can be changed, etc. and validation done to ensure only a correct network is output. This isn…

I’m currently using Ansible for something similar. Mind if I ask why you switched to Terraform?

Re: Automate Your Network

#32
post #18

Earlier quoted context omitted.

I'm not using both. The first version of my tool used Ansible. The second version used Terraform. They were written 4 years apart. My users are not devops savvy. They use runbook forms to call into my API giving them a very simple UI that requires almost zero input. The object model includes lifecycling so certain attributes can be changed, etc. and validation done to ensure only a correct network is output. This isn…

I’m currently using Ansible for something similar. Mind if I ask why you switched to Terraform?

Faster: it uses a local state file, so it doesn't need to interrogate the devices every time.

Stateful: you don't have to manually track "present" and "absent" - you just omit and it will notice it needs to delete it

More standard: Writing HCL is very similar between providers. Every module in Ansible typically behaves pretty differently

Re: Automate Your Network

#33
post #6

I do network automation for a profession. I build tools (technically compilers) that take a proprietary object model designed for our private cloud and translate that into Ansible (v1) or Terraform (v2) code. At our company, I actually call using these tools in isolation doing it "manually". This is because the largest benefit of automation, I believe, is the abstraction gained from the new object model and being to…

Are you using an open source tool/stack to do this? Sounds pretty awesome and I’d love to learn!

Mostly - Python and MongoDb mostly

Re: Automate Your Network

#34
> I believe in open source software

But... PDF is not "open source", it is literally a compiled binary blob :)

This is pretty cool book though. If author reading this: can you please publish real source files for the book?

Re: Automate Your Network

#35
post #29
post #21

Earlier quoted context omitted.

No. It is a frontend application that works as a CRUD REST API, validates the data, generates what it can, and stores it into a database/IPAM. It can then be changed, viewed, modified, deleted, etc. When you are ready to deploy I "compile" the object model data into an IR (representing the "network topology") and then make a final pass and translate into HCL for all the various backends. I'm not saying its "better" a…

Interesting way to do things there. Have you looked into Pulumi or Terraform CDK? I don’t know if either of those would help you or not and I’m not proficient in either, but some of the components you described seem like they might have some overlap.

Those things are about using code instead of HCL for modeling primarily. For us, it is about UI and UX (it is a REST API consumed by a Rundeck form and other services) as most of our engineers are not devops trained. Also, TF is only one possible backend. We actually emit other configuation code and configuration instruction sheets as MD and PDF for things we don't support.
Post reply on HN