Adding Agent Nodes

Adding agent nodes to an existing DC/OS cluster

Agent nodes are designated as public or private during installation. By default, they are designated as private during the GUI or CLI installation.

Prerequisites:

  • DC/OS™ installed using the custom installation method
  • The archived DC/OS installer file (dcos-install.tar) from your installation
  • Available agent nodes that satisfy the system requirements
  • The CLI JSON processor jq
  • SSH installed and configured. This is required to access nodes in the DC/OS cluster.

Install DC/OS agent nodes

Copy the archived DC/OS installer file (dcos-install.tar) to the agent node. This archive is created during the GUI or CLI installation.

  1. Copy the files to your agent node. For example, you can use Secure Copy (scp) to copy dcos-install.tar to your home directory:

    scp ~/dcos-install.tar $username@$node-ip:~/dcos-install.tar
    
  2. SSH to the machine:

    ssh $USER@$AGENT
    
  3. Create a directory for the installer files:

    sudo mkdir -p /opt/dcos_install_tmp
    
  4. Unpackage the dcos-install.tar file:

    sudo tar xf dcos-install.tar -C /opt/dcos_install_tmp
    
  5. Run this command to install DC/OS on your agent nodes. You must designate your agent nodes as public or private.

    Private agent nodes:

    sudo bash /opt/dcos_install_tmp/dcos_install.sh slave
    

    Public agent nodes:

    sudo bash /opt/dcos_install_tmp/dcos_install.sh slave_public
    

Verify node type

You can verify the node type by running these commands from the DC/OS CLI.

  • Run the following command to count the private agents.

    dcos node --json | jq --raw-output '.[] | select(.reserved_resources.slave_public == null) | .id' | wc -l
    
  • Run the followingn command to count the public agents.

    dcos node --json | jq --raw-output '.[] | select(.reserved_resources.slave_public != null) | .id' | wc -l