Skip to main content

Submit user data

Metadata is a service that enables a ccloud³ VM to retrieve data about itself. You can also use metadata to provide user data when creating a ccloud³ VM, in order to simplify or automate the setup process.

Prerequisites

About User Data

User data is any data – usually a script – that you can provide whilst creating a ccloud³ VM. If CloudInit is available on the ccloud³ VM, it processes the user data, which it can use to perform tasks as the root user during the first boot of the ccloud³ VM.

CloudInit accepts Cloud Config files or any script that can be interpreted by the new ccloud³ VM, such as a Bash script. CloudInit is available on the latest Ubuntu and CentOS images from centron. You can define user data for images that do not support CloudInit, but this will not be processed automatically on first boot.

Provision of user data

You can provide user data when creating a ccloud³ VM via centron, Control Panel or the API.

  • About the Ventron Control Panel: On the page for creating the ccloud³ VM, click on ‘+ Advanced options’ above the ‘Final details’ section. In the section that opens, tick the box next to ‘Add initialisation scripts’. Enter your user details in the field that appears.

  • About the centron API: Use the user_data field in the POST request to create the ccloud³ VM.

User data cannot be changed once a ccloud³ VM has been created.

Debugging user data

To see how a CloudInit file uses the provisioned user data, take a look at the /var/log/cloud-init-output.log file:

Command: cat /var/log/cloud-init-output.log | grep userdata

This file logs the output from CloudInits, allowing you to view warnings, error messages or debug information.