Difference between revisions of "Rally/HowToExtendRally"
< Rally
(Deploy engine skeleton) |
m (→Add Deploy engines) |
||
Line 25: | Line 25: | ||
return { | return { | ||
'identity': { | 'identity': { | ||
− | 'url': 'http://$IDENTITY_HOST/' | + | 'url': 'http://$IDENTITY_HOST/', |
− | 'uri': 'http://$IDENTITY_HOST:5000/v2.0/' | + | 'uri': 'http://$IDENTITY_HOST:5000/v2.0/', |
'admin_username': '$ADMIN', | 'admin_username': '$ADMIN', | ||
'admin_password': '$PASSWORD', | 'admin_password': '$PASSWORD', | ||
Line 35: | Line 35: | ||
''# Cleanup the deployment here, e.g.'' | ''# Cleanup the deployment here, e.g.'' | ||
self._vm_provider.destroy_vms() | self._vm_provider.destroy_vms() | ||
− | |||
==Add Server providers== | ==Add Server providers== |
Revision as of 08:28, 15 October 2013
Contents
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.