Create environments

This topic explains how to create new environments. For an introduction, see About environments and environment groups.

How to add an environment

The steps for adding an environment are described in adding and configuring an environment are explained in Step 5: Add an environment and Specify configuration overrides.

How to add multiple environments

  1. Create a new environment in the Apigee UI or with the Create environments API. For the basic steps, see Step 5: Add an environment.
  2. Add a new environment definition to the envs array in your overrides file. Give the new environment the same name as the one you created in the UI. For example, the following configuration defines two environments: test and prod:

    namespace: my-namespace
    org: my-organization
    ...
    envs:
      - name: test
        sslCertPath: "your_certpath/ingress-cert.crt"
        sslKeyPath: "your_keypath/ingress-key.key"
        hostAlias: "apitest.example.com"
        serviceAccountPaths:
          synchronizer: "your_keypath/synchronizer-manager-service-account.json
          udca: "your_keypath/analytic-agent-service-account.json
      - name: prod
        sslCertPath: "your_certpath/ingress-cert.crt"
        sslKeyPath: "your_keypath/ingress-key.key"
        hostAlias: "apiprod.example.com"
        serviceAccountPaths:
          synchronizer: "your_keypath/synchronizer-manager-service-account.json
          udca: "your_keypath/analytic-agent-service-account.json
    ...

For a complete list of environment configuration elements, see envs in the Configuration property reference.

Host aliases with multiple environments

If you have multiple enviroments, each one can have its own host alias, or multiple enviromments can share the same host alias. For details, see About virtual hosts and environments and Environments can share the same host alias. If multiple environments share the same host alias, you must use the technique called base path routing to route proxy requests to the correct environment.

TLS keys and certificates

When you create a new environment, you must provide a TLS key and certificate to the environment configuration. The key/cert are used to provide secure communication with the ingress gateway.

It is up to you how you generate proper TLS certificate/key pairs for your hybrid configuration. The following topics are provided as samples only, intended primarily for trying out or testing a new hybrid installation if it isn't feasible to obtain TLS credentials in another way: