=====================
Standard installation
=====================

Downloading the Adam installer
==============================

To download the installer, run one of the commands below on the
host machine where you want to manage the Anaconda platform:

.. code-block:: bash

    wget https://anaconda.org/anaconda-adam/adam-installer/4.4.0/download/adam-installer-4.4.0-Linux-x86_64.sh

Or:

.. code-block:: bash

    curl -LO https://anaconda.org/anaconda-adam/adam-installer/4.4.0/download/adam-installer-4.4.0-Linux-x86_64.sh

Installing Adam
===============

#. Run the installer, specifying the installation directory:

   .. code-block:: bash

      bash adam-installer-4.4.0-Linux-x86_64.sh -b -p ~/adam

   NOTE: Replace ``~/adam`` with the actual installation
   directory.

#. Add the ``adam`` command to your path by modifying the
   ``~/.bashrc`` file:

   .. code-block:: bash

      echo -e '\n# Anaconda Adam\nexport PATH=~/adam/bin:$PATH' >> ~/.bashrc

#. To activate the changes, source your ``~/.bashrc`` file:

   .. code-block:: bash

      source ~/.bashrc

Verifying the installation
==========================

To verify that the installation succeeded and to create
configuration files in ``~/.continuum/adam``,
run the ``adam`` command, which outputs the Adam help text:

.. code-block:: bash

    $ adam
    Usage: adam [OPTIONS] COMMAND [ARGS]...

    Options:
      --version                    Show the version and exit.
      -l, --log-level [info|debug|error]
                                   Logging level [default: debug]
      -h, --help                   Show this message and exit.

    Commands:
      cmd                   Execute a command on the nodes
      describe              Describe an Adam cluster or profile
      ec2                   EC2 options
      enterprise-notebooks  Anaconda Enterprise Notebooks options
      info                  Display Adam version, system, and
                              license information
      jupyter               Jupyter options
      kubernetes            Kubernetes options
      list                  List Adam clusters and profiles
      platform              Anaconda Platform options
      provision             Provision options
      remove                Remove a cluster
      repository            Anaconda Repository options
      salt                  Execute a Salt module
      scale                 Anaconda Scale options
      ssh                   SSH to one of the nodes (0-based
                              index)
      up                    Create a cluster from a profile


Installing your Anaconda Enterprise license file
================================================

Copy your Anaconda Enterprise license file to any of the
following directories:

* ``~/adam/licenses/``.
* ``~/.continuum/``.
* Any other directory shown by the command
  ``~/adam/bin/conda info --license``.

Adam searches all of these directories for license files named ``license*.txt``.

EXAMPLE: ``~/adam/licenses/license_bundle_20170428044737.txt``.


Defining a cluster profile
==========================

#. Switch to root user and create a file with this name and path
   ``~/.continuum/adam/profile.d/profile.yaml`` and the following
   contents:

   .. 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

      security:
        flush_iptables: false
        selinux_context: false
        selinux_permissive: false


#. Replace ``centos`` with an actual username. Verify that the
   username has sudo privileges.

#. Replace ``22`` with the appropriate
   :ref:`SSH port number <adam-default-network-ports>`.

#. Replace ``~/.ssh/my-private-key`` with the location of the
   private SSH key (key pair) to be used. Verify that you have
   SSH access to all of the cluster nodes.

#. Edit the IP addresses or hostnames of the nodes in the
   cluster. Each host must be able to connect to the other hosts
   using the specified FQDN or IP address.

   TIP: We recommend using the nodes' FQDN that matches the
   hostname on each machine.

   NOTE: The first node in the list of nodes is the head node.
   The remaining nodes are compute nodes.


By default, the ``anaconda`` user/group is created across the
cluster and owns the directory and files located in the root
installation directory. If desired, you can
:doc:`customize the cluster profile <../user-guide/tasks/profiles/customize-cluster-profile>`
to change these and other settings.


Creating a cluster
==================

To create a cluster, run::

	adam up -n [cluster-name] [profile-name]

EXAMPLE: To create a cluster named "cluster" from a cluster
profile named "profile":

.. code-block:: bash

    adam up -n cluster profile


.. _adam-plat-comp-install:

Installing platform components
==============================

After creating or :doc:`provisioning a cluster <../user-guide/tasks/clusters/provision-cluster>`,
you can install platform components by running::

    adam [platform-component] -n [cluster-name] install

EXAMPLE: To install Repository, Enterprise Notebooks, and Scale
on a cluster named "cluster":

.. code-block:: bash

   $ adam repository -n cluster install
   $ adam enterprise-notebooks -n cluster install
   $ adam scale -n cluster cluster install
   $ adam scale -n cluster dask install


.. _adam-plat-comp-open:

Opening a platform component
============================

To open a platform component's user interface in your browser,
run::

   $ adam [platform-component] -n [cluster-name] open

EXAMPLE: To open Repository and Enterprise Notebooks on a
cluster named "cluster":

.. code-block:: bash

   $ adam repository -n cluster open
   $ adam enterprise-notebooks -n cluster open

For more information see :doc:`../user-guide/tasks/work-with-platform-components`.
