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…
Automate Your Network
31–35 of 35 posts
Re: Automate Your Network
#32Earlier 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?
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
#33I 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!
Re: Automate Your Network
#34But... 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
#35Earlier 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.