MalloZup/ceph-open-terrarium

Adapt terraform examples inline with the sles12sp3.tf one

MalloZup opened this issue · 4 comments

At moment the examples are not the same. This is because i did them in different time and worked on special one.

All examples should be inline with the sles12sp3.tf, aka: having 4 clients/vms, at least 2 disks, and we need to have a unique_name of cloud_init.

This is only sles specific https://github.com/MalloZup/ceph-open-terrarium/blob/master/examples/sles12sp3.tf#L8 so we don't need to add it.

A good approach would to create a PR pro example so is easy to review.

@MalloZup Hello, I checked the examples and saw that on the sles12sp3.tf size is provided as an argument for the volume, while on the others you don't. Could you please explain this to me, because if I understand correctly normally base_volume_id should be enough? Thank you.

@gekios hi, yop. Feel free to ignore the size variable there.
The size variable is kind specific to sles12sp3 because it is needed for resize the volumes.

See this as reference: https://github.com/dmacvicar/terraform-provider-libvirt/tree/master/examples/resize_base

So we need to resize the volume of partition because otherwise it is to small. This is kind OS specific so we don't need to align this.

More important is having 4 clients/vms, at least 2 disks, and we need to have a unique_name of cloud_init.

This is what we should have for the other examples.

For any question feel free to ask 🌹

e.g https://github.com/MalloZup/ceph-open-terrarium/blob/master/examples/libvirt/ubuntu.tf#L20

we should have kind of this for ubuntu too and other os.
https://github.com/MalloZup/ceph-open-terrarium/blob/master/examples/libvirt/sles12sp3.tf#L16

basically having a local variable where user could specify the number of os etc. ( this is only an example, of the one small change that would be needed to make consitent the tf.files)

OK thank you for clarifying this. I will check them and let you know if I have any more questions.