alibaba / packer-provider

Apache License 2.0
93 stars 26 forks source link

Add 'Hostname' ECS parameter to create. #70

Closed matttrach closed 1 year ago

matttrach commented 5 years ago

If someone wouldn't mind adding the 'Hostname' config option when creating an ECS instance it would be very helpful. This could even simplify the chef example. I am trying to build an application which expects the hostname to be set to something reasonable and the default Alibaba hostname is a simple uuid.

https://www.alibabacloud.com/help/doc-detail/25499.htm https://github.com/alibaba/packer-provider/blob/master/ecs/run_config.go

chhaj5236 commented 5 years ago

@matttrach We'll take a look, thanks for the sugguestion

chhaj5236 commented 5 years ago

Hi @matttrach, the instance created by packer is temporary, setting hostname during the build process would not be preserved in the target image. What you need seems to be terraform or other orchestration tool or services? You can use them to set the hostname when you lauch a new instance with the image created by packer.

Could you please provide more details about your secnarios if you still need packer to provide this parameter? Thanks.

matttrach commented 5 years ago

The custom software I am installing (for custom image creation) requires a hostname, while I know that any hostname set will be temporary, I would prefer to set it properly during instance creation rather than adding the hostname before running the installer.

chhaj5236 commented 5 years ago

@matttrach Could you tell me which custom software you refer to? And will the custom software work properly, if the hostname is changed when launch the instance with the image created?