[英]How can I specify EBS Volume when adding a EC2 Resource to AWS Data Pipeline?
When I try to create an EC2 Resource with a AWS Data Pipeline, I don't see and option for defining EBS volume that will be associated with that compute engine. 当我尝试使用AWS Data Pipeline创建EC2资源时,我没有看到和选项来定义将与该计算引擎相关联的EBS卷。 Is it possible to set the volume size?
是否可以设置音量大小? If yes, can someone give me an example.
如果是,有人可以给我一个例子。
No, currently you cannot specify EBS volumes in Data-Pipelines Ec2Resource object. 不,目前您无法在Data-Pipelines Ec2Resource对象中指定EBS卷。
Often times ROOT volume is used as staging directory for most of the Data-Pipeline activities which is currently limited to 8GB for Data-Pipeline provided default AMI's. 通常,ROOT卷用作大多数Data-Pipeline活动的暂存目录,目前Data-Pipeline提供的默认AMI限制为8GB。
So, you can make your own AMI out of an Ec2 instance with increased EBS root volume and include that AMI in the Resource object(Image-id field) of Data-Pipelines. 因此,您可以在具有增加的EBS根卷的Ec2实例中创建自己的AMI,并将该AMI包含在Data-Pipelines的Resource对象(Image-id字段)中。
Tip: You can check the AMI-id of Data-pipelines launched ec2 instances in Ec2 console.Use that AMI to create an ec2 instance with increased EBS ROOT volume and Make Image(AMI) from this instance with even more volume size. 提示:您可以在Ec2控制台中检查数据管道启动的ec2实例的AMI-id。使用AMI创建具有增加的EBS ROOT卷的ec2实例,并使用更大的卷大小从此实例创建图像(AMI)。 This way you dont need to choose from a list of AMI's and you will preserve visualization type that is required for launching particular instance types.
这样您就不需要从AMI列表中进行选择,并且您将保留启动特定实例类型所需的可视化类型。
Currently, datapipeline service does not support an option to specify ebs volumes to attach to a ec2 resource. 目前,datapipeline服务不支持指定附加到ec2资源的ebs卷的选项。 But, you can write a shell command activity ( http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-object-shellcommandactivity.html ) which can create ebs volume and attach it to the instance.
但是,您可以编写一个shell命令活动( http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-object-shellcommandactivity.html ),它可以创建ebs卷并将其附加到实例。
You can then run the shell command activity on the ec2 resource. 然后,您可以在ec2资源上运行shell命令活动。
You can use aws cli for creating and attaching ebs volumes assuming that you have appropriate role on the launched ec2 instance. 假设您在启动的ec2实例上具有适当的角色,则可以使用aws cli创建和附加ebs卷。
you can also make use of ec2 metadata service: http://169.254.169.254/2009-04-04/meta-data/ to get instance info like availability zone etc... so that you can create ebs volume in the same availability zone 您还可以使用ec2元数据服务: http : //169.254.169.254/2009-04-04/meta-data/获取可用区等实例信息...以便您可以在相同的可用性中创建ebs卷区
related post: https://serverfault.com/questions/126408/creating-ebs-volumn-from-and-attaching-to-the-same-instance 相关文章: https : //serverfault.com/questions/126408/creating-ebs-volumn-from-and-attaching-to-the-same-instance
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.