NOTE: Some aspects of this product are in Beta. The hybrid installation options are GA. To join the Beta program, reach out to your Apigee representative.

Understanding environments and environment groups

About environments and environment groups

An environment is a runtime execution context for the API proxies in an organization. You must deploy an API proxy to an environment before it can be accessed. You can deploy an API proxy to a single environment or to multiple environments.

An organization can contain multiple environments. For example, you might define a "dev", "test", and "prod" environment in an organization.

The organization provides scope for some Apigee capabilities. For example, key-value-map (KVM) data can be made available at the organization level, meaning that API proxies deployed to any environment within that organization get the same KVM data. Some capabilities can be scoped to environments or environment groups within the organization. Apigee analytics data is partitioned by a combination of organization, environment, and (eventually) environment group.

Shown below are the major entities you manage within an organization, including those defined globally in the organization, and those defined specifically to an environment:

You can manage your environments with the Apigee UI or the Environments API and the Environment Groups API. This section describes how to manage environments and environment groups in the UI.

Creating a new environment

After you create an environment, you must then add it to an environment group. Otherwise, it will not be targeted because hostnames are defined at the group level and not the environment level.

You can create up to 75 environments.

To create a new environment:

  1. Open Apigee UI in a browser.
  2. Select Admin > Environments > Overview in the left navigation menu.

    The UI displays a set of cards, each one representing an existing environment:

    Environment cards

    If this is your first time accessing this view in the UI, there will be no environments.

  3. Click +Environment in the upper right corner of the UI.

    The New environment dialog box displays:

  4. Enter the following information in the New Information dialog box:
    1. Display name: A friendly name for the environment that is used in the UI. For example, "My Test Environment".
    2. Environment name: The programmatic name for the environment. This value will be part of the request URL for your API proxies and should not contain any spaces or other special characters. It can only letters, numbers, and hyphens. For example, "test".
    3. Description (optional): Additional information about the environment that you want to add as a reminder.

    All fields except Description are required.

  5. Click OK.

    The card displays "Pending Provisioning" label while Apigee creates the new environment, as the following example shows:

    There can be a several minute delay before the new environment is provisioned.

  6. When it's done, the Apigee UI displays the new group in the Environment Groups list:

    Environment Groups list

  7. After you create a new environment, you must assign it to an environment group. Environments not assigned to groups have no hostnames pointing to them, and therefore they are not accessible. For more information, see Creating environment groups.

To edit the environment's display name or description, click the environment's card in the Environments list and click the pencil icon in the details view.

To delete an environment, click the environment card's 3-dot menu and select Delete. The environment's card in the UI displays a "Pending Deletion" label while Apigee deletes the environment. There can be a several minute delay before the deletion is complete.

Creating environment groups

To create a new environment group:

  1. In the Apigee UI, select Admin > Environments > Groups.
  2. Click +Environment Group:

    Add environment button

    The Add an Environment Group dialog displays.

  3. Enter a name for your new environment group:

    Add environment group

    The name can contain only lower case letters, numbers, and hyphens.

  4. Click the Add button.

    Apigee creates a new environment group. This is usually a very quick operation.

    On a successful operation, Apigee confirms that the group has been created with a banner that looks like the following:

    Group confirmation banner

By default, an environment group does not contain any environments. It does, however, define a default hostname: example.group_name. To add environments to an environment group, see Adding environments to an environment group.

Adding environments to an environment group

Environments that are not in a group cannot be accessed because there is no host name associated with them. This section describes how to add an unassigned environment to an environment group.

Environments can be in multiple environment groups.

To add an environment to an environment group:

  1. In the Apigee UI, select Admin > Environments > Groups.
  2. Look under Unassigned. This section lists the environments that are not part of an environment group:

    View unassigned environments

    Note which environments are unassigned as you want to assign them.
  3. Click the pencil icon next to the environment group that you want to add environments to.

    The Environment Group Details view displays:

    Group details view

  4. To add a new environment to this group, click + in the Environments list.

    The Add environment view displays:

    Add environment to group dialog

  5. Select the environment you want to add to the group and click Add. Apigee adds the environment to the group.

Adding hostnames to an environment group

When you create a group, Apigee adds the default hostname "example.group_name". You can add more host names to the group using the instructions in this section.

To add a hostname to an environment group:

  1. In the Apigee UI, select Admin > Environments > Groups.
  2. Hover over the group's card and select the pencil icon.

    The Environment Group Details view displays:

    Group details view

  3. In the Hostnames field, enter your new hosts.
  4. Click Save to add the new hosts to the group.