Metadata service
When deploying Compute Instances, additional configuration is often required before hosting your website or running workloads. This configuration may include creating a new user, adding an SSH key, or installing software. The Metadata service simplifies this process by providing instance data and optional user data. To automate this configuration, we recommend using the Metadata service.
Overview
The Metadata service provides a convenient method to automate software configuration when deploying a Compute Instance. It's an API that's accessible only from within a provisioned Compute Instance, and provides relevant metadata to that Compute Instance. The Metadata service is compatible with cloud-init, an industry standard software that automates cloud instance initialization. This allows you to use the same tool across multiple cloud providers, enabling a pathway for provisioning your systems as part of a multi-cloud infrastructure strategy.
Key Benefits
- Faster Deployments: Quickly provision and configure Linodes.
- Consistent Setups Ensure uniform configurations across your infrastructure
- Reduced Errors Minimize human error with automated tasks.
- Enhanced Security Implement security measures during deployment
How it Works
The Metadata service provides instance data, network data, ssh-keys, and optional user data, which are outlined below:
-
Instance data: Information about the Compute Instance configuration including its label, plan size, region, host identifier, and more.
-
Network data Information about the Compute Instance network configuration including interfaces and IP addresses.
-
SSH Key Data The ssh-keys assigned to the Compute Instance during provisioning.
-
(Optional) User data: Optionally supplied by the user when deploying a Compute Instance, user data enables you to define your desired system configuration. This can include creating users, installing software, configuring settings, and more. This user data can be written as a cloud-config file, or it can be any script that can be executed on the target distribution image, such as a bash script.
User data can be submitted directly in Cloud Manager, Linode CLI, or Linode API. It can also be submitted through Infrastructure as Code (IaC) provisioning tools like Terraform.
When a Compute Instance first boots up, cloud-init runs locally on the system, accesses the Metadata service, and then configures your system using that information.
Availability
The Metadata service is available in all regions.
For the current list of supported distributions, please refer to the Linode Distributions page.
When selecting a distribution in Cloud Manager, the following icon designates distributions that fully support the Metadata service:
Compute Instances deployed in a supported region can always access the Metadata service API to obtain Compute Instance data, regardless of the distribution. However, user data cannot be submitted for distributions that do not have cloud-init support.
Technical specifications
- The Metadata service cloud-init datasource is available in cloud-init version 23.3.1 and greater.
- All user data is encrypted and the Metadata service is only accessible from within the Compute Instance.
- Supports custom user data in the form of cloud-config scripts, shell scripts, and more.
- User data can be added when creating a Compute Instance. User data can also be added when performing one of those functions using a custom image created from a compatible distribution image.
Updated 19 days ago