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 xref:model-app-dyna.adoc[Deploying Applications in Dynamic Environments] .

Creating Environment Tiers

In the Environments List:

  1. Click Add + to add an environment.

  2. The Environment dialog box appears.

  3. Enter A—Amazon ECS Production into the Name field.

  4. Select a project to which the new environment will belong in the field and enter a description of the environment.

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

    This dialog box lets you quickly define an environment tier and the resources in it or a service and the nodes in it.

  5. Click OK.

    The Environment Editor opens.

    application editor start new environ

  6. Click Tier 1.

  7. Define an environment tier and assign resources it.

    1. In the New dialog box, click Add resources.

    2. Click context menu tier , then click Details, then rename the environment tier to "mysql," and then click OK.

    3. To define the resource:

      Click + under the Resource.
      Click Add resources.
      Select the resource that you want to assign to the environment tier, and click. A resource is available if it is enabled.

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

Creating Environment Clusters

  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 example, Amazon EC2 Container Service.

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

    Description Default Configuration

    Name of an existing configuration which holds the connection information for Amazon ECS.

    Container Cluster Name

    Name of the cluster to be provisioned for in Amazon ECS.

    Description

    (Optional) Description of the cluster that needs to be provisioned.

    Desired Capacity

    Number of EC2 instances that should be running in the group.

    Maximum Size

    (Optional) Maximum size of the group.

    Minimum Size

    (Optional) Minimum size of the group.

    VPC Subnet Ids

    (Optional) Comma-separated list of subnet identifiers for your virtual private cloud (VPC) in which to launch the EC2 instances.

    Availability Zones

    Availability zones in which to launch your EC2 instances.

    Image

    ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.

    Instance Type

    Instance type of the EC2 instance.

    Security Groups

    One or more security groups with which to associate the instances.

    Key Name

    (Optional) Name of the key pair.

    Associate Public IP

    (Optional) Checkbox that specifies whether to associate a public IP address.

    Container Instance IAM Role

    ECS container instance IAM role for the launched container instances to use.

  4. Click OK.

  5. In the cluster that you just created, click > Details. The Environment Cluster dialog box appears:

  6. In the Environment Cluster dialog box, enter a cluster name into the Name field. For example, ecs-cluster1.

  7. Click OK.