Uninstalling AEN (AEN 4.1.3)
============================

.. raw:: html

    <p>Each AEN node must be uninstalled separately.</p>
    <div class="contents local topic" id="contents">
    <ul class="simple">
    <li><a class="reference internal" href="#uninstalling-a-server-node" id="id1">Uninstalling a server node</a></li>
    <li><a class="reference internal" href="#uninstalling-a-gateway-node" id="id2">Uninstalling a gateway node</a></li>
    <li><a class="reference internal" href="#uninstalling-a-compute-node" id="id3">Uninstalling a compute node</a></li>
    <li><a class="reference internal" href="#optional-removing-projects-from-compute-nodes" id="id4">OPTIONAL: Removing projects from compute nodes</a></li>
    </ul>
    </div>
    <p>Begin by setting the AEN Functional ID (NFI). The NFI is the username of the AEN
    Service Account which is used to run all AEN services and is also the username
    of the AEN Admin account. The NFI may be any name. The default NFI is
    <code class="docutils literal"><span class="pre">wakari</span></code>. The NFI is also often set to <code class="docutils literal"><span class="pre">aen_admin</span></code>. The NFI (and AEN
    Functional Group or NFG) are described in
    <a class="reference internal" href="index.html"><span class="doc">the installation instructions</span></a>.</p>
    <p>Set the NFI with this command:</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>Replace the name <code class="docutils literal"><span class="pre">aen_admin</span></code> with the NFI that was set in your installation of
    Anaconda Enterprise Notebooks.</p>
    <div class="section" id="uninstalling-a-server-node">
    <h2><a class="toc-backref" href="#id1">Uninstalling a server node</a><a class="headerlink" href="#uninstalling-a-server-node" title="Permalink to this headline">¶</a></h2>
    <p>To remove a server node, run the following commands as root or sudo on the
    server node&#8217;s host system:</p>
    <ol class="arabic">
    <li><p class="first">Stop the server processes:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>service wakari-server stop
    </pre></div>
    </div>
    </li>
    <li><p class="first">Stop MongoDB:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>service mongod stop
    </pre></div>
    </div>
    </li>
    <li><p class="first">Remove AEN server software, AEN database files and NGINX configuration:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>rm -Rf /opt/wakari/wakari-server
    rm -Rf /opt/wakari/miniconda
    rm -Rf /var/lib/mongo/wakari*
    rm -Rf /etc/nginx/conf.d/www.enterprise.conf
    </pre></div>
    </div>
    <p>NOTE: Remove <code class="docutils literal"><span class="pre">/etc/nginx/conf.d/www.enterprise.https.conf</span></code> if SSL is
    enabled on the Server node.</p>
    </li>
    <li><p class="first">Restart MongoDB and NGINX:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>service mongod restart
    service nginx restart
    </pre></div>
    </div>
    </li>
    <li><p class="first">Check for any outstanding server processes and stop them:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>ps -ef <span class="p">|</span> grep -e wakari-server -e wk-server
    </pre></div>
    </div>
    </li>
    <li><p class="first">Remove the AEN Service Account:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>userdel <span class="nv">$AEN_SRVC_ACCT</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Check for and remove any references to &#8220;aen&#8221; or &#8220;wakari&#8221; from
    the root user&#8217;s <code class="docutils literal"><span class="pre">.condarc</span></code> file:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>grep -i aen ~/.condarc
    grep -i wakari ~/.condarc
    </pre></div>
    </div>
    </li>
    </ol>
    </div>
    <div class="section" id="uninstalling-a-gateway-node">
    <h2><a class="toc-backref" href="#id2">Uninstalling a gateway node</a><a class="headerlink" href="#uninstalling-a-gateway-node" title="Permalink to this headline">¶</a></h2>
    <p>To uninstall a gateway node, run the following commands as root or sudo on the
    gateway host system:</p>
    <ol class="arabic">
    <li><p class="first">Stop the gateway processes:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>service wakari-gateway stop
    </pre></div>
    </div>
    </li>
    <li><p class="first">Remove gateway software:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>rm -Rf /opt/wakari/wakari-gateway
    </pre></div>
    </div>
    </li>
    <li><p class="first">Check for any outstanding gateway processes and stop them:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>ps -ef <span class="p">|</span> grep -e wakari-gateway -e wk-gateway
    </pre></div>
    </div>
    </li>
    <li><p class="first">Remove the AEN Service Account:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>userdel <span class="nv">$AEN_SRVC_ACCT</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Check for and remove any references to &#8220;aen&#8221; or &#8220;wakari&#8221; from the root user&#8217;s <code class="docutils literal"><span class="pre">.condarc</span></code> file:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>grep -i aen ~/.condarc
    grep -i wakari ~/.condarc
    </pre></div>
    </div>
    </li>
    </ol>
    </div>
    <div class="section" id="uninstalling-a-compute-node">
    <h2><a class="toc-backref" href="#id3">Uninstalling a compute node</a><a class="headerlink" href="#uninstalling-a-compute-node" title="Permalink to this headline">¶</a></h2>
    <p>To remove a compute node, run the following commands as root or
    sudo on each compute node host system:</p>
    <ol class="arabic">
    <li><p class="first">Stop the compute processes:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>service wakari-compute stop
    </pre></div>
    </div>
    </li>
    <li><p class="first">Remove the compute software:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>rm -Rf /opt/wakari/wakari-compute
    rm -Rf /opt/wakari/miniconda
    rm -Rf /opt/wakari/anaconda
    </pre></div>
    </div>
    </li>
    <li><p class="first">Check for any outstanding compute processes and stop them:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>ps -ef <span class="p">|</span> grep -e wakari-compute -e wk-compute
    </pre></div>
    </div>
    </li>
    <li><p class="first">Remove the AEN Service Account:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>userdel <span class="nv">$AEN_SRVC_ACCT</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Check for and remove any references to &#8220;aen&#8221; or &#8220;wakari&#8221; from the root user&#8217;s <code class="docutils literal"><span class="pre">.condarc</span></code> file:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>grep -i aen ~/.condarc
    grep -i wakari ~/.condarc
    </pre></div>
    </div>
    </li>
    </ol>
    </div>
    <div class="section" id="optional-removing-projects-from-compute-nodes">
    <h2><a class="toc-backref" href="#id4">OPTIONAL: Removing projects from compute nodes</a><a class="headerlink" href="#optional-removing-projects-from-compute-nodes" title="Permalink to this headline">¶</a></h2>
    <p>CAUTION: This is an extreme measure and is not necessary in most
    instances. We recommend you create and verify a backup before doing this
    or any other file removal.</p>
    <p>To remove all AEN projects from all of your compute nodes:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>rm -Rf /projects
    </pre></div>
    </div>
    </div>
