This section provides an overview of the cloud-init package.
About cloud-init
Cloud-init is a Linux package responsible for handling early initialization of instances. If available in the distributions, it allows for configuration of many common parameters of the instance directly after installation. This creates a fully functional instance that is configured based on a series of inputs. This mode of installation requires two files, meta-data and user-data.
Cloud-init's behavior can be configured via user-data. User-data can be given by the user at the time of launching the instance. This is typically done by attaching a secondary disk in ISO format that cloud-init will look for at first boot time. This disk contains all early configuration data that will be applied at that time.
The VeloCloud Virtual Edge supports cloud-init and all essential configurations packaged in an ISO image.
Create the cloud-init meta-data and user-data Files
The final installation configuration options are set with a pair of cloud-init configuration files. The first installation configuration file contains the metadata. Create this file with a text editor and name it meta-data. This file provides information that identifies the instance of the VeloCloud Virtual Edge being installed. The instance-id can be any identifying name, and the local-hostname should be a host name that follows your site standards.
- Create the meta-data file that contains the instance:
name.instance-id: vedge1
local-hostname: vedge1
- Create the network-config file that contains the WAN configuration. Only WAN interfaces that require static IP addressing need to be specified here. By default, all VCE WAN interfaces are configured for DHCP. Multiple interfaces can be specified.
version: 1 config: - type: physical name: GE3 subnets: - type: static address: 10.1.0.2 netmask: 255.255.255.0 gateway: 10.1.0.1
- Create the user-data file. This file contains three main modules: VCO, Activation Code, and Ignore Certificates Errors.
Module Description vco
IP Address/URL of the VCO. activation_code
Activation code for the Virtual Edge. The activation code is generated while creating an Edge instance on the VCO. vco_ignore_cert_errors
Option to verify or ignore any certificate validity errors. The activation code is generated while creating an Edge instance on the VCO.
Important: There is no default password in VCE image. The password must be provided in cloud-config:#cloud-config password: passw0rd chpasswd: { expire: False } ssh_pwauth: True velocloud: vce: vco: 10.32.0.3 activation_code: F54F-GG4S-XGFI vco_ignore_cert_errors: true
Create the ISO File
Once you have completed your files, they need to be packaged into an ISO image. This ISO image is used as a virtual configuration CD with the virtual machine. This ISO image (called seed.iso in the example below), is created with the following command on Linux system:
genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data network-data
Including network-config is optional. If the file is not present, the DHCP option will be used by default.
Once the ISO image is generated, transfer the image to a datastore on the host machine.