You now have a solid idea of Kontent.ai’s versatility in content management and what kind of environment you want to set up. Let’s dive in on how to create an environment. This lesson will walk you through how you can create, clone, and configure your environment.
Create a new environment
Creating an environment means you make a copy of a selected environment, such as Production.There are two ways you can create a new environment, either through cloning or creating a new environment from Project settings.When you decide to create a new environment, make sure to:
Select which users to active in the new environment based on their roles.
Name the new environment based on its purpose. Use an easily identifiable name such as Develop.
Identify your environment
After you create your new environment, you get a unique environment ID. The environment ID looks like this: 8d20758c-d74c-4f59-ae04-ee928c0816b. For example, you can use the environment ID to retrieve content via API.
Choose an environment to work with
You can switch between the environments in your Kontent.ai project using the second drop-down at the top.
What does the new environment contain?
Because the environment is cloned, all items, assets, types, snippets, taxonomies, collections, workflow, roles, and languages are transferred from the source environment. Additionally, the content items cloned with the environment will contain all their revisions, comments and suggestions, and tasks.Preview URLs and webhooks will be duplicated to the new environment. While preview URLs' state remains unchanged after cloning, webhooks are automatically set as disabled by default. This is to make sure that the newly created environment does not cause any interruptions to your production apps.
Tailor access levels for your new environment
In Kontent.ai, users can be assigned distinct roles and permissions within each environment. This ensures that individuals have appropriate access levels tailored to their responsibilities. For example, Developer roles can be assigned to non-production environments such as Develop.Project managers enjoy unrestricted access to all environments with all the associated content to oversee the entire project seamlessly.To maintain an optimal workflow, it’s crucial to restrict content creators to the production environment only. By doing so, content creators can focus solely on content production, minimizing the risk of any mistaken efforts made in the wrong environment, such as creating content meant to be published in a non-production environment. This practice safeguards content integrity and promotes efficient collaboration within the workflow.
What's next?
Swap environments
Now you have the know-how to create a new environment, and you’re confident about the purpose of your new environment. Once it’s time to turn the new environment into the new live version, it’s time for the big swap. Let’s take a good look at the necessary steps to ensure a smooth swapping process between your environments.
Naming tips for new environmentsFor better clarity, you might want to name 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, Develop
Should you clone your project or create environments?Although project cloning and environments work similarly, they serve different purposes.
Use environments to prepare changes in a safe space before going into production. Your developers then take care of propagating those changes to production.
Use project cloning to create new standalone projects for content creation. For example, if you want to run projects based on a similar content model but with slightly different content.