This topic explains how to create new environments for Apigee hybrid. For an introduction, see About environments and environment groups.
About environment creation
Environment creation is a two-step process:
- Create an environment in the management plane using either the UI or an Apigee API.
- Add configuration for that environment to your overrides file and apply it to the cluster.
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 create an environment
- Create one or more new environments in the Apigee UI or with the Create environments API. For the basic steps, see Step 5: Add an environment.
-
Add a new environment definition to the
envs[]
property in your overrides file. Note that the property is an array; therefore, you can add more than one environment definition to it. Give the new environment the same name as the environment 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 serviceAccountPaths: synchronizer: "your_keypath/synchronizer-manager-service-account.json udca: "your_keypath/analytic-agent-service-account.json - name: prod serviceAccountPaths: synchronizer: "your_keypath/synchronizer-manager-service-account.json udca: "your_keypath/analytic-agent-service-account.json ...
- Apply any changes to the cluster. Apply the changes to each environment in sequence.
helm upgrade ENV_RELEASE_NAME apigee-env/ \ --install \ --namespace APIGEE_NAMESPACE \ --set env=ENV_NAME \ -f OVERRIDES_FILE \ --dry-run=server
ENV_RELEASE_NAME is a name used track installation and upgrades of the
apigee-env
chart. Helm release names must be unique within your Apigee hybrid installation. If you environment name is unique, this can be the same asENV_NAME
. However, if you have the same name for your environment and environment group, make sure to enter a unique Helm release name for each. For example, if both are nameddev
you could use something likedev-env-release
anddev-envgroup-release
.For more information on releases in Helm, see Three big concepts in the Helm documentation.
The
test
environment:helm upgrade test-release apigee-env/ \ --namespace apigee \ --atomic \ --set env=test \ -f OVERRIDES_FILE.yaml
The
prod
environment:helm upgrade prod-release apigee-env/ \ --namespace apigee \ --set env=prod \ --atomic \ -f OVERRIDES_FILE.yaml
For more information about virtual host configuration see Configure virtual hosts. For a complete list of environment configuration elements, see envs in the Configuration property reference.