metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From merrimanr <...@git.apache.org>
Subject [GitHub] incubator-metron pull request #489: METRON-623: Management UI
Date Mon, 03 Apr 2017 16:39:15 GMT
Github user merrimanr commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/489#discussion_r109464805
  
    --- Diff: metron-interface/metron-config/README.md ---
    @@ -0,0 +1,67 @@
    +# Metron Management UI
    +
    +This module provides a user interface for management functions in Metron.
    +
    +## Prerequisites
    +
    +* A network accessible Metron REST application
    +* npm 3.8.9+ (npm can be installed on quick dev with `yum install npm && npm
install npm@3.8.9 -g`)
    +
    +## Installation
    +1. Build Metron:
    +    ```
    +    mvn clean package -DskipTests
    +    ```
    +  
    +1. Copy `incubator-metron/metron-interface/metron-config/target/metron-config-METRON_VERSION-archive.tar.gz`
to the desired host.
    +
    +1. Untar the archive in the target directory.  The directory structure will look like:
    +    ```
    +    bin
    +      start_management_ui.sh
    +    web
    +      management-ui
    +        web assets (html, css, js, ...)
    +    ```
    +
    +1. For production use, the contents of the `./web/management-ui` directory should be
deployed to a web server with paths `/api/v1` and `/logout` mapped to the REST application
url.  
    +
    +1. As an example, a convenience script is included that will install a simple [http-server](https://github.com/indexzero/http-server),
set the root context path to `./web/management-ui`, and exposes proxy settings as environment
variables.  Set the `METRON_REST_URL` environment variable (`http://localhost:8080` by default)
to the url of REST application.  Set the `METRON_MANAGEMENT_UI_PORT` environment variable
(`4200` by default) to the desired port.
    +
    +1. Then start the application with the script:
    +    ```
    +    ./bin/start_management_ui.sh
    +    ```
    +
    +## Usage
    +
    +The application will be available at http://host:4200 with credentials `user/password`,
assuming the default port is configured and the `dev` profile is included when starting the
REST application.  See the [REST application](../metron-rest#security) documentation for more
information about security configuration for production.
    +
    +## Development
    +
    +The Management UI can also be started in development mode.  This allows changes to web
assets to be seen interactively.
    +
    +1. Install the application with dev dependencies:
    +    ```
    +    npm install
    +    ```
    +  
    +1. Start the application:
    +    ```
    +    ./scripts/start_dev.sh
    +    ```
    +
    +The application will be available at http://localhost:4200/.  The REST application url
defaults to `http://localhost:8080` but can be changed in the `proxy.conf.json` file.
    +
    +## Testing
    +
    +1. Install the application with dev dependencies:
    +    ```
    +    npm install
    +    ```
    +
    +1. Unit tests can be run with:
    --- End diff --
    
    It looks ok in github.  I was using the README in metron-profiler as an example.  I'm
not sure which one is correct to be honest.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message