When launching a Public Cloud instance, you can provide arbitrary commands to install packages or run specific commands on boot. This allows you to deploy instances in a predictable way and with the necessary configuration from the start.
Passing user data on instance launch
There are two types of user data supported: a cloud-config for the cloud-init program and shell scripts. The cloud-config format uses YAML with keys that describe the desired instance state.
The official cloud-init docs provide extensive documentation. Alternatively, you can insert a shell script that is executed once during the boot process.
The user data field is located on the Launch Instance page. To provide user data when launching an instance in the Customer Portal, follow the steps below:
- Select your instance to launch
- Enter a script in the user data field
- Click ‘Launch’