Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-16182: Updating user guide page Welcome to reflect makersaurus guidelines #16183

Open
wants to merge 20 commits into
base: rel-3.46.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions h2o-docs/src/product/getting-started/api-users.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
API users
=========

Our REST APIs are generated immediately out of the code, allowing you to implement machine learning in many ways. For example, REST APIs can be used to call a model created by sensor data and to set up auto-alerts if the sensor data falls below a specified threshold.

REST API references
-------------------

See the definitive `guide to H2O's REST API <https://docs.h2o.ai/h2o/latest-stable/h2o-docs/rest-api-reference.html>`__.

Schemas
~~~~~~~

See the definitive `guide to H2O's REST API schemas <https://docs.h2o.ai/h2o/latest-stable/h2o-docs/rest-api-reference.html#schema-reference>`__.


REST API example
~~~~~~~~~~~~~~~~

See an `in-depth explanation of how H2O REST API commands are used <https://github.com/h2oai/h2o-3/blob/master/h2o-docs/src/api/REST/h2o_3_rest_api_overview.md>`__. This explanation includes versioning, experimental APIs, verbs, status codes, formats, schemas, payloads, metadata, and examples.
161 changes: 161 additions & 0 deletions h2o-docs/src/product/getting-started/docker-users.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
Docker users
============

This section describes how to use H2O on Docker. It walks you through the following steps:

1. Installing Docker on Mac or Linux OS.
2. Creating and modifying your Dockerfile.
3. Building a Docker image from the Dockerfile.
4. Running the Docker build.
5. Launching H2O.
6. Accessing H2O frm the web browser or from Python/R.

Prerequisites
-------------

- Linux kernal verison 3.8+ or Mac OS 10.6+
- VirtualBox
- Latest version of Docker installed and configured
- Docker daemon running (enter all following commands in the Docker daemon window)
- In ``User`` directory (not ``root``)

.. note::

- Older Linux kernal versions can cause kernal panics that break Docker. There are ways around it, but attempt these at your own risk. Check the version of your kernel by running ``uname -r``.
- The Dockerfile always pulls the latest H2O release.
- The Docker image only needs to be built once.

Walkthrough
-----------

The following steps walk you through how to use H2O on Docker.

.. note::

If the following commands don't work, prepend them with ``sudo``.

Step 1: Install and launch Docker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Depending on your operating system, select the appropriate installation method:

- `Mac installation <https://docs.docker.com/installation/mac/#installation>`__
- `Ubuntu installation <https://docs.docker.com/installation/ubuntulinux/>`__
- `Other OS installations <https://docs.docker.com/installation/>`__

.. note::

By default, Docker allocates 2GB of memory for Mac installations. Be sure to increase this value. We suggest 3-4 times the size of the dataset for the amount of memory required.

Step 2: Create or download Dockerfile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Create a folder on the Host OS to host your Dockerfile:

.. code-block:: bash

mkdir -p /data/h2o-{{branch_name}}

2. Download or create a Dockerfile, which is a build recipe that builds the container. Download and use our `Dockerfile template <https://github.com/h2oai/h2o-3/blob/master/Dockerfile>`__:

.. code-block:: bash

cd /data/h2o-<branch_name>
wget https://raw.githubusercontent.com/h2oai/h2o-3/master/Dockerfile

This Dockerfile will do the following:

- Obtain and update the base image (Ubuntu 14.0.4).
- Install Java 8.
- Obtain and download the H2O build from H2O's S3 repository.
- Expose ports ``54321`` and ``54322`` in preparation for launching H2O on those ports.

Step 3: Build a Docker image from the Dockerfile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From the ``/data/h2o-<branch_name>`` directory, run the following (note that ``v5`` represents the current version number):

.. code-block:: bash

docker build -t "h2o.ai/{{branch_name}}:v5"

.. note::

This process can take a few minutes because it assembles all the necessary parts for the image.

Step 4: Run the Docker build
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On a mac, use the argument ``-p 54321:54321`` to expressly map the port ``54321`` (this is not necessary on Linux).

.. code-block:: bash

docker run -ti -p 54321:54321 h2o.ai/{{branch_name}}:v5 /bin/bash

Step 5: Launch H2O
~~~~~~~~~~~~~~~~~~

Navigate to the ``/opt`` directory and launch H2O. Update the value of ``-Xmx`` to the amount of memory you want ot allocate to the H2O instance. By default, H2O will launch on port ``54321``.

.. code-block:: bash

cd /opt
java -Xmx1g -jar h2o.jar

Step 6: Access H2O from the web browser or Python/R
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. tabs::
.. tab:: On Linux

After H2O launches, copy and paste the IP address and port of the H2O instance into the address bar of your browser. In the following example, the IP is ``172.17.0.5:54321``.

.. code-block:: bash

03:58:25.963 main INFO WATER: Cloud of size 1 formed [/172.17.0.5:54321 (00:00:00.000)]

.. tab:: On MacOS

