Manage environments

A user can belong to multiple organizations and an organization can have one or more environments. This article explains what an environment is and how to use environments in Prepr.

Introduction

An environment is an isolated container for your project, for example for a website or an app. An environment contains the schema, content items, media files, personalizations and users. When you have multiple environments, it allows you to safely test your project without affecting your production-ready content. Let's look at how to do this in more detail.

Create an environment

If you haven't already done so, go to https://signup.prepr.io/ and sign up for a Prepr account. After you sign up, create an environment as follows:

  1. Click the Create environment button.

create environment

  1. Enter a meaningful Name for your environment. The URL will be generated automatically based on specified name.
  2. Select a Default locale for your project. Learn more about how to use locales in the Localization guide.
  3. Set the Development stage to either Development, Testing, Acceptance or Production according to your DTAP configuration.
  4. Click Create environment to confirm the settings.

environment details

Next, you’ll be prompted to load Prepr demo data or start from scratch.

  • Load demo data. If you’re exploring Prepr we recommend loading demo data. It includes examples for common use cases, like a blog and landing pages. Also, you'll get sample customer segments to try A/B testing and Personalization features in Prepr.

  • Start from scratch. If you’re setting up a Prepr environment with a specific project in mind, choose to start from scratch. This allows you to add models, components, and fields yourself.

Import demo data

Once you've made your choice, the environment is now ready for you to use. Check out the Users and Roles and permissions docs to manage additional users.

Set up a DTAP configuration

Many development teams use a DTAP (Development, Test, Acceptance and Production) configuration to manage their development, testing, acceptance and deployment to production. One of the first things that you need to decide before starting your project is your DTAP strategy. Your DTAP strategy will define how many environments you need to create.

1. Create your DTAP environments.

It's good practice to create one environment for each phase of your integration and deployment process as follows.

  • Development - used by developers to freely test their initial development without affecting production-ready content and systems.
  • Test - used by testers to test the web site or app without affecting production-ready content.
  • Acceptance - front-end users can QA the front-end in accordance with their requirements.
  • Production - used by content editors to manage content and media files and to set up personalizations.

2. Add your users.

Some basic user roles and permissions are available out of the box. If needed, set up additional user roles and add users for each environment. Check out the Users and Roles and permissions docs for more details.

3. Create a schema.

The production environment is used by content editors to maintain the content so this is where you create your schema first. Copy this schema to the other environments when needed for development and testing.

Check out the Sync schemas doc on how to synchronize the entire source schema.

If you only want to copy a couple of models and components, check out the Export/Import models and Export/Import components docs for more details.

4. Copy content.

Sometimes developers and testers need more realistic content to do their testing. In this case, you may want to copy the published content from one environment to another. You can do this yourself using the Mutation API or we can assist you if you need additional support to do this.

Environment setup for multiple brands

Prepr offers specific features to support multiple brands in an organization. We recommend that you create an environment per brand and manage your schema and content using the following features:

  • Shared schema
  • Shared content

Shared schema

Different brands often need different content, but it makes sense for an organization to keep the structure of all the content the same across their brands. In this case, it's useful to use the same schema across multiple environments. That's what we call a shared schema. This will also simplify and speed up development by enabling a leaner and more consistent code base.

To create a Shared schema do the following:

  1. Click the environment dropdown at the top right, choose your organization and click to open the environments overview.
  2. Click Shared schema to open the Schema Editor.

shared schema

Now you can create models and components that will be shared by multiple environments within your organization. Check out the Create schema docs for more details.

Shared content

Sometimes, different brands want to share content within the same organization. For example, each brand creates their own articles, but these articles belong to common categories. This can be done with shared content.

To enable sharing of specific content, enable the toggle Allow items from all environments when you add the Content reference field to a model.

shared content

Check out the Create schema docs for more details.

Manage Environment settings

You can update your environment settings anytime by navigating to Settings > General. Here, you can rename your environment, change its timezone, interface language, and development stage.

General environment settings

Please note you must be an owner, admin or have the Environment permission to access the environment settings. Read more about roles and permissions in Prepr.