You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by GitBox <gi...@apache.org> on 2020/03/30 03:12:04 UTC

[GitHub] [bigtop] guyuqi opened a new pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

guyuqi opened a new pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620
 
 
   The PR:
   1. Implement build and package scripts for Logstash deb package.
   2. Implement scripts and resources for Logstash rpm package.
   3. Add 'ruby' to Bigtop_toolchain.
   4. Implement deployment scripts for Logstash.
   5. Implement smoke tests for Logstash.
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405062685
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/do-component-build
 ##########
 @@ -0,0 +1,27 @@
+#!/bin/bash
+# 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.
+
+set -ex
+
+. `dirname $0`/bigtop.bom
+
+export RELEASE=1
+export LANG="en_US.UTF-8"
+export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/bin/java::"`
 
 Review comment:
   bigtop have a script to detect java home. Maybe we can leverage it.
   ```
   # Autodetect JAVA_HOME if not defined
   . /usr/lib/bigtop-utils/bigtop-detect-javahome
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405064022
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/patch0-logstash.diff
 ##########
 @@ -0,0 +1,2393 @@
+diff -ruaN logstash-5.4.1/bin/bundle linaro-logstash-5.4.1/bin/bundle
 
 Review comment:
   Where does this patch come from and why this is necessary instead of pulling an official released version?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r406363668
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/patch0-logstash.diff
 ##########
 @@ -0,0 +1,2393 @@
+diff -ruaN logstash-5.4.1/bin/bundle linaro-logstash-5.4.1/bin/bundle
 
 Review comment:
   Usually for apache project we just name it like patch0-HBASE-16864.diff, which we can easily find the source.
   For this one... how about we name it something like patch0-logstash-for-arm64.diff so that it's more clear. Also add the source of the patch in Bigtop-3319, which helps people to locate where the change come from.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405243594
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/do-component-build
 ##########
 @@ -0,0 +1,27 @@
+#!/bin/bash
+# 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.
+
+set -ex
+
+. `dirname $0`/bigtop.bom
+
+export RELEASE=1
+export LANG="en_US.UTF-8"
+export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/bin/java::"`
 
 Review comment:
   Agree to leverage Bigtop script to detect JAVA_HOME, thanks for the info.
   But I found that it's unnecessary to detect JAVA_HOME in `do-component-build` , and in the phase of `do-component-build` , `bigtop-utils` has not be ready yet.
   Removed the JAVA_HOME detection.
   Thanks for the comments, evans!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405063825
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/install_logstash.sh
 ##########
 @@ -0,0 +1,135 @@
+#!/bin/bash
 
 Review comment:
   Where does this patch come from and why this is necessary instead of pulling an official released version? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405224224
 
 

 ##########
 File path: bigtop_toolchain/manifests/ruby.pp
 ##########
 @@ -0,0 +1,38 @@
