Dynamic Deployment

Dynamic deployment means how specific provision configurations are chosen.

In a business where you have multiple integrations, servers or provision providers -- how do you define which one a client service is deployed to? If a client places a new order, which provision configuration is chosen and what data is passed to that provision provider?

  • How does a new web hosting order get deployed to Server X rather than Server Y
  • How does a domain get registered through registrar A rather than registrar B

In this guide we will explain how dynamic deployment works. We will use Coffee Shop as an example, and then explain how you might use dynamic deployment in a web hosting environment.

Basic static implementation

In the most simple implementation, you may create a direct "static" mapping of a product to a provision provider. I.e. if you sell Basekit, then you are more than likely to just have one Basekit implementation. If you only interfaced with one domain provider, then you could just map statically to that domain provider.

Imagine that our coffee shop has one coffee machine. Any coffee that is ordered would just statically map to that coffee machine. We may define in the provision configuration a mapping of the product option to a function on the coffee machine (e.g. Make a Latte vs Make an Espresso). But we do not need to dynamically select between coffee machines.

Dynamic deployment

Now let us say we have two coffee machines. We add them to our system as Coffee Machine A and Coffee Machine B. We want Coffee Machine A to make Lattes and Coffee Machine B to make Espressos.

What dynamic deployment allows us to do is to send requests to specific provision providers based on order values.

We do this by

  1. Setting up configuration attributes on the provision configurations (the web servers, domain providers, coffee machines etc)
  2. We then map order values to configuration attributes under the dynamic deployment settings under a product.

Setting up configuration attributes

On provision providers where dynamic deployment is relevant, we give you the option to create configuration attributes. For example, our standard cPanel shared hosting provider lets you define a location, or a hosting provider. We also add a field called 'Accepting New Accounts'.

The coffee machine equivalent would be 'What type of coffee can be made?'

These are set independently per provision provider. So one cPanel server might have a location of London, and another might have a location of New York. Coffee Machine A may be set as Lattes, Cappucinos and Flat Whites, whereas the other for Americano and Espresso.

Configuration Dynamic Deployment

Once this is set on the provision configuration it is then very easy to set up the attributes on a product.

What your define on a product is which configuration attribute an order needs to match in order to deploy to that server.

2200

An example cPanel hosting dynamic deployment setup

In the screenshot above, you can see that when choosing a web server, the setting on that web server 'Accepting New Accounts' must be set to true.

1420

If the product option 'London, UK' is selected, then the order will be deployed to a provision configuration with the location 'London, UK' specified.