Repository: metron Updated Branches: refs/heads/master a46be91ae -> 696a454a6
METRON-1207 Make RPMs for Alerts UI (merrimanr) closes apache/metron#777 Project: http://git-wip-us.apache.org/repos/asf/metron/repo Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/696a454a Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/696a454a Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/696a454a Branch: refs/heads/master Commit: 696a454a6c0da0ff68712af56c254cfcd7a94bda Parents: a46be91 Author: merrimanr <[email protected]> Authored: Thu Sep 28 10:57:39 2017 -0500 Committer: merrimanr <[email protected]> Committed: Thu Sep 28 10:57:39 2017 -0500 ---------------------------------------------------------------------- .../docker/rpm-docker/SPECS/metron.spec | 62 ++++++++++++++++++-- .../packaging/docker/rpm-docker/pom.xml | 6 ++ metron-interface/metron-alerts/README.md | 10 ++++ 3 files changed, 72 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/metron/blob/696a454a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec ---------------------------------------------------------------------- diff --git a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec index 43f2c67..82e0a23 100644 --- a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec +++ b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec @@ -56,6 +56,7 @@ Source9: metron-rest-%{full_version}-archive.tar.gz Source10: metron-config-%{full_version}-archive.tar.gz Source11: metron-management-%{full_version}-archive.tar.gz Source12: metron-maas-service-%{full_version}-archive.tar.gz +Source13: metron-alerts-%{full_version}-archive.tar.gz %description Apache Metron provides a scalable advanced security analytics framework @@ -91,8 +92,10 @@ tar -xzf %{SOURCE9} -C %{buildroot}%{metron_home} tar -xzf %{SOURCE10} -C %{buildroot}%{metron_home} tar -xzf %{SOURCE11} -C %{buildroot}%{metron_home} tar -xzf %{SOURCE12} -C %{buildroot}%{metron_home} +tar -xzf %{SOURCE13} -C %{buildroot}%{metron_home} install %{buildroot}%{metron_home}/bin/metron-management-ui %{buildroot}/etc/init.d/ +install %{buildroot}%{metron_home}/bin/metron-alerts-ui %{buildroot}/etc/init.d/ # allows node dependencies to be packaged in the RPMs npm install --prefix="%{buildroot}%{metron_home}/web/expressjs" --only=production @@ -424,12 +427,6 @@ This package installs the Metron Management UI %{metron_home} %attr(0644,root,root) %{metron_home}/web/management-ui/assets/images/* %attr(0644,root,root) %{metron_home}/web/management-ui/license/* -%post config -chkconfig --add metron-management-ui - -%preun config -chkconfig --del metron-management-ui - # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %package maas-service @@ -451,7 +448,60 @@ This package install the Metron MaaS Service files %{metron_home} # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +%package alerts +Summary: Metron Alerts UI +Group: Applications/Internet +Provides: alerts = %{version} + +%description alerts +This package installs the Metron Alerts UI %{metron_home} + +%files alerts +%defattr(-,root,root,755) +%dir %{metron_root} +%dir %{metron_home} +%dir %{metron_home}/bin +%dir %{metron_home}/web +%dir %{metron_home}/web/alerts-ui +%dir %{metron_home}/web/alerts-ui/assets +%dir %{metron_home}/web/alerts-ui/assets/ace +%dir %{metron_home}/web/alerts-ui/assets/fonts +%dir %{metron_home}/web/alerts-ui/assets/fonts/Roboto +%dir %{metron_home}/web/alerts-ui/assets/images +%{metron_home}/bin/metron-alerts-ui +/etc/init.d/metron-alerts-ui +%attr(0755,root,root) %{metron_home}/web/expressjs/alerts-server.js +%attr(0644,root,root) %{metron_home}/web/alerts-ui/favicon.ico +%attr(0644,root,root) %{metron_home}/web/alerts-ui/index.html +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.bundle.css +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.js +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.ttf +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.svg +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.jpg +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.eot +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.woff +%attr(0644,root,root) %{metron_home}/web/alerts-ui/*.woff2 +%attr(0644,root,root) %{metron_home}/web/alerts-ui/3rdpartylicenses.txt +%attr(0644,root,root) %{metron_home}/web/alerts-ui/assets/ace/*.js +%attr(0644,root,root) %{metron_home}/web/alerts-ui/assets/ace/LICENSE +%attr(0644,root,root) %{metron_home}/web/alerts-ui/assets/fonts/font.css +%attr(0644,root,root) %{metron_home}/web/alerts-ui/assets/fonts/Roboto/LICENSE.txt +%attr(0644,root,root) %{metron_home}/web/alerts-ui/assets/fonts/Roboto/*.ttf +%attr(0644,root,root) %{metron_home}/web/alerts-ui/assets/images/* + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +%post config +chkconfig --add metron-management-ui +chkconfig --add metron-alerts-ui + +%preun config +chkconfig --del metron-management-ui +chkconfig --del metron-alerts-ui + %changelog +* Tue Sep 25 2017 Apache Metron <[email protected]> - 0.4.2 +- Add Alerts UI * Tue Sep 19 2017 Apache Metron <[email protected]> - 0.4.2 - Updated and renamed metron-rest script * Tue Aug 29 2017 Apache Metron <[email protected]> - 0.4.1 http://git-wip-us.apache.org/repos/asf/metron/blob/696a454a/metron-deployment/packaging/docker/rpm-docker/pom.xml ---------------------------------------------------------------------- diff --git a/metron-deployment/packaging/docker/rpm-docker/pom.xml b/metron-deployment/packaging/docker/rpm-docker/pom.xml index b6a9ce3..18d2253 100644 --- a/metron-deployment/packaging/docker/rpm-docker/pom.xml +++ b/metron-deployment/packaging/docker/rpm-docker/pom.xml @@ -179,6 +179,12 @@ <include>*.tar.gz</include> </includes> </resource> + <resource> + <directory>${metron_dir}/metron-interface/metron-alerts/target/</directory> + <includes> + <include>*.tar.gz</include> + </includes> + </resource> </resources> </configuration> </execution> http://git-wip-us.apache.org/repos/asf/metron/blob/696a454a/metron-interface/metron-alerts/README.md ---------------------------------------------------------------------- diff --git a/metron-interface/metron-alerts/README.md b/metron-interface/metron-alerts/README.md index 765ad83..fe0950c 100644 --- a/metron-interface/metron-alerts/README.md +++ b/metron-interface/metron-alerts/README.md @@ -42,6 +42,16 @@ 1. [Express](https://expressjs.com/) is installed at `$METRON_HOME/web/expressjs/` as part of the Management UI installation process. The Management UI should be installed first on the same host as the Alerts UI. +### From Package Manager + +1. Deploy the RPM at `/metron/metron-deployment/packaging/docker/rpm-docker/target/RPMS/noarch/metron-alerts-$METRON_VERSION-*.noarch.rpm` + +1. Install the RPM with: + + ``` + rpm -ih metron-alerts-$METRON_VERSION-*.noarch.rpm + ``` + ## Configuration The Alerts UI is configured in the `$METRON_HOME/config/alerts_ui.yml` file. Create this file and set the values to match your environment:
