diff options
| author | Amy Fong <amy.fong@windriver.com> | 2014-05-21 14:35:15 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-05-23 23:42:55 -0400 |
| commit | fb1d6f23fa01c0217ed3f6778d8033dd0030db2a (patch) | |
| tree | 36dc89d6b66050a56cbca2f2f7c90229ebcb8854 /meta-openstack/Documentation/README.heat | |
| parent | 6350b155270f7f086624db36ecc6e6008ebcd378 (diff) | |
| download | meta-cloud-services-fb1d6f23fa01c0217ed3f6778d8033dd0030db2a.tar.gz | |
Testing documentation
Add documentation for testing swift, ceph, heat.
Create a script and instructions on a script that launches a controller
and a specified number of compute nodes.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/Documentation/README.heat')
| -rw-r--r-- | meta-openstack/Documentation/README.heat | 549 |
1 files changed, 549 insertions, 0 deletions
diff --git a/meta-openstack/Documentation/README.heat b/meta-openstack/Documentation/README.heat new file mode 100644 index 0000000..276ad23 --- /dev/null +++ b/meta-openstack/Documentation/README.heat | |||
| @@ -0,0 +1,549 @@ | |||
| 1 | Summary | ||
| 2 | ======= | ||
| 3 | |||
| 4 | This document is not intended to provide detail of how Heat in general | ||
| 5 | works, but rather it describes how Heat is tested to ensure that Heat | ||
| 6 | is working correctly. | ||
| 7 | |||
| 8 | |||
| 9 | Heat Overview | ||
| 10 | ============= | ||
| 11 | |||
| 12 | Heat is template-driven orchestration engine which enables you to orchestrate | ||
| 13 | multiple composite cloud applications. Heat stack is a set of resources | ||
| 14 | (including nova compute VMs, cinder volumes, neutron IPs...) which are described | ||
| 15 | by heat orchestration template (a.k.a HOT) file. | ||
| 16 | |||
| 17 | Heat interacts with Ceilometer to provide autoscaling feature in which when | ||
| 18 | resources within a stack reach certain watermark (e.g. cpu utilization hits 70%) | ||
| 19 | then Heat can add or remove resources into or out of that stack to handle | ||
| 20 | the changing demands. | ||
| 21 | |||
| 22 | |||
| 23 | Build Configuration Options | ||
| 24 | =========================== | ||
| 25 | |||
| 26 | * Controller build config options: | ||
| 27 | |||
| 28 | --enable-board=intel-xeon-core \ | ||
| 29 | --enable-rootfs=ovp-openstack-controller \ | ||
| 30 | --enable-addons=wr-ovp-openstack,wr-ovp \ | ||
| 31 | --with-template=feature/openstack-tests | ||
| 32 | |||
| 33 | * Compute build config options: | ||
| 34 | |||
| 35 | --enable-board=intel-xeon-core \ | ||
| 36 | --enable-rootfs=ovp-openstack-compute \ | ||
| 37 | --enable-addons=wr-ovp-openstack,wr-ovp | ||
| 38 | |||
| 39 | |||
| 40 | Test Steps | ||
| 41 | ========== | ||
| 42 | |||
| 43 | Please note: the following commands/steps are carried on Controller | ||
| 44 | node, unless otherwise explicitly indicated. | ||
| 45 | |||
| 46 | $ Start Controller and Compute node | ||
| 47 | $ . /etc/nova/openrc | ||
| 48 | $ glance image-create --name myfirstimage --is-public true --container-format bare --disk-format qcow2 --file /root/images/cirros-0.3.0-x86_64-disk.img | ||
| 49 | $ glance image-list | ||
| 50 | +--------------------------------------+--------------+-------------+------------------+---------+--------+ | ||
| 51 | | ID | Name | Disk Format | Container Format | Size | Status | | ||
| 52 | +--------------------------------------+--------------+-------------+------------------+---------+--------+ | ||
| 53 | | a71b84d3-e656-43f5-afdc-ac67cf4f398a | myfirstimage | qcow2 | bare | 9761280 | active | | ||
| 54 | +--------------------------------------+--------------+-------------+------------------+---------+--------+ | ||
| 55 | |||
| 56 | $ neutron net-create mynetwork | ||
| 57 | $ neutron net-list | ||
| 58 | +--------------------------------------+-----------+---------+ | ||
| 59 | | id | name | subnets | | ||
| 60 | +--------------------------------------+-----------+---------+ | ||
| 61 | | 8c9c8a6f-d90f-479f-82b0-7f6e963b39d7 | mynetwork | | | ||
| 62 | +--------------------------------------+-----------+---------+ | ||
| 63 | |||
| 64 | $ /etc/cinder/add-cinder-volume-types.sh | ||
| 65 | $ cinder create --volume_type nfs --display_name nfs_vol_1 3 | ||
| 66 | $ cinder create --volume_type glusterfs --display_name glusterfs_vol_1 2 | ||
| 67 | $ cinder list | ||
| 68 | +--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+ | ||
| 69 | | ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | | ||
| 70 | +--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+ | ||
| 71 | | 1d283cf7-2258-4038-a31b-5cb5fba995f3 | available | nfs_vol_1 | 3 | nfs | false | | | ||
| 72 | | c46276fb-e3df-4093-b759-2ce03c4cefd5 | available | glusterfs_vol_1 | 2 | glusterfs | false | | | ||
| 73 | +--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+ | ||
| 74 | |||
| 75 | *** The below test steps are for testing lifecycle management *** | ||
| 76 | |||
| 77 | $ heat stack-create -f /etc/heat/templates/two_vms_example.template -P "vol_2_id=c46276fb-e3df-4093-b759-2ce03c4cefd5" mystack | ||
| 78 | $ Keep running "heat stack-list" until seeing | ||
| 79 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 80 | | id | stack_name | stack_status | creation_time | | ||
| 81 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 82 | | 8d79a777-2e09-4d06-a04e-8430df341514 | mystack | CREATE_COMPLETE | 2014-05-08T16:36:22Z | | ||
| 83 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 84 | |||
| 85 | $ nova list | ||
| 86 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 87 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 88 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 89 | | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | mystack-vm_1-j5tq5m2ppk3z | ACTIVE | - | Running | | | ||
| 90 | | fe1b693e-db8c-4d74-b840-7dae8acef0c1 | mystack-vm_2-oiu6mzg3jjv2 | ACTIVE | - | Running | | | ||
| 91 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 92 | |||
| 93 | (Should see 2 VMs: vm_1 and vm_2 as defined in two_vms_example.template) | ||
| 94 | |||
| 95 | $ cinder list | ||
| 96 | +--------------------------------------+-----------+----------------------------+------+-------------+----------+--------------------------------------+ | ||
| 97 | | ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | | ||
| 98 | +--------------------------------------+-----------+----------------------------+------+-------------+----------+--------------------------------------+ | ||
| 99 | | 1d283cf7-2258-4038-a31b-5cb5fba995f3 | available | nfs_vol_1 | 3 | nfs | false | | | ||
| 100 | | 58b55eb9-e619-4c2e-bfd8-ebc349aff02b | in-use | mystack-vol_1-5xk2zotoxidr | 1 | lvm_iscsi | false | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | | ||
| 101 | | c46276fb-e3df-4093-b759-2ce03c4cefd5 | in-use | glusterfs_vol_1 | 2 | glusterfs | false | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | | ||
| 102 | +--------------------------------------+-----------+----------------------------+------+-------------+----------+--------------------------------------+ | ||
| 103 | |||
| 104 | (2 Cinder volumes are attached to vm_1) | ||
| 105 | |||
| 106 | $ From Dashboard, log into vm_1, and run "cat /proc/partitions" | ||
| 107 | (Should see partitions vdb of 1G and vdc of 2G) | ||
| 108 | |||
| 109 | $ heat stack-show 8d79a777-2e09-4d06-a04e-8430df341514 | ||
| 110 | |||
| 111 | (Command should return lot of info) | ||
| 112 | |||
| 113 | $ heat resource-list mystack | ||
| 114 | +------------------+------------------------------+-----------------+----------------------+ | ||
| 115 | | resource_name | resource_type | resource_status | updated_time | | ||
| 116 | +------------------+------------------------------+-----------------+----------------------+ | ||
| 117 | | vol_1 | OS::Cinder::Volume | CREATE_COMPLETE | 2014-05-08T16:36:24Z | | ||
| 118 | | vm_2 | OS::Nova::Server | CREATE_COMPLETE | 2014-05-08T16:36:56Z | | ||
| 119 | | vm_1 | OS::Nova::Server | CREATE_COMPLETE | 2014-05-08T16:37:26Z | | ||
| 120 | | vol_2_attachment | OS::Cinder::VolumeAttachment | CREATE_COMPLETE | 2014-05-08T16:37:28Z | | ||
| 121 | | vol_1_attachment | OS::Cinder::VolumeAttachment | CREATE_COMPLETE | 2014-05-08T16:37:31Z | | ||
| 122 | +------------------+------------------------------+-----------------+----------------------+ | ||
| 123 | |||
| 124 | (Should see all 5 resources defined in two_vms_example.template) | ||
| 125 | |||
| 126 | $ heat resource-show mystack vm_1 | ||
| 127 | +------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| 128 | | Property | Value | | ||
| 129 | +------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| 130 | | description | | | ||
| 131 | | links | http://128.224.149.168:8004/v1/088d10de18a84442a7a03497e834e2af/stacks/mystack/8d79a777-2e09-4d06-a04e-8430df341514/resources/vm_1 | | ||
| 132 | | | http://128.224.149.168:8004/v1/088d10de18a84442a7a03497e834e2af/stacks/mystack/8d79a777-2e09-4d06-a04e-8430df341514 | | ||
| 133 | | logical_resource_id | vm_1 | | ||
| 134 | | physical_resource_id | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | | ||
| 135 | | required_by | vol_1_attachment | | ||
| 136 | | | vol_2_attachment | | ||
| 137 | | resource_name | vm_1 | | ||
| 138 | | resource_status | CREATE_COMPLETE | | ||
| 139 | | resource_status_reason | state changed | | ||
| 140 | | resource_type | OS::Nova::Server | | ||
| 141 | | updated_time | 2014-05-08T16:37:26Z | | ||
| 142 | +------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | ||
| 143 | |||
| 144 | $ heat template-show mystack | ||
| 145 | |||
| 146 | (The content of this command should be the same as content of two_vms_example.template) | ||
| 147 | |||
| 148 | $ heat event-list mystack | ||
| 149 | +------------------+-----+------------------------+--------------------+----------------------+ | ||
| 150 | | resource_name | id | resource_status_reason | resource_status | event_time | | ||
| 151 | +------------------+-----+------------------------+--------------------+----------------------+ | ||
| 152 | | vm_1 | 700 | state changed | CREATE_IN_PROGRESS | 2014-05-08T16:36:22Z | | ||
| 153 | | vm_1 | 704 | state changed | CREATE_COMPLETE | 2014-05-08T16:37:26Z | | ||
| 154 | | vm_2 | 699 | state changed | CREATE_IN_PROGRESS | 2014-05-08T16:36:22Z | | ||
| 155 | | vm_2 | 703 | state changed | CREATE_COMPLETE | 2014-05-08T16:36:56Z | | ||
| 156 | | vol_1 | 701 | state changed | CREATE_IN_PROGRESS | 2014-05-08T16:36:22Z | | ||
| 157 | | vol_1 | 702 | state changed | CREATE_COMPLETE | 2014-05-08T16:36:24Z | | ||
| 158 | | vol_1_attachment | 706 | state changed | CREATE_IN_PROGRESS | 2014-05-08T16:37:27Z | | ||
| 159 | | vol_1_attachment | 708 | state changed | CREATE_COMPLETE | 2014-05-08T16:37:31Z | | ||
| 160 | | vol_2_attachment | 705 | state changed | CREATE_IN_PROGRESS | 2014-05-08T16:37:26Z | | ||
| 161 | | vol_2_attachment | 707 | state changed | CREATE_COMPLETE | 2014-05-08T16:37:28Z | | ||
| 162 | +------------------+-----+------------------------+--------------------+----------------------+ | ||
| 163 | |||
| 164 | $ heat action-suspend mystack | ||
| 165 | $ Keep running "heat stack-list" until seeing | ||
| 166 | +--------------------------------------+------------+------------------+----------------------+ | ||
| 167 | | id | stack_name | stack_status | creation_time | | ||
| 168 | +--------------------------------------+------------+------------------+----------------------+ | ||
| 169 | | 8d79a777-2e09-4d06-a04e-8430df341514 | mystack | SUSPEND_COMPLETE | 2014-05-08T16:36:22Z | | ||
| 170 | +--------------------------------------+------------+------------------+----------------------+ | ||
| 171 | |||
| 172 | $ nova list | ||
| 173 | +--------------------------------------+---------------------------+-----------+------------+-------------+----------+ | ||
| 174 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 175 | +--------------------------------------+---------------------------+-----------+------------+-------------+----------+ | ||
| 176 | | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | mystack-vm_1-j5tq5m2ppk3z | SUSPENDED | - | Shutdown | | | ||
| 177 | | fe1b693e-db8c-4d74-b840-7dae8acef0c1 | mystack-vm_2-oiu6mzg3jjv2 | SUSPENDED | - | Shutdown | | | ||
| 178 | +--------------------------------------+---------------------------+-----------+------------+-------------+----------+ | ||
| 179 | |||
| 180 | (2 VMs are in suspeded mode) | ||
| 181 | |||
| 182 | $ Wait for 2 minutes | ||
| 183 | $ heat action-resume mystack | ||
| 184 | $ Keep running "heat stack-list" until seeing | ||
| 185 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 186 | | id | stack_name | stack_status | creation_time | | ||
| 187 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 188 | | 8d79a777-2e09-4d06-a04e-8430df341514 | mystack | RESUME_COMPLETE | 2014-05-08T16:36:22Z | | ||
| 189 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 190 | |||
| 191 | $ nova list | ||
| 192 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 193 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 194 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 195 | | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | mystack-vm_1-j5tq5m2ppk3z | ACTIVE | - | Running | | | ||
| 196 | | fe1b693e-db8c-4d74-b840-7dae8acef0c1 | mystack-vm_2-oiu6mzg3jjv2 | ACTIVE | - | Running | | | ||
| 197 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 198 | |||
| 199 | $ nova show e58da67a-9a22-4db2-9d1e-0a1810df2f2e | grep flavor | ||
| 200 | | flavor | m1.tiny (1) | ||
| 201 | |||
| 202 | (Should see m1.tiny flavour for vm_2 by default) | ||
| 203 | |||
| 204 | $ heat stack-update -f /etc/heat/templates/two_vms_example.template -P "vol_2_id=c46276fb-e3df-4093-b759-2ce03c4cefd5;vm_type=m1.small" mystack | ||
| 205 | (Update vm_2 flavour from m1.tiny to m1.small) | ||
| 206 | |||
| 207 | $ Keep running "heat stack-list" until seeing | ||
| 208 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 209 | | id | stack_name | stack_status | creation_time | | ||
| 210 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 211 | | 8d79a777-2e09-4d06-a04e-8430df341514 | mystack | UPDATE_COMPLETE | 2014-05-08T16:36:22Z | | ||
| 212 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 213 | |||
| 214 | $ nova list | ||
| 215 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 216 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 217 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 218 | | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | mystack-vm_1-j5tq5m2ppk3z | ACTIVE | - | Running | | | ||
| 219 | | fe1b693e-db8c-4d74-b840-7dae8acef0c1 | mystack-vm_2-oiu6mzg3jjv2 | ACTIVE | - | Running | | | ||
| 220 | +--------------------------------------+---------------------------+--------+------------+-------------+----------+ | ||
| 221 | |||
| 222 | $ nova show e58da67a-9a22-4db2-9d1e-0a1810df2f2e | grep flavor | ||
| 223 | | flavor | m1.small (2) | | ||
| 224 | |||
| 225 | (Should see m1.small flavour for vm_2. This demonstrates that its able to update) | ||
| 226 | |||
| 227 | $ heat stack-create -f /etc/heat/templates/two_vms_example.template -P "vol_2_id=1d283cf7-2258-4038-a31b-5cb5fba995f3" mystack2 | ||
| 228 | $ Keep running "heat stack-list" until seeing | ||
| 229 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 230 | | id | stack_name | stack_status | creation_time | | ||
| 231 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 232 | | 8d79a777-2e09-4d06-a04e-8430df341514 | mystack | UPDATE_COMPLETE | 2014-05-08T16:36:22Z | | ||
| 233 | | 258e05fd-370b-4017-818a-4bb573ac3982 | mystack2 | CREATE_COMPLETE | 2014-05-08T16:46:12Z | | ||
| 234 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 235 | |||
| 236 | $ nova list | ||
| 237 | +--------------------------------------+----------------------------+--------+------------+-------------+----------+ | ||
| 238 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 239 | +--------------------------------------+----------------------------+--------+------------+-------------+----------+ | ||
| 240 | | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | mystack-vm_1-j5tq5m2ppk3z | ACTIVE | - | Running | | | ||
| 241 | | fe1b693e-db8c-4d74-b840-7dae8acef0c1 | mystack-vm_2-oiu6mzg3jjv2 | ACTIVE | - | Running | | | ||
| 242 | | 181931ae-4c3b-488d-a7c6-4c4b08f6a35b | mystack2-vm_1-hmy5feakes2q | ACTIVE | - | Running | | | ||
| 243 | | c80aaea9-276f-4bdb-94d5-9e0c5434f269 | mystack2-vm_2-6b4nzxecda3j | ACTIVE | - | Running | | | ||
| 244 | +--------------------------------------+----------------------------+--------+------------+-------------+----------+ | ||
| 245 | |||
| 246 | $ cinder list | ||
| 247 | +--------------------------------------+--------+-----------------------------+------+-------------+----------+--------------------------------------+ | ||
| 248 | | ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | | ||
| 249 | +--------------------------------------+--------+-----------------------------+------+-------------+----------+--------------------------------------+ | ||
| 250 | | 1d283cf7-2258-4038-a31b-5cb5fba995f3 | in-use | nfs_vol_1 | 3 | nfs | false | 181931ae-4c3b-488d-a7c6-4c4b08f6a35b | | ||
| 251 | | 2175db16-5569-45eb-af8b-2b967e2b808c | in-use | mystack2-vol_1-ey6udylsdqbo | 1 | lvm_iscsi | false | 181931ae-4c3b-488d-a7c6-4c4b08f6a35b | | ||
| 252 | | 58b55eb9-e619-4c2e-bfd8-ebc349aff02b | in-use | mystack-vol_1-5xk2zotoxidr | 1 | lvm_iscsi | false | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | | ||
| 253 | | c46276fb-e3df-4093-b759-2ce03c4cefd5 | in-use | glusterfs_vol_1 | 2 | glusterfs | false | e58da67a-9a22-4db2-9d1e-0a1810df2f2e | | ||
| 254 | +--------------------------------------+--------+-----------------------------+------+-------------+----------+--------------------------------------+ | ||
| 255 | |||
| 256 | $ Wait for 5 minutes | ||
| 257 | $ heat stack-delete mystack2 | ||
| 258 | $ heat stack-delete mystack | ||
| 259 | $ Keep running "heat stack-list" until seeing | ||
| 260 | +----+------------+--------------+---------------+ | ||
| 261 | | id | stack_name | stack_status | creation_time | | ||
| 262 | +----+------------+--------------+---------------+ | ||
| 263 | +----+------------+--------------+---------------+ | ||
| 264 | |||
| 265 | $ nova list | ||
| 266 | +----+------+--------+------------+-------------+----------+ | ||
| 267 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 268 | +----+------+--------+------------+-------------+----------+ | ||
| 269 | +----+------+--------+------------+-------------+----------+ | ||
| 270 | |||
| 271 | $ cinder list | ||
| 272 | +--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+ | ||
| 273 | | ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | | ||
| 274 | +--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+ | ||
| 275 | | 1d283cf7-2258-4038-a31b-5cb5fba995f3 | available | nfs_vol_1 | 3 | nfs | false | | | ||
| 276 | | c46276fb-e3df-4093-b759-2ce03c4cefd5 | available | glusterfs_vol_1 | 2 | glusterfs | false | | | ||
| 277 | +--------------------------------------+-----------+-----------------+------+-------------+----------+-------------+ | ||
| 278 | |||
| 279 | *** The below test steps are for testing autoscaling *** | ||
| 280 | |||
| 281 | $ By default, Ceilometer data samples are collected every 10 minutes, therefore | ||
| 282 | to speed up the test process, change the data simple polling rates at every | ||
| 283 | 1 minutes. On Controller node modify /etc/ceilometer/pipeline.yaml to change | ||
| 284 | all value "600" to "60". | ||
| 285 | |||
| 286 | *** The following commands are for reseting Ceilometer database *** | ||
| 287 | |||
| 288 | $ /etc/init.d/ceilometer-agent-notification stop | ||
| 289 | $ /etc/init.d/ceilometer-agent-central stop | ||
| 290 | $ /etc/init.d/ceilometer-alarm-evaluator stop | ||
| 291 | $ /etc/init.d/ceilometer-alarm-notifier stop | ||
| 292 | $ /etc/init.d/ceilometer-api stop | ||
| 293 | $ /etc/init.d/ceilometer-collector stop | ||
| 294 | $ sudo -u postgres psql -c "DROP DATABASE ceilometer" | ||
| 295 | $ sudo -u postgres psql -c "CREATE DATABASE ceilometer" | ||
| 296 | $ ceilometer-dbsync | ||
| 297 | $ /etc/init.d/ceilometer-agent-central restart | ||
| 298 | $ /etc/init.d/ceilometer-agent-notification restart | ||
| 299 | $ /etc/init.d/ceilometer-alarm-evaluator restart | ||
| 300 | $ /etc/init.d/ceilometer-alarm-notifier restart | ||
| 301 | $ /etc/init.d/ceilometer-api restart | ||
| 302 | $ /etc/init.d/ceilometer-collector restart | ||
| 303 | |||
| 304 | $ On Compute node, modify /etc/ceilometer/pipeline.yaml to change all | ||
| 305 | value "600" to "60", and run: | ||
| 306 | |||
| 307 | /etc/init.d/ceilometer-agent-compute restart | ||
| 308 | |||
| 309 | $ heat stack-create -f /etc/heat/templates/autoscaling_example.template mystack | ||
| 310 | $ Keep running "heat stack-list" until seeing | ||
| 311 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 312 | | id | stack_name | stack_status | creation_time | | ||
| 313 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 314 | | 1905a541-edfa-4a1f-b6f9-eacdf5f62d85 | mystack | CREATE_COMPLETE | 2014-05-06T22:46:08Z | | ||
| 315 | +--------------------------------------+------------+-----------------+----------------------+ | ||
| 316 | |||
| 317 | $ ceilometer alarm-list | ||
| 318 | +--------------------------------------+-------------------------------------+-------------------+---------+------------+---------------------------------+------------------+ | ||
| 319 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 320 | +--------------------------------------+-------------------------------------+-------------------+---------+------------+---------------------------------+------------------+ | ||
| 321 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | insufficient data | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 322 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | insufficient data | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 323 | +--------------------------------------+-------------------------------------+-------------------+---------+------------+---------------------------------+------------------+ | ||
| 324 | |||
| 325 | $ nova list | ||
| 326 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 327 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 328 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 329 | | 49201b33-1cd9-4e2f-b182-224f29c2bb7c | mystack-server_group-etzglbdncptt-server_group-0-moxmbfm4pynk | ACTIVE | - | Running | | | ||
| 330 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 331 | |||
| 332 | $ Keep running "ceilometer alarm-list" until seeing | ||
| 333 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 334 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 335 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 336 | | 39a9cb57-46f0-4f8a-885d-9a645aa467b1 | mystack-cpu_alarm_low-jrjmwxbhzdd3 | alarm | True | True | cpu_util < 15.0 during 1 x 120s | None | | ||
| 337 | | 5dd5747e-a7a7-4ccd-994b-b0b8733728de | mystack-cpu_alarm_high-tpgsvsbcskjt | ok | True | True | cpu_util > 80.0 during 1 x 180s | None | | ||
| 338 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 339 | |||
| 340 | $ Wait for 5 minutes | ||
| 341 | $ ceilometer alarm-list | ||
| 342 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 343 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 344 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 345 | | 39a9cb57-46f0-4f8a-885d-9a645aa467b1 | mystack-cpu_alarm_low-jrjmwxbhzdd3 | alarm | True | True | cpu_util < 15.0 during 1 x 120s | None | | ||
| 346 | | 5dd5747e-a7a7-4ccd-994b-b0b8733728de | mystack-cpu_alarm_high-tpgsvsbcskjt | ok | True | True | cpu_util > 80.0 during 1 x 180s | None | | ||
| 347 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 348 | |||
| 349 | $ On Dashboard, log into 49201b33-1cd9-4e2f-b182-224f29c2bb7c VM console and run | ||
| 350 | |||
| 351 | while [ true ]; do echo "hello world"; done | ||
| 352 | |||
| 353 | $ Keep running "ceilometer alarm-list" until seeing | ||
| 354 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 355 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 356 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 357 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | ok | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 358 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | alarm | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 359 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 360 | |||
| 361 | $ nova list | ||
| 362 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 363 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 364 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 365 | | 49201b33-1cd9-4e2f-b182-224f29c2bb7c | mystack-server_group-etzglbdncptt-server_group-0-moxmbfm4pynk | ACTIVE | - | Running | | | ||
| 366 | | a1a21353-3400-46be-b75c-8c6a0a74a1de | mystack-server_group-etzglbdncptt-server_group-1-wzspkkrb4qay | BUILD | spawning | NOSTATE | | | ||
| 367 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 368 | |||
| 369 | (Should see that now heat auto scales up by creating another VM) | ||
| 370 | |||
| 371 | $ nova list | ||
| 372 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 373 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 374 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 375 | | 49201b33-1cd9-4e2f-b182-224f29c2bb7c | mystack-server_group-etzglbdncptt-server_group-0-moxmbfm4pynk | ACTIVE | - | Running | | | ||
| 376 | | a1a21353-3400-46be-b75c-8c6a0a74a1de | mystack-server_group-etzglbdncptt-server_group-1-wzspkkrb4qay | ACTIVE | - | Running | | | ||
| 377 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 378 | |||
| 379 | $ Keep running "ceilometer alarm-list" until seeing | ||
| 380 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 381 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 382 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 383 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | ok | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 384 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | ok | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 385 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 386 | |||
| 387 | (Both alarm should be in "ok" state as average cpu_util for 2 VMs should be around 50% | ||
| 388 | which is in the range) | ||
| 389 | |||
| 390 | $ On Dashboard, log into the a1a21353-3400-46be-b75c-8c6a0a74a1de VM console and run | ||
| 391 | |||
| 392 | while [ true ]; do echo "hello world"; done | ||
| 393 | |||
| 394 | $ Keep running "ceilometer alarm-list" until seeing | ||
| 395 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 396 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 397 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 398 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | ok | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 399 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | alarm | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 400 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 401 | |||
| 402 | $ nova list | ||
| 403 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 404 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 405 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 406 | | 49201b33-1cd9-4e2f-b182-224f29c2bb7c | mystack-server_group-etzglbdncptt-server_group-0-moxmbfm4pynk | ACTIVE | - | Running | | | ||
| 407 | | a1a21353-3400-46be-b75c-8c6a0a74a1de | mystack-server_group-etzglbdncptt-server_group-1-wzspkkrb4qay | ACTIVE | - | Running | | | ||
| 408 | | 88e88660-acde-4998-a2e3-312efbc72447 | mystack-server_group-etzglbdncptt-server_group-2-jaotqnr5x7xb | BUILD | spawning | NOSTATE | | | ||
| 409 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 410 | |||
| 411 | (Should see that now heat auto scales up by creating another VM) | ||
| 412 | |||
| 413 | $ nova list | ||
| 414 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 415 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 416 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 417 | | 49201b33-1cd9-4e2f-b182-224f29c2bb7c | mystack-server_group-etzglbdncptt-server_group-0-moxmbfm4pynk | ACTIVE | - | Running | | | ||
| 418 | | a1a21353-3400-46be-b75c-8c6a0a74a1de | mystack-server_group-etzglbdncptt-server_group-1-wzspkkrb4qay | ACTIVE | - | Running | | | ||
| 419 | | 88e88660-acde-4998-a2e3-312efbc72447 | mystack-server_group-etzglbdncptt-server_group-2-jaotqnr5x7xb | ACTIVE | - | Running | | | ||
| 420 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 421 | |||
| 422 | $ Keep running "ceilometer alarm-list" until seeing | ||
| 423 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 424 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 425 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 426 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | ok | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 427 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | ok | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 428 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 429 | |||
| 430 | $ Wait for 5 minutes | ||
| 431 | $ ceilometer alarm-list | ||
| 432 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 433 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 434 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 435 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | ok | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 436 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | ok | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 437 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 438 | |||
| 439 | $ On Dashboard, log into the a1a21353-3400-46be-b75c-8c6a0a74a1de VM console and | ||
| 440 | stop the while loop | ||
| 441 | |||
| 442 | $ Keep running "ceilometer alarm-list" until seeing | ||
| 443 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 444 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 445 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 446 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | alarm | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 447 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | ok | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 448 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 449 | |||
| 450 | $ nova list | ||
| 451 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 452 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 453 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 454 | | 49201b33-1cd9-4e2f-b182-224f29c2bb7c | mystack-server_group-etzglbdncptt-server_group-0-moxmbfm4pynk | ACTIVE | - | Running | | | ||
| 455 | | a1a21353-3400-46be-b75c-8c6a0a74a1de | mystack-server_group-etzglbdncptt-server_group-1-wzspkkrb4qay | ACTIVE | - | Running | | | ||
| 456 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 457 | |||
| 458 | (Heat scales down the VMs by one as cpu_alarm_low is triggered) | ||
| 459 | |||
| 460 | $ Wait for 5 minutes | ||
| 461 | $ ceilometer alarm-list | ||
| 462 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 463 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 464 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 465 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | ok | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 466 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | ok | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 467 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 468 | |||
| 469 | $ On Dashboard, log into the 49201b33-1cd9-4e2f-b182-224f29c2bb7c VM console and | ||
| 470 | stop the while loop | ||
| 471 | |||
| 472 | $ Keep running "ceilometer alarm-list" until seeing | ||
| 473 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 474 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 475 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 476 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | alarm | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 477 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | ok | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 478 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 479 | |||
| 480 | $ nova list | ||
| 481 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 482 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 483 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 484 | | 49201b33-1cd9-4e2f-b182-224f29c2bb7c | mystack-server_group-etzglbdncptt-server_group-0-moxmbfm4pynk | ACTIVE | - | Running | | | ||
| 485 | +--------------------------------------+---------------------------------------------------------------+--------+------------+-------------+----------+ | ||
| 486 | |||
| 487 | (Heat scales down the VMs by one as cpu_alarm_low is triggered) | ||
| 488 | |||
| 489 | $ Wait for 5 minutes | ||
| 490 | $ ceilometer alarm-list | ||
| 491 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 492 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 493 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 494 | | 14a1c510-667c-4717-a49d-eba375e48e01 | mystack-cpu_alarm_low-3jmjeyqrwd3k | alarm | True | False | cpu_util < 45.0 during 1 x 120s | None | | ||
| 495 | | edcc3c0c-84b7-4694-8312-72677bc50efd | mystack-cpu_alarm_high-jiziioj5zt6r | ok | True | False | cpu_util > 80.0 during 1 x 300s | None | | ||
| 496 | +--------------------------------------+-------------------------------------+-------+---------+------------+---------------------------------+------------------+ | ||
| 497 | |||
| 498 | $ heat stack-delete 1905a541-edfa-4a1f-b6f9-eacdf5f62d85 | ||
| 499 | $ heat stack-list | ||
| 500 | +----+------------+--------------+---------------+ | ||
| 501 | | id | stack_name | stack_status | creation_time | | ||
| 502 | +----+------------+--------------+---------------+ | ||
| 503 | +----+------------+--------------+---------------+ | ||
| 504 | |||
| 505 | $ nova list | ||
| 506 | +----+------+--------+------------+-------------+----------+ | ||
| 507 | | ID | Name | Status | Task State | Power State | Networks | | ||
| 508 | +----+------+--------+------------+-------------+----------+ | ||
| 509 | +----+------+--------+------------+-------------+----------+ | ||
| 510 | |||
| 511 | $ ceilometer alarm-list | ||
| 512 | +----------+------+-------+---------+------------+-----------------+------------------+ | ||
| 513 | | Alarm ID | Name | State | Enabled | Continuous | Alarm condition | Time constraints | | ||
| 514 | +----------+------+-------+---------+------------+-----------------+------------------+ | ||
| 515 | +----------+------+-------+---------+------------+-----------------+------------------+ | ||
| 516 | |||
| 517 | |||
| 518 | Heat Built-In Unit Tests | ||
| 519 | ========================= | ||
| 520 | |||
| 521 | This section describes how to run Heat and Heat client built-in unit | ||
| 522 | tests which are located at: | ||
| 523 | |||
| 524 | /usr/lib64/python2.7/site-packages/heat/tests | ||
| 525 | /usr/lib64/python2.7/site-packages/heatclient/tests | ||
| 526 | |||
| 527 | To run heat built-in unit test with nosetests: | ||
| 528 | |||
| 529 | $ cd /usr/lib64/python2.7/site-packages/heat | ||
| 530 | $ nosetests -v tests | ||
| 531 | |||
| 532 | ---------------------------------------------------------------------- | ||
| 533 | Ran 1550 tests in 45.770s | ||
| 534 | |||
| 535 | OK | ||
| 536 | |||
| 537 | To run heatclient built-in unit test with nosetests: | ||
| 538 | |||
| 539 | $ cd /usr/lib64/python2.7/site-packages/heatclient/tests | ||
| 540 | $ python -v -m subunit.run discover . | subunit2pyunit | ||
| 541 | |||
| 542 | ---------------------------------------------------------------------- | ||
| 543 | Ran 272 tests in 3.368s | ||
| 544 | |||
| 545 | OK | ||
| 546 | |||
| 547 | Please note that, Python testrunner subunit.run is used instead of | ||
| 548 | nosetests as nosetests is not compatible with testscenarios test | ||
| 549 | framework used by some of the heatclient unit tests. | ||
