Start/Shutdown (AEN 4.1.2)
==========================

.. 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 has 3 main components: Server, Gateway,
    and Compute-Launcher</p>
    <p>Each component must be started and shutdown independently because they
    may be running on separate boxes. The process is basically the same for
    each component but the path to the correct commands will vary.</p>
    <p>All the instructions below assume that the 3 components are installed in
    the following locations:</p>
    <ul class="simple">
    <li>Server -&gt; /opt/wakari/wakari-server/</li>
    <li>Gateway -&gt; /opt/wakari/wakari-gateway/</li>
    <li>Compute-Launcher -&gt; /opt/wakari/wakari-compute/</li>
    </ul>
    </div>
    <div class="section" id="supervisor-process">
    <h2>Supervisor Process<a class="headerlink" href="#supervisor-process" title="Permalink to this headline">¶</a></h2>
    <p>Anaconda Enterprise Notebooks uses a process control system called
    Supervisor to run the Anaconda Enterprise Notebooks services. Supervisor
    is run by the AEN Service Account user, usually &#8220;wakari&#8221; or &#8220;aen_admin&#8221;.</p>
    <p>The Supervisor daemon process is called <code class="docutils literal"><span class="pre">supervisord</span></code>. The Supervisor
    daemon runs in the background and should rarely need to be restarted
    itself.</p>
    <p>To verify the Supervisor processes are running, execute each of these on
    the appropriate nodes:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">server</span> <span class="n">status</span>
    <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">status</span>
    <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">compute</span> <span class="n">status</span>
    </pre></div>
    </div>
    <p>The services can be restarted with:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">server</span> <span class="n">restart</span>
    <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">restart</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>
    <div class="section" id="start-procedure">
    <h2>Start Procedure<a class="headerlink" href="#start-procedure" title="Permalink to this headline">¶</a></h2>
    <p>Services should start automatically both when they are first installed
    and then at any point where the system is restarted. If it is necessary
    to manually start the services, this can be achieved by executing the
    appropriate command below on the node running that service:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></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">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">start</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>
    <p>It is possible to check the service status with:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">server</span> <span class="n">status</span>
    <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">status</span>
    <span class="n">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">compute</span> <span class="n">status</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="shutdown-procedure">
    <h2>Shutdown Procedure<a class="headerlink" href="#shutdown-procedure" title="Permalink to this headline">¶</a></h2>
    <p>Services can be stopped using the following commands:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></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">service</span> <span class="n">wakari</span><span class="o">-</span><span class="n">gateway</span> <span class="n">stop</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>Anaconda Enterprise Notebooks Compute Nodes may have running processes
    as well. These are not automatically stopped, but can be stopped by
    executing:</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">wakari</span><span class="o">-</span><span class="n">compute</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">wk</span><span class="o">-</span><span class="n">compute</span><span class="o">-</span><span class="n">apps</span> <span class="n">kill</span><span class="o">-</span><span class="nb">all</span>
    </pre></div>
    </div>
    </div>
