<%@ page isELIgnored="true" %> <%@ taglib uri="cms" prefix="cms" %> Environment Management

Environment Management

In AnthillPro, an environment is a partition grid of agents that is specific for different stages of a project life-cycle (QA, PROD, etc.). Environments may also be configured to a specific technology (Java, .NET, etc.).

Workflows within AnthillPro execute on a specified environment. This allows the definition of a single deployment workflow that can then be used to deploy the application to numerous environments.

For example, common environments are development (DEV), quality assurance (QA), and production (PROD). The DEV environment should include the set of AnthillPro agents that are specific to development. Once the DEV environment is created, it is added to an environment group (see Using Environment Groups) and then the AnthillPro Agents are added to the groups (see also Agent Settings).

AnthillPro has a default environment, the Build Farm, that contains all agents used in conjunction with originating workflows. Each build will be assigned to an agent in the Build Farm unless the project is configured to build in a specific environment. The Build Farm may also contain any other agent you choose (e.g., a deployment agent). In AnthillPro, the build farm is an implied environment and can't be deleted. Because there are no restrictions on how the Build-Farm is used, it may be used for deployments as well.

See also About AnthillPro Agents.

Environment Prerequisites

Configuring an Environment

AnthillPro environments are typically modeled after the different stages of the application life-cycle (or technologies) your organization uses.

  1. Go to Agents > Environment.

  2. Click Create Environment.

  3. Configure Environment:

    • Name the environment.

    • Short Name. Give the name to be used as a key in property files. For example, the "development" environment will be identified by the short name PROD in property files and on the Dashboard.

    • Description. Give an optional description of the environment.

  4. Click Save.

  5. Set Environment Property (optional). The property set here will be used unless it is overridden by other properties. It is also possible to set a property in the environment for specific projects.

    • Select the Add Property link in the Environment Properties header.

    • Secure. To make the property secure, check the box.

    • To add an additional property, select the Add Property link again.

    • Click Save.

  6. Select the environment's Security tab and click Edit.

  7. Check the Roles and permissions for this environment. See Define Roles and Using Permissions.

  8. Click Save then click Done twice.

Editing an Environment

Once created, the name, short name and/or description of an environment may be edited. Editing an environment will only effect future usage of the environment.

  1. Go to Agents > Environment.

  2. Select the environment to be edited from the Environment List.

  3. Click Edit on the Main tab.

  4. Edit the name, short name and/or description.

  5. To remove an agent from the environment, select the Remove from Environment icon under the Operations menu. If the tool tip says Remove from Environment (disabled) the agent may not be removed from the environment in this manner. To remove an agent from an environment, see Agent Settings.

  6. Click Save then Done.

  7. Click Done.

Removing an Environment

To remove an environment, ensure that it is not in use by any project. If the environment is in use, it must first be removed from every environment group that uses it. Removing an environment that is currently in use may require you to reconfigure other environment groups, projects, and workflows that depend on the environment.

  1. Go to Agents > Environment.

  2. If the Delete icon (under the Operations menu) of the environment to be removed is red, click the icon.

    If the Delete icon is gray, the environment must be removed from all environment groups it has been added to (see Using Environment Groups). Once the environment has been removed and the Delete icon is red, click the icon.

  3. Click OK in the dialog box.

  4. Click Done.

Modifying Agent Settings (Environments)

Once an agent has been configured (see Agent Configuration), you can access/edit its settings from the Environments page. Using the Operations icons, you can either change settings or remove an agent from any environment (in addition to performing the same actions on the Agents page).

  1. Go to Agents > Environment, and select an environment from the list.

  2. On the Environment page, find the agent you wish to modify/remove from this environment (you may have to scroll down).

  3. To remove the agent from this environment, select the Remove from Environment icon under the Operations menu.

    Note that removing an agent from an environment will effect all projects that participate within that environment. For example, if multiple projects are configured to use a particular agent (e.g., one on a Linux machine) and that agent is removed, the workflows will fail unless another suitable agent is configured within the environment.

  4. To edit an agent's settings, select the agent's Name or the View icon under the Operations menu.

    Note that changing agent settings will effect all projects that use the agent. For example, if multiple projects are configured to use a particular agent (e.g., one on a Linux machine) based on a property, and the property is modified, the workflows will fail unless another suitable agent is configured.

  5. After modifying agent settings, click Done to return to the Environment page.

