Difference between revisions of "Rally/HowToExtendRally"
< Rally
m (→Add Deploy engines) |
m (→Add Deploy engines) |
||
Line 20: | Line 20: | ||
self._vms = self._vm_provider.create_vms() | self._vms = self._vm_provider.create_vms() | ||
for vm in self._vms: | for vm in self._vms: | ||
− | ''# Deploy OpenStack here'' | + | ''# Deploy OpenStack on each VM here'' |
''# Return the endpoints'' | ''# Return the endpoints'' | ||
return { | return { |
Revision as of 08:30, 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 on each VM 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.