简体   繁体   English

自定义私有 AWS AMI 能否用作创建新打包程序映像的基础

[英]Can a custom private AWS AMI be used as a base for creating a new packer image

I'm new to using Packer and I was wondering if when configuring the 'builders' section of the Packer JSON file if a 'custom', non-public AMI can be used in the 'source_ami' setting as the base image?我是使用 Packer 的新手,我想知道在配置 Packer JSON 文件的“构建器”部分时,是否可以在“source_ami”设置中使用“自定义”非公共 AMI 作为基本映像? I would like to use an AMI that has been customized as the 'base' AMI used by Packer to build a new AMI.我想使用一个已被定制为 Packer 用来构建新 AMI 的“基础”AMI 的 AMI。

...
"builders": [{
   "type": "amazon-ebs",
   "communicator": "ssh",
   "ssh_pty": "true",
   "access_key”: "{{user `aws_access_key`}}",
   "secret_key”: "{{user `aws_secret_key`}}",
   "region": "eu-west-1",
   "source_ami": "ami-my-custom,
   "instance_type": "t2.micro",
   "ssh_username": "ubuntu",
   "ami_name": "new-ami-from-custom {{timestamp}}"
 }],
...

You can use custom vm import and create an image out of it and then use it packer, though I have never tried the same you can try following the same with this doc: https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html您可以使用自定义 vm 导入并从中创建图像,然后使用它打包器,尽管我从未尝试过相同的操作,但您可以尝试使用此文档进行相同操作: https://docs.aws.amazon.com/vm-导入/最新/用户指南/vmimport-image-import.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM