Installation Runbook (AEN 4.0)
==============================

.. raw:: html

    <div class="section" id="overview">
    <h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
    <p>Anaconda Enterprise Notebooks (AEN) is a Python data analysis environment from
    Continuum Analytics. Accessed through a browser, Anaconda Enterprise
    Notebooks is a ready-to-use, powerful, fully-configured Python analytics
    environment.</p>
    <p>We believe that programmers, scientists, and analysts
    should spend their time analyzing data, not working to set up a system.
    Data should be shareable, and analysis should be repeatable.
    Reproducibility should extend beyond just code to include the runtime
    environment, configuration, and input data.</p>
    <p>Anaconda Enterprise Notebooks makes it easy to start your analysis
    immediately.</p>
    </div>
    <div class="section" id="audience">
    <h2>Audience<a class="headerlink" href="#audience" title="Permalink to this headline">¶</a></h2>
    <p>This runbook walks through the steps needed to install a basic Anaconda
    Enterprise Notebooks system comprised of the front-end server, gateway,
    and two compute machines. The runbook is designed for two audiences:
    those who have direct access to the internet for installation and those
    where such access is not available or restricted for security reasons.
    For these restricted a.k.a. &#8220;Air Gap&#8221; environments, Continuum ships the
    entire Anaconda product suite on portable storage medium or as a
    downloadable TAR archive. If you have any questions about the
    instructions, please contact your sales representative or Priority
    Support team, if applicable, for additional assistance.</p>
    </div>
    <div class="section" id="components">
    <h2>Components<a class="headerlink" href="#components" title="Permalink to this headline">¶</a></h2>
    <p><strong>AEN Server:</strong> The administrative front-end to the system. This is
    where users login to the system, where user accounts are stored, and
    where admins can manage the system.</p>
    <p><strong>AEN Gateway:</strong> The gateway is a reverse proxy that authenticates
    users and automatically directs them to the proper AEN Compute
    machine for their project. Users will not notice this component as it
    automatically routes them. One could put a gateway in each datacenter in
    a tiered scale-out fashion.</p>
    <p><strong>AEN Compute nodes:</strong> This is where projects are stored and run.
    AEN Compute machines only need to be reachable by the AEN Gateway,
    so they can be completely isolated by a firewall.</p>
    <blockquote>
    <div><a class="reference internal image-reference" href="../../../_images/ae-notebooks/4.0/install/components.png"><img alt="../../../_images/ae-notebooks/4.0/install/components.png" class="align-center" src="../../../_images/ae-notebooks/4.0/install/components.png" style="width: 816.0px; height: 1056.0px;" /></a>
    </div></blockquote>
    </div>
    <div class="section" id="table-of-contents">
    <h2>Table of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h2>
    <ul class="simple">
    <li>Anaconda Enterprise Installation Run Book<ul>
    <li>Overview</li>
    <li>Audience</li>
    <li>Components</li>
    <li>Table of Contents</li>
    </ul>
    </li>
    <li>Installation Requirements<ul>
    <li>Hardware Requirements</li>
    <li>Software Requirements</li>
    <li>Linux System Accounts Required</li>
    <li>Software Prerequisites</li>
    <li>Security Requirements</li>
    <li>Network Requirements</li>
    <li>Other Requirements</li>
    </ul>
    </li>
    </ul>
    <ul class="simple">
    <li>Install Preparation<ul>
    <li>Download the Installers</li>
    <li>Gather IP addresses of FQDNs</li>
    </ul>
    </li>
    <li>Install AEN Server<ul>
    <li>AEN Server Preparation - Prerequisites<ul>
    <li>Download Prerequisite RPMs</li>
    <li>Install Prerequisite RPMs</li>
    </ul>
    </li>
    <li>Run the AEN Server Installer<ul>
    <li>Setup Variables and Change Permissions</li>
    <li>Run AEN Server Installer</li>
    <li>Start ElasticSearch</li>
    <li>Test the AEN Server Install</li>
    <li>Update the License</li>
    </ul>
    </li>
    </ul>
    </li>
    <li>Install AEN Gateway<ul>
    <li>Setup Variables and Change Permissions</li>
    <li>Run Wakari Gateway Installer</li>
    <li>Register the AEN Gateway<ul>
    <li>Ensure Proper Permissions</li>
    <li>Start the Gateway</li>
    <li>Verify the AEN Gateway has Registered</li>
    </ul>
    </li>
    </ul>
    </li>
    <li>Install AEN Compute<ul>
    <li>Set Variables and Change Permissions</li>
    <li>Run AEN Compute Installer</li>
    <li>Configure AEN Compute Node</li>
    <li>Configure conda to use local on-site Anaconda Enterprise Repo<ul>
    <li>Edit the condarc on the Compute Node</li>
    <li>Configure Anaconda Client</li>
    </ul>
    </li>
    </ul>
    </li>
    <li>Optional Configuration<ul>
    <li>Configure common AEN Compute options<ul>
    <li>Change the project directory</li>
    <li>Create groups with the same id</li>
    <li>Use numeric usernames</li>
    </ul>
    </li>
    <li>Verify and Tune Search Indexing</li>
    <li>Setting a Default Project Environment</li>
    <li>Configure a remote mongodb</li>
    <li>SELinux Enforcing Mode</li>
    </ul>
    </li>
    <li>Wrapping Up</li>
    </ul>
    </div>
    <div class="section" id="installation-requirements">
    <h2>Installation Requirements<a class="headerlink" href="#installation-requirements" title="Permalink to this headline">¶</a></h2>
    <div class="section" id="hardware-requirements">
    <h3>Hardware Requirements<a class="headerlink" href="#hardware-requirements" title="Permalink to this headline">¶</a></h3>
    <p><strong>AEN Server</strong></p>
    <ul class="simple">
    <li>2+GB RAM</li>
    <li>2+CPU cores</li>
    <li>20GB storage</li>
    </ul>
    <p><strong>AEN Gateway</strong></p>
    <ul class="simple">
    <li>2 GB RAM</li>
    <li>2 CPU cores</li>
    </ul>
    <p><strong>AEN Compute</strong> (N-machines)</p>
    <p>Configure to meet the needs of the projects. At least:</p>
    <ul class="simple">
    <li>2GB RAM</li>
    <li>2 CPU cores</li>
    <li>At least 20 GB</li>
    </ul>
    <p>NOTE: We recommend putting ``/opt/wakari`` and ``/projects`` on the same
    filesystem. If the project and conda env directories are on separate
    filesystems then more disk space will be required on compute nodes and
    performance will be worse.</p>
    <div class="section" id="software-requirements">
    <h4>Software Requirements<a class="headerlink" href="#software-requirements" title="Permalink to this headline">¶</a></h4>
    <ul class="simple">
    <li>RHEL/CentOS versions 6.5 to 6.8 on all nodes (Other operating systems are supported,
    however this document assumes RHEL or CentOS)</li>
    <li><strong>/opt/wakari:</strong> Ability to install here and at least 5GB of storage.</li>
    <li><strong>/projects:</strong> Size depends on number and size of projects. At least
    20GB of storage.</li>
    <li><strong>ACL:</strong> These directories need the filesystem mounted with Posix ACL
    support (Posix.1e). Check with <code class="docutils literal"><span class="pre">mount</span></code> and
    <code class="docutils literal"><span class="pre">tune2fs</span> <span class="pre">-l</span> <span class="pre">/path/to/filesystem</span> <span class="pre">|</span> <span class="pre">grep</span> <span class="pre">options</span></code></li>
    </ul>
    </div>
    <div class="section" id="linux-system-accounts-required">
    <h4>Linux System Accounts Required<a class="headerlink" href="#linux-system-accounts-required" title="Permalink to this headline">¶</a></h4>
    <p>Some Linux system accounts (UIDs) are added to the system during installation.
    If your organization requires special actions, here is the list of UIDs:</p>
    <ul class="simple">
    <li>mongod (RHEL) or mongodb (Ubuntu/Debian): created by the RPM or deb package</li>
    <li>elasticsearch: created by RPM or deb package</li>
    <li>nginx: created by RPM or deb package</li>
    <li>wakari: created during installation of Anaconda Enterprise Notebooks</li>
    </ul>
    </div>
    <div class="section" id="software-prerequisites">
    <h4>Software Prerequisites<a class="headerlink" href="#software-prerequisites" title="Permalink to this headline">¶</a></h4>
    <p><strong>AEN Server</strong></p>
    <ul class="simple">
    <li>Mongo Version: &gt;= 2.6.8 and &lt; 3.0</li>
    <li>Nginx version: &gt;= 1.4.0</li>
    <li>ElasticSearch: &gt;= 1.7.2</li>
    <li>Oracle JRE 7 and 8</li>
    </ul>
    <p><strong>AEN Compute</strong></p>
    <ul class="simple">
    <li>git</li>
    </ul>
    </div>
    <div class="section" id="security-requirements">
    <h4>Security Requirements<a class="headerlink" href="#security-requirements" title="Permalink to this headline">¶</a></h4>
    <ul class="simple">
    <li>root or sudo access</li>
    <li>SELinux in Permissive or Disabled mode - check with <code class="docutils literal"><span class="pre">getenforce</span></code></li>
    </ul>
    </div>
    <div class="section" id="network-requirements">
    <h4>Network Requirements<a class="headerlink" href="#network-requirements" title="Permalink to this headline">¶</a></h4>
    <ul class="simple">
    <li>TCP Ports</li>
    </ul>
    <table border="1" class="docutils">
    <colgroup>
    <col width="16%" />
    <col width="7%" />
    <col width="12%" />
    <col width="14%" />
    <col width="14%" />
    <col width="21%" />
    <col width="17%" />
    </colgroup>
    <tbody valign="top">
    <tr class="row-odd"><td>direction</td>
    <td>type</td>
    <td>port</td>
    <td>protocol</td>
    <td>optional</td>
    <td>configurable</td>
    <td>comments</td>
    </tr>
    <tr class="row-even"><td>inbound</td>
    <td>TCP</td>
    <td>80</td>
    <td>HTTP</td>
    <td>No</td>
    <td>No</td>
    <td>Server</td>
    </tr>
    <tr class="row-odd"><td>in/out</td>
    <td>TCP</td>
    <td>8089</td>
    <td>&nbsp;</td>
    <td>No</td>
    <td>No</td>
    <td>Gateway</td>
    </tr>
    <tr class="row-even"><td>in/out</td>
    <td>TCP</td>
    <td>5002</td>
    <td>&nbsp;</td>
    <td>No</td>
    <td>No</td>
    <td>Compute</td>
    </tr>
    </tbody>
    </table>
    </div>
    <div class="section" id="other-requirements">
    <h4>Other Requirements<a class="headerlink" href="#other-requirements" title="Permalink to this headline">¶</a></h4>
    <p>Assuming the above requirements are met, there are no additional
    dependencies necessary for AEN.</p>
    <p>Note: While not a requirement for running the software, these
    instructions use <cite>curl</cite> to download packages used in the install process.
    You may use other appropriate means to put the needed files into the
    installation directory.</p>
    </div>
    </div>
    </div>
    <div class="section" id="installation-preparation">
    <h2>Installation Preparation<a class="headerlink" href="#installation-preparation" title="Permalink to this headline">¶</a></h2>
    <div class="section" id="download-the-installers">
    <h3>Download the Installers<a class="headerlink" href="#download-the-installers" title="Permalink to this headline">¶</a></h3>
    <p>Download the installers and copy them to the corresponding servers.</p>
    <ul>
    <li><p class="first"><strong>Regular Installation:</strong></p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>curl -O $RPM_CDN/aen-server-4.0.0-Linux-x86_64.sh
    curl -O $RPM_CDN/aen-gateway-4.0.0-Linux-x86_64.sh
    curl -O $RPM_CDN/aen-compute-4.0.0-Linux-x86_64.sh
    </pre></div>
    </div>
    </li>
    </ul>
    <p>Note: the $RPM_CDN server will be provided by your sales rep.</p>
    </div>
    <div class="section" id="gather-ip-addresses-or-fqdns">
    <h3>Gather IP addresses or FQDNs<a class="headerlink" href="#gather-ip-addresses-or-fqdns" title="Permalink to this headline">¶</a></h3>
    <p>AEN is very sensitive to the IP address or domain name used to
    connect to the Server and Gateway components. If users will be using the
    domain name, you should install the components using the domain name
    instead of the IP addresses. The authentication system requires the
    proper hostnames when authenticating users between the services.</p>
    <p>Fill in the domain names or IP addresses of the components below and
    record the auto­generated wakari password in the box below after
    installing the AEN Server component.</p>
    <table border="1" class="docutils">
    <colgroup>
    <col width="51%" />
    <col width="49%" />
    </colgroup>
    <thead valign="bottom">
    <tr class="row-odd"><th class="head" colspan="2">Component     | Name or IP address</th>
    </tr>
    </thead>
    <tbody valign="top">
    <tr class="row-even"><td colspan="2">AEN Server    |</td>
    </tr>
    <tr class="row-odd"><td colspan="2">AEN Gateway   |</td>
    </tr>
    <tr class="row-even"><td colspan="2">AEN Compute   |</td>
    </tr>
    </tbody>
    </table>
    <p>Notes:</p>
    <ul class="simple">
    <li>we will refer to the values of these IP entries or DNS entries as,
    e.g., <code class="docutils literal"><span class="pre">&lt;AEN_SERVER_IP&gt;</span></code> or <code class="docutils literal"><span class="pre">&lt;AEN_SERVER_FQDN&gt;</span></code>, particularly in
    examples of shell commands. Consider actually assigning those values
    to environment variables with similar names.</li>
    </ul>
    </div>
    <div class="section" id="setup-variables">
    <h3>Setup Variables<a class="headerlink" href="#setup-variables" title="Permalink to this headline">¶</a></h3>
    <div class="section" id="aen-server-address">
    <h4>AEN Server Address<a class="headerlink" href="#aen-server-address" title="Permalink to this headline">¶</a></h4>
    <p>Define an environment variable for the AEN Server address (FQDN or IP):</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SERVER</span><span class="o">=&lt;</span><span class="n">AEN_SERVER_IP</span><span class="o">&gt;</span>  <span class="c1"># &lt;from table above&gt;</span>
    </pre></div>
    </div>
    <p>Note that the address (FQDN or IP) specified for the AEN server must be
    resolvable by your intended AEN users web clients. You may verify your
    hostname as follows:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>echo $AEN_SERVER
    </pre></div>
    </div>
    </div>
    <div class="section" id="aen-functional-id">
    <span id="id1"></span><h4>AEN Functional ID<a class="headerlink" href="#aen-functional-id" title="Permalink to this headline">¶</a></h4>
    <p>AEN must be installed and executed by a Linux account called the AEN Service
    Account. The username of the AEN Service Account is called the AEN Functional
    ID (NFI). The AEN Service Account is created during AEN installation if it does
    not exist and is used to run all AEN services.</p>
    <p>The default NFI username is <code class="docutils literal"><span class="pre">wakari</span></code>. To override that default value and set
    the NFI to another name, set the environment variable &#8220;AEN_SRVC_ACCT&#8221; <em>before</em>
    installation:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SRVC_ACCT</span><span class="o">=</span><span class="s2">&quot;aen_admin&quot;</span>
    </pre></div>
    </div>
    <p>This name will then be the username of the AEN Service Account and the username
    of the AEN Admin account.</p>
    </div>
    <div class="section" id="aen-functional-group">
    <h4>AEN Functional Group<a class="headerlink" href="#aen-functional-group" title="Permalink to this headline">¶</a></h4>
    <p>By default, AEN uses a Linux group (NFG) name of <code class="docutils literal"><span class="pre">wakari</span></code> for all
    files and directories owned by the NFI. Set the following environment
    variable <strong>*before*</strong> installation to specify a custom NFG whenever the
    NFI environment variable is set: <code class="docutils literal"><span class="pre">AEN_SRVC_GRP</span></code></p>
    <p>Example:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SRVC_GRP</span><span class="o">=</span><span class="s2">&quot;aen_admin&quot;</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="aen-install-sudo-command">
    <h4>AEN Install sudo Command<a class="headerlink" href="#aen-install-sudo-command" title="Permalink to this headline">¶</a></h4>
    <p>During AEN installation the installers perform various operations that
    require root level privileges. By default the installers use the
    <code class="docutils literal"><span class="pre">sudo</span></code> command to perform these operations. Set the following
    environment variable <strong>*before*</strong> installation to override the default
    <code class="docutils literal"><span class="pre">sudo</span></code> command to perform root level operations or no command at all
    when the user running the installers has root privileges and the
    <code class="docutils literal"><span class="pre">sudo</span></code> command is not needed or available: <code class="docutils literal"><span class="pre">AEN_SUDO_INSTALL_CMD</span></code></p>
    <p>Examples:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SUDO_INSTALL_CMD</span><span class="o">=</span><span class="s2">&quot;&quot;</span>
    <span class="n">export</span> <span class="n">AEN_SUDO_INSTALL_CMD</span><span class="o">=</span><span class="s2">&quot;sudo2&quot;</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="aen-sudo-command">
    <h4>AEN sudo Command<a class="headerlink" href="#aen-sudo-command" title="Permalink to this headline">¶</a></h4>
    <p>By default the AEN services uses <code class="docutils literal"><span class="pre">sudo</span> <span class="pre">-u</span></code> to perform operations on
    behalf of other users. Such operations include <code class="docutils literal"><span class="pre">mkdir</span></code>, <code class="docutils literal"><span class="pre">chmod</span></code>,
    <code class="docutils literal"><span class="pre">cp</span></code> and <code class="docutils literal"><span class="pre">mv</span></code>. Set the following environment variable before
    installation to override the default <code class="docutils literal"><span class="pre">sudo</span></code> command when sudo is not
    available on the system: <code class="docutils literal"><span class="pre">AEN_SUDO_CMD</span></code>.</p>
    <p>Note, AEN must have the ability to perform operations on behalf of other
    users. This environment variable cannot be set to an empty string or
    null. The <code class="docutils literal"><span class="pre">AEN_SUDO_CMD</span></code> must support the <code class="docutils literal"><span class="pre">-u</span></code> command line
    parameter similar to the <code class="docutils literal"><span class="pre">sudo</span></code> command.</p>
    <p>Example:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SUDO_CMD</span><span class="o">=</span><span class="s2">&quot;sudo2&quot;</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="note-on-post-install-customization">
    <h4>Note on Post-Install Customization<a class="headerlink" href="#note-on-post-install-customization" title="Permalink to this headline">¶</a></h4>
    <p><strong>Please</strong> review the <a class="reference internal" href="customization.html"><span class="doc">post-installation
    documentation</span></a> for additional information on
    configuration options.</p>
    <p>While root/sudo privileges are required during installation, root/sudo
    privileges are not required during normal operations after install, if
    user accounts are managed outside the software (for example, via LDAP).
    However root/sudo privileges are required to start the services, thus in
    the service config files there may still need to be a <code class="docutils literal"><span class="pre">AEN_SUDO_CMD</span></code>
    entry.</p>
    </div>
    </div>
    </div>
    <div class="section" id="install-aen-server">
    <h2>Install AEN Server<a class="headerlink" href="#install-aen-server" title="Permalink to this headline">¶</a></h2>
    <p>The AEN server is the administrative front­end to the system. This is
    where users login to the system, where user accounts are stored, and
    where admins can manage the system.</p>
    <div class="section" id="aen-server-preparation-prerequisites">
    <h3>AEN Server Preparation - Prerequisites<a class="headerlink" href="#aen-server-preparation-prerequisites" title="Permalink to this headline">¶</a></h3>
    <div class="section" id="download-prerequisite-rpms">
    <h4>Download Prerequisite RPMs<a class="headerlink" href="#download-prerequisite-rpms" title="Permalink to this headline">¶</a></h4>
    <ul class="simple">
    <li><strong>Regular Installation:</strong></li>
    </ul>
    <div class="highlight-default"><div class="highlight"><pre><span></span>RPM_CDN=&quot;https://820451f3d8380952ce65-4cc6343b423784e82fd202bb87cf87cf.ssl.cf1.rackcdn.com&quot;
    curl -O $RPM_CDN/nginx-1.6.2-1.el6.ngx.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-tools-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-shell-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-server-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-mongos-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/elasticsearch-1.7.2.noarch.rpm
    curl -O $RPM_CDN/jre-8u65-linux-x64.rpm
    </pre></div>
    </div>
    </div>
    <div class="section" id="install-prerequisite-rpms">
    <h4>Install Prerequisite RPMs<a class="headerlink" href="#install-prerequisite-rpms" title="Permalink to this headline">¶</a></h4>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">yum</span> <span class="n">install</span> <span class="o">-</span><span class="n">y</span> <span class="o">*.</span><span class="n">rpm</span>
    <span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">mongod</span> <span class="n">start</span>
    <span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">elasticsearch</span> <span class="n">stop</span>
    <span class="n">sudo</span> <span class="n">chkconfig</span> <span class="o">--</span><span class="n">add</span> <span class="n">elasticsearch</span>
    </pre></div>
    </div>
    </div>
    </div>
    <div class="section" id="run-the-aen-server-installer">
    <h3>Run the AEN Server Installer<a class="headerlink" href="#run-the-aen-server-installer" title="Permalink to this headline">¶</a></h3>
    <div class="section" id="set-variables-and-change-permissions">
    <h4>Set Variables and Change Permissions<a class="headerlink" href="#set-variables-and-change-permissions" title="Permalink to this headline">¶</a></h4>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SERVER</span><span class="o">=&lt;</span><span class="n">FQDN</span> <span class="n">HOSTNAME</span><span class="o">&gt;</span> <span class="c1"># Use the real FQDN</span>
    <span class="n">chmod</span> <span class="n">a</span><span class="o">+</span><span class="n">x</span> <span class="n">aen</span><span class="o">-*.</span><span class="n">sh</span>                <span class="c1"># Set installer to be executable</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="run-aen-server-installer">
    <h4>Run AEN Server Installer<a class="headerlink" href="#run-aen-server-installer" title="Permalink to this headline">¶</a></h4>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo -E ./aen-server-4.0.0-Linux-x86_64.sh -w $AEN_SERVER
    &lt;license text&gt;
    ...
    ...

    PREFIX=/opt/wakari/wakari-server
    Logging to /tmp/wakari_server.log
    Checking server name
    Ready for pre-install steps
    Installing miniconda
    ...
    ...
    Checking server name
    Loading config from /opt/wakari/wakari-server/etc/wakari/config.json
    Loading config from /opt/wakari/wakari-server/etc/wakari/wk-server-config.json


    ===================================

    Created password &#39;&lt;RANDOM_PASSWORD&gt;&#39; for user &#39;wakari&#39;

    ===================================


    Starting Wakari daemons...
    installation finished.
    </pre></div>
    </div>
    <p>After successfully completing the installation script, the installer
    will create the administrator account (AEN_SRVC_ACCT user) and assign it a
    password:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Created</span> <span class="n">password</span> <span class="s1">&#39;&lt;RANDOM_PASSWORD&gt;&#39;</span> <span class="k">for</span> <span class="n">user</span> <span class="s1">&#39;wakari&#39;</span>
    </pre></div>
    </div>
    <p><strong>Record this password.</strong> It will be needed in the following steps. It
    is also available in the installation log file found at
    <code class="docutils literal"><span class="pre">/tmp/wakari_server.log</span></code></p>
    </div>
    <div class="section" id="start-elasticsearch">
    <h4>Start ElasticSearch<a class="headerlink" href="#start-elasticsearch" title="Permalink to this headline">¶</a></h4>
    <p>Start elasticsearch to read the new config file</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">elasticsearch</span> <span class="n">start</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="test-the-aen-server-install">
    <h4>Test the AEN Server install<a class="headerlink" href="#test-the-aen-server-install" title="Permalink to this headline">¶</a></h4>
    <p>Visit <a class="reference external" href="http://$AEN_SERVER">http://$AEN_SERVER</a>. You should be shown the <strong>&#8220;license
    expired&#8221;</strong> page.</p>
    </div>
    <div class="section" id="update-the-license">
    <h4>Update the License<a class="headerlink" href="#update-the-license" title="Permalink to this headline">¶</a></h4>
    <p>From the <strong>&#8220;license expired&#8221;</strong> page, follow the onscreen instructions to
    upload your license file. After submitting, you should see the login
    page.</p>
    </div>
    </div>
    </div>
    <div class="section" id="install-aen-gateway">
    <h2>Install AEN Gateway<a class="headerlink" href="#install-aen-gateway" title="Permalink to this headline">¶</a></h2>
    <p>The gateway is a reverse proxy that authenticates users and
    automatically directs them to the proper AEN Compute machine for
    their project. Users will not notice this component as it automatically
    routes them.</p>
    <div class="section" id="id2">
    <h3>Set Variables and Change Permissions<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SERVER</span><span class="o">=&lt;</span><span class="n">FQDN</span> <span class="n">HOSTNAME</span><span class="o">&gt;</span> <span class="c1"># Use the real FQDN</span>
    <span class="n">export</span> <span class="n">AEN_GATEWAY_PORT</span><span class="o">=</span><span class="mi">8089</span>
    <span class="n">export</span> <span class="n">AEN_GATEWAY</span><span class="o">=&lt;</span><span class="n">FQDN</span> <span class="n">HOSTNAME</span><span class="o">&gt;</span>  <span class="c1"># will be needed shortly</span>
    <span class="n">chmod</span> <span class="n">a</span><span class="o">+</span><span class="n">x</span> <span class="n">aen</span><span class="o">-*.</span><span class="n">sh</span>                <span class="c1"># Set installer to be executable</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="run-wakari-gateway-installer">
    <h3>Run Wakari Gateway Installer<a class="headerlink" href="#run-wakari-gateway-installer" title="Permalink to this headline">¶</a></h3>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo -E ./aen-gateway-4.0.0-Linux-x86_64.sh -w $AEN_SERVER
    &lt;license text&gt;
    ...
    ...

    PREFIX=/opt/wakari/wakari-gateway
    Logging to /tmp/wakari_gateway.log
    ...
    ...
    Checking server name
    Please restart the Gateway after running the following command
    to connect this Gateway to the AEN Server
    ...
    </pre></div>
    </div>
    <p>Note: replace <strong>password</strong> with the password of the wakari user that was generated during server installation.</p>
    </div>
    <div class="section" id="register-the-aen-gateway">
    <h3>Register the AEN Gateway<a class="headerlink" href="#register-the-aen-gateway" title="Permalink to this headline">¶</a></h3>
    <p>The AEN Gateway needs to register with the AEN Server. This needs
    to be authenticated, so the wakari user’s credentials created during the
    AEN Server install need to be used. <strong>This needs to be run as sudo or root</strong>
    to write the configuration file:
    <code class="docutils literal"><span class="pre">/opt/wakari/wakari-gateway/etc/wakari/wk-gateway-config.json</span></code></p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo /opt/wakari/wakari-gateway/bin/wk-gateway-configure \
    --server http://$AEN_SERVER --host $AEN_GATEWAY \
    --port $AEN_GATEWAY_PORT --name Gateway --protocol http \
    --summary Gateway --username $AEN_SRVC_ACCT \
    --password &#39;&lt;USE PASSWORD SET ABOVE&gt;&#39;
    </pre></div>
    </div>
    <div class="section" id="ensure-proper-permissions">
    <h4>Ensure Proper Permissions<a class="headerlink" href="#ensure-proper-permissions" title="Permalink to this headline">¶</a></h4>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo chown $AEN_SRVC_ACCT /opt/wakari/wakari-gateway/etc/wakari/wk-gateway-config.json
    </pre></div>
    </div>
    </div>
    <div class="section" id="start-the-gateway">
    <h4>Start the Gateway<a class="headerlink" href="#start-the-gateway" title="Permalink to this headline">¶</a></h4>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">start</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="verify-the-aen-gateway-has-registered">
    <h4>Verify the AEN Gateway has Registered<a class="headerlink" href="#verify-the-aen-gateway-has-registered" title="Permalink to this headline">¶</a></h4>
    <ol class="arabic">
    <li><p class="first">Login to the AEN Server using Chrome or Firefox browser using the
    AEN_SRVC_ACCT user.</p>
    </li>
    <li><p class="first">Click the Admin link in the toolbar</p>
    <a class="reference internal image-reference" href="../../../_images/ae-notebooks/4.0/install/admin-menu.png"><img alt="../../../_images/ae-notebooks/4.0/install/admin-menu.png" src="../../../_images/ae-notebooks/4.0/install/admin-menu.png" style="width: 234.4px; height: 170.4px;" /></a>
    </li>
    <li><p class="first">Click the Datacenters sub­section and then click your datacenter:</p>
    <a class="reference internal image-reference" href="../../../_images/ae-notebooks/4.0/install/datacenter-leftnav.png"><img alt="../../../_images/ae-notebooks/4.0/install/datacenter-leftnav.png" src="../../../_images/ae-notebooks/4.0/install/datacenter-leftnav.png" style="width: 682.4px; height: 423.2px;" /></a>
    </li>
    <li><p class="first">Verify that your datacenter is registered and status is
    <code class="docutils literal"><span class="pre">{&quot;status&quot;:</span> <span class="pre">&quot;ok&quot;,</span> <span class="pre">&quot;messages&quot;:</span> <span class="pre">[]}</span></code></p>
    <a class="reference internal image-reference" href="../../../_images/ae-notebooks/4.0/install/datacenter.png"><img alt="../../../_images/ae-notebooks/4.0/install/datacenter.png" src="../../../_images/ae-notebooks/4.0/install/datacenter.png" style="width: 680.8px; height: 433.6px;" /></a>
    </li>
    </ol>
    </div>
    </div>
    </div>
    <div class="section" id="install-aen-compute">
    <h2>Install AEN Compute<a class="headerlink" href="#install-aen-compute" title="Permalink to this headline">¶</a></h2>
    <p>This is where projects are stored and run. Adding multiple AEN
    Compute machines allows one to scale-out horizontally to increase
    capacity. Projects can be created on individual compute nodes to spread
    the load.</p>
    <div class="section" id="id3">
    <h3>Set Variables and Change Permissions<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SERVER</span><span class="o">=&lt;</span><span class="n">FQDN</span> <span class="n">HOSTNAME</span><span class="o">&gt;</span> <span class="c1"># Use the real FQDN</span>
    <span class="n">chmod</span> <span class="n">a</span><span class="o">+</span><span class="n">x</span> <span class="n">aen</span><span class="o">-*.</span><span class="n">sh</span>                <span class="c1"># Set installer to be executable</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="run-aen-compute-installer">
    <h3>Run AEN Compute Installer<a class="headerlink" href="#run-aen-compute-installer" title="Permalink to this headline">¶</a></h3>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo -E ./aen-compute-4.0.0-Linux-x86_64.sh -w $AEN_SERVER
    ...
    ...
    PREFIX=/opt/wakari/wakari-compute
    Logging to /tmp/wakari_compute.log
    Checking server name
    ...
    ...
    Initial clone of root environment...
    Starting Wakari daemons...
    installation finished.
    Do you wish the installer to prepend the wakari-compute install location
    to PATH in your /root/.bashrc ? [yes|no]
    [no] &gt;&gt;&gt; yes
    </pre></div>
    </div>
    </div>
    <div class="section" id="configure-aen-compute-node">
    <h3>Configure AEN Compute Node<a class="headerlink" href="#configure-aen-compute-node" title="Permalink to this headline">¶</a></h3>
    <p>Once installed, you need to configure the Compute Launcher on AEN Server.</p>
    <ol class="arabic simple">
    <li>Point your browser at the AEN Server</li>
    <li>Login as the AEN_SRVC_ACCT user</li>
    <li>Click on the Admin link in the top navbar</li>
    <li>Click on Enterprise Resources in the left navbar</li>
    <li>Click on Add Resource</li>
    <li>Select the correct (probably the only) Data Center to associate this
    Compute Node with</li>
    <li>For URL, enter <strong>http://$AEN_COMPUTE:5002</strong>.</li>
    </ol>
    <p>Note: If the Compute Launcher is located on the same box as the Gateway, we recommend using <strong>http://localhost:5002</strong> for the URL value.</p>
    <ol class="arabic simple" start="8">
    <li>Add a Name and Description for the compute node</li>
    <li>Click the Add Resource button to save the changes.</li>
    </ol>
    </div>
    <div class="section" id="configure-conda-to-use-local-on-site-anaconda-enterprise-repo">
    <h3>Configure conda to use local on-site Anaconda Enterprise Repo<a class="headerlink" href="#configure-conda-to-use-local-on-site-anaconda-enterprise-repo" title="Permalink to this headline">¶</a></h3>
    <p>This integrates Anaconda Enterprise Notebooks to use a local on-site Anaconda
    Enterprise Repository server instead of Anaconda.org.</p>
    <div class="section" id="edit-the-condarc-on-the-compute-node">
    <h4>Edit the condarc on the Compute Node<a class="headerlink" href="#edit-the-condarc-on-the-compute-node" title="Permalink to this headline">¶</a></h4>
    <p>Note: If there are some channels below that you haven&#8217;t mirrored, you should remove them from the configuration.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1">#/opt/wakari/anaconda/.condarc</span>
    <span class="n">channels</span><span class="p">:</span>
        <span class="o">-</span> <span class="n">defaults</span>

    <span class="n">create_default_packages</span><span class="p">:</span>
        <span class="o">-</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
        <span class="o">-</span> <span class="n">python</span>
        <span class="o">-</span> <span class="n">ipython</span><span class="o">-</span><span class="n">we</span>
        <span class="o">-</span> <span class="n">pip</span>

    <span class="c1"># Default channels is needed for when users override the system .condarc</span>
    <span class="c1"># with ~/.condarc.  This ensures that &quot;defaults&quot; maps to your Anaconda Server and not</span>
    <span class="c1"># repo.continuum.io</span>
    <span class="n">default_channels</span><span class="p">:</span>
        <span class="o">-</span> <span class="n">http</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span> <span class="n">Anaconda</span> <span class="n">Server</span> <span class="n">name</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">conda</span><span class="o">/</span><span class="n">anaconda</span>
        <span class="o">-</span> <span class="n">http</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span> <span class="n">Anaconda</span> <span class="n">Server</span> <span class="n">name</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">conda</span><span class="o">/</span><span class="n">wakari</span>
        <span class="o">-</span> <span class="n">http</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span> <span class="n">Anaconda</span> <span class="n">Server</span> <span class="n">name</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">conda</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">cluster</span>
        <span class="o">-</span> <span class="n">http</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span> <span class="n">Anaconda</span> <span class="n">Server</span> <span class="n">name</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">conda</span><span class="o">/</span><span class="n">r</span><span class="o">-</span><span class="n">channel</span>

    <span class="c1"># Note:  You must add the &quot;conda&quot; subdirectory to the end</span>
    <span class="n">channel_alias</span><span class="p">:</span> <span class="n">http</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span> <span class="n">Anaconda</span> <span class="n">Server</span> <span class="n">name</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">conda</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="configure-anaconda-client">
    <h4>Configure Anaconda Client<a class="headerlink" href="#configure-anaconda-client" title="Permalink to this headline">¶</a></h4>
    <p>Anaconda client lets users work with the Anaconda Repository from the command-line.
    Things like the following: search for packages, login, upload packages, etc.  The
    command below will set this value globally for all users.</p>
    <p>Run the following command filling in the proper value.
    Requires <cite>sudo</cite> since config file is written to root file system: <cite>/etc/xdg/binstar/config.yaml</cite>.
    This sets the default config for <cite>anaconda-client</cite> for all users on compute node.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">wakari</span><span class="o">/</span><span class="n">anaconda</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">anaconda</span> <span class="n">config</span> <span class="o">--</span><span class="nb">set</span> <span class="n">url</span> <span class="n">http</span><span class="p">:</span><span class="o">//&lt;</span><span class="n">your</span> <span class="n">Anaconda</span> <span class="n">Server</span><span class="o">&gt;</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">api</span> <span class="o">-</span><span class="n">s</span>
    </pre></div>
    </div>
    <p><strong>Congratulations! You&#8217;ve now successfully installed and configured
    Anaconda Enterprise Notebooks.</strong></p>
    </div>
    </div>
    </div>
    <div class="section" id="optional-configuration">
    <h2>Optional Configuration<a class="headerlink" href="#optional-configuration" title="Permalink to this headline">¶</a></h2>
    <div class="section" id="optional-configure-common-aen-compute-options">
    <h3>Optional: Configure common AEN Compute options<a class="headerlink" href="#optional-configure-common-aen-compute-options" title="Permalink to this headline">¶</a></h3>
    <p>To make any of the changes described below, please edit the following file:
    <code class="docutils literal"><span class="pre">/opt/wakari/wakari-compute/etc/wakari/wk-compute-launcher-config.json</span></code></p>
    <p>Then restart the AEN Compute service:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">compute</span> <span class="n">restart</span>
    </pre></div>
    </div>
    <div class="section" id="change-the-project-directory">
    <h4>Change the project directory<a class="headerlink" href="#change-the-project-directory" title="Permalink to this headline">¶</a></h4>
    <p>NOTE: We recommend putting ``/opt/wakari`` and ``/projects`` on the same
    filesystem. If the project and conda env directories are on separate
    filesystems then more disk space will be required on compute nodes and
    performance will be worse.</p>
    <p>To make <code class="docutils literal"><span class="pre">aen-compute</span></code> service use a different directory than <code class="docutils literal"><span class="pre">/projects</span></code>
    for storing the projects, modify the configuration file referenced above as follows:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="s2">&quot;projectRoot&quot;</span> <span class="p">:</span> <span class="s2">&quot;/nfs/storage/services/wakari/projects&quot;</span><span class="p">,</span>
    </pre></div>
    </div>
    <p>The directory <code class="docutils literal"><span class="pre">/nfs/storage/services/wakari/projects</span></code> specified as
    <code class="docutils literal"><span class="pre">projectRoot</span></code> above must exist for this to succeed.</p>
    </div>
    <div class="section" id="create-groups-with-the-same-id">
    <h4>Create groups with the same id<a class="headerlink" href="#create-groups-with-the-same-id" title="Permalink to this headline">¶</a></h4>
    <p>Additionally, if the <code class="docutils literal"><span class="pre">/projects</span></code> folder resides on an NFSv3 volume and
    you have a setup with several compute nodes, AEN will create local users
    with a different uid on each node.</p>
    <p>To make the AEN Compute service create groups with the same id, edit the
    configuration file referenced above so that it contains the key <code class="docutils literal"><span class="pre">identicalGID</span></code>
    and the value <code class="docutils literal"><span class="pre">true</span></code> as in the following example. If you don&#8217;t see the
    <code class="docutils literal"><span class="pre">identicalGID</span></code> key, add it, and notice that you must add a comma at the
    beginning of the line.
    If you add this line as the last key, remove any comma at the end of the line.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">,</span> <span class="s2">&quot;identicalGID&quot;</span><span class="p">:</span> <span class="n">true</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="use-numeric-usernames">
    <h4>Use numeric usernames<a class="headerlink" href="#use-numeric-usernames" title="Permalink to this headline">¶</a></h4>
    <p>To use numeric usernames, you must modify the configuration file
    referenced above so that it contains the key <code class="docutils literal"><span class="pre">numericUsernames</span></code> and the value
    <code class="docutils literal"><span class="pre">true</span></code> as in the following example. If you don&#8217;t see the <code class="docutils literal"><span class="pre">numericUsernames</span></code>
    key, add it, and notice that you must add a comma at the beginning of the line.
    If you add this line as the last key, remove any comma at the end of the line.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">,</span> <span class="s2">&quot;numericUsernames&quot;</span><span class="p">:</span> <span class="n">true</span>
    </pre></div>
    </div>
    </div>
    </div>
    <div class="section" id="optional-verify-and-tune-search-indexing">
    <h3>Optional: Verify and Tune Search Indexing<a class="headerlink" href="#optional-verify-and-tune-search-indexing" title="Permalink to this headline">¶</a></h3>
    <p>Verify that the AEN Compute node can communicate with the AEN Server.
    This is required for search indexing to work correctly.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>curl -m 5 $AEN_SERVER &gt; /dev/null
    </pre></div>
    </div>
    <p>Ensure that there are sufficient <code class="docutils literal"><span class="pre">inotify</span></code> watches available for the
    number of subdirectories within the project root filesystem. Some Linux
    distributions default to a low number of watches, which may prevent the
    search indexer from monitoring project directories for changes.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cat</span> <span class="o">/</span><span class="n">proc</span><span class="o">/</span><span class="n">sys</span><span class="o">/</span><span class="n">fs</span><span class="o">/</span><span class="n">inotify</span><span class="o">/</span><span class="n">max_user_watches</span>
    </pre></div>
    </div>
    <p>If necessary, this can be increased with the following command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">echo</span> <span class="n">fs</span><span class="o">.</span><span class="n">inotify</span><span class="o">.</span><span class="n">max_user_watches</span><span class="o">=</span><span class="mi">100000</span> <span class="o">|</span> <span class="n">sudo</span> <span class="n">tee</span> <span class="o">-</span><span class="n">a</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">sysctl</span><span class="o">.</span><span class="n">conf</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">sysctl</span> <span class="o">-</span><span class="n">p</span>
    </pre></div>
    </div>
    <p>Ensure that there are sufficient <code class="docutils literal"><span class="pre">inotify</span></code> user instances available,
    at least one per project.</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cat</span> <span class="o">/</span><span class="n">proc</span><span class="o">/</span><span class="n">sys</span><span class="o">/</span><span class="n">fs</span><span class="o">/</span><span class="n">inotify</span><span class="o">/</span><span class="n">max_user_instances</span>
    </pre></div>
    </div>
    <p>If necessary, this can be increased with the following command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">echo</span> <span class="n">fs</span><span class="o">.</span><span class="n">inotify</span><span class="o">.</span><span class="n">max_user_instances</span><span class="o">=</span><span class="mi">1000</span> <span class="o">|</span> <span class="n">sudo</span> <span class="n">tee</span> <span class="o">-</span><span class="n">a</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">sysctl</span><span class="o">.</span><span class="n">conf</span> <span class="o">&amp;&amp;</span> <span class="n">sudo</span> <span class="n">sysctl</span> <span class="o">-</span><span class="n">p</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="optional-setting-up-a-default-project-environment">
    <h3>Optional: Setting up a Default Project Environment<a class="headerlink" href="#optional-setting-up-a-default-project-environment" title="Permalink to this headline">¶</a></h3>
    <p>Anaconda Enterprise Notebooks includes a full installation of the
    Anaconda python distribution, along with several additional packages,
    located in the <code class="docutils literal"><span class="pre">root</span></code> conda environment in the path
    <code class="docutils literal"><span class="pre">/opt/wakari/anaconda</span></code>. A copy of this environment is created for each
    new AEN Project.</p>
    <p>To configure a different set of packages as the defaults, create a new
    conda environment in the directory
    <code class="docutils literal"><span class="pre">/opt/wakari/anaconda/envs/default</span></code>. For example, to do so using a
    python 3.4 base environment, run the following command:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo -u $AEN_SRVC_ACCT /opt/wakari/anaconda/bin/conda create -p /opt/wakari/anaconda/envs/default python=3.4
    </pre></div>
    </div>
    <p>Then use <code class="docutils literal"><span class="pre">conda</span></code> to install any additional packages into the
    environment as needed. After creating the environment, clone it once to
    ensure that it works correctly:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo -u $AEN_SRVC_ACCT /opt/wakari/anaconda/bin/conda create -p /opt/wakari/testenv --clone /opt/wakari/anaconda/envs/default
    sudo -u $AEN_SRVC_ACCT rm -rf /opt/wakari/testenv
    </pre></div>
    </div>
    <p>The default project environment will be cloned into the project
    workspace the first time the project is started. To convert an existing
    project, run the following command to clone the environment, replacing
    <code class="docutils literal"><span class="pre">/projects/owner/project/envs/&lt;ENV_NAME&gt;</span></code> with the path to the new
    environment you would like to create within the project:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo -u $AEN_SRVC_ACCT /opt/wakari/anaconda/bin/conda create -n /projects/owner/project/envs/&lt;ENV_NAME&gt; --clone /opt/wakari/anaconda/envs/default
    </pre></div>
    </div>
    <p>Then open the Compute Resource Config for the project and set the
    project environment path there.</p>
    </div>
    <div class="section" id="configure-a-remote-mongodb">
    <h3>Configure a remote mongodb<a class="headerlink" href="#configure-a-remote-mongodb" title="Permalink to this headline">¶</a></h3>
    <p>First you will need to stop the AEN Server, AEN Gateway and AEN compute:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">server</span> <span class="n">stop</span>
    <span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">stop</span>
    <span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">compute</span> <span class="n">stop</span>
    </pre></div>
    </div>
    <p>Now, in order to configure a remote database to work with
    <strong>AEN-Server</strong>, you will need to edit
    <code class="docutils literal"><span class="pre">/opt/wakari/wakari-server/etc/wakari/config.json</span></code>, create a new key
    called <code class="docutils literal"><span class="pre">MONGO_URL</span></code> and as a value you will need to add the database
    information. The final file should look like:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span>
      <span class="s2">&quot;MONGO_URL&quot;</span><span class="p">:</span> <span class="s2">&quot;mongodb://MONGO-USER:MONGO-PASSWORD@MONGO-URL:MONGO-PORT&quot;</span><span class="p">,</span>
      <span class="s2">&quot;WAKARI_SERVER&quot;</span><span class="p">:</span> <span class="s2">&quot;http://YOUR-IP&quot;</span><span class="p">,</span>
      <span class="s2">&quot;USE_SES&quot;</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span>
      <span class="s2">&quot;CDN&quot;</span><span class="p">:</span> <span class="s2">&quot;http://YOUR-UP/static/&quot;</span><span class="p">,</span>
      <span class="s2">&quot;ANON_USER&quot;</span><span class="p">:</span> <span class="s2">&quot;anonymous&quot;</span>
    <span class="p">}</span>
    </pre></div>
    </div>
    <p>You can migrate the data from the former database into the new one,
    there is a guide about this in the <a class="reference external" href="https://docs.mongodb.com/manual/tutorial/backup-and-restore-tools/">MongoDB documentation
    website</a>.
    Once the migration has been performed you can start back the services
    with:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">server</span> <span class="n">start</span>
    <span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">start</span>
    <span class="n">sudo</span> <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">compute</span> <span class="n">start</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="optional-selinux-enforcing-mode">
    <h3>Optional: SELinux Enforcing Mode<a class="headerlink" href="#optional-selinux-enforcing-mode" title="Permalink to this headline">¶</a></h3>
    <p>In order to run SELinux in Enforcing mode, there are a few ports that
    must be set which can be done using the <code class="docutils literal"><span class="pre">semanage</span> <span class="pre">port</span></code> command.</p>
    <p>The semange command relies on <code class="docutils literal"><span class="pre">policycoreutils-python</span></code>. To install (if
    needed):</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">yum</span> <span class="o">-</span><span class="n">y</span> <span class="n">install</span> <span class="n">policycoreutils</span><span class="o">-</span><span class="n">python</span>
    </pre></div>
    </div>
    <p>Enable port 5000 for core aen-server:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">semanage</span> <span class="n">port</span> <span class="o">-</span><span class="n">m</span> <span class="o">-</span><span class="n">t</span> <span class="n">http_port_t</span> <span class="o">-</span><span class="n">p</span> <span class="n">tcp</span> <span class="mi">5000</span>
    </pre></div>
    </div>
    <p>The <code class="docutils literal"><span class="pre">-m</span></code> flag is for modifying an existing usage of a port. If you get
    an error <code class="docutils literal"><span class="pre">Port</span> <span class="pre">tcp/5000</span> <span class="pre">is</span> <span class="pre">not</span> <span class="pre">defined</span></code> change the flag to <code class="docutils literal"><span class="pre">-a</span></code> to
    add the port.</p>
    <p>Enable ports 9200 and 9300 for elasticsearch:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">semanage</span> <span class="n">port</span> <span class="o">-</span><span class="n">a</span> <span class="o">-</span><span class="n">t</span> <span class="n">http_port_t</span> <span class="o">-</span><span class="n">p</span> <span class="n">tcp</span> <span class="mi">9200</span>
    <span class="n">sudo</span> <span class="n">semanage</span> <span class="n">port</span> <span class="o">-</span><span class="n">a</span> <span class="o">-</span><span class="n">t</span> <span class="n">http_port_t</span> <span class="o">-</span><span class="n">p</span> <span class="n">tcp</span> <span class="mi">9300</span>
    </pre></div>
    </div>
    <p>Please see the <a class="reference internal" href="../admin/index.html"><span class="doc">Administrative documentation</span></a> for
    additional information.</p>
    </div>
    </div>
    <div class="section" id="wrapping-up">
    <h2>Wrapping Up<a class="headerlink" href="#wrapping-up" title="Permalink to this headline">¶</a></h2>
    <p>Congratulations. You now have a fully installed Anaconda Enterprise
    Notebooks system!</p>
    <p>For additional documentation on topics such as creating user accounts
    and instructions of users who wish to use the system for collaborative
    analysis, please see other documentation resources.</p>
    <p>Should you encounter any issues while installing AEN or have additional
    questions, please do not hesitate to contact your enterprise support
    representative.</p>
    </div>