Locate the IP address of the Docker's network (``192.168.59.103`` in the following example) that bridges to your Host OS by opening a new terminal window (not a bash for your container) and running ``boot2docker ip``.

.. code-block:: bash

$ boot2docker ip
192.168.59.103


You can also view the IP address (``192.168.99.100`` in the following example) by scrolling to the top of the Docker daemon window:

::


## .
## ## ## ==
## ## ## ## ## ===
/"""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~
\______ o __/
\ \ __/
\____\_______/


docker is configured to use the default machine with IP 192.168.99.100
For help getting started, check out the docs at https://docs.docker.com

Access Flow
'''''''''''

After obtaining the IP address, point your browser to the specified IP address and port to open Flow. In R and Python, you can access the instance by installing the latest version of the H2O R or Python package and then initializing H2O:

.. tabs::
.. code-tab:: python

# Initialize H2O
import h2o
docker_h2o = h2o.init(ip = "192.168.59.103", port = 54321)

.. code-tab:: r R

# Initialize H2O
library(h2o)
dockerH2O <- h2o.init(ip = "192.168.59.103", port = 54321)
80 changes: 80 additions & 0 deletions h2o-docs/src/product/getting-started/experienced-users.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Experienced users
=================

If you've used previous versions of H2O, the following links will help guide you through the process of upgrading H2O.

Changes
-------

Change log
~~~~~~~~~~

`This page houses the most recent changes in the latest build of H2O <https://github.com/h2oai/h2o-3/blob/master/Changes.md>`__. It lists new features, improvements, security updates, documentation improvements, and bug fixes for each release.

API-related changes
~~~~~~~~~~~~~~~~~~~

The `API-related changes <https://docs.h2o.ai/h2o/latest-stable/h2o-docs/api-changes.html>`__ section describes changes made to H2O that can affect backward compatibility.

Developers
----------

If you're looking to use H2O to help you develop your own apps, the following links will provide helpful references.

Gradle
~~~~~~

H2O's build is completely managed by Gradle. Any IDEA with Gradle support is sufficient for H2O-3 development. The latest versions of IntelliJ IDEA are thoroughly tested and proven to work well.

Open the folder with H2O-3 in IntelliJ IDEA and it will automatically recognize that Gradle is requried and will import the project. The Gradle wrapper present in the repository itself may be used manually/directly to build and test if required.

For JUnit tests to pass, you may need multiple H2O nodes. Create a "Run/Debug" configuration:

::

Type: Application
Main class: H2OApp
Use class path of module: h2o-app

After starting multiple "worker" node processes in addition to the JUnit test process, they will cloud up and run the multi-node JUnit tests.

Maven install
~~~~~~~~~~~~~

You can view instructions for using H2O with Maven on the `Downloads page <https://h2o.ai/resources/download/>`__.

1. Select H2O Open Source Platform or scroll down to H2O.
2. Select the version of H2O you want to install (latest stable or nightly build).
3. Click the Use from Maven tab.

`This page provides information on how to build a version of H2O that generates the correct IDE files <https://github.com/h2oai/h2o-3/blob/master/build.gradle>`__ for your Maven installation.

Developer resources
~~~~~~~~~~~~~~~~~~~

Documentation
'''''''''''''

See the detailed `instructions on how to build and launch H2O <https://github.com/h2oai/h2o-3#4-building-h2o-3>`__, including how to clone the repository, how to pull from the repository, and how to install required dependencies.

Droplet project templates
^^^^^^^^^^^^^^^^^^^^^^^^^

`This page provides template information <https://github.com/h2oai/h2o-droplets>`__ for projects created in Java, Scala, or Sparkling Water.

Blogs
'''''

Learn more about performance characteristics when implementing new algorithms in this `KV Store guide blog <https://www.h2o.ai/blog/kv-store-memory-analytics-part-2-2/>`__.

This `blog post by Cliff <https://www.h2o.ai/blog/hacking-algorithms-in-h2o-with-cliff/>`__ walks you through building a new algorithm, using K-Means, Quantiles, and Grep as examples.

Join the H2O community
----------------------

`Join our community support and outreach <https://h2o.ai/community/>`__ by accessing self-paced courses, scoping out meetups, and interacting with other users and our team.

Contributing code
~~~~~~~~~~~~~~~~~

If you're interested in contributing code to H2O, we appreciate your assistance! See `how to contribute to H2O <https://github.com/h2oai/h2o-3/blob/master/CONTRIBUTING.md>`__. This document describes how to access our list of issues, or suggested tasks for contributors, and how to contact us.
6 changes: 6 additions & 0 deletions h2o-docs/src/product/getting-started/flow-users.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Flow users
==========

H2O Flow is a notebook-style open source UI for H2O. It's a web-based interactive environment that lets you combine code execution, text, mathematics, plots, and rich media in a single document (similar to iPython Notebooks).

See more about `H2O Flow <../flow.html>`__.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I clicked on the URL and it goes to error.