You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@metron.apache.org by Frank Horsfall <Fr...@cunet.carleton.ca> on 2017/09/21 14:15:30 UTC

Metron upgrade from 040 to 041

Morning gents,

Congratulations on 0.4.1.

As you are aware I have a 3 node bare bones Centos 7 install. Metron 0.4.0 with HDP 2.5 bare-metal install on Centos 7 with MariaDB for Metron REST<https://cwiki.apache.org/confluence/display/METRON/Metron+0.4.0+with+HDP+2.5+bare-metal+install+on+Centos+7+with+MariaDB+for+Metron+REST>

So in order to upgrade Metron I simply:


*         Stop everything.

*         Re-execute the 'Build Metron Code' section of the instruction set commands using 0.4.1 instead of 0.4.0

*         Restart everything or reboot

Is this correct or is there something else?

Kindest,
Frank


The following is a copy of the section in the instructions.
Build Metron code

Now we are going to start to building Metron. At the time of writing, Metron 0.4.0 was in the final stages of being released.

On the main node, clone the Metron repository:
git clone https://github.com/apache/metron


If you want to make sure you're on the 0.4.0 release branch, do:
git clone https://github.com/apache/metron
cd metron
git checkout Metron_0.4.0




Build Metron with HDP 2.5 profile:
cd metron
mvn clean package -DskipTests -T 2C -P HDP-2.5.0.0,mpack
cd metron-deployment/packaging/docker/rpm-docker
mvn clean install -DskipTests -PHDP-2.5.0.0


If for some reason, the rpm-docker fails with the message "/bin/bash: ./build.sh: Permission denied", try disabling selinux:
setenforce 0


And run "mvn clean install -DskipTests -PHDP-2.5.0.0" again.

On all nodes, create a localrepo directory and copy the RPMs from Ambari node there:
mkdir /localrepo
cp -rp /root/metron/metron-deployment/packaging/docker/rpm-docker/RPMS/noarch/* /localrepo/
createrepo /localrepo


If you're doing a multi node install, also copy the packages to the other nodes:
ssh root@node2 mkdir /localrepo
scp /localrepo/*rpm root@node2:/localrepo/
ssh root@node2 createrepo /localrepo


Make sure to do the above on each node.

Fetch & create logrotate script for Hadoop Services:
wget -O /etc/logrotate.d/metron-ambari https://raw.githubusercontent.com/apache/metron/master/metron-deployment/roles/ambari_common/templates/metron-hadoop-logrotate.yml
sed -i 's/^  {{ hadoop_logrotate_frequency }}.*$/  daily/' /etc/logrotate.d/metron-ambari
sed -i 's/^  rotate {{ hadoop_logrotate_retention }}.*$/  rotate 30/' /etc/logrotate.d/metron-ambari
chmod 0644 /etc/logrotate.d/metron-ambari




Re: Metron upgrade from 040 to 041

Posted by Laurens Vets <la...@daemon.be>.
Hi Frank,

This works for me on CentOS 6 going from master (between 0.4.0 & 0.4.1) 
to 0.4.1-release:

- Stop everything. Including ambari-server ("ambari-server stop").
- Build Metron RPMs
- Install/Upgrade the RPMs with "rpm -Uvh metron*.rpm"
- Install/Upgrade mpack with "ambari-server install-mpack 
--mpack=/root/metron/metron-deployment/packaging/ambari/metron-mpack/target/metron_mpack-0.4.1.0.tar.gz 
--verbose --force". Maybe try "ambari-server upgrade-mpack 
--mpack=/root/metron/metron-deployment/packaging/ambari/metron-mpack/target/metron_mpack-0.4.1.0.tar.gz 
--verbose" first.
- Restarted my machine & started all services.

Be aware that this is from somewhere in between 0.4.0 and 0.4.1 to 
0.4.1-release. If you're upgrading from 0.4.0 to 0.4.1, there might be a 
conflict with the Metron directory (/usr/metron/0.4.0 vs 
/usr/metron/0.4.1)

Can anyone else confirm the above?


On 2017-09-21 07:15, Frank Horsfall wrote:

> Morning gents,
> 
> Congratulations on 0.4.1.
> 
> As you are aware I have a 3 node bare bones Centos 7 install. Metron 
> 0.4.0 with HDP 2.5 bare-metal install on Centos 7 with MariaDB for 
> Metron REST
> 
> So in order to upgrade Metron I simply:
> 
> ·         Stop everything.
> 
> ·         Re-execute the 'Build Metron Code' section of the instruction 
> set commands using 0.4.1 instead of 0.4.0
> 
> ·         Restart everything or reboot
> 
> Is this correct or is there something else?
> 
> Kindest,
> 
> Frank
> 
> The following is a copy of the section in the instructions.
> 
> BUILD METRON CODE
> 
> Now we are going to start to building Metron. At the time of writing, 
> Metron 0.4.0 was in the final stages of being released.
> 
> On the main node, clone the Metron repository:
> 
> git clone https://github.com/apache/metron
> 
> If you want to make sure you're on the 0.4.0 release branch, do:
> 
> git clone https://github.com/apache/metron
> 
> cd metron
> 
> git checkout Metron_0.4.0
> 
> Build Metron with HDP 2.5 profile:
> 
> cd metron
> 
> mvn clean package -DskipTests -T 2C -P HDP-2.5.0.0,mpack
> 
> cd metron-deployment/packaging/docker/rpm-docker
> 
> mvn clean install -DskipTests -PHDP-2.5.0.0
> 
> If for some reason, the rpm-docker fails with the message "/bin/bash: 
> ./build.sh: Permission denied", try disabling selinux:
> 
> setenforce 0
> 
> And run "mvn clean install -DskipTests -PHDP-2.5.0.0" again.
> 
> On all nodes, create a localrepo directory and copy the RPMs from 
> Ambari node there:
> 
> mkdir /localrepo
> 
> cp -rp 
> /root/metron/metron-deployment/packaging/docker/rpm-docker/RPMS/noarch/* 
> /localrepo/
> 
> createrepo /localrepo
> 
> If you're doing a multi node install, also copy the packages to the 
> other nodes:
> 
> ssh root@node2 mkdir /localrepo
> 
> scp /localrepo/*rpm root@node2:/localrepo/
> 
> ssh root@node2 createrepo /localrepo
> 
> Make sure to do the above on each node.
> 
> Fetch & create logrotate script for Hadoop Services:
> 
> wget -O /etc/logrotate.d/metron-ambari 
> https://raw.githubusercontent.com/apache/metron/master/metron-deployment/roles/ambari_common/templates/metron-hadoop-logrotate.yml
> 
> sed -i 's/^  {{ hadoop_logrotate_frequency }}.*$/  daily/' 
> /etc/logrotate.d/metron-ambari
> 
> sed -i 's/^  rotate {{ hadoop_logrotate_retention }}.*$/  rotate 30/' 
> /etc/logrotate.d/metron-ambari
> 
> chmod 0644 /etc/logrotate.d/metron-ambari