=====================================
Generating custom Anaconda installers
=====================================

As an Data Science & AI Workbench Administrator, you can :ref:`create custom environments <create-environment>`. These environments include specific packages and their dependencies. You can then :ref:`create a custom installer<custom-installer>` for the environment, that can be shipped to HDFS and used in Spark jobs.

Custom installers enable IT and Hadoop administrators to maintain close control of a Hadoop cluster while also making these tools available to data scientists who need Python and R libraries. They provide an easy way to ship multiple custom Anaconda distributions to multiple Hadoop clusters.

--------------

.. _create-environment:

Creating an environment
=======================

#. Open the |circle-user| **My Account** dropdown menu and select *Admin Console*.
#. Select |laptop| **Environments** from the left-hand navigation. 
#. Click |plus| **Create**, give the environment a unique name, and then click **Save**.  

    .. note::
    
        Environment names can contain alphanumeric characters and underscores only.

#. Select the channel you want to choose packages from, then select the specific packages—and version of each—you want to include in the installer.
#. Click |save| **Save** to create the environment. Workbench resolves all the package dependencies and displays the environment in the list. 

    .. note:: 
        
        If there is an issue resolving the dependencies, you'll be notified and prompted to edit the environment.

You can now use the environment as a basis for creating additional versions of the environment or other environments. 

Editing an existing environment
-------------------------------

#. Click on an environment name to view details about the packages included in the environment, then click **Edit**. 
#. Change the channels and/or packages included in the environment, and enter a version number for the updated package before clicking **Save**. The new version is displayed in the list of environments.

.. _custom-installer:

Creating a custom installer for an environment
==============================================

Select the environment in the list, click |plus| **Create installer**, and then select the type of installer you want to create. Workbench creates the installer and displays it in the |zip-file| **Installers** list. 

.. note:: 

    * *If you created a management pack*: Install it on your Hortonworks HDP cluster and add it to your local Ambari server to make it available to users. For more information, see `this blog post about generating custom management packs <https://www.anaconda.com/blog/developer-blog/self-service-open-data-science-custom-anaconda-management-packs-hortonworks-hdp/>`_.

    * *If you created a parcel*: Install it on your CDP cluster to make it `available to users <https://docs.cloudera.com/cdp-private-cloud-base/7.1.7/installation/topics/cdpdc-using-local-parcel-repository.html>`_, or directly download the parcel onto your CDP cluster `as described here <https://enterprise-docs.anaconda.com/en/latest/data-science-workflows/installers.html>`_.

Use the icons at the top of the page to manage your environment. You can edit, duplicate, delete, and view logs and resolved packages for the selected environment. 

.. thumbnail:: ../images/environment_mgmt_icons.png
    :align: center


.. |circle-user| raw:: html
   
   <svg height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 496c-54 0-103.9-17.9-144-48v0c0-61.9 50.1-112 112-112h64c61.9 0 112 50.1 112 112v0c5.3-4 10.4-8.2 15.4-12.6C409.1 370.6 354.5 320 288 320H224c-66.5 0-121.1 50.6-127.4 115.4C47.2 391.5 16 327.4 16 256C16 123.5 123.5 16 256 16s240 107.5 240 240s-107.5 240-240 240zm0 16A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm80-304a80 80 0 1 0 -160 0 80 80 0 1 0 160 0zm-80-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"/></svg>

.. |save| raw:: html

    <i class="fa-regular fa-floppy-disk"></i>

.. |zip-file| raw:: html

    <svg height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M352 448V192H240c-26.5 0-48-21.5-48-48V32H64C46.3 32 32 46.3 32 64V448c0 17.7 14.3 32 32 32H320c17.7 0 32-14.3 32-32zm-.5-288c-.7-2.8-2.1-5.4-4.2-7.4L231.4 36.7c-2.1-2.1-4.6-3.5-7.4-4.2V144c0 8.8 7.2 16 16 16H351.5zM0 64C0 28.7 28.7 0 64 0H220.1c12.7 0 24.9 5.1 33.9 14.1L369.9 129.9c9 9 14.1 21.2 14.1 33.9V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64zM64 80c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H80c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H80c-8.8 0-16-7.2-16-16zm0 64c0-8.8 7.2-16 16-16h64c8.8 0 16 7.2 16 16s-7.2 16-16 16H80c-8.8 0-16-7.2-16-16zm32 48h32c7.1 0 13.4 4.7 15.4 11.6L158 318.9c1.3 4.6 2 9.3 2 14V336c0 26.5-21.5 48-48 48s-48-21.5-48-48v-3.1c0-4.7 .7-9.5 2-14l14.7-51.3c2-6.9 8.2-11.6 15.4-11.6zm.7 71.7c-.5 1.7-.7 3.5-.7 5.2V336c0 8.8 7.2 16 16 16s16-7.2 16-16v-3.1c0-1.8-.2-3.5-.7-5.2L115.9 288h-7.9L96.7 327.7z"/></svg>

.. |laptop| raw:: html

    <svg height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M512 80H128c-8.8 0-16 7.2-16 16V320H64V96c0-35.3 28.7-64 64-64H512c35.3 0 64 28.7 64 64V320H528V96c0-8.8-7.2-16-16-16zM96 432H544c20.9 0 38.7-13.4 45.3-32H50.7c6.6 18.6 24.4 32 45.3 32zM0 384c0-17.7 14.3-32 32-32H608c17.7 0 32 14.3 32 32c0 53-43 96-96 96H96c-53 0-96-43-96-96z"/></svg>

.. |plus| raw:: html

    <i class="fa-light fa-plus"></i>

.. |ellipsis-vertical| raw:: html

   <svg class="inline" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><path d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/></svg>