Jump to: navigation, search

Rally/HowToExtendRally

< Rally
Revision as of 08:28, 15 October 2013 by Mikhail Dubov (talk | contribs) (Add Deploy engines)

Extend Rally functionality

Add Deploy engines

Implementing your own deploy engines allows you to employ custom OpenStack platforms. You can see the list of already available Deploy engines here.

To implement a custom deploy engine, you need to create a subclass of rally.deploy.engine.EngineFactory and implement the __init__(), deploy() and cleanup() methods:

   from rally.deploy import engine
   from rally.serverprovider import provider
   class MyEngine(engine.EngineFactory):
       def __init__(self, task, config):
           self.task = task
           self._config = config
           self._vms = []
           provider_config = config['provider']
           self._vm_provider = provider.ProviderFactory.get_provider(
               provider_config)
           # Perform further initialization here
       def deploy(self):
           self._vms = self._vm_provider.create_vms()
           for vm in self._vms:
               # Deploy OpenStack here
           # Return the endpoints
           return {
               'identity': {
                   'url': 'http://$IDENTITY_HOST/',
                   'uri': 'http://$IDENTITY_HOST:5000/v2.0/',
                   'admin_username': '$ADMIN',
                   'admin_password': '$PASSWORD',
                   'admin_tenant_name': '$TENANT',
               }
           }
       def cleanup(self):
           # Cleanup the deployment here, e.g.
           self._vm_provider.destroy_vms()

Add Server providers

Stay tuned.


Add Benchmark scenarios

Stay tuned.