Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
6.9 KiB
Cloud-Init/Cloudbase-Init
Cloud-Init or Cloudbase-Init is an open-source cloud program that allows you to configure specific custom details of newly created ECSs (such as the hostname, key pair, and user data) during initialization.
All standard (Standard_xxx) and enterprise (Enterprise_xxx) images support Cloud-Init or Cloudbase-Init. Only certain community images (Community_xxx) do not support it.
Using Cloud-Init or Cloudbase-Init to initialize your ECSs will affect the use of your ECS, IMS, and AS services.
Impact on IMS
- For Windows OSs, download and install Cloudbase-Init.
- For Linux OSs, download and install Cloud-Init.
Once installed in an image, Cloud-Init or Cloudbase-Init will automatically configure initial attributes for the ECSs when they are created using this image.
For more information, see Image Management Service User Guide.
Impact on ECS
- When creating an ECS, if the selected image supports Cloud-Init or Cloudbase-Init, you can inject custom information (such as the ECS login password) during the initialization. For details, see Injecting User Data.
- After Cloud-Init is supported, ECSs do not support password authentication anymore. All newly created ECSs use key pair authentication. This change will affect your login to ECSs. For details, see the following sections:
- After Cloud-Init or Cloudbase-Init is supported, you can view and use metadata to configure and manage running ECSs. For details, see Obtaining ECS Details Using Metadata.
Impact on AS
- When creating an AS configuration, you can use the User Data function to specify ECS configurations for initialization. If the AS configuration has taken effect in an AS group, the ECSs newly created in the AS group will automatically initialize their configurations based on the specified ECS configurations.
- For an existing AS configuration, if its private image does not have Cloud-Init or Cloudbase-Init installed, the login mode of the ECSs created in the AS group where the AS configuration takes effect may fail to take effect.
To resolve this issue, see "How Does Cloud-Init Affect the AS Service?" in Auto Scaling User Guide.
Notes
- When using Cloud-Init, enable DHCP for the VPC subnet that the ECS belongs to.
- When using Cloud-Init, ensure that security group rules for the outbound direction meet the following requirements:
- Protocol: TCP
- Port: 80
- Destination: 169.254.0.0/16
If you use the default security group rules for the outbound direction, the metadata can be accessed because the default rules meet the preceding requirements. For details about the default security group rules for the outbound direction, see Security Group.