Perform dark launch deployments

This topic describes how to perform “dark launch” deployments using XL Deploy. Dark launch is a go-live strategy in which code implementing new features is released to a subset of the production environment but is not visibly activated or is only partially activated. With this strategy, the code can be tested in a production setting without users being aware of it.

In XL Deploy, you can implement a dark launch deployment by:

  1. Adding parameterized feature switches to your code.
  2. Using dictionaries to toggle each switch based on the target environment.

Step 1 Parameterize your code

To parameterize your code, use placeholders in {{ placeholder }} format. XL Deploy can scan many types of artifacts for placeholders, such as ZIP, JAR, EAR, and WAR files. For more information, see Using placeholders in XL Deploy.

This is an example of web content with placeholders that will function as feature switches:

Sample DarkLaunch code

Tip: If required, you can configure XL Deploy to recognize different placeholder delimiters and scan additional types of artifacts for placeholders.

Step 2 Create a dictionary

In XL Deploy, dictionaries contain the values that will replace the placeholders that you use in your artifacts. Dictionaries are assigned to environments and are applied at deployment time, during the planning phase.

You can create as many dictionaries as you need and assign them to one or more environments. For more information, see Create a dictionary.

This is an example of a DarkLaunch dictionary that will be used in all environments.

  1. Create the dictionary:

Sample DarkLaunch dictionary

  1. Add entries that will allow you to toggle features:

Sample DarkLaunch dictionary

  1. Assign the dictionary to an environment:

Sample DarkLaunch dictionary

Redeploying a deployment package after a dictionary parameter has been changed only affects the components that use that parameter.

Step 3 Toggle feature switches

After a feature switch is in place, you can adjust the logic to toggle the dark launch of that feature by changing the value in the dictionary.

You can verify the components that will be affected by previewing the deployment plan before executing it.

Example with features toggled off

This is an example of a dictionary with two features toggled off:

Dark launch feature toggled off

Deploying the application with these dictionary values creates this output:

Dark launch feature toggled off

Example with a feature toggled on

To toggle one of the features on, update the dictionary entry:

Dark launch feature toggled on

Redeploying the application creates this output:

Dark launch feature toggled off