Creating 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.

See Configuring Resources for more information about 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

In the Environments List:

  1. Select New + to add an environment. The Environment dialog box displays.

  2. Select CreateNew or From Application based on your requirements. If you selected From Application choose an application from the list presented to you. In either case, the New Environment dialog displays.

  3. Enter a name into the Name field.

  4. Select a project to which the new environment belongs and enter a description of the environment.

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

    The Environment Editor opens.

From here, you 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:

+

Creating an environment cluster

Environment clusters are used with microservice applications.

Cluster configurations

Before creating an environment cluster, you must have created 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. Create one configuration for each cluster in your deployment.

  1. Navigate to Administration Plugins and find EC-Helm from the list of plugins.

  2. Select Configure from the right side. The configuration list for EC-Helm displays.

  3. Select Create Configuration. See EC-Helm cluster configuration for complete information.

  1. Click + at the bottom of Cluster 1. The Cluster Definition dialog box appears:

  2. In the Cluster Definition dialog box, select a platform. For a microservice application choose Kubernetes (via Helm).

  3. Enter the cluster attributes as needed. The following table describes the available attributes. Select OK when finished.

    LabelDefinition

    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 be used.

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

    1. Select the new resource button (with wrench and hammer) in upper right. The New dialog opens.

    2. In the New dialog, 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 new Utility Resource tile now appears in the editor field.