Provisioning your First Environment

This page includes the following:

Why Should I Read this Use Case?

This use case will help you learn how to provision an Environment with Docker.

What Will I Learn?

Before you Start...

Make sure that the following conditions are met before you start provisioning the environment:

   

The PCK.AUTOMIC_PROVISIONING Pack is installed.

Note: Download the packs from https://marketplace.automic.com/.

The appropriate provisioning provider Pack (for example PCK.AUTOMIC_PROVISIONING.AWS) is installed.

Follow the steps below to recursively delete agents registered via provisioning once the Environment is deprovisioned:

To Define a Recurring Execution for the Agent Remove Action

  1. In the Process Assembly, navigate to PACKAGES > PCK.AUTOMIC_PROVISIONING > ACTIONS > SYSTEM_INTEGRATION > AUTOMIC > PROVISIONING.
  2. Double-click the Agent Remove Action.
  3. Click the Variables & Prompts tab and select Prompt Sets.
  4. Populate the Input and Overwrite Promptset fields with connection strings for client 0.

    Notes:

    • Enter the Service Username in the following format: Client/User/Department. For example: 0/ABC/ADMIN.
    • Overwrite Agent: default agent = OS agent.
    • Overwrite Login: default login = AE login object.
  5. Save your changes.
  6. In the toolbar, click Execute and select the Execute Recurring option from the drop-down list.
  7. Define the execution frequency.

    Tip: Execute the Action at least once a day.

  8. Click Execute.

A new agent-client assignment object (HSTA) has been created in AE and is active.

Note: The agent installed while provisioning a new environment is auto-assigned to the current logged client in CDA.

If you want to use this agent on another client you can either assign it manually or predefine the HSTA object in client 0. For more information, see Assigning Clients to Agents .

The user provisioning the environment has been granted either:
  • Admin rights on CDA

    or

  • R, U, W, D and X rights on the folders where the entities (for example, deployment targets, environments) are created:

Prerequisites for Windows target boxes:

  • Supported platforms: Windows Server 2012 R2 and later.
  • VMware tools must be installed.
  • WMF 5.0 is installed. See: https://www.microsoft.com/en-us/download/details.aspx?id=50395.
  • Windows Remoting must be enabled as follows:

  • WinRM is configured as follows (Authentication - Basic, UseSSL = No):

    winrm/config/client/auth '@{Basic="true"}'

    winrm/config/client '@{AllowUnencrypted="true"}'

    winrm set winrm/config/client '@{TrustedHosts="<your-target-box>"}'.

    Example: winrm set winrm/config/client '@{TrustedHosts="box1,box2"}' or winrm set winrm/config/client '@{TrustedHosts="*"}'

    winrm/config/service/auth '@{Basic="true"}'

    winrm/config/service '@{AllowUnencrypted="true"}'

Agents running on Windows Server 2012: To avoid problems while executing actions (access denied), change the value of User Account Control: Run all administrators in Admin Approval Mode to Disabled in the Security Settings / Local Policies / Security Options section of the Local Security Policy application (secpol.msc). This ensures that the Windows Agent using the local Windows administrator account (although in the administrator group) can execute actions properly.

Prerequisites for UNIX target boxes:

  • Supported platforms: Linux 64bit, Ubuntu Server 16.04.1 LTS (= long-term support version of the Ubuntu server)
  • VMware tools must be installed.
  • An SSHD server is installed and its service port (for example, 22) is reachable from the ExecutingAgent.

    Note: Agents can be rolled out into docker containers too. In case you are building upon Linux-based containers, an SSH server must be built into your docker image. See: https://docs.docker.com/engine/examples/running_ssh_service/ for more information about how to set up an SSH server in a Linux-based docker container.

  • Service account:
    • A service account is set up on all servers that will own and run the Agent and Service Manager files (that is, automic). This will be used to SCP (secure copy) the files to the remote servers and to execute deployment-related commands remotely via SSH.
    • The service user has also been added to the sudoers list to perform the agent deployment-related commands.
  • On the target hosts where the agents should be deployed, the following ports are reachable from the AE-box:
    • 2300 - Agent port
    • 8871 - Service Manager port

Process Overview

The provisioning process consists of the following steps:

  1. Checking Folder Permissions and the Customer.config file
  2. Adding a Docker Stack Provider
  3. Creating Stack Templates
  4. Creating the Blueprint
  5. Provisioning the Environment
  6. Successful Provisioning Checklist &Troubleshooting

More Information:

Provisioning Environments.