是否存在用于创建基于“实例存储"的AMI的Ansible模块? [英] Is there an Ansible module for creating 'instance-store' based AMI's?

查看:103
本文介绍了是否存在用于创建基于“实例存储"的AMI的Ansible模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从EBS支持的实例创建AMI非常简单,但是从基于 instance-store 的实例执行此操作似乎只能使用CLI手动完成.

Creating AMI's from EBS backed instances is exceedingly easy, but doing the same from an instance-store based instance seems like it can only be done manually using the CLI.

到目前为止,我已经能够使用Ansible从HVM Amazon Linux AMI引导基于实例存储"的服务器的创建,但是我迷失了后续步骤...我尝试遵循以下步骤: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-instance-store-ami.html#amazon_linux_instructions

So far I've been able to bootstrap the creation of an 'instance-store' based server off of an HVM Amazon Linux AMI with Ansible, but I'm getting lost on the steps that follow... I'm trying to follow this: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-instance-store-ami.html#amazon_linux_instructions

显然,我需要在实例上存储我的x.509证书和密钥,但是那是哪个密钥?那是...

Apparently I need to store my x.509 cert and key on the instance, but which key is that? Is that...

  • 我必须使用openssl在实例上生成一个,
  • 我从AWS生成/转换的一个
  • 我用Putty生成的一个,或
  • 我的AWS账户中已经存在一个人吗?

在那之后,我在Ansible中找不到对ec2-bundle-vol的任何引用.因此,我想知道是否唯一的方法是使用Ansible的command模块.

After that, I can't find any reference to ec2-bundle-vol in Ansible. So I'm left wondering if the only way to do this is with Ansible's command module.

我基本上希望发现的是:是否有一种方法可以使用Ansible轻松创建基于instance-store的AMI,如果没有,是否有人可以参考使该过程自动化的必要步骤? >谢谢!

Basically what I'm hoping to find out is: Is there a way to easily create instance-store based AMI's using Ansible, and if not, if anyone can reference the steps necessary to automate this? Thanks!

推荐答案

通常来说,Ansible AWS模块旨在通过与AWS HTTP API交互(即您可以在AWS管理控制台中执行的操作)来管理AWS资源.

Generally speaking, Ansible AWS modules are meant to manage AWS resources by interacting with AWS HTTP API (ie. actions you could otherwise do in the AWS Management Console).

它们并非旨在在EC2实例上运行AWS特定的系统工具.

They are not intended to run AWS specific system tools on EC2 instances.

ec2-bundle-volec2-upload-bundle必须在EC2实例本身上运行.不能通过HTTP API调用.

ec2-bundle-vol and ec2-upload-bundle must be run on the EC2 instance itself. It is not callable via the HTTP API.

恐怕您需要编写一个自定义剧本/角色来自动化该过程.

I'm afraid you need to write a custom playbook / role to automate the process.

另一方面,aws ec2 register-image是一个AWS API调用,对应于ec2_ami Ansible模块. 不幸的是,该模块似乎不支持从S3存储桶中注册图像.

On the other hand, aws ec2 register-image is an AWS API call and correspond to the ec2_ami Ansible module. Unfortunately, this module doesn't seem to support image registering from an S3 bucket.

这篇关于是否存在用于创建基于“实例存储"的AMI的Ansible模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