view content/documentation/content.html @ 40:00a4d3801a00

Update website with new look. Use bootstrap for front-end framework. Adds getting-started, contribute, download and documentation pages. Changes from: http://icedtea.classpath.org/people/jkang/testbed/rev/bc631c6009b3 Mailing list discussion: http://icedtea.classpath.org/pipermail/thermostat/2016-October/021159.html http://icedtea.classpath.org/pipermail/thermostat/2016-October/021360.html
author Jie Kang <jkang@redhat.com>
date Wed, 26 Oct 2016 17:00:10 -0400
parents
children 236c53729f3c
line wrap: on
line source

<div class="row">
    <div class="col-xs-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h1 class="panel-title" id="documentation">Documentation</h1>
            </div>
            <div class="panel-body">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2 class="panel-title">User Guide</h2>
                    </div>
                    <div class="panel-body">
                        <h4>
                            This is the latest user guide for Thermostat 1.99.x. For older guides see the <a href="http://icedtea.classpath.org/wiki/Thermostat/UserGuide"> Archives</a>
                        </h4>
                    </div>
                </div>
                <section id="component-overview">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 class="panel-title">Component Overview</h2>
                        </div>
                        <div class="panel-body">
                            <h3>
                                Storage
                            </h3>
                            <h4>
                                The Storage is where data gets stored. Currently, Thermostat supports Mongodb backends.
                            </h4>
                            <h3>
                                Web Endpoint
                            </h3>
                            <h4>
                                The Web Endpoint is an HTTP layer that runs in front of the Storage. By using the web endpoint, the Storage can be hidden
                                from direct connection while Agents and Clients connect with credentials through HTTP.
                            </h4>
                            <h3>
                                Agent
                            </h3>
                            <h4>
                                The Agent monitors JVMs that run on the machine with the same userid as the Agent, storing the data through the Web Endpoint
                                or directly into the Storage. The Agent also listens on a Command Channel for Client requests
                                such as heap dumping or full garbage collection on JVMs being monitored. Agents require a
                                valid Storage connection to start.
                            </h4>
                            <h3>
                                GUI and CLI Client
                            </h3>
                            <h4>
                                The Clients allow for displaying of data from the Storage (through the Web Endpoint or directly from Storage) as well as
                                performing actions on JVMs such as a heap dump or full garbage collection through the Command
                                Channel with the Agent. Clients require a valid Storage connection for most functions as
                                well as a valid Agent connection for Command Channel actions.
                            </h4>
                        </div>
                    </div>
                </section>
                <section id="local-setup">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 class="panel-title">Local Setup Tutorial</h2>
                        </div>
                        <div class="panel-body">
                            <h4>
                                This tutorial will guide you through setting Thermostat up on a single machine. The machine will hold the Storage, accessed
                                through HTTP via the Web Endpoint, the Agent which will monitor all JVMs on the machine and
                                view the data through GUI or CLI Client.
                            </h4>
                            <h4>
                                The quickest way is to run the local command.
                            </h4>
                            <p><code>$ thermostat local</code></p>
                            <h4>
                                This starts the Agent (monitors jvms), the Web-Storage (stores data) and the GUI (displays data) all on your local machine.
                            </h4>
                            <h4>
                                Each component can be started individually or chained in certain configurations. For example, the local command chains the
                                Storage, Web Endpoint (collectively referred to as Web-Storage), Agent and GUI in a single
                                command.
                            </h4>
                            <h4>
                                The Storage, Web Endpoint and Agent can be started via:
                            </h4>
                            <p><code>$ thermostat web-storage-service</code></p>
                            <h4>
                                The Storage and Web Endpoint can be started via:
                            </h4>
                            <p><code>$ thermostat web-storage</code></p>
                            <h4>
                                The Storage can be started and stopped via:
                            </h4>
                            <p><code>$ thermostat storage --start</code></p>
                            <p><code>$ thermostat storage --stop</code></p>
                            <h4>
                                The Agent can be started via:
                            </h4>
                            <p><code>$ thermostat agent</code></p>
                            <h4>
                                The GUI Client can be started via:
                            </h4>
                            <p><code>$ thermostat gui</code></p>
                        </div>
                    </div>
                </section>
                <section id="distributed-setup">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 class="panel-title">Distributed Setup Tutorial</h2>
                        </div>
                        <div class="panel-body">
                            <h4>
                                This tutorial will guide you through setting Thermostat up on multiple machines. One machine will hold the Storage, accessed
                                through HTTP via the Web Endpoint. One or more machines will hold the Agent, monitoring any
                                JVMs on the machine and sending data to the Storage. One machine will view the data via GUI
                                or CLI Client.
                            </h4>
                            <h4>
                                Any machine that is part of the distributed setup needs Thermostat installed. All machines should have the same version of
                                Thermostat.
                            </h4>
                            <div id="rs-step-1">
                                <h3>
                                    Storage And Web Endpoint Setup
                                </h3>

                                <h4>
                                    To setup the Storage on a machine for remote access through HTTP it must be configured to bind to a proper IP address and
                                    port of the machine and have authentication for users.
                                </h4>
                                <h4>
                                    First we setup the Mongodb backend and user authentication with:
                                </h4>
                                <p><code>$ thermostat setup -c</code></p>
                                <h4>
                                    This runs the CLI setup, asking you to input the username/passwords for the Mongodb backend, default client user and default
                                    agent user. The Mongodb credentials are used by the Web Endpoint to connect to the local
                                    Mongodb backend. The default client user credentials are used by Clients to connect to
                                    the Web Endpoint. Likewise, the default agent user credentials are used by Agents to
                                    connect to the Web Endpoint. These credentials should be remembered for later use.
                                </h4>
                                <h4>
                                    Next, the Web Endpoint needs to be configured to bind to the host machine's IP Address. This is done with the configuration
                                    file <a class="ac" href="#term-thermostat-home">THERMOSTAT_HOME</a>/etc/db.properties
                                    or <a class="ac" href="#term-user-thermostat-home">USER_THERMOSTAT_HOME</a>/etc/db.properties.
                                    The settings in <a class="ac" href="#term-user-thermostat-home">USER_THERMOSTAT_HOME</a>                                    override those in
                                    <a class="ac" href="#term-thermostat-home">THERMOSTAT_HOME</a>.
                                </h4>
                                <h4>
                                    The BIND and PORT fields should be set to the machine's IP address and a free port. For a machine with ip 192.168.0.1 and
                                    free port 27518, the db.properties file would look like:
                                </h4>
                                <pre><code>BIND=192.168.0.1&#10PORT=27518</code></pre>
                                <h4>
                                    Finally, the Storage and Web Endpoint can be started via:
                                </h4>
                                <p><code>$ thermostat web-storage</code></p>
                                <h4>
                                    The Web Endpoint can be accessed at http://192.168.0.1:27518/thermostat/storage (replace IP and Port with appropriate values
                                    for your setup). Accessing the URL through a web browser should bring up an authentication
                                    prompt if the Storage and Web Endpoint are setup successfully.
                                </h4>
                            </div>

                            <div id="rs-step-2">
                                <h3>
                                    Agent Setup
                                </h3>

                                <h4>
                                    To setup the Agent on a machine it must be configured to connect to the Web Endpoint via URL.
                                </h4>
                                <h4>
                                    First, prevent setup from occurring by creating the file: <a class="ac" href="#term-user-thermostat-home">USER_THERMOSTAT_HOME</a>/data/setup-complete.stamp
                                </h4>
                                <h4>
                                    Next, configure the agent to bind it's Command Channel to a remotely accessible IP address and to connect to the Web Endpoint
                                    via URL. This is done with the file: <a class="ac"
                                        href="#term-user-thermostat-home">USER_THERMOSTAT_HOME</a>/etc/agent.properties The CONFIG_LISTEN_ADDRESS
                                    property should be set to a remotely accessible IP address and free port and the DB_URL
                                    property should be set to the URL that the Web Endpoint is accessible on. For a machine
                                    with ip 192.168.0.2 and free port 12000, connecting to a Web Endpoint at 192.168.0.1:27518,
                                    the agent.properties file would look like:
                                </h4>
                                <pre><code>CONFIG_LISTEN_ADDRESS=192.168.0.2:12000&#10DB_URL=http://192.168.0.1:27518/thermostat/storage</code></pre>
                                <h4>
                                    After this, set the credentials to be used in the file: <a class="ac" href="#term-user-thermostat-home">USER_THERMOSTAT_HOME</a>/etc/agent.auth
                                    These are used when connecting to the Web Endpoint and should be the same as the default
                                    agent user credentials in the setup for Storage and Web Endpoint. An example agent.auth
                                    file looks like:
                                </h4>
                                <pre><code>username=agentuser&#10password=agentpassword</code></pre>
                                <h4>
                                    Finally, the Agent can be started via:
                                </h4>
                                <p><code>$ thermostat agent</code></p>
                            </div>
                            <div id="rs-step-3">
                                <h3>
                                    Client Setup
                                </h3>

                                <h4>
                                    To setup the Client on the machine it must be configured to connect to the Web Endpoint via URL.
                                </h4>
                                <h4>
                                    First, prevent setup from occurring by creating the file: <a class="ac" href="#term-user-thermostat-home">USER_THERMOSTAT_HOME</a>/data/setup-complete.stamp
                                </h4>
                                <h4>
                                    For the GUI Client, start via:
                                </h4>
                                <p><code>$ thermostat gui</code></p>
                                <h4>
                                    A connection failed prompt will appear. Click "Configure..." and a dialog will appear where you can fill in the URL to connect
                                    to and the credentials to use. The URL is the URL of the Web Endpoint, e.g. http://192.168.0.1:27518/thermostat/storage.
                                    The credentials are for the default client user that was setup on the Storage and Web
                                    Endpoint machine.
                                </h4>
                                <h4>
                                    For the CLI Client, start via:
                                </h4>
                                <p><code>$ thermostat shell</code></p>
                                <h4>
                                    This enters the CLI terminal where you can connect to the Web Endpoint via:
                                </h4>
                                <p><code>connect -d http://192.168.0.1:27518/thermostat/storage</code></p>
                                <h4>
                                    Replace the argument for -d with the correct URL for your Web Endpoint. The terminal will then prompt you for credentials
                                    to use. Once successfully connected, other CLI commands that use the Web Endpoint will
                                    use the one specified in the connect command.
                                </h4>
                            </div>
                        </div>
                    </div>
                </section>
                <section id="cli-features">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 class="panel-title">CLI Features</h2>
                        </div>
                        <div class="panel-body">
                            <h4>
                                The easiest way to see what features the CLI has is to run the help command.
                            </h4>
                            <p><code>$ thermostat help</code></p>
                            <h4>
                                Thermostat offers CLI through invocations of thermostat, for example:
                            </h4>
                            <p><code>$ thermostat list-vms</code></p>
                            <h4>
                                Thermostat also offers a Shell that can be started via:
                            </h4>
                            <p><code>$ thermostat shell</code></p>
                            <h4>
                                This brings up the Shell, printing the version and the prompt and then waiting for command input. Run 'help' to list all
                                the commands available in the Shell.
                            </h4>
                            <pre><code>Thermostat version 1.99.12&#10Please see the User Guide at http://icedtea.classpath.org/wiki/Thermostat/UserGuide&#10Thermostat - > </pre></code>
                        </div>
                    </div>
                </section>
                <section id="gui-features">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 class="panel-title">GUI Features</h2>
                        </div>
                        <div class="panel-body">
                            <h3>
                                Host Machine Information
                            </h3>
                            <h4><ul>
                                <li>Hardware/Network Information</li>
                                <li>CPU/Memory Usage</li>
                                <li>NUMA Allocation Data</li>
                            </ul></h4>
                            <h3>
                                JVM Information
                            </h3>
                            <h4><ul>
                                <li>JVM Process Information</li>
                                <li>CPU/Memory Usage</li>
                                <li>GC, Heap, Threads, Stack Trace, IO, Compiler, Class Information</li>
                                <li>NUMA Allocation Data for NUMA Aware systems</li>
                            </ul></h4>
                            <h3>
                                JVM Actions
                            </h3>
                            <h4><ul>
                                <li>Kill a JVM</li>
                                <li>Perform a full GC</li>
                                <li>Create a Heap Dump and analyze it in GUI</li>
                                <li>Profile JVM</li>
                                <li>Inject Byteman rules and view results</li>
                                <li>Detect deadlocks</li>
                            </ul></h4>
                        </div>
                    </div>
                </section>
                <section id="terminology">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h2 class="panel-title">Terminology</h2>
                        </div>
                        <div class="panel-body">
                            <h4>
                                This section contains description for terminology used in the User Guide.
                            </h4>

                            <div id="term-thermostat-home">
                                <h4 class="h4c">
                                    THERMOSTAT_HOME
                                </h4>

                                <h4>
                                    THERMOSTAT_HOME refers to the install location of Thermostat. This location is usually owned by root. For an RPM based installation
                                    this is:
                                </h4>
                                <p><code>/usr/share/thermostat</code></p>
                                <h4>
                                    For compilations from source (tarballs, cloned repository) this is:
                                </h4>
                                <p><code>{source-location}/distribution/target/image</code></p>
                            </div>
                            <div id="term-user-thermostat-home">
                                <h4 class="h4c">
                                    USER_THERMOSTAT_HOME
                                </h4>

                                <h4>
                                    USER_THERMOSTAT_HOME refers to the configuration and data location of Thermostat in the user's home directory. For user "someuser"
                                    this is:
                                </h4>
                                <p><code>/home/someuser/.thermostat</code></p>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
            <div class="text-center">
                <h4>
                    There are also a lot of resources in the Thermostat wiki targeting developers.
                </h4>
                <a href="http://icedtea.classpath.org/wiki/Thermostat" class="btn btn-default btn-c1" role="button"> Wiki</a>
            </div>
        </div>
    </div>
    <div class="col-xs-2">
        <nav class="bs-docs-sidebar fixed" id="nav-sidebar">
            <ul class="nav bs-docs-sidenav">
                <li><a href="#component-overview">Component Overview</a></li>
                <li><a href="#local-setup">Local Setup Tutorial</a></li>
                <li><a href="#distributed-setup">Distributed Setup Tutorial</a>
                    <ul class="nav nav-stacked">
                        <li><a href="#rs-step-1">Storage Setup</a></li>
                        <li><a href="#rs-step-2">Agent Setup</a></li>
                        <li><a href="#rs-step-3">Client Setup</a></li>
                    </ul>
                </li>
                <li><a href="#cli-features">CLI Features</a></li>
                <li><a href="#gui-features">GUI Features</a></li>
                <li><a href="#terminology">Terminology</a>
                    <ul class="nav nav-stacked">
                        <li><a href="#term-thermostat-home">THERMOSTAT_HOME</a></li>
                        <li><a href="#term-user-thermostat-home">USER_THERMOSTAT_HOME</a></li>
                    </ul>
                </li>
            </ul>
            <a href="#logo-box" class="back-to-top">Back to Top</a>
        </nav>
    </div>
</div>

<script>
$('body').scrollspy({
    target: '#nav-sidebar',
    offset: 10
});
</script>

<!--
<h4>
    TODO Some possibilities:
    <ul>
        <li>Remote Setup</li>
        <li>API</li>
        <li>Plugin Development Guide</li>
        <li>Thermostat in Depth (web-storage-service, web-storage, storage, agent, gui, shell)</li>
        <li>Thermostat and Docker</li>
        <li>Thermostat and Byteman</li>
        <li>User Guides, HowTos</li>
        <li>Secure Setup, TLS/SSL, Thermostat Access Control, Command Channel</li>
        <li>Performance Logging and Analysis</li>
        <li>Setup for mongostat</li>
    </ul>
</h4>
-->