Additional Location Configuration Options
Attaching Additional Volumes
AMP supports attaching additional volumes for AWS EC2, Azure ARM, vCloud Director and OpenStack. Note that it does not yet support OpenStack Mitaka.
Attaching additional volumes is possible both at provisioning time using a customizer and once the application is running, through the use of an effector.
Note: AMP users should design blueprints and extra disks scaling policies while taking in mind disks limitations for each cloud and OS. AWS EC2 Disks limitations: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/volume_limits.html
Attach volumes during provisioning
To attach a disk on provisioning stage add the io.brooklyn.blockstore.brooklyn-blockstore:brooklyn.location.blockstore.NewVolumeCustomizer
location customizer to the entities capabilities.
A YAML example is shown below:
tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
node_templates:
a_server:
type: tosca.nodes.Compute
capabilities:
cloudsoft:
properties:
customizers:
- $brooklyn:object:
type: io.brooklyn.blockstore.brooklyn-blockstore:brooklyn.location.blockstore.NewVolumeCustomizer
object.fields:
volumes:
- blockDevice:
sizeInGb: 3
# NOTE: g can be any unused partition name e.g. `/dev/xvdg`
deviceSuffix: 'g'
deleteOnTermination: true
tags:
brooklyn: br-example-val-test-1
filesystem:
mountPoint: /mount/brooklyn/diskG
filesystemType: ext4
- blockDevice:
sizeInGb: 3
# NOTE: h can be any unused partition name e.g. `/dev/xvdh`
deviceSuffix: 'h'
deleteOnTermination: true
tags:
brooklyn: br-example-val-test-1
filesystem:
mountPoint: /mount/brooklyn/diskH
filesystemType: ext4
You should specify a valid and available (this means that there shouldn’t be any existing partition already named with it) device suffix.
For AWS the defined device name will be of type /dev/xvd*
.
For Windows installations, deviceSuffix
is ignored, fileSystemType
should be set to a valid Windows file system, such as NTFT
, and the
optional parameters mountPoint
and volumeLabel
are used to specify the drive letter (without the colon, e.g. ‘D’), and the volume label
respectively. If either are omitted, they are assigned by the operating system.
A YAML example for Windows is shown below:
tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
node_templates:
a_server:
type: tosca.nodes.Compute
capabilities:
cloudsoft:
properties:
customizers:
- $brooklyn:object:
type: io.brooklyn.blockstore.brooklyn-blockstore:brooklyn.location.blockstore.NewVolumeCustomizer
object.fields:
volumes:
- blockDevice:
sizeInGb: 3
deleteOnTermination: true
filesystem:
mountPoint: M
filesystemType: NTFS
volumeLabel: My M Drive
Important notice: The KVM is configured as the default hypervisor for OpenStack which means that the defined device name will be of type /dev/vd*
.
A device of the size specified by sizeInGb
will be created. This device will then be mounted by the OS at the path specified at
mountPoint
and formatted to the file system specified in filesystemType
.
IF DELETEONTERMINATION
IS SET TO TRUE, THIS DEVICE WILL BE DELETED ON TERMINATION OF THE VM.
To attach a disk on provisioning stage add the io.brooklyn.blockstore.brooklyn-blockstore:brooklyn.location.blockstore.NewVolumeCustomizer
location customizer to the location configuration.
A YAML example is shown below:
brooklyn.config:
provisioning.properties:
customizers:
- $brooklyn:object:
type: io.brooklyn.blockstore.brooklyn-blockstore:brooklyn.location.blockstore.NewVolumeCustomizer
object.fields:
volumes:
- blockDevice:
sizeInGb: 3
# NOTE: g can be any unused partition name e.g. `/dev/xvdg`
deviceSuffix: 'g'
deleteOnTermination: true
tags:
brooklyn: br-example-val-test-1
filesystem:
mountPoint: /mount/brooklyn/diskG
filesystemType: ext4
- blockDevice:
sizeInGb: 3
# NOTE: h can be any unused partition name e.g. `/dev/xvdh`
deviceSuffix: 'h'
deleteOnTermination: true
tags:
brooklyn: br-example-val-test-1
filesystem:
mountPoint: /mount/brooklyn/diskH
filesystemType: ext4
You should specify a valid and available (this means that there shouldn’t be any existing partition already named with it) device suffix.
For AWS the defined device name will be of type /dev/xvd*
.
For Windows installations, deviceSuffix
is ignored, fileSystemType
should be set to a valid Windows file system, such as NTFT
, and the
optional parameters mountPoint
and volumeLabel
are used to specify the drive letter (without the colon, e.g. ‘D’), and the volume label
respectively. If either are omitted, they are assigned by the operating system.
A YAML example for Windows is shown below:
brooklyn.config:
provisioning.properties:
customizers:
- $brooklyn:object:
type: io.brooklyn.blockstore.brooklyn-blockstore:brooklyn.location.blockstore.NewVolumeCustomizer
object.fields:
volumes:
- blockDevice:
sizeInGb: 3
deleteOnTermination: true
filesystem:
mountPoint: M
filesystemType: NTFS
volumeLabel: My M Drive
Important notice: The KVM is configured as the default hypervisor for OpenStack which means that the defined device name will be of type /dev/vd*
.
A device of the size specified by sizeInGb
will be created. This device will then be mounted by the OS at the path specified at
mountPoint
and formatted to the file system specified in filesystemType
.
IF DELETEONTERMINATION
IS SET TO TRUE, THIS DEVICE WILL BE DELETED ON TERMINATION OF THE VM.
Attach volumes during runtime via an effector
To attach an effector for creating and adding an extra hdd, you should add this initializer to the yaml:
brooklyn.initializers:
- type: io.brooklyn.blockstore.brooklyn-blockstore:brooklyn.location.blockstore.effectors.ExtraHddBodyEffector
Use a map in the form of the JSON below as a parameter for the effector.
{
"blockDevice": {
"sizeInGb": 16,
"deviceSuffix": "h",
"deleteOnTermination": true,
"tags": {
"brooklyn": "br-example-test-1"
}
},
"filesystem": {
"mountPoint": "/mount/brooklyn/h",
"filesystemType": "ext4"
}
}