Skip to main content

A Docker Management Server

How to install a Stack Automation Management Server on a VM

The Stack Automation management server (also referred to as an agent) can be hosted in various ways, one of them on a VM/EC2 with a docker host installed.

Requirements

  • VM (this guide will walk you through how to configure the management server on ubuntu, but you can use any distribution as long as it supports docker)
  • docker
  • docker-compose
  • wget
  • unzip

What if my VM is barebone?

Great question! Follow these steps to get your VM all set up.

  1. Install docker

    # Add Docker's official GPG key:
    sudo apt-get update
    sudo apt-get install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyringsdocker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc

    # Add the repository to Apt sources:
    echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
    $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt-get update

    # install docker and docker compose
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugindocker-compose-plugin
  2. Create an executable to use docker compose as docker-compose

    cat << 'EOF' | sudo tee /usr/local/bin/docker-compose
    #!/bin/bash
    docker compose "$@"
    EOF

    # make it executable
    sudo chmod +x /usr/local/bin/docker-compose
  3. Install wget and unzip

    sudo apt-get install wget unzip

Install the Stack Automation management server

To install the management server, log in to Stack Automation as a system administrator.

  1. Navigate to Resources → Management Servers.
  2. Click New Management Server in the top-right corner to open the Connect a Management Server wizard.
  3. In the Setup step, choose Cloud, then Public Cloud, then select the Docker tile, and click Next.
  4. In the Generate Agent step, enter a name for the management server and click Next.
  5. On the Installation Instructions step, click Download Zip to download the installation package.
  6. Copy the downloaded deployment.zip to your VM (for example with scp), then run:
    unzip deployment.zip
    cd deployment
    chmod +x deploy_torque_agent.sh
    ./deploy_torque_agent.sh
  7. Fill in the management server name and press Enter.
  8. This will initiate the installation process. After roughly a minute you'll be able to see the Connection Status change to Connected back in Stack Automation.
  9. Click Associate to Space, choose the desired spaces and you're done!