Skip to content
This repository has been archived by the owner on Apr 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #254 from h2oai/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
justinloyola authored Nov 15, 2016
2 parents 656ddf3 + 94dc595 commit 472949b
Show file tree
Hide file tree
Showing 186 changed files with 7,475 additions and 2,585 deletions.
10 changes: 10 additions & 0 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ If you're an Open Source community member, you can contact H2O using one of the
- Send an e-mail message directly to <a href="mailto:[email protected]">[email protected]</a>
- Ask your question on the [H2O Community](https://community.h2o.ai/spaces/540/index.html) site (create an account if necessary)

## v1.1.4 Changes

- [STEAM-496] Early release support for LDAP basic authentication using the ``--authentication-provider`` and ``--authentication-config`` flags when starting Steam.
- [STEAM-562] Steam superusers can add and maintain users and roles in the UI.
- [PUBSTEAM-4] When a dataframe that is used to train a model is deleted from the cluster, the model metadata will remain in the Steam database.
- [PUBSTEAM-3] Servers that are down are no longer shown as green in the main view.

## v1.1.3 Changes

- [STEAM-567] Updated Prediction Service UI to reflect DeepWater support
Expand Down
46 changes: 46 additions & 0 deletions cli2/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
// supplied Cobra context.
func registerGeneratedCommands(c *context, cmd *cobra.Command) {
cmd.AddCommand(
activate(c),
add(c),
build(c),
check(c),
Expand All @@ -55,6 +56,51 @@ func registerGeneratedCommands(c *context, cmd *cobra.Command) {
)
}

var activateHelp = `
activate [?]
Activate entities
Commands:
$ steam activate identity ...
`

func activate(c *context) *cobra.Command {
cmd := newCmd(c, activateHelp, nil)

cmd.AddCommand(activateIdentity(c))
return cmd
}

var activateIdentityHelp = `
identity [?]
Activate Identity
Examples:
Activate an identity
$ steam activate identity \
--identity-id=?
`

func activateIdentity(c *context) *cobra.Command {
var identityId int64 // Integer ID of an identity in Steam.

cmd := newCmd(c, activateIdentityHelp, func(c *context, args []string) {

// Activate an identity
err := c.remote.ActivateIdentity(
identityId, // Integer ID of an identity in Steam.
)
if err != nil {
log.Fatalln(err)
}
return
})

cmd.Flags().Int64Var(&identityId, "identity-id", identityId, "Integer ID of an identity in Steam.")
return cmd
}

var addHelp = `
add [?]
Add entities
Expand Down
5 changes: 4 additions & 1 deletion cli2/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ func serveMaster(c *context) *cobra.Command {
webTLSCertPath string
webTLSKeyPath string
authProvider string
authConfig string
workingDirectory string
clusterProxyAddress string
compilationServiceAddress string
Expand Down Expand Up @@ -193,6 +194,7 @@ func serveMaster(c *context) *cobra.Command {
webTLSCertPath,
webTLSKeyPath,
authProvider,
authConfig,
workingDirectory,
clusterProxyAddress,
compilationServiceAddress,
Expand Down Expand Up @@ -226,7 +228,8 @@ func serveMaster(c *context) *cobra.Command {
cmd.Flags().StringVar(&webAddress, "web-address", opts.WebAddress, "Web server address (\"<ip>:<port>\" or \":<port>\").")
cmd.Flags().StringVar(&webTLSCertPath, "web-tls-cert-path", opts.WebTLSCertPath, "Web server TLS certificate file path (optional).")
cmd.Flags().StringVar(&webTLSKeyPath, "web-tls-key-path", opts.WebTLSKeyPath, "Web server TLS key file path (optional).")
cmd.Flags().StringVar(&authProvider, "authentication-provider", opts.AuthProvider, "Authentication mechanismfor client logins (one of \"basic\" or \"digest\")")
cmd.Flags().StringVar(&authProvider, "authentication-provider", opts.AuthProvider, "Authentication mechanism for client logins (one of \"basic\", \"digest\"), or \"basic-ldap\"")
cmd.Flags().StringVar(&authConfig, "authentication-config", opts.AuthConfig, "Configuration file for authentication (used in \"basic-ldap\")")
cmd.Flags().StringVar(&workingDirectory, "working-directory", opts.WorkingDirectory, "Working directory for application files.")
cmd.Flags().StringVar(&clusterProxyAddress, "cluster-proxy-address", opts.ClusterProxyAddress, "Cluster proxy address (\"<ip>:<port>\" or \":<port>\")")
cmd.Flags().StringVar(&compilationServiceAddress, "compilation-service-address", opts.CompilationServiceAddress, "Model compilation service address (\"<ip>:<port>\")")
Expand Down
Binary file modified demo/H2OSteamDemo.pdf
Binary file not shown.
68 changes: 62 additions & 6 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ The **Clusters** page shows all H2O clusters that Steam is connected to along wi
![Steam Clusters page](images/cluster_page.png)


## Launch a New Cluster
## <a name="launchcluster"></a>Launch a New Cluster

You can connect to additional clusters that are running H2O by clicking the **Launch New Cluster** button.

Expand All @@ -393,14 +393,68 @@ You can connect to additional clusters that are running H2O by clicking the **La

# Users

The Users page includes a list of all users are have been added to the Steam database along with the user's role. Note that currently, only Steam superusers can add users and roles.
The Users page includes a list of all users are have been added to the Steam database along with the user's role. From this page, Steam superusers can add, edit, and deactivate users and roles.

![Users page](images/users.png)

The Roles tab provides a table of the permissions assigned to each role.
The Roles tab provides a table of the permissions assigned to each role. The information in this table is viewable only to users with appropriate privileges.

![Roles tab](images/roles_tab.png)

## <a name="createroles"></a>Creating Roles

Roles must be created before users can be added to Steam.

1. To create a new role, click on the **Create Role** button.
2. Specify a name and description for the role, then select the permissions that will be granted to the role.
3. Click **Create Role** at the bottom of the form when you are done.

![Create role](images/create_role.png)

## <a name="deleteroles"></a>Deleting Roles

On the Roles tab, scroll down to the bottom of the page, and click the trashcan icon beside the role that you want to delete. A confirmation page will display, prompting you to confirm the deletion. Click **Confirm** to remove the role.

![Delete role](images/delete_role.png)

## <a name="addusers"></a>Adding Users

Superusers can add users directly from within the UI.

**Note**: Users must be assigned to a role. Because of that, roles must be created before new users can be added.

1. Click the **Create User** button.
2. Enter the name of the user. Note that the name must match with a username in your YARN system.
3. Specify and confirm a password for the user.
4. Specify the role(s) and workgroup(s) for this user.
5. Click **Create User** when you are done.

![Create user](images/create_user.png)

Upon successful completion, the new user will appear in the list of Steam users.

## <a name="editusers"></a>Editing Users

On the Users tab, click the **Edit** link beside the user you want to edit. This opens the Edit User Details form. Change the user's workgroup and/or roles, then click **Confirm** when you are done.

![Edit user](images/edit_user.png)

## <a name="deactivateusers"></a>Deactivating/Reactivating Users

On the Users tab, click the **Deactivate User** link beside the user whose Steam access you want to revoke. Click **Reactivate User** to once again grant access for that user.

![Deactivate/reactivate user](images/deactivate_user.png)

## <a name="changepermissions"></a>Changing Permissions

Superusers can add or remove permissions for each role directly on this page. Select the checkbox for the correspoding permission and role that you want to change, then click **Review Changes** at the bottom of the page. A popup displays, providing you with a summary of the changes.

![Confirm changes](images/update_permissions_confirm.png)

Click the **Confirm** button beside each change that you want to make, then click **Save Changes** to complete the update.

![Save changes](images/update_permissions_save.png)


# <a name="usesteamwithflow"></a>Using Steam with H2O Flow

Expand Down Expand Up @@ -949,7 +1003,7 @@ The following example deletes workgroup 3 from the database. Note that you can u

**Description**

Retrieves a list of cluster types that are available in Steam along with the corresponding code. Note that these cluster types are currently hard coded into Steam.
Retrieves a list of cluster types that are available in Steam along with the corresponding code.

**Usage**

Expand All @@ -976,7 +1030,7 @@ The following example retrieves a list of the Steam cluster types.

**Description**

Retrieves a list of entity types that are available in Steam along with the corresponding code. Note that these entity types are currently hard coded into Steam.
Retrieves a list of entity types that are available in Steam along with the corresponding code.

**Usage**

Expand Down Expand Up @@ -1012,7 +1066,9 @@ The following example retrieves a list of Steam entity types.

**Description**

Retrieves a list of permissions available in Steam along with the corresponding code. These permissions are currently hard coded into Steam.
Retrieves a list of permissions available in Steam along with the corresponding code. A permission code is used when linking roles to permissions.

Note that permission IDs are randomly generated during installation, and the IDs will vary between Steam installations.

**Usage**

Expand Down
7 changes: 7 additions & 0 deletions demo/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@
* [Creating a New Label](README.md#createlabel)
* [Collaborators](README.md#collaborators)
* [Clusters](README.md#clusters)
* [Launch New Cluster](README.md#launchcluster)
* [Users](README.md#users)
* [Creating Roles](README.md#createroles)
* [Deleting Roles](README.md#deleteroles)
* [Adding Users](README.md#addusers)
* [Editing Users](README.md#editusers)
* [Deactivating/Reactivating Users](README.md#deactivateusers)
* [Changing Permissions](README.md#changepermissions)
* [Using Steam with H2O Flow](README.md#usesteamwithflow)
* [Stopping Steam](README.md#stopsteam)
* [What's Next?](README.md#next)
Expand Down
Binary file added demo/images/create_role copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/images/create_role.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/images/create_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/images/deactivate_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/images/edit_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/images/roles_tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/images/update_permissions_confirm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/images/update_permissions_save.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo/images/users.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 5 additions & 7 deletions docs/CLIAppendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,7 @@ you can use `get workgroups`_ to retrieve a list of workgroups.
**Description**

Retrieves a list of cluster types that are available in Steam along with
the corresponding code. Note that these cluster types are currently hard
coded into Steam.
the corresponding code.

**Usage**

Expand Down Expand Up @@ -642,8 +641,7 @@ The following example retrieves a list of the Steam cluster types.
**Description**

Retrieves a list of entity types that are available in Steam along with
the corresponding code. Note that these entity types are currently hard
coded into Steam.
the corresponding code.

**Usage**

Expand Down Expand Up @@ -682,9 +680,9 @@ The following example retrieves a list of Steam entity types.

**Description**

Retrieves a list of permissions available in Steam along with the
corresponding code. These permissions are currently hard coded into
Steam.
Retrieves a list of permissions available in Steam along with the corresponding code. A permission code is used when linking roles to permissions.

**Note**: Permission IDs are randomly generated during installation, and the IDs will vary between Steam installations.

**Usage**

Expand Down
9 changes: 7 additions & 2 deletions docs/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,18 @@ the URL of the edge node and the superuser login credentials. The superuser can

java -jar var/master/assets/jetty-runner.jar var/master/assets/ROOT.war

3. Open another terminal window and run the following command to start Steam. Be sure to include the ``--superuser-name=superuser`` and ``--superuser-password=superuser`` flags. (Or provide a more secure password.) This starts Steam on the edge node at port 9000 and creates a Steam superuser. The Steam superuser is responsible for creating roles, workgroups, and users and maintains the H2O cluster.
3. Open another terminal window and run the following command to start Steam. Be sure to include the ``--superuser-name=superuser`` and ``--superuser-password=superuser`` flags. (Or provide a more secure password.) This starts Steam on the edge node at port 9000 and creates a Steam superuser. The Steam superuser is responsible for creating roles, workgroups, and users and maintains the H2O cluster. Use ``./steam serve master --help`` or ``./steam serve master -h`` for information on how to start the compilation and/or prediction service on a different location and for additional flags that can be specified when starting Steam.

::

sudo ./steam serve master --superuser-name=superuser --superuser-password=superuser

**Note**: Use ``./steam serve master --help`` or ``./steam serve master -h`` for information on how to start the compilation and/or prediction service on a different location.
**Note**: This version of Steam currently includes an experimental/early release of LDAP basic authentication support using the ``—-authentication-provider`` and ``—-authentication-config`` flags. When used, a configuration file is required. For example:

::

sudo ./steam serve master --superuser-name=superuser --superuser-password=superuser —-authentication-provider="ldap-basic" —-authentication-config="file/path.toml"


4. Open a Chrome browser and navigate to the YARN edge node.

Expand Down
2 changes: 1 addition & 1 deletion docs/UserManagement.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ User Management Overview

Before using Steam, it is important to understand User Management within
your YARN environment. In Steam, User Management is supported in a
PostgreSQL database. The User Management functions in Steam determine
database. The User Management functions in Steam determine
the level of access that users have for Steam features. The Steam
database supports setup via CLI commands. Refer to the `CLI Command
Reference Appendix <CLIAppendix.html>`__ for a list of all
Expand Down
Loading

0 comments on commit 472949b

Please sign in to comment.