Developer

Working with Multiple Environments

Introduction

Nimvio provides an option to create environments where you can take snapshots of your content. These snapshots can be from your production environment or other environments. By using non-production environments, you can modify the content template and content without any impact on what your customers see in the production environment.

The usage of environments in Nimvio

Environments in Nimvio are primarily designed for testing rather than content production. For instance, if you intend to modify a content model or make changes to multiple items programmatically, it is advisable to use a non-production environment to test the changes before implementing them in production.

Every Nimvio project includes a default environment called Production. It is essential to mark the environment as Production for content production and preview purposes, and it cannot be deleted while it's marked as such.

Create Environment

By creating an environment, you make a copy of an existing environment (e.g., Production) that you can use for testing and development purposes. Depending on your subscription plan, you can create multiple environments.

Step 1: Click + Create Environment 

To create a new environment, navigate to the project settings and select the "Environment" option from the sidebar. Then, click on the "+Create Environment" button.

Step 2: Give Name and Choose Source

When creating a new environment, you need to provide the Environment name and select the source environment that you want to copy. These are the required fields that need to be filled.

https://media.nimvio.com/Project_c1457a00-729a-456c-841b-5c10710e8a18/Media/Resources/Guide/Project%20Environment/Create%20Environment_published.png

Naming tips for new environments

To improve clarity, you may consider naming your non-production environments based on one of the following criteria:

  • Tasks such as JRA-256, CTC-1234
  • Releases such as Release 2021-11-24, Release 2022/02
  • Functionality such as QA, Staging, UAT

What happens when you create an environment?

The newly created environment will replicate all the content items, content templates,  media, and roles from the source environment. The users from the source environment will also be copied, and you can choose which users to activate by selecting their roles. 

Select an environment in Nimvio App

You can toggle between different environments within the current project using the secondary drop-down menu located at the top.

https://media.nimvio.com/Project_c1457a00-729a-456c-841b-5c10710e8a18/Media/Resources/Guide/Project%20Environment/Switch%20Environment_published.png

Environment Swap

Using environment swap, you have the ability to designate any non-production environment as your new production environment. After swapping an environment to the new production environment, its type in the environments list will change to "Production".

Before you swap

It is recommended to create a clone of your production environment to serve as a safe non-production space for testing changes. However, it is important to enforce a content freeze during this time to prevent any changes from being made in the production environment. Any changes made in production during this time will be lost. Once you have thoroughly tested the changes in the non-production environment, you can mark it as production and lift the content freeze to resume content creation.

What happens when you swap environments?

When you mark a non-production environment as production:

  • The environment names will remain the same, so be sure to rename both the new production environment and the old non-production environment to avoid confusion after the swap.
  • Content items, media, content templates, users, and roles will remain the same between the environments.
  • The environment ID and API keys will also remain the same for both environments, but you will need to update them in your app after the swap to ensure it uses the new production environment.
  • Users and their active status will be carried over from the original production environment, with active users in the original production becoming active in the new production environment and inactive users remaining inactive.
  • Users who only exist in the original production environment will not appear in the new production environment after the swap.

How to swap environments

To mark a non-production environment as the production environment, you need to click on the "Checkmark" that corresponds to the desired environment in the list of environments.

https://media.nimvio.com/Project_c1457a00-729a-456c-841b-5c10710e8a18/Media/Resources/Guide/Project%20Environment/Swap%20Environment_published.png

What's Next? 

Congratulations! You have finished guide on working with Nimvio environments. Keep exploring others below: