=========================================
Installing into an air gapped environment
=========================================

Currently, Adam can install the remote conda management
functionality in an :ref:`air gapped <adam-concepts-air-gap-definition>`
environment using artifacts from Repository. In future versions of Adam,
air gapped installations of all Anaconda platform components will be fully
supported.


#. :doc:`Install Repository <../../../anaconda-repository/index>`.

#. Configure Repository for the Adam installation on the nodes:

   #. Mirror the ``anaconda`` and ``anaconda-adam`` channels onto
      your local Repository.

   #. Copy the latest versions of the
      `Anaconda <http://repo.continuum.io/archive/>`_ and
      `Miniconda <http://repo.continuum.io/miniconda/>`_ installers
      to the ``/static/extras/`` folder on the Repository
      web server.

#. Switch to root user and create a cluster profile at
   ``~/.continuum/adam/profile.d/profile.yaml`` with 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

       plugins:
         conda:
           anaconda_hash: md5=d72add23bc937ccdfc7de4f47deff843
           anaconda_url: http://local.anaconda.repository.address:8080/static/extras/Anaconda2-4.4.0-Linux-x86_64.sh
           channel_alias: http://local.anaconda.repository.address:8080/conda/
           channels:
           - http://local.anaconda.repository.address:8080/conda/anaconda
           - http://local.anaconda.repository.address:8080/conda/anaconda-adam
           enabled: true
           miniconda_hash: md5=7097150146dd3b83c805223663ebffcc
           miniconda_url: http://local.anaconda.repository.address:8080/static/extras/Miniconda2-4.3.21-Linux-x86_64.sh
           rootdir: /opt/continuum
           ssl_verify: False

       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 (``keypair``) to be used. Verify that you have
   SSH access to all of the cluster nodes.

#. Edit the port and IP addresses or hostnames of the nodes in
   the cluster.

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

#. Replace the ``anaconda_hash`` value with the hash of your
   Anaconda installer.

#. Replace the ``miniconda_hash`` value with the hash of your
   Miniconda installer.

#. Replace ``local.anaconda.repository.address`` with the
   address of your Repository.