Environment Security

User access to an environment is managed on the Security tab. Administrators can define what roles have access to read, write, or determine security for environments. You need administrative permissions to set environment security.

Using Environment Groups

Environment groups determine the set of environments that project workflows may be executed on. Each environment group must contain at least one environment, and is set at the Project level. For example, common environments are development (DEV), quality assurance (QA), and production (PROD). Once the environments for the stages of the life-cycle are created (see Environment Management), they are grouped together. AnthillPro will then use the environment group when determining which agent to send work to.

AnthillPro's Default Environment Group (the name may be different depending on what version of AnthillPro you use) contains all the default environments. Environments may be added to or deleted from this group.

Generally, different applications are likely to use different sets of machines for their build, deploy, test activity, and will likely use different environment groups. When you create a deployment workflow for instance, it is best practice to present the user with the environments that are actually relevant to the project (maybe 5 or 10) rather than all the ones in the system (potentially hundreds). Environment groups help a project administrator by restricting what other users can see. Environment groups may be formed per project, per team or per department depending on where hardware is shared. An environment may exist in multiple groups which would allow a shared build cluster to be in environment groups for projects that do not share test hardware.

Consider the following: An organization that develops software using two different technologies. The first is J2EE. Our hypothetical organization has a development, a QA, and a production J2EE environment, with each containing application servers configured to the corporate standard. The second technology used is C++, with development, QA, and production environments for all C++ projects. The C++ environments use different physical servers than the corresponding J2EE environments. In this scenario, J2EE projects and C++ projects are configured into two environment groups: one called 'J2EE Env Group', and the other called 'C++ Env Group'. The 'J2EE Env Group' contains the J2EE development, QA, and production environment groups, and the 'C++ Env Group' contains the C++ environment groups. With these environment groups, the organization derailed any confusion about what set of servers a J2EE or C++ project should be deployed to.

See also About AnthillPro Agents.

Environment Groups Prerequisites

Configuring an Environment Group

  1. Go to Agents > Environment Group.

  2. Click the Create Environment Group button.

  3. Configure environment group:

    • Name the environment group.

    • Description. Give an optional description of the environment.

    • Click Save.

  4. Click the Add an Environment button, select an environment from the drop-down menu. See Environment Management.

  5. Click Add Environment and then Save.

  6. Repeat Items 2 through 5 for every environment to be added to the group.

  7. Select the environment group's Security tab and click Edit.

  8. Check the Roles and permissions for this environment group. See Define Roles and Using Permissions.

  9. Click Save then click Done twice.

Editing an Environment Group

Once created, the name of, description of, and/or environments within an environment group may be edited. Editing an environment group will only effect future usage of the environment groups.

  1. Go to Agents > Environment Group.

  2. Select the environment group to be edited from the Environment Group List.

  3. Click Edit on the Main tab.

  4. Edit the name and/or description.

  5. To remove an environment from the group, select the Remove from Group icon under the Operations menu.

  6. Click OK in the dialog box.

  7. To edit security, see Configuring an Environment, Items 6 through 8.

  8. Click Done twice.

Removing an Environment Group

To remove an environment group, ensure that it is not in use by any project. If the environment group is in use, it must first be removed from any projects using it (listed under the Used in Projects menu). Removing an environment group that is currently in use may require you to reconfigure other environment groups, projects, and workflows that depend on the environment group.

  1. Go to Agents > Environment Group.

  2. If the Delete icon (under the Operations menu) of the environment group to be removed is red, click the icon.

    If the Delete icon is gray, the environment group must be removed from any project using it. Once the environment has been removed and the Delete icon is red, click the icon.

  3. Click OK in the dialog box.

  4. Click Done.