| <!DOCTYPE html> |
| <!-- |
| | Generated by Apache Maven Doxia Site Renderer 1.8 from src/site/markdown/metron-interface/metron-config/index.md at 2019-05-14 |
| | Rendered using Apache Maven Fluido Skin 1.7 |
| --> |
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| <head> |
| <meta charset="UTF-8" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| <meta name="Date-Revision-yyyymmdd" content="20190514" /> |
| <meta http-equiv="Content-Language" content="en" /> |
| <title>Metron – Metron Management UI</title> |
| <link rel="stylesheet" href="../../css/apache-maven-fluido-1.7.min.css" /> |
| <link rel="stylesheet" href="../../css/site.css" /> |
| <link rel="stylesheet" href="../../css/print.css" media="print" /> |
| <script type="text/javascript" src="../../js/apache-maven-fluido-1.7.min.js"></script> |
| <script type="text/javascript"> |
| $( document ).ready( function() { $( '.carousel' ).carousel( { interval: 3500 } ) } ); |
| </script> |
| </head> |
| <body class="topBarDisabled"> |
| <div class="container-fluid"> |
| <div id="banner"> |
| <div class="pull-left"><a href="http://metron.apache.org/" id="bannerLeft"><img src="../../images/metron-logo.png" alt="Apache Metron" width="148px" height="48px"/></a></div> |
| <div class="pull-right"></div> |
| <div class="clear"><hr/></div> |
| </div> |
| |
| <div id="breadcrumbs"> |
| <ul class="breadcrumb"> |
| <li class=""><a href="http://www.apache.org" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li> |
| <li class=""><a href="http://metron.apache.org/" class="externalLink" title="Metron">Metron</a><span class="divider">/</span></li> |
| <li class=""><a href="../../index.html" title="Documentation">Documentation</a><span class="divider">/</span></li> |
| <li class="active ">Metron Management UI</li> |
| <li id="publishDate" class="pull-right"><span class="divider">|</span> Last Published: 2019-05-14</li> |
| <li id="projectVersion" class="pull-right">Version: 0.7.1</li> |
| </ul> |
| </div> |
| <div class="row-fluid"> |
| <div id="leftColumn" class="span2"> |
| <div class="well sidebar-nav"> |
| <ul class="nav nav-list"> |
| <li class="nav-header">User Documentation</li> |
| <li><a href="../../index.html" title="Metron"><span class="icon-chevron-down"></span>Metron</a> |
| <ul class="nav nav-list"> |
| <li><a href="../../CONTRIBUTING.html" title="CONTRIBUTING"><span class="none"></span>CONTRIBUTING</a></li> |
| <li><a href="../../Upgrading.html" title="Upgrading"><span class="none"></span>Upgrading</a></li> |
| <li><a href="../../metron-analytics/index.html" title="Analytics"><span class="icon-chevron-right"></span>Analytics</a></li> |
| <li><a href="../../metron-contrib/metron-docker/index.html" title="Docker"><span class="none"></span>Docker</a></li> |
| <li><a href="../../metron-contrib/metron-performance/index.html" title="Performance"><span class="none"></span>Performance</a></li> |
| <li><a href="../../metron-deployment/index.html" title="Deployment"><span class="icon-chevron-right"></span>Deployment</a></li> |
| <li><a href="../../metron-interface/index.html" title="Interface"><span class="icon-chevron-down"></span>Interface</a> |
| <ul class="nav nav-list"> |
| <li><a href="../../metron-interface/metron-alerts/index.html" title="Alerts"><span class="none"></span>Alerts</a></li> |
| <li class="active"><a href="#"><span class="none"></span>Config</a></li> |
| <li><a href="../../metron-interface/metron-rest/index.html" title="Rest"><span class="none"></span>Rest</a></li> |
| </ul> |
| </li> |
| <li><a href="../../metron-platform/index.html" title="Platform"><span class="icon-chevron-right"></span>Platform</a></li> |
| <li><a href="../../metron-sensors/index.html" title="Sensors"><span class="icon-chevron-right"></span>Sensors</a></li> |
| <li><a href="../../metron-stellar/stellar-3rd-party-example/index.html" title="Stellar-3rd-party-example"><span class="none"></span>Stellar-3rd-party-example</a></li> |
| <li><a href="../../metron-stellar/stellar-common/index.html" title="Stellar-common"><span class="icon-chevron-right"></span>Stellar-common</a></li> |
| <li><a href="../../metron-stellar/stellar-zeppelin/index.html" title="Stellar-zeppelin"><span class="none"></span>Stellar-zeppelin</a></li> |
| <li><a href="../../use-cases/index.html" title="Use-cases"><span class="icon-chevron-right"></span>Use-cases</a></li> |
| </ul> |
| </li> |
| </ul> |
| <hr /> |
| <div id="poweredBy"> |
| <div class="clear"></div> |
| <div class="clear"></div> |
| <div class="clear"></div> |
| <div class="clear"></div> |
| <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../../images/logos/maven-feather.png" /></a> |
| </div> |
| </div> |
| </div> |
| <div id="bodyColumn" class="span10" > |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <h1>Metron Management UI</h1> |
| <p><a name="Metron_Management_UI"></a></p> |
| <p>This module provides a user interface for management functions in Metron.</p> |
| <div class="section"> |
| <h2><a name="Prerequisites"></a>Prerequisites</h2> |
| <ul> |
| |
| <li>A network accessible Metron REST application</li> |
| <li>nvm (or a similar node verison manager) should be installed. The node version required for this project is listed in the <a class="externalLink" href="https://github.com/creationix/nvm#nvmrc">.nvmrc</a> file.</li> |
| </ul></div> |
| <div class="section"> |
| <h2><a name="Installation"></a>Installation</h2> |
| <div class="section"> |
| <h3><a name="From_Source"></a>From Source</h3> |
| <ol style="list-style-type: decimal"> |
| |
| <li> |
| |
| <p>Package the application with Maven:</p> |
| |
| <div> |
| <div> |
| <pre class="source">cd metron-interface/metron-config |
| mvn clean package |
| </pre></div></div> |
| </li> |
| <li> |
| |
| <p>Untar the archive in the $METRON_HOME directory. The directory structure will look like:</p> |
| |
| <div> |
| <div> |
| <pre class="source">bin |
| metron-management-ui |
| web |
| expressjs |
| package.json |
| server.js |
| management-ui |
| web assets (html, css, js, ...) |
| </pre></div></div> |
| </li> |
| <li> |
| |
| <p>Copy the <tt>$METRON_HOME/bin/metron-management-ui</tt> script to <tt>/etc/init.d/metron-management-ui</tt></p> |
| </li> |
| <li> |
| |
| <p>Install the <a class="externalLink" href="https://expressjs.com/">Express</a> web framework from the <tt>package.json</tt> file in <tt>$METRON_HOME/web/expressjs</tt>:</p> |
| |
| <div> |
| <div> |
| <pre class="source">npm --prefix $METRON_HOME/web/expressjs/ install |
| </pre></div></div> |
| </li> |
| </ol></div> |
| <div class="section"> |
| <h3><a name="From_Package_Manager"></a>From Package Manager</h3> |
| <ol style="list-style-type: decimal"> |
| |
| <li> |
| |
| <p>Deploy the RPM at <tt>/metron/metron-deployment/packaging/docker/rpm-docker/target/RPMS/noarch/metron-config-$METRON_VERSION-*.noarch.rpm</tt></p> |
| </li> |
| <li> |
| |
| <p>Install the RPM with:</p> |
| |
| <div> |
| <div> |
| <pre class="source">rpm -ih metron-config-$METRON_VERSION-*.noarch.rpm |
| </pre></div></div> |
| </li> |
| </ol></div></div> |
| <div class="section"> |
| <h2><a name="Configuration"></a>Configuration</h2> |
| <p>The Managment UI is configured in the <tt>$METRON_HOME/config/management_ui.yml</tt> file. Create this file and set the values to match your environment:</p> |
| |
| <div> |
| <div> |
| <pre class="source">port: port the managment UI will run on |
| |
| rest: |
| host: REST application host |
| port: REST applciation port |
| </pre></div></div> |
| </div> |
| <div class="section"> |
| <h2><a name="Usage"></a>Usage</h2> |
| <p>After configuration is complete, the Management UI can be managed as a service:</p> |
| |
| <div> |
| <div> |
| <pre class="source">service metron-management-ui start |
| </pre></div></div> |
| |
| <p>The application will be available at <a class="externalLink" href="http://host:4200">http://host:4200</a> assuming the port is set to <tt>4200</tt>. Logs can be found at <tt>/var/log/metron/metron-management-ui.log</tt>.</p></div> |
| <div class="section"> |
| <h2><a name="Development"></a>Development</h2> |
| <p>The Management UI can also be started in development mode. This allows changes to web assets to be seen interactively.</p> |
| <ol style="list-style-type: decimal"> |
| |
| <li> |
| |
| <p>Switch to the correct node version and install all the dependent node_modules using the following commands:</p> |
| |
| <div> |
| <div> |
| <pre class="source">cd metron-interface/metron-config |
| nvm use |
| npm install |
| </pre></div></div> |
| </li> |
| <li> |
| |
| <p>Start the application:</p> |
| |
| <div> |
| <div> |
| <pre class="source">./scripts/start_dev.sh |
| </pre></div></div> |
| </li> |
| </ol> |
| <p>The application will be available at <a class="externalLink" href="http://localhost:4200/">http://localhost:4200/</a>. The REST application url defaults to <tt>http://localhost:8080</tt> but can be changed in the <tt>proxy.conf.json</tt> file.</p></div> |
| <div class="section"> |
| <h2><a name="Testing"></a>Testing</h2> |
| <ol style="list-style-type: decimal"> |
| |
| <li> |
| |
| <p>Install the application with dev dependencies:</p> |
| |
| <div> |
| <div> |
| <pre class="source">cd metron-interface/metron-config |
| npm install |
| </pre></div></div> |
| </li> |
| <li> |
| |
| <p>Unit tests can be run with:</p> |
| |
| <div> |
| <div> |
| <pre class="source">npm test |
| </pre></div></div> |
| </li> |
| </ol></div> |
| <div class="section"> |
| <h2><a name="License"></a>License</h2> |
| <p>This projects bundles Font Awesome which is available under the SIL Open Font License. See <a class="externalLink" href="http://fontawesome.io/license/">http://fontawesome.io/license/</a> for more details.</p></div> |
| </div> |
| </div> |
| </div> |
| <hr/> |
| <footer> |
| <div class="container-fluid"> |
| <div class="row-fluid"> |
| © 2015-2016 The Apache Software Foundation. Apache Metron, Metron, Apache, the Apache feather logo, |
| and the Apache Metron project logo are trademarks of The Apache Software Foundation. |
| </div> |
| </div> |
| </footer> |
| </body> |
| </html> |