Jump to: navigation, search

Difference between revisions of "Rally/ServerProviders"

m (Clone VM from pre-built template using virsh)
(Fixed renamings and new config formats)
 
(2 intermediate revisions by one other user not shown)
Line 13: Line 13:
 
=Available Server providers=
 
=Available Server providers=
  
==DummyProvider==
+
==ExistingServers==
  
 
===Description===
 
===Description===
Line 19: Line 19:
 
===Configuration Example===
 
===Configuration Example===
 
     {
 
     {
         "name": "ExampleEngine",
+
         "type": "DevstackEngine",
 
         "provider": {
 
         "provider": {
             "name": "DummyProvider",
+
             "type": "ExistingServers",
             "credentials": [{"user": "root", "host": "host1.net"}, {"user": "root", "host": "host2.net"}]
+
             "credentials": [{"user": "root", "host": "10.2.0.8"}]
 
         }
 
         }
 
     }
 
     }
Line 31: Line 31:
 
This provider creates virtual machines on host provided by configuration.
 
This provider creates virtual machines on host provided by configuration.
 
===Configuration Examples===
 
===Configuration Examples===
====Clone VM from pre-built template using virsh====
+
Clone VM from pre-built template using virsh
 
       {
 
       {
             "name": "VirshProvider",
+
             "type": "VirshProvider",
 
             "connection": "user@host.net",   
 
             "connection": "user@host.net",   
 
             "template_name": "stack-01-devstack-template",  
 
             "template_name": "stack-01-devstack-template",  
Line 49: Line 49:
  
 
     {
 
     {
             "name": "LxcProvider",
+
             "type": "LxcProvider",
 
             "containers_per_host": 1,
 
             "containers_per_host": 1,
 
             "distribution": "ubuntu",
 
             "distribution": "ubuntu",
Line 55: Line 55:
 
             "ipv4_prefixlen": 16,
 
             "ipv4_prefixlen": 16,
 
             "host_provider": {
 
             "host_provider": {
                 "name": "DummyProvider",
+
                 "type": "DummyProvider",
 
                 "credentials": [{"user": "root", "host": "192.168.1.42"}]
 
                 "credentials": [{"user": "root", "host": "192.168.1.42"}]
 
             }
 
             }
 +
    }
 +
 +
==OpenStackProvider==
 +
 +
===Description===
 +
Provides VMs using existing OpenStack cloud.
 +
 +
===Configuration Example===
 +
 +
    {
 +
        "type": "OpenStackProvider",
 +
        "deployment_name": "Rally sample deployment",
 +
        "amount": 3,
 +
        "user": "admin",
 +
        "tenant": "admin",
 +
        "password": "secret",
 +
        "auth_url": "http://example.net:5000/v2.0",
 +
        "flavor_id": 2,
 +
        "image": {
 +
            "checksum": "75846dd06e9fcfd2b184aba7fa2b2a8d",
 +
            "url": "http://example.com/disk1.img",
 +
            "name": "Ubuntu Precise(added by rally)",
 +
            "format": "qcow2",
 +
            "userdata": "#cloud-config\r\n disable_root: false\r\n manage_etc_hosts: true\r\n"
 +
        }
 
     }
 
     }

Latest revision as of 10:11, 19 May 2014

Server providers: Introduction

Server providers in Rally are typically used by deploy engines to manage virtual machines necessary for OpenStack deployment and its following benchmarking. The key feature of server providers is that they provide a unified interface for interacting with different virtualization technologies (LXS, Virsh etc.) and cloud suppliers (like Amazon).

Every server provider should implement the following basic interface:

  • constructor, which should take the deployment entity the provider should bind to and a config dictionary as its parameters;
  • create_servers(image_uuid, type_id, amount), which should create the requested number of virtual machines of the given type using a specific image. The method should also return the list of created servers wrapped in special Server entities.
  • destroy_servers(), which should destroy all virtual machines previously created by the same server provider.


Below you will find a short but informative description of server providers implemented in Rally.

Available Server providers

ExistingServers

Description

This provider does nothing, but returns endpoints from configuration. This may be useful if you have specific software/hardware configuration ready to deploy OpenStack.

Configuration Example

   {
       "type": "DevstackEngine",
       "provider": {
           "type": "ExistingServers",
           "credentials": [{"user": "root", "host": "10.2.0.8"}]
       }
   }

VirshProvider

Description

This provider creates virtual machines on host provided by configuration.

Configuration Examples

Clone VM from pre-built template using virsh

      {
           "type": "VirshProvider",
           "connection": "user@host.net",  
           "template_name": "stack-01-devstack-template", 
           "template_user": "ubuntu",  
           "template_password": "password" 
       }

LxcProvider

Description

This provider creates lxc containers on host provided by another provider. Container is attached to the same network as host.

Works well with ubuntu-13.10 hosts.

Configuration Example

   {
           "type": "LxcProvider",
           "containers_per_host": 1,
           "distribution": "ubuntu",
           "ipv4_start_address": "192.168.1.43",
           "ipv4_prefixlen": 16,
           "host_provider": {
               "type": "DummyProvider",
               "credentials": [{"user": "root", "host": "192.168.1.42"}]
           }
   }

OpenStackProvider

Description

Provides VMs using existing OpenStack cloud.

Configuration Example

   {
       "type": "OpenStackProvider",
       "deployment_name": "Rally sample deployment",
       "amount": 3,
       "user": "admin",
       "tenant": "admin",
       "password": "secret",
       "auth_url": "http://example.net:5000/v2.0",
       "flavor_id": 2,
       "image": {
           "checksum": "75846dd06e9fcfd2b184aba7fa2b2a8d",
           "url": "http://example.com/disk1.img",
           "name": "Ubuntu Precise(added by rally)",
           "format": "qcow2",
           "userdata": "#cloud-config\r\n disable_root: false\r\n manage_etc_hosts: true\r\n"
       }
   }