Working with the Staging Environment

The staging environment provides a safe, isolated sandbox environment to test changes to your Instart production configuration. Changes can then be promoted to production, and in the event of any issues, can easily be rolled back.

Note

If you have a QA testing environment with its own unique and publicly-published DNS address, the current release of the staging environment does not support using this.

With the staging environment you can

  • copy configurations from a production property to the staging environment as its initial setup
  • test changes to a configuration before pushing them to production
  • deploy configuration changes from staging to the corresponding production property

Note

The staging environment is best suited for light test traffic to verify the changes of a configuration change. If you need to test your staging environment for heavier, production scale traffic, please contact Support.

A user can create a staging property and modify its configuration. You must have admin privileges to deploy a staging configuration to production.

Note

  • Synching from production to staging includes Lua scripts, WAF rules, or SSL certificates, but we do NOT support synching these dependencies back to production. If you want to change any Lua scripts, WAF rules, or add or delete SSL certificates in your staging environment, contact Support.
  • The staging environment does not support Security Rules or Network Lists.

Using the staging environment

The overall basic workflow to use the staging environment to make and test configuration changes is:

  1. Copy the current production configuration to the staging environment.
  2. Set up test devices with a DNS override to the IP address of the staging environment.
  3. Make your configuration changes in the staging environment.
  4. Use your test devices to verify the effect of your changes; rinse and repeat.
  5. When ready, promote your configuration changes to the production environment.
  6. If necessary, roll back the configuration to a previous state.

The staging environment is reachable from the individual Property overview screens, the Performance & Delivery Rules screens, and the Cache Purge screen. It is accessed from the Staging tab on these screens.

Note that when you select the Staging tab, the background color of the Config navigation panel changes to green:

Copy the current production configuration to the staging environment

  1. With the desired property selected, click the Staging tab.
  2. Click View/Promote Diff.
  3. Click the Push Changes to Staging button.
  4. A message box appears; click Yes, push to staging to confirm.
  5. After a brief time, the View and Promote Diffs screen repaints with both boxes showing the same config, and the two push buttons below are grayed out.

At this point the two copies of the configuration are identical. While the staging environment is active, any changes you make to the configuration will only apply to the staging environment, unless you explicitly copy those changes to production.

Set up test devices with a DNS override to the IP address of the staging environment

To access the staging environment from browsers on the test devices you are using, you need to use a DNS override to observe the effect of your configuration changes – that is, any changes you make will affect only requests that you route through the staging environment by pointing your domain names appropriately. This is accomplished by editing the hosts file on any devices you are using for your testing.

Edit the hosts file on your browser test systems

First, you will need the IP address for the staging environment domains. To do so:

  1. In the Property overview screen, get the CNAME for one of your domains in the staging environment. These are displayed next to each domain under the CNAME column. 
  2. To get the IP address, open a command prompt/terminal window and type
    dig <CNAME of staging domain>
  3. Find the hosts file on your system.
    On Windows:
    The hosts file is in C:\Windows\System32\drivers\etc
    On Mac:
    The hosts file is in /etc
    You need to have administrative credentials to edit it.
  4. Add one line per domain to the hosts file on each browser test system, using the IP address for the staging environment that you got from the output of the dig command above.
    For example:
    #----- <Customer name> -----#
    <IP address> www.acme.com
    <IP address> images.acme.com

Browser testing

Clear the browser cache and flush DNS on Windows/Mac and you are ready to test. This will confirm a fresh view based on the local DNS. This has no effect on the public DNS.

To confirm that we are serving the contents for you, you can view the HTTP response header (using the browser tools like Firebug, IE headers, Charles Proxy, or Fiddler) to confirm that objects are being routed through Instart. You should see something like the following in the header:

#----- <Customer name> -----#
a001.example.inscname.net www.example.com
a002.example.inscname.net images.example.com
x-instart-cache-id: 5:6246235656887008991::1493892970
X-Instart-Request-ID:5343918169523053488:FWP01-NPPRY19:1422909593:21

Note

The x-instart-cache-id is only present for cached resources; uncached resources will only have the X-Instart-Request-ID.

When you have finished testing, remember to revert your changes in the test computer's hosts file!

Make your configuration changes in the staging environment

Once you have done set your test devices up with a DNS override, making changes in the staging environment is done just as you would in the production environment.

If you have the Performance & Delivery Rules builder (v2 configuration):

The Property Overview page has two sub-sections for either the production environment or the staging environment:

  • Domains lets you add to or modify the DNS addresses that Instart proxies for you.
  • Change History shows a list of all changes made to the configuration, with the ability to view a configuration file in detail, compare the current configuration with an earlier version, or roll back to an earlier version.

To add, edit or delete domains in the staging environment, use the Domains tab.

To make changes in how web performance optimizations and overall delivery settings are configured, use the Performance & Delivery Rules screen to add new rules or edit existing rules. See the document Configuring Performance & Delivery Rules in the Portal for details.

If you do not have the Performance & Delivery Rules builder (v1 configuration):

The Property Overview page has three sub-sections for both the production environment or the staging environment:

  • Domains lets you add to or modify the DNS addresses that Instart proxies for you.
  • Available Settings lets you modify how Instart delivers your web application, including controls for caching, basic IP blocking, and performance optimization features.
  • Change History shows a list of all changes made to the configuration, with the ability to view a configuration file in detail, compare the current configuration with an earlier version, or roll back to an earlier version.

To add, edit or delete domains to the staging environment, use the Domains tab. To make other changes, use the Available Settings tab:

You can click on any of the feature cards displayed to make the corresponding changes.

Use your test devices to verify the effect of changes

Use the browsers on the prepared test devices to view the effect of your changes. The DNS override described above tells the devices that requests for the usual domains of your site are routed to the staging environment. Without this, you would only see the production environment, where the changes you are testing do not yet exist.

Promote configuration changes to the production environment

Once you have tested your changes and are ready to promote them to production, click View/Promote Diffs. A pane opens that shows the production and staging configurations side by side. Differences between them is indicated with highlighting, with the number of differences displayed at the top:

Click Push Changes to Production (green) to update the production configuration.

A message asks you to verify you are sure you want to copy the staging config. You can accept and push the changes, or Cancel.

If you don't want to keep some of those changes, you can edit them. Or, if you want to reset the staging environment back to the current state of the production configuration, click Push Changes to Staging (blue). This restores the production configuration to the staging environment, overwriting any changes you made.

Viewing configuration change history

As in the production environment, you can view the changes that have been made to your staging configuration over time. You can track the version, date, a description, and who made each change. You can also view any individual configuration, and compare any two configurations with a diff display.

To view changes made to your staging configuration through the portal, click View Change History from the Domains tab:

To download a copy of the change history, click Export Change History (CSV).

To view a previous version of the configuration file, check the Select box of the version you want to view and click View Configuration.

To compare the current configuration against a previous one, check the Select box of the item you want to compare and click Compare Configurations. Additions are highlighted in green, deletions are highlighted in red: