diff --git a/conf/telemetry-nova-persist-instances-with-network.yaml b/conf/telemetry-nova-persist-instances-with-network.yaml new file mode 100644 index 000000000..b6e9acced --- /dev/null +++ b/conf/telemetry-nova-persist-instances-with-network.yaml @@ -0,0 +1,124 @@ +# Stress test designed for telemetry services (ceilometer, gnocchi) by +# booting persisting xtiny cirros instances. It boots 100 each iteration +# with a concurrency of 20 instances. A total of 1000 instances are +# booted. These instances are attached to a network which creates +# additional telemetry load View how system resources degrade over each +# new set of instances booted. +browbeat: + results : results/ + rerun: 1 + cloud_name: openstack +elasticsearch: + enabled: false + host: 1.1.1.1 + port: 9200 + regather: true + metadata_files: + - name: hardware-metadata + file: metadata/hardware-metadata.json + - name: environment-metadata + file: metadata/environment-metadata.json + - name: software-metadata + file: metadata/software-metadata.json + - name: version + file: metadata/version.json +ansible: + ssh_config: ansible/ssh-config + hosts: ansible/hosts + adjust: + keystone_token: ansible/browbeat/adjustment-keystone-token.yml + neutron_l3: ansible/browbeat/adjustment-l3.yml + nova_db: ansible/browbeat/adjustment-db.yml + workers: ansible/browbeat/adjustment-workers.yml + grafana_snapshot: ansible/browbeat/snapshot-general-performance-dashboard.yml + metadata: ansible/gather/site.yml +connmon: + enabled: false + sudo: true +grafana: + enabled: false + grafana_ip: 1.1.1.1 + grafana_port: 3000 + dashboards: + - openstack-general-system-performance + snapshot: + enabled: false + snapshot_compute: false +rally: + enabled: true + sleep_before: 0 + # Sleeps 30 minutes after each iteration to allow for system resources to degrade or + # display stepped degrading (If the system is hitting saturation or high utilization) + sleep_after: 1800 + venv: /home/stack/rally-venv/bin/activate + plugins: + - nova: rally/rally-plugins/nova + - neutron: rally/rally-plugins/neutron + benchmarks: + # Boots a total of 1000 instances, 100 at a time with 30minutes between booting storms + - name: BrowbeatNovaPersistWithNetwork01 + enabled: true + concurrency: + - 20 + times: 100 + scenarios: + - name: nova-boot-persist-with-network-100-01 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.0.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-02 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.2.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-03 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.4.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-04 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.6.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-05 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.8.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-06 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.10.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-07 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.12.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-08 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.14.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-09 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.16.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml + - name: nova-boot-persist-with-network-100-10 + enabled: true + image_name: cirros + flavor_name: m1.xtiny + network_start_cidr: 10.1.18.0/23 + file: rally/rally-plugins/nova/nova_boot_persist_with_network.yml diff --git a/conf/telemetry-nova-persist-instances.yaml b/conf/telemetry-nova-persist-instances.yaml index 4b5e680f9..a03479017 100644 --- a/conf/telemetry-nova-persist-instances.yaml +++ b/conf/telemetry-nova-persist-instances.yaml @@ -1,7 +1,8 @@ # Stress test designed for telemetry services (ceilometer, gnocchi) by -# booting persisting xtiny cirros instances. It boots 20 each iteration -# with a concurrency of 5 instances. View how system resources degrade -# over each new set of instances booted. +# booting persisting xtiny cirros instances. It boots 100 each iteration +# with a concurrency of 20 instances. A total of 1000 instances are +# booted. View how system resources degrade over each new set of +# instances booted. browbeat: results : results/ rerun: 1 @@ -10,6 +11,7 @@ elasticsearch: enabled: false host: 1.1.1.1 port: 9200 + regather: true metadata_files: - name: hardware-metadata file: metadata/hardware-metadata.json @@ -44,66 +46,66 @@ grafana: rally: enabled: true sleep_before: 0 - # Sleeps 20 minutes after each iteration to allow for system resources to degrade or + # Sleeps 30 minutes after each iteration to allow for system resources to degrade or # display stepped degrading (If the system is hitting saturation or high utilization) - sleep_after: 1200 + sleep_after: 1800 venv: /home/stack/rally-venv/bin/activate plugins: - nova: rally/rally-plugins/nova benchmarks: - # Boots a total of 200 instances, 20 at a time with 20minutes between persist-booting "Storms" + # Boots a total of 1000 instances, 100 at a time with 30minutes between booting storms - name: BrowbeatNovaPersist01 enabled: true concurrency: - - 5 - times: 20 + - 20 + times: 100 scenarios: - - name: nova-boot-20-01 + - name: nova-boot-100-01 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-02 + - name: nova-boot-100-02 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-03 + - name: nova-boot-100-03 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-04 + - name: nova-boot-100-04 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-05 + - name: nova-boot-100-05 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-06 + - name: nova-boot-100-06 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-07 + - name: nova-boot-100-07 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-08 + - name: nova-boot-100-08 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-09 + - name: nova-boot-100-09 enabled: true image_name: cirros flavor_name: m1.xtiny file: rally/rally-plugins/nova/nova_boot_persist.yml - - name: nova-boot-20-10 + - name: nova-boot-100-10 enabled: true image_name: cirros flavor_name: m1.xtiny diff --git a/doc/source/index.rst b/doc/source/index.rst index beba9b135..4065e6bf4 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -14,6 +14,7 @@ Contents: introduction installation usage + plugins contributing Indices and tables @@ -22,4 +23,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/doc/source/plugins.rst b/doc/source/plugins.rst new file mode 100644 index 000000000..a1ab1bed4 --- /dev/null +++ b/doc/source/plugins.rst @@ -0,0 +1,21 @@ +============= +Plugins +============= + +Rally +~~~~~ + +Context - browbeat_persist_network +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This context creates network resources that persist upon completation of a rally run. It is used in conjunction with the nova_boot_persist_with_network plugin scenario. Beware that removal of the network resources created by this context plugin can be a lengthy process so this is best used on "throw-away-test" clouds. + +Scenario - nova_boot_persist +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This scenario creates instances without a network that persist upon completation of a rally run. This scenario is best used for excerising the Telemetry systems within an OpenStack Cloud. Alternatively, it can be used to put idle instances on a cloud for other workloads to compuete for resources. The scenario is referenced in the telemetry Browbeat configurations in order to build a "stepped" workload that can be used to analyze telemetry performance and scalability. + +Scenario - nova_boot_persist_with_network +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This scenario creates instances that are attached to a network and persist upon completation of a rally run. This scenario is best used for excerising the Telemetry systems within an OpenStack Cloud. It increases the telemetry workload by creating more resources that the telemetry services must collect and process metrics over. Alternatively, it can be used to put idle instances on a cloud for other workloads to compuete for resources. The scenario is referenced in the telemetry Browbeat configurations in order to build a "stepped" workload that can be used to analyze telemetry scalability. diff --git a/rally/rally-plugins/neutron/browbeat_persist_network_context.py b/rally/rally-plugins/neutron/browbeat_persist_network_context.py new file mode 100644 index 000000000..84f5e1333 --- /dev/null +++ b/rally/rally-plugins/neutron/browbeat_persist_network_context.py @@ -0,0 +1,36 @@ +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +from rally.common.i18n import _ +from rally.common import logging +from rally.plugins.openstack.context.network import networks +from rally.task import context + + +LOG = logging.getLogger(__name__) + + +@context.configure(name="browbeat_persist_network", order=350) +class BrowbeatPersistNetwork(networks.Network): + """Create networking resources but does not clean them up + at the conclusion to allow resources to persist. + """ + + @logging.log_task_wrapper(LOG.info, _("Enter context: `browbeat_persist_network`")) + def setup(self): + super(BrowbeatPersistNetwork, self).setup() + + @logging.log_task_wrapper(LOG.info, _("Exit context: `browbeat_persist_network`")) + def cleanup(self): + pass diff --git a/rally/rally-plugins/nova/nova.py b/rally/rally-plugins/nova/nova.py index be42cad9c..b9b9e7f56 100644 --- a/rally/rally-plugins/nova/nova.py +++ b/rally/rally-plugins/nova/nova.py @@ -10,18 +10,34 @@ # See the License for the specific language governing permissions and # limitations under the License. -from rally.plugins.openstack import scenario +from rally import consts +from rally.task import scenario from rally.plugins.openstack.scenarios.nova import utils as nova_utils from rally.task import types from rally.task import validation +@types.convert(image={"type": "glance_image"}, + flavor={"type": "nova_flavor"}) +@validation.image_valid_on_flavor("flavor", "image") +@validation.required_services(consts.Service.NOVA) +@validation.required_openstack(users=True) +@scenario.configure(context={}, + name="BrowbeatPlugin.nova_boot_persist") +class NovaBootPersist(nova_utils.NovaScenario): -class BrowbeatPlugin(nova_utils.NovaScenario, scenario.OpenStackScenario): - - @types.convert(image={"type": "glance_image"}, - flavor={"type": "nova_flavor"}) - @validation.image_valid_on_flavor("flavor", "image") - @validation.required_openstack(users=True) - @scenario.configure(context={}) - def nova_boot_persist(self, image, flavor, **kwargs): + def run(self, image, flavor, **kwargs): self._boot_server(image, flavor) + + +@types.convert(image={"type": "glance_image"}, + flavor={"type": "nova_flavor"}) +@validation.image_valid_on_flavor("flavor", "image") +@validation.required_contexts("browbeat_persist_network") +@validation.required_services(consts.Service.NOVA) +@validation.required_openstack(users=True) +@scenario.configure(context={}, + name="BrowbeatPlugin.nova_boot_persist_with_network") +class NovaBootPersistWithNetwork(nova_utils.NovaScenario): + + def run(self, image, flavor, **kwargs): + self._boot_server(image, flavor, **kwargs) diff --git a/rally/rally-plugins/nova/nova_boot_persist_with_network.yml b/rally/rally-plugins/nova/nova_boot_persist_with_network.yml new file mode 100644 index 000000000..efa581066 --- /dev/null +++ b/rally/rally-plugins/nova/nova_boot_persist_with_network.yml @@ -0,0 +1,41 @@ +{% set image_name = image_name or "cirros" %} +{% set flavor_name = flavor_name or "m1.xtiny" %} +{% set sla_max_avg_duration = sla_max_avg_duration or 60 %} +{% set sla_max_failure = sla_max_failure or 0 %} +{% set sla_max_seconds = sla_max_seconds or 60 %} +{% set network_start_cidr = network_start_cidr or '10.1.0.0/23' %} +--- +BrowbeatPlugin.nova_boot_persist_with_network: + - + args: + flavor: + name: '{{flavor_name}}' + image: + name: '{{image_name}}' + runner: + concurrency: {{concurrency}} + times: {{times}} + type: "constant" + context: + browbeat_persist_network: + networks_per_tenant: 1 + subnets_per_network: 1 + start_cidr: {{network_start_cidr}} + users: + tenants: 1 + users_per_tenant: 8 + quotas: + neutron: + network: -1 + port: -1 + router: -1 + subnet: -1 + nova: + instances: -1 + cores: -1 + ram: -1 + sla: + max_avg_duration: {{sla_max_avg_duration}} + max_seconds_per_iteration: {{sla_max_seconds}} + failure_rate: + max: {{sla_max_failure}}