Hi,
I’m looking to automatically deploy RancherOS vms on Vsphere.
These vm are then used to deploy a RKE K8S cluster.
With govc
I add the cloud-config.yml for the cloud-init:
# | cloud-init.config.data | string |
govc vm.change -vm $vm -e 'guestinfo.cloud-init.config.data'=$(base64 -w0 cloud-config_master-test-1.yml)
# | cloud-init.data.encoding | {“”, “base64”, “gzip+base64”} |
govc vm.change -vm $vm -e 'guestinfo.cloud-init.data.encoding'='base64'
My cloud-config cloud-config_master-test-1.yml file :
#cloud-config
hostname: master-test-1
rancher:
cloud_init:
datasources:
- configdrive:/media/config-2
- vmware
environment:
EXTRA_CMDLINE: /init
network:
dns:
nameservers:
- XXXX
search:
- XXXX
interfaces:
eth0:
addresses:
- XXXX
gateway: XXXX
match: eth0
eth1:
addresses:
- XXXX
gateway: XXXX
match: eth1
services_include:
open-vm-tools: true
ssh_authorized_keys:
- ssh-rsa XXXX
And I boot on the ISO RancherOS.
The OS boot well with the configuration given in the cloud-init loaded in memory.
My question: To make the configuration persistent, I am required to do a “ros install” or is there a way to say in the cloud-init to do the installation on the disk ?
Thanks,
Aracannan