Alex | b0bd7b3 | 2021-07-13 18:06:02 -0500 | [diff] [blame] | 1 | # Openstack resources |
| 2 | |
| 3 | Network and image must be created prior to run this template |
| 4 | network: cvp.net.1 |
| 5 | image: cvp.ubuntu.1604 |
| 6 | |
| 7 | To auto create them, run cvp resource creation script from ../scripts |
| 8 | Path is relative to this folder: <repo>/autoscale |
Alex | e4772c2 | 2021-07-14 09:09:23 -0500 | [diff] [blame] | 9 | bash ../scripts/repare.sh -w ($pwd) |
Alex | b0bd7b3 | 2021-07-13 18:06:02 -0500 | [diff] [blame] | 10 | |
| 11 | # Source the rc file |
| 12 | . cvprc |
| 13 | |
| 14 | # Create stack |
| 15 | openstack stack create -t simple.yaml -e environment.yaml simple-scale |
| 16 | |
| 17 | # Check that 2 servers created and copy one of the server IDs |
| 18 | openstack server list |
| 19 | |
| 20 | # Check that alarm is created |
| 21 | openstack alarm list |
| 22 | |
| 23 | # Check that 'cpu' metric is coming in |
| 24 | openstack metric resource show --type instance <server_uuid> |
| 25 | |
| 26 | # Finally, wait for several minutes for the metrics to collect and check averages |
| 27 | gnocchi measures show --resource-id <server_uuid> --aggregation rate:mean cpu |
| 28 | |
| 29 | # And check that signals coming in: |
| 30 | openstack stack event list simple-scale |
| 31 | |
| 32 | # And check that there is 5 VMs running after ~10 min |
| 33 | openstack server list |