collaborate on go/terraform provider for ganeti?

337 views
Skip to first unread message

Karsten Heymann

unread,
Oct 16, 2017, 7:32:00 AM10/16/17
to gan...@googlegroups.com
Hi *ganeti,

I'm a bit hesitant to post this as I honestly don't have enough time on my hands currently to start yet another project, but would anyone from the list be interested to collaborate on creating/maintaining a ganeti provider for terraform (https://terraform.io)? For those who don't know terraform, it's a open source general purpose infrastructure configuration tool that at its core maps settings in a declarative language to api calls and allows comparing the currently set value with the one in the config file and then can update it to the defined value in a second step. Creating a provider that exposes the ganeti RAPI to terraform would be extremely helpful, as it would allow to put the cluster configuration under version control, which is especially nice when maintaining several clusters that are supposed to share some common configuration (for example: make sure every production cluster has a migration_bandwidth of 100, and if we later find that we want to set it to 200 make sure all clusters are updated).

These terraform providers have to be written in go and there are many existing examples (e.g. https://github.com/terraform-providers/terraform-provider-gitlab to pick just one), unfortuately I'm still starting to learn go, so if there should be anyone here with some existing go knowledge and some free time on his/her hands, I would be more than happy to create a test setup and do the grunt work of implementing the different api endpoints once the basic foundation for the provider is there.

Best regards
Karsten

Ansgar Jazdzewski

unread,
Oct 19, 2017, 1:13:20 AM10/19/17
to Ganeti
Hi,

I like the idea but i'am not sure how it can worke with ganeti.
- manage rapi users and resources cpu mem
- manage names of instances networks and so on (prefix with rapi user???)
- manage Images and inegrate with the OS-Interface
- how to handle changes (destroy and create new?)

also i'am not sure how to integrate with ansiable puppet and co.

i started some time ago to build some easy integration rapi + rundeck
so we can scale our k8s-cluster and add worker-nodes as needed.

just some things came into my mind reading it,

Have a nice one,
Ansgar

Karsten Heymann

unread,
Oct 19, 2017, 8:47:59 AM10/19/17
to gan...@googlegroups.com
Hi Ansgar,

2017-10-19 7:13 GMT+02:00 'Ansgar Jazdzewski' via ganeti <gan...@googlegroups.com>:
I like the idea but i'am not sure how it can worke with ganeti.
- manage rapi users and resources cpu mem

I wouldn't manage rapi users with terraform, that would rather be in the scope of a config management tool. Typical tasks I would envision terraform wold be responsible for would be anything that doesn't happen on a specific server, but is executed against the cluster itself. So anything interacting with packages, files, processes, local users/groups etc. should be done by a config management tool and everything that's executed via the ganeti rapi or generally an api is better done by a non server centric infrastructure tool like terraform. For example:

* Setting cluster variables like migration bandwith, default instance settings, allowed disk templates etc
* Adding/modifying/deleting groups, networks, instances

also i'am not sure how to integrate with ansiable puppet and co.

In my opinion they serve different purposes. With infrastructure provisioning tools you describe the intended state of your infrastructure, with config management tools you describe the desired configuration state of your systems. The border isn't always clear, but I find it helpful to handle theses tasks relatively distinct.
 
i started some time ago to build some easy integration rapi + rundeck
so we can scale our k8s-cluster and add worker-nodes as needed.

That sounds very interesting, although maybe not for the list. Rundeck is on my list of tools that i'd like to implement for a long time, it's a shame its ldap auth integration is so inflexible.
 
just some things came into my mind reading it,

I appreciate that, thanks! 

BR
Karsten 
Reply all
Reply to author
Forward
0 new messages