===================================
Adding nodes to an existing cluster
===================================

#. In the existing cluster profile, add ``host`` lines to
   specify the additional node(s).

   EXAMPLE: You have this existing cluster profile,
   ``~/.continuum/adam/profile.d/profile.yaml``:

   .. code-block:: yaml

       name: profile
       provider: bare

       bare:
         username: centos
         # password: password  # Optional
         port: 22
         keypair: ~/.ssh/my-private-key
         nodes:
         - host: node1.company.com
         - host: node2.company.com
         - host: node3.company.com
         - host: node4.company.com

   You want to add the following nodes:

   * node10.company.com
   * node11.company.com
   * node12.company.com

   Assuming these nodes use the same authentication mode as the
   existing nodes, add a ``host`` line for each node:

   .. code-block:: yaml

       name: profile
       provider: bare

       bare:
         username: centos
         # password: password  # Optional
         port: 22
         keypair: ~/.ssh/my-private-key
         nodes:
         - host: node1.company.com
         - host: node2.company.com
         - host: node3.company.com
         - host: node4.company.com
         - host: node10.company.com
         - host: node11.company.com
         - host: node12.company.com

#. Run the ``adam up`` command to provision the cluster.

   EXAMPLE: To use the profile named "profile" to provision
   the cluster named "cluster", run:

   .. code-block:: bash

       $ adam up -n cluster profile

   You are prompted to overwrite the cluster definition file
   located at ``~/.continuum/adam/cluster.d/cluster.yaml`` to
   include the newly defined nodes.

   During the provisioning process, Adam will install on the new nodes and will
   not reinstall on the previously defined nodes.
