Amazon web services Apache brooklyn创建自己的卷,而不是使用现有卷
我使用Apache Brooklyn 0.8.0-Cubating在AWS上创建d2.xlarge实例,其蓝图如下:Amazon web services Apache brooklyn创建自己的卷,而不是使用现有卷,amazon-web-services,jclouds,brooklyn,Amazon Web Services,Jclouds,Brooklyn,我使用Apache Brooklyn 0.8.0-Cubating在AWS上创建d2.xlarge实例,其蓝图如下: location: jclouds:aws-ec2: region: eu-central-1 ... provisioning.properties: imageId: eu-central-1/ami-7bcddf17 # Redhat 6.6 hardwareId: d2.xlarge # with 2TB EBS 机器上的总存储容量只有10GB。经过
location:
jclouds:aws-ec2:
region: eu-central-1
...
provisioning.properties:
imageId: eu-central-1/ami-7bcddf17 # Redhat 6.6
hardwareId: d2.xlarge # with 2TB EBS
机器上的总存储容量只有10GB。经过一些研究,我发现/dev/xvdb下的实例卷未被分区
有人能告诉我如何使用实例存储而不是在AWS上为机器创建新卷吗
致以最良好的祝愿,
Felix这是AWS EC2中虚拟机的预期行为 如中所述: 对于您的实例类型,它看起来像是未格式化地附加了实例存储卷 EC2文档讨论运行
lsblk
、mkfs
和mount
来格式化和装载实例存储卷
预期的行为也取决于AMI:“每个AMI都有一个块设备映射,指定从AMI启动实例时要附加到实例的块设备。Amazon提供的AMI只包括一个根设备。”
请注意,在一个AMI上使用的可能不会在所有其他AMI上使用(例如,由于不同的块设备映射)。坚持亚马逊自己的AMI通常是一个好主意,因为它可以获得明智的违约行为
这可以在Apache Brooklyn中实现自动化。对此,您有几种选择:
- 在实体中实现它,例如,如果使用
实体,则可以使用config键SoftwareProcess
执行bash命令来设置卷pre.install.command
- 在现场实施
- 这可以使用新的
在机器上执行命令(然后在位置上配置)MachineLocationCustomizer
- 或者,对于jclouds位置,您可以使用
配置,该配置使用shell脚本的URL来执行setup.script
- 这可以使用新的
在这些方法中,
MachineLocationCustomizer
为您提供了最大的功能和灵活性。感谢您的建议。我将环境更新为Apache Brooklyn 0.9.0,现在使用JcloudsLocationCustomizer。但我发现我的问题来自课堂。根设备卷将始终从Jcloud设置为10GB。是否可以创建我自己的HardwareBuilder并将其注入JcloudLocationCustomizer,以便我可以为根设备卷定义自己的大小?我将就此问题提出另一个问题。
"After you launch the instance, you must ensure that the instance
store volumes for your instance are formatted and mounted before you can use them. Note that the root
volume of an instance store-backed instance is mounted automatically."
"the instance type determines which instance store volumes are mounted for you and which are available for you to mount yourself"