What are environments?
0% complete
Imagine having the power to test and develop your project without jeopardizing its live content – that’s where environments come into play in Kontent.ai. Acting as snapshots of a project’s content, developers can use environments to safely build new features, test modifications, and perform integrations in either production or non-production settings.
Flexible safeguards with environments
Environments not only provide a safeguard for your production environment but also grant you the flexibility to execute specific functions, such as seamless migration between different environments.Environments and their use
Environments are a tool for testing purposes, not for content production. For example, if you need to adjust the existing content model or programmatically modify hundreds of items, we recommend using a non-production environment to test the change before making it in production. By default, every Kontent.ai project comes with an environment called Production. You can rename this environment to anything you like, such as main or live. As long as the environment is marked as production, it cannot be deleted. For content production and preview purposes, use an environment marked as production.If you need to make changes to your content models, we recommend code-first content migration.
The purposes environments serve
You can have different environments for several dedicated purposes while keeping the production environment untouched. This kind of non-production environment is your sandbox.Experiment with changes in a safe space
Environments empower you to safely experiment with content types or restructure your content models without the risk of affecting the live production environment. This ensures that any modifications or additions can be thoroughly tested and reviewed before implementation. You can:- Modify and test all things content.
- Run content migration scripts on your content types and content items.
- Import data from other systems into your testing environment during development.
- Extend your content model and related content items while adjusting your app.
- Deploy modified content models to the potential production environment through migration.
- Create testing content in a non-production environment to check how your app handles edge cases.
Build new features in the development environment
A dedicated environment for development provides a workspace where you can:- Work on developing scripts for integration and migration.
- Perform rigorous testing.
- Validate content types and your overall content model.
Review in the staging environment
The staging environment can be dedicated to reviewing and testing content changes or new features before going live. This is the environment where you ensure everything developed and coded from the development environment is working before applying these changes to the live production environment.Go live using the production environment
The production environment is the live, public-facing version of your channels. This environment contains the finalized and approved content. It’s content that your customers and end users will interact with. Any approved changes in your content types or new features can be migrated to an environment marked as production. Only the production environment can be dedicated to content production and content preview.Continuous integration with environments
Let’s say you want to change how you use images in your project and move towards using assets in components. To do that, you need to create a content type for the components and migrate all the image assets to components of that type. As with all changes to the content model, it’s best to validate what you’re doing in a non-production environment first.- Create a non-production environment to have a safe space for testing.
- Write migration scripts to make the content model changes programmatically.
- Validate the scripts in the testing environment.
- If the scripts do what you want, create a new clone of your production environment for staging.
- Run the migration scripts on the staging environment.
- Migrate the changes to production by marking your staging environment as production.
What are environments not for?
Sign in with your Kontent.ai credentials or sign up for free to unlock the full lesson, track your progress, and access exclusive expert insights and tips!