Provisioning

From DreamFactory
Jump to: navigation, search
m
m (Provisioners)
Line 10: Line 10:
 
To enable this provisioner, a section is added to the `config/provisioners.php` configuration file as shown below. This example stanza lives within the `provisioners.hosts` config array.  
 
To enable this provisioner, a section is added to the `config/provisioners.php` configuration file as shown below. This example stanza lives within the `provisioners.hosts` config array.  
  
<code lang="php">
+
<pre lang="php">
 
     'dreamfactory' => [
 
     'dreamfactory' => [
 
         'provides'    => [
 
         'provides'    => [
Line 20: Line 20:
 
         'resource-uri' => '/api/v2/system/',
 
         'resource-uri' => '/api/v2/system/',
 
     ],
 
     ],
</code>
+
</pre>
  
 
The top level is the mnemonic name of the provisioner, **dreamfactory** in this case. This may contain the following elements:
 
The top level is the mnemonic name of the provisioner, **dreamfactory** in this case. This may contain the following elements:
Line 27: Line 27:
 
  * `offerings`: an array of options that are provided to the end-user during provisioning. These can be versions or other feature selections offered by the guest location and/or instance.
 
  * `offerings`: an array of options that are provided to the end-user during provisioning. These can be versions or other feature selections offered by the guest location and/or instance.
 
  * `resource-uri`: an endpoint at the provisioned instance where the console can communicate with it.
 
  * `resource-uri`: an endpoint at the provisioned instance where the console can communicate with it.
+
 
 
== ProvisionManager ==
 
== ProvisionManager ==
 
The **ProvisionManager**, and its **Provision** *facade*, resolve and oversee all provisioning requests.
 
The **ProvisionManager**, and its **Provision** *facade*, resolve and oversee all provisioning requests.
  
 
[[file:provisioning-manager.png]]
 
[[file:provisioning-manager.png]]

Revision as of 15:39, 15 September 2015

Provisioners

In the DFE world, a *provisioner* represents a contract to manage virtual instances in a specific manner. This is physically represented in code by classes that adhere to one or more pre-defined *interfaces*. Below is the class/UML diagram of the **DreamFactory** provisioner.

Dfe-software-provisioning.png

Each provisioner is comprised of one or more *sub-provisioners* which each provide a slice of the provisioning process. This is my no means necessary, and provisioning may be completed by a single service. For flexibility and future expansion, the provisioning system is driven completely by configuration and discovery.

The default **DreamFactory** provisioner is installed via composer using the `dreamfactory/dfe-dreamfactory-provisioner` package. This package consists of a service which adheres to the provisioning contracts stated above, and can be used to create and manage instances. It consists of three sub-provisioners. These are the *instance*, *storage*, and *database*.

To enable this provisioner, a section is added to the `config/provisioners.php` configuration file as shown below. This example stanza lives within the `provisioners.hosts` config array.

    'dreamfactory' => [
        'provides'     => [
            PortableTypes::INSTANCE => DreamFactory\Enterprise\Provisioners\DreamFactory\InstanceProvisioner::class,
            PortableTypes::STORAGE  => DreamFactory\Enterprise\Provisioners\DreamFactory\StorageProvisioner::class,
            PortableTypes::DATABASE => DreamFactory\Enterprise\Provisioners\DreamFactory\DatabaseProvisioner::class,
        ],
        'offerings'    => [],
        'resource-uri' => '/api/v2/system/',
    ],

The top level is the mnemonic name of the provisioner, **dreamfactory** in this case. This may contain the following elements:

* `provides`: an array of sub-provisioners that make up the entire provisioner. The **dreamfactory** provisioner consists of three sub-provisioners: instance, storage, and database. 
* `offerings`: an array of options that are provided to the end-user during provisioning. These can be versions or other feature selections offered by the guest location and/or instance.
* `resource-uri`: an endpoint at the provisioned instance where the console can communicate with it.

ProvisionManager

The **ProvisionManager**, and its **Provision** *facade*, resolve and oversee all provisioning requests.

Provisioning-manager.png