Passing the cloud-init data to a VCP node

Passing the cloud-init data to a VCP nodeΒΆ

By default, a VCP node is bootstrapped through cloud-init. You can set the cloud-init user_data either on the cluster or node levels. The node level configuration overrides the cloud_init data passed on the cluster level.

The user_data configuration example on the cluster level:

salt:
  control:
    enabled: true
    virt_enabled: true
    cluster:
      mycluster:
        domain: neco.virt.domain.com
        engine: virt
        # Cluster global settings
        seed: cloud-init
        cloud_init:
          user_data:
            disable_ec2_metadata: true
            resize_rootfs: True
            timezone: UTC
            ssh_deletekeys: True
            ssh_genkeytypes: ['rsa', 'dsa', 'ecdsa']
            ssh_svcname: ssh
            locale: en_US.UTF-8
            disable_root: true
            apt_preserve_sources_list: false
            apt:
              sources_list: ""
              sources:
                ubuntu.list:
                  source: ${linux:system:repo:ubuntu:source}
                mcp_saltstack.list:
                  source: ${linux:system:repo:mcp_saltstack:source}

The user_data configuration example on the node level:

salt:
 control:
   cluster:
     mycluster:
       node:
         ubuntu1:
           provider: node01.domain.com
           image: ubuntu.qcow
           size: medium
           cloud_init:
             network_data:
               networks:
               - <<: *private-ipv4
                 ip_address: 192.168.0.161