Create environments

3 minute readReferenceAutomation

Environments are logical grouping of machines to which various applications can be mapped and deployed. Using environments and templates, you can model the infrastructure and the middleware available for various applications. Environments consist of logical groups of resources with a similar function or role called environment tiers. An environment tier can be a group of machines with a similar function or role, such all the web servers or application servers or database servers for an environment. Resources are actual target end point machines (such as physical servers), virtual machines, or mobile devices.

Environments can be static, dynamic, or hybrid. A static environment has resources that are already provisioned and managed at the platform level. Each resource has its own logical name to identify it from the other resources in the system. It also can be assigned to one or more resource pools or to a zone (a collection of agents). Several resources can correspond to the same physical host or agent machine. Resources can also be configured as standard or proxy.

  • Standard resources are machines running the CloudBees CD/RO agent on a supported agent platform while

  • Proxy resources (agents and targets) are on remote platforms or hosts that exist in your environment and requires SSH keys for authentication. The CloudBees CD/RO agent does not need to run on the remote platform or host.

Refer to Create and manage resources for more information about how to create, configure, and manage resources.

This example shows to how model a static environment to which the application will be deployed. For information about dynamic environments and how to model them, see Deploying Applications in Dynamic Environments.

Creating an environment

To create an environment:

  1. Select Deployment Automation  Environments.

  2. Select New + to add an environment. The New Environment dialog appears.

  3. Select Create New or From traditional application…​ based on your requirements. If you selected From traditional application choose an application from the list.

  4. Enter a name into the Name field.

  5. Select a project for the new environment and enter a description of the environment.

    You can include hyperlinks as part of an object description for any CloudBees CD/RO object.
  6. Select OK.

    The Environment Editor opens.

    application editor start new environment

From here, you can create a tier with resources or a cluster with nodes.

Creating an environment tier

Environment tiers are used with traditional applications.

  1. Define Tier 1:

    1. Select Details from the vertical dots menu.

    2. On the Details tab, enter the name and optional description.

    3. On the Capabilities tab, optionally define a capability.

    4. Select OK.

  2. Assign resources it:

    1. Select + in Resources block.

    2. In the New dialog box, click Add resources or Add resource pool. The Resources list or Resource Pools list, respectively, displays.

    3. Select one or more enabled resources or resource pools for this environment and then click OK.

The Environment editor now has an environment tier called mysql with one resource. Example:

Environment tier with one resource
Figure 1. mysql environment tier

Creating an environment cluster

Environment clusters are used with microservice applications.

Before creating an environment cluster, you must create a cluster configuration, which is a CloudBees CD/RO object to hold common values, predefined parameter sets, and credentials for your cluster. Creating a cluster configuration leverages the CloudBees CD/RO EC-Helm plugin. You must create one configuration for each cluster in your deployment. For more information, refer to Create Helm plugin configurations.
  1. Select + at the bottom of Cluster 1. The Cluster Definition dialog appears.

  2. Select a platform. For a microservice application, select Kubernetes (via Helm).

  3. Enter the cluster attributes as needed. The following table describes the available attributes:

    Label Definition

    Configuration Name

    The name of the previously defined configuration for the cluster.

    Namespace

    The name of the Kubernetes namespace. If not supplied, the default namespace is used.

    Kubeconfig context

    The name of the context to be used for this cluster deployment. If not specified, the one defined by the current-context inside kubeconfig file is used.

  4. Select OK when finished.

  5. Link a utility resource to the cluster. This defines the static environment to which the cluster is deployed.

    1. Select the New Utility Resource button (with wrench and hammer) in the upper right. The New dialog appears.

    2. Select Add resources or Add resource pool. The Resources list or Resource Pools list, respectively, displays.

    3. Select one or more enabled resources or resource pools for this environment and then select OK.

      The new Utility Resource tile now appears in the editor field.