90 lines
2.5 KiB
YAML
Executable File
90 lines
2.5 KiB
YAML
Executable File
heat_template_version: '2013-05-23'
|
|
|
|
description:
|
|
Two Bonnies, One root volume 50GB and non-root 4 volumes
|
|
|
|
parameters:
|
|
Network_Name:
|
|
type: string
|
|
description: Network which is used for servers
|
|
default: tenant1-mgmt-net
|
|
|
|
resources:
|
|
|
|
root_volume_1:
|
|
type: OS::Cinder::Volume
|
|
properties:
|
|
name: root_volume_1
|
|
image: centos_nkstress
|
|
size: 20
|
|
|
|
Test_volume_2:
|
|
type: OS::Cinder::Volume
|
|
properties:
|
|
name: Test_volume_2
|
|
size: 5
|
|
|
|
Test_volume_3:
|
|
type: OS::Cinder::Volume
|
|
properties:
|
|
name: Test_volume_3
|
|
size: 5
|
|
|
|
Test_volume_4:
|
|
type: OS::Cinder::Volume
|
|
properties:
|
|
name: Test_volume_4
|
|
size: 5
|
|
|
|
Test_volume_5:
|
|
type: OS::Cinder::Volume
|
|
properties:
|
|
name: Test_volume_5
|
|
size: 5
|
|
|
|
Stabi_volume_write:
|
|
type: OS::Nova::Server
|
|
depends_on: root_volume_1
|
|
properties:
|
|
name: { list_join : [ "-", [{get_param: 'OS::stack_name'}, 'Stabi_volume_write']]}
|
|
flavor: smallvol
|
|
key_name: newkey
|
|
availability_zone: "nova"
|
|
networks:
|
|
- network: { get_param: Network_Name }
|
|
block_device_mapping:
|
|
- { volume_id: { get_resource: root_volume_1}, device_name: "vda" }
|
|
- { volume_id: { get_resource: Test_volume_2}, device_name: "vdb" }
|
|
- { volume_id: { get_resource: Test_volume_3}, device_name: "vdc" }
|
|
- { volume_id: { get_resource: Test_volume_4}, device_name: "vdd" }
|
|
- { volume_id: { get_resource: Test_volume_5}, device_name: "vde" }
|
|
|
|
user_data_format: RAW
|
|
user_data: |
|
|
#cloud-config
|
|
user: centos
|
|
password: centos
|
|
chpasswd: {expire: False}
|
|
ssh_pwauth: True
|
|
runcmd:
|
|
- echo "Creating file systems..." > /root/stabi_1.log&
|
|
- mkfs.ext4 /dev/vdb
|
|
- mkfs.ext4 /dev/vdc
|
|
- mkfs.ext4 /dev/vdd
|
|
- mkfs.ext4 /dev/vde
|
|
- echo "Mounting directories..." >> /root/stabi_1.log&
|
|
- mkdir /mnt/b
|
|
- mkdir /mnt/c
|
|
- mkdir /mnt/d
|
|
- mkdir /mnt/e
|
|
- mount /dev/vdb /mnt/b/
|
|
- mount /dev/vdc /mnt/c/
|
|
- mount /dev/vdd /mnt/d/
|
|
- mount /dev/vde /mnt/e/
|
|
- echo "Starting bonnie++..." >> /root/stabi_1.log&
|
|
- date >> /root/stabi_1.log&
|
|
- /usr/sbin/bonnie++ -b -n 100 -d /home/centos -u root -x 1000 >> /root/stabi_1.log&
|
|
- /usr/sbin/bonnie++ -b -n 100 -d /mnt/b -u root -x 1000 >> /root/stabi_2.log&
|
|
- /usr/sbin/bonnie++ -b -n 100 -d /mnt/c -u root -x 1000 >> /root/stabi_2.log&
|
|
|