Hello,
I’m testing Rancher in last release (v2.4.8) with vsphere as cloud-provider.
When I create a cluster, I need to have for my nodes, some specific configuration like static IP, DNS, NTP and so on. “Cloud-init” is able to do this. I tested by passing a URL to get “cloud-init” file and it’s working fine.
I would like to use one template for all my nodes. But I want to configure static IP address for each. So, to construct my “cloud-init” file, I need more informations like “node name”. Is it possible to add dynamic parameter to URL used to get “cloud-init” file in the template node?
Hi,
I’m using a different approach to achieve the same result, so I thought I might share it.
I have a static cloud-init script that uses the environment passed through the vmware-tools guestInfo interface, and then I use network protocol profiles on vCenter to allocate IP addresses in that subnet. This way it works fine and you don’t get any issues such as you would get using DHCP, and if you replace a node (or add a node) it just gets a new IP automatically. I find it very simple, I’ve found this approach on some article and tested it extensively, never had a problem so far.
Hope this helps,
Daniele
P.S. If you are interested let me know and I can share the script and some screenshots
Hi Daniele,
Thanks for your feedback! I already had a look to this solution. But it is not optimal for my infrastructure… I don’t want to be dependant of VMWare configuration. I also need to make other things completly dependant of our infrastructure (like reserved IP in our IPAM, …).
I didn’t try yet the method you propose. It should be a great solution if I’m not able to do what I want! I’m interseted to get your script if it is possible.