+# 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.
+
+class bigtop_toolchain::ruby {
+
+  require bigtop_toolchain::packages
+
+  $url = "https://cache.ruby-lang.org/pub/ruby/2.4"
+
+  $ruby24 = "ruby-2.4.0.tar.gz"
+  $ruby24dir = "ruby-2.4.0"
+
+  exec { "download ruby":
+     cwd  => "/usr/src",
+     command => "/usr/bin/wget $url/$ruby24 && mkdir -p $ruby24dir && /bin/tar -xvzf $ruby24 -C $ruby24dir --strip-components=1 && cd $ruby24dir",
+     creates => "/usr/src/$ruby24dir",
+  }
+
+  exec { "install ruby":
+     cwd => "/usr/src/$ruby24dir",
+     command => "/usr/src/$ruby24dir/configure --prefix=/usr/local --disable-shared && /usr/bin/make install",
+     creates => "/usr/local/bin/ruby",
+     timeout => 1800,
+     require => EXEC["download ruby"]
+  }
 
 Review comment:
   So ruby 2.4 version is the only one that works with log stash? Or we can install it from Distro's pkg manager (yum/apt)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405063825
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/install_logstash.sh
 ##########
 @@ -0,0 +1,135 @@
+#!/bin/bash
 
 Review comment:
   Where does this patch come from and why this is necessary instead of pulling an official released version? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r406360137
 
 

 ##########
 File path: bigtop_toolchain/manifests/ruby.pp
 ##########
 @@ -0,0 +1,38 @@
+# 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.
+
+class bigtop_toolchain::ruby {
+
+  require bigtop_toolchain::packages
+
+  $url = "https://cache.ruby-lang.org/pub/ruby/2.4"
+
+  $ruby24 = "ruby-2.4.0.tar.gz"
+  $ruby24dir = "ruby-2.4.0"
+
+  exec { "download ruby":
+     cwd  => "/usr/src",
+     command => "/usr/bin/wget $url/$ruby24 && mkdir -p $ruby24dir && /bin/tar -xvzf $ruby24 -C $ruby24dir --strip-components=1 && cd $ruby24dir",
+     creates => "/usr/src/$ruby24dir",
+  }
+
+  exec { "install ruby":
+     cwd => "/usr/src/$ruby24dir",
+     command => "/usr/src/$ruby24dir/configure --prefix=/usr/local --disable-shared && /usr/bin/make install",
+     creates => "/usr/local/bin/ruby",
+     timeout => 1800,
+     require => EXEC["download ruby"]
+  }
 
 Review comment:
   Sounds good to me. I'm a +1 but not an expert on Logstash. If no one chimed in I'll commit this in this week. 
   Ping me if not. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r406571789
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/patch0-logstash.diff
 ##########
 @@ -0,0 +1,2393 @@
+diff -ruaN logstash-5.4.1/bin/bundle linaro-logstash-5.4.1/bin/bundle
 
 Review comment:
   Yes, it maskes sense.
   Updated, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405239731
 
 

 ##########
 File path: bigtop_toolchain/manifests/ruby.pp
 ##########
 @@ -0,0 +1,38 @@
+# 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.
+
+class bigtop_toolchain::ruby {
+
+  require bigtop_toolchain::packages
+
+  $url = "https://cache.ruby-lang.org/pub/ruby/2.4"
+
+  $ruby24 = "ruby-2.4.0.tar.gz"
+  $ruby24dir = "ruby-2.4.0"
+
+  exec { "download ruby":
+     cwd  => "/usr/src",
+     command => "/usr/bin/wget $url/$ruby24 && mkdir -p $ruby24dir && /bin/tar -xvzf $ruby24 -C $ruby24dir --strip-components=1 && cd $ruby24dir",
+     creates => "/usr/src/$ruby24dir",
+  }
+
+  exec { "install ruby":
+     cwd => "/usr/src/$ruby24dir",
+     command => "/usr/src/$ruby24dir/configure --prefix=/usr/local --disable-shared && /usr/bin/make install",
+     creates => "/usr/local/bin/ruby",
+     timeout => 1800,
+     require => EXEC["download ruby"]
+  }
 
 Review comment:
   Yea, for the dependency issues, the ruby-2.4 is the latest version that that works with logstash-5.4.1.
   And the bigtop should support different kind of distros and platforms(x86/arm64). 
   It may not be guaranteed the various distros could offer the ruby-2.4 pkg (x86/arm64) installation. IMHO, it's robust to build the ruby-2.4 binaries from source though it may cost extra time in bigtop_toolchain build. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r406363668
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/patch0-logstash.diff
 ##########
 @@ -0,0 +1,2393 @@
+diff -ruaN logstash-5.4.1/bin/bundle linaro-logstash-5.4.1/bin/bundle
 
 Review comment:
   Usually for apache project we just name it like patch0-HBASE-16864.diff, which we can easily find the source.
   For this one... how about we name it something like patch0-logstash-for-arm64.diff so that it's more clear. Also describe the source of the repo in Bigtop JIRA helps people to locate the change.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
evans-ye commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r406360847
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/do-component-build
 ##########
 @@ -0,0 +1,27 @@
+#!/bin/bash
+# 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.
+
+set -ex
+
+. `dirname $0`/bigtop.bom
+
+export RELEASE=1
+export LANG="en_US.UTF-8"
+export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/bin/java::"`
 
 Review comment:
   Got it thanks for checking it :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405243594
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/do-component-build
 ##########
 @@ -0,0 +1,27 @@
+#!/bin/bash
+# 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.
+
+set -ex
+
+. `dirname $0`/bigtop.bom
+
+export RELEASE=1
+export LANG="en_US.UTF-8"
+export JAVA_HOME=`readlink -f /usr/bin/java | sed "s:jre/bin/java::"`
 
 Review comment:
   Agree to leverage Bigtop script to detect JAVA_HOME, thanks for the info.
   But I found that it's unnecessary to detect JAVA_HOME in `do-component-build` , and in the phase of `do-component-build` , `bigtop-utils` has not be ready yet.
   Removed the JAVA_HOME detection.
   Thanks for the comments, envans!
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405234038
 
 

 ##########
 File path: bigtop-packages/src/common/logstash/patch0-logstash.diff
 ##########
 @@ -0,0 +1,2393 @@
+diff -ruaN logstash-5.4.1/bin/bundle linaro-logstash-5.4.1/bin/bundle
 
 Review comment:
   Thanks for comment, evans.
   1. Pick the logstash version: 5.4.1. It corresponds to the elasticsearch version in Bigtop.
   2.  `patch0-logstash.diff` is to support Arm64.
   The Jruby-1.9 in logstash-5.4.1 doesn't support Arm64 due to the fact that Jffi 1.2.12 which Jruby 1.9 depends on has no native AArch64 libraries. Also see:  [jffi](https://github.com/jnr/jffi/pull/32), [jruby1](https://github.com/jruby/jruby/pull/4548), [jruby2](https://github.com/jruby/jruby/pull/4567).
   So `patch0-logstash.diff` upgraded jruby to 9K and also fix dependency issues for Arm64.
   The modification for Arm64 support was archived in [linaro repo](https://git.linaro.org/leg/bigdata/logstash.git) and `patch0-logstash.diff` comes from it.
   
   
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [bigtop] guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component

Posted by GitBox <gi...@apache.org>.
guyuqi commented on a change in pull request #620: BIGTOP-3319: Add Logstash as Bigtop component
URL: https://github.com/apache/bigtop/pull/620#discussion_r405239731
 
 

 ##########
 File path: bigtop_toolchain/manifests/ruby.pp
 ##########
 @@ -0,0 +1,38 @@
+# 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.
+
+class bigtop_toolchain::ruby {
+
+  require bigtop_toolchain::packages
+
+  $url = "https://cache.ruby-lang.org/pub/ruby/2.4"
+
+  $ruby24 = "ruby-2.4.0.tar.gz"
+  $ruby24dir = "ruby-2.4.0"
+
+  exec { "download ruby":
+     cwd  => "/usr/src",
+     command => "/usr/bin/wget $url/$ruby24 && mkdir -p $ruby24dir && /bin/tar -xvzf $ruby24 -C $ruby24dir --strip-components=1 && cd $ruby24dir",
+     creates => "/usr/src/$ruby24dir",
+  }
+
+  exec { "install ruby":
+     cwd => "/usr/src/$ruby24dir",
+     command => "/usr/src/$ruby24dir/configure --prefix=/usr/local --disable-shared && /usr/bin/make install",
+     creates => "/usr/local/bin/ruby",
+     timeout => 1800,
+     require => EXEC["download ruby"]
+  }
 
 Review comment:
   Yea, for the dependency issues, the ruby-2.4 is the latest version that works with logstash-5.4.1.
   And the bigtop should support different kind of distros and platforms(x86/arm64). 
   It may not be guaranteed the various distros could offer the ruby-2.4 pkg (x86/arm64) installation. IMHO, it's robust to build the ruby-2.4 binaries from source though it may cost extra time in bigtop_toolchain build. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services