自定义私有 AWS AMI 是否可以用作创建新打包程序映像的基础
我是 Packer 的新手,我想知道在配置 Packer JSON 文件的“构建器”部分时是否可以在“source_ami”设置中使用“自定义”非公共 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}}"
}],
...
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? I would like to use an AMI that has been customized as the 'base' AMI used by Packer to build a new 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}}"
}],
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
您可以使用自定义虚拟机导入并从中创建一个图像,然后使用它的打包程序,尽管我从未尝试过相同的操作,您可以尝试按照此文档进行相同的操作: https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html
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