Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Disable Transparent Hugepage. Add "<code>transparenttransparent_hugepage=never</code>never" to the end of the kernel line in "/etc/default/grub" and reboot. (Ambari demands it, do we need to comply?):

 

...

Change the line:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet"
To:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet transparent_hugepage=never"
Afterwards, run:
# grub2-mkconfig -o /boot/grub2/grub.cfg

...

After reboot check that changes were applied (make sure that word "never" is selected in square-brackets):

...

 

...

# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]

...

Metron install pre-preparation:

...

  • On all nodes Install pre-requisites for Ambari:

...

# yum install git wget curl rpm tar unzip bzip2 wget createrepo yum-utils ntp python-pip psutils python-psutil ntp libffi-devel gcc openssl-devel -y
# pip install --upgrade pip
# pip install requests

...

  • Install Maven on main node and on Metron node install java 1.8 (if you don't know which it is, install it everywhere):

...

# yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel -y

...

...

  • Set path to Java 8 if it does not exist:

...

# export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s_/jre/bin/java__")

...

  • Save export for future reboots:

...

# echo 'export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s_/jre/bin/java__")' > /etc/profile.d/java_18.sh
# chmod +x /etc/profile.d/java_18.sh
# source /etc/profile.d/java_18.sh

...

...

  • Download and install Maven 3.3.9:

...

# wget http://apache.volia.net/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
# tar -zxf apache-maven-3.3.9-bin.tar.gz
# mv apache-maven-3.3.9 /opt
# PATH=/opt/apache-maven-3.3.9/bin:$PATH
# echo 'export PATH=/opt/apache-maven-3.3.9/bin:$PATH' > /etc/profile.d/maven.sh
# chmod +x /etc/profile.d/maven.sh

...

  • Check whether Maven works:

...

# source /etc/profile.d/maven.sh
# mvn -V

...

You should see something similar to:

...

[root@base1 ~]# mvn -V
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-3.b12.el7_3.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-514.16.1.el7.x86_64", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.083 s
[INFO] Finished at: 2017-06-06T09:59:03-07:00
[INFO] Final Memory: 13M/479M
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
[root@base1 ~]#

...

...

  • On Ambari node install and enable docker (we will need it to build Metron mpack for Ambari):

...

# yum install docker-io -y
# systemctl start docker

...

...

  • Also on your build box, install npm. This is needed to build metron-config, part of the UI.

...

# yum install npm -y

...

...

  • Remove ipv4 'localhost.localdomain' from /etc/hosts

...

  • Remove ipv6 'localhost.localdomain' from /etc/hosts

...

  • Add "127.0.0.1    localhost" to /etc/hosts

...

  • Install the database we will use for Metron REST:

```
# yum install mariadb-server mysql-connector-java -y
```

- Configure a user and a database for Metron REST:
If you haven't run `mysql_secure_installation` after the database installation, do that first:
```
# systemctl start mariadb
# systemctl enable mariadb
# systemctl status mariadb
# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] n
 ... skipping.

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
 ... Success!
By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
 - Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
 ... Failed!  Not critical, keep moving...
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
 ... Success!

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


Cleaning up...
#
```

...