Commit 8b28c0c6 authored by Léo-Paul Géneau's avatar Léo-Paul Géneau 👾

component/fluentd: fix failing install pinning gems version

- pins component/fluentd gems version to fix :

  ERROR:  Error installing fluentd:
	msgpack requires Ruby version >= 2.4.

  encountered while supplying software/fluentd in a SlapOS Webrunner.

- removes outdated gem arguments '--no-ri --no-rdoc'
  by default `rubygemsrecipe` uses '--no-document' (see https://lab.nexedi.com/nexedi/rubygemsrecipe/blob/master/rubygems.py#L206)

- splits `gem-options` arguments to fit the README example (see https://lab.nexedi.com/nexedi/rubygemsrecipe/blob/master/README.rst#L50)

- adds minimal test to check fluentd SR instanciation
parent 8dc22418
...@@ -10,9 +10,24 @@ recipe = rubygemsrecipe ...@@ -10,9 +10,24 @@ recipe = rubygemsrecipe
url = https://rubygems.org/rubygems/rubygems-2.4.8.zip url = https://rubygems.org/rubygems/rubygems-2.4.8.zip
ruby-executable = ${ruby:location}/bin/ruby ruby-executable = ${ruby:location}/bin/ruby
gems = gems =
msgpack==1.3.3
cool.io==1.4.6
http_parser.rb==0.6.0
sigdump==0.2.4
serverengine==2.2.3
strptime==0.1.9
thread_safe==0.3.6
tzinfo==1.2.9
tzinfo-data==1.2021.1
yajl-ruby==1.4.1
fluentd==0.14.14 fluentd==0.14.14
httpclient==2.8.3
json==2.5.1
td-client==0.8.85
fluent-plugin-td==0.10.29 fluent-plugin-td==0.10.29
gem-options = --no-ri --no-rdoc --with-icu-lib=${icu:location}/lib/ --with-icu-dir=${icu:location}/ gem-options =
--with-icu-lib=${icu:location}/lib/
--with-icu-dir=${icu:location}/
environment = environment =
LDFLAGS = -L${icu:location}/lib -Wl,-rpath=${icu:location}/lib LDFLAGS = -L${icu:location}/lib -Wl,-rpath=${icu:location}/lib
CFLAGS = -I${icu:location}/include CFLAGS = -I${icu:location}/include
[buildout]
extends =
software.cfg
[python]
part = python2.7
...@@ -7,6 +7,9 @@ parts = ...@@ -7,6 +7,9 @@ parts =
instance-profile instance-profile
slapos-cookbook slapos-cookbook
[python]
part = python3
[instance-profile] [instance-profile]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
......
Tests for fluentd Software Release
##############################################################################
#
# Copyright (c) 2018 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from setuptools import setup, find_packages
version = '0.0.1.dev0'
name = 'slapos.test.fluentd'
with open("README.md") as f:
long_description = f.read()
setup(name=name,
version=version,
description="Test for SlapOS' fluentd",
long_description=long_description,
long_description_content_type='text/markdown',
maintainer="Nexedi",
maintainer_email="info@nexedi.com",
url="https://lab.nexedi.com/nexedi/slapos",
packages=find_packages(),
install_requires=[
'slapos.core',
'slapos.libnetworkcache',
'erp5.util',
'supervisor',
'six',
],
zip_safe=True,
test_suite='test',
)
##############################################################################
#
# Copyright (c) 2018 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import os
import six
from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass
setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
os.path.abspath(
os.path.join(os.path.dirname(__file__), '..',
'software%s.cfg' % ("-py2" if six.PY2 else ""))))
class FluentdTestCase(SlapOSInstanceTestCase):
__partition_reference__ = 'fluentd'
def test_process(self):
expected_process_name_list = [
'fluentd-service-on-watch',
]
with self.slap.instance_supervisor_rpc as supervisor:
process_names = [process['name']
for process in supervisor.getAllProcessInfo()]
for expected_process_name in expected_process_name_list:
self.assertIn(expected_process_name, process_names)
...@@ -114,6 +114,11 @@ setup = ${slapos-repository:location}/software/slaprunner/test/ ...@@ -114,6 +114,11 @@ setup = ${slapos-repository:location}/software/slaprunner/test/
egg = slapos.test.metabase egg = slapos.test.metabase
setup = ${slapos-repository:location}/software/metabase/test/ setup = ${slapos-repository:location}/software/metabase/test/
[slapos.test.fluentd-setup]
<= setup-develop-egg
egg = slapos.test.fluentd
setup = ${slapos-repository:location}/software/fluentd/test/
[slapos.test.helloworld-setup] [slapos.test.helloworld-setup]
<= setup-develop-egg <= setup-develop-egg
egg = slapos.test.helloworld egg = slapos.test.helloworld
...@@ -236,6 +241,7 @@ extra-eggs = ...@@ -236,6 +241,7 @@ extra-eggs =
${slapos.test.jscrawler-setup:egg} ${slapos.test.jscrawler-setup:egg}
${slapos.test.html5as-setup:egg} ${slapos.test.html5as-setup:egg}
${slapos.test.html5as-base-setup:egg} ${slapos.test.html5as-base-setup:egg}
${slapos.test.fluentd-setup:egg}
# We don't name this interpreter `python`, so that when we run slapos node # We don't name this interpreter `python`, so that when we run slapos node
# software, installation scripts running `python` use a python without any # software, installation scripts running `python` use a python without any
...@@ -289,6 +295,7 @@ tests = ...@@ -289,6 +295,7 @@ tests =
# the version of Python that is used to run the test. # the version of Python that is used to run the test.
# Due to a bug in the way promises are run, we may also list some Py3-only SR # Due to a bug in the way promises are run, we may also list some Py3-only SR
# here, to check there's no promise issue when slapos node runs with Python 2. # here, to check there's no promise issue when slapos node runs with Python 2.
fluentd ${slapos.test.fluentd-setup:setup}
kvm ${slapos.test.kvm-setup:setup} kvm ${slapos.test.kvm-setup:setup}
slaprunner ${slapos.test.slaprunner-setup:setup} slaprunner ${slapos.test.slaprunner-setup:setup}
metabase ${slapos.test.metabase-setup:setup} metabase ${slapos.test.metabase-setup:setup}
......
[buildout] [buildout]
extends = extends =
../fluentd/software.cfg ../fluentd/software-py2.cfg
test-common.cfg test-common.cfg
[template-erp5] [template-erp5]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment