[openstack-dev] [Fuel] Plugins improvement
Dmitry Ukov
dukov at mirantis.com
Wed Nov 26 12:46:23 UTC 2014
Evgeniy,
Thanks a lot!
On Mon, Nov 24, 2014 at 5:15 PM, Evgeniy L <eli at mirantis.com> wrote:
> Hi Dmitry,
>
> Our current validation implementation is based on jsonschema,
> we will figure out how to hack/configure it to provide more human
> readable message
>
> Thanks,
>
> On Mon, Nov 24, 2014 at 2:34 PM, Dmitry Ukov <dukov at mirantis.com> wrote:
>
>> That was my fault. I did not expect that timeout parameter is a mandatory
>> requirement for task. Every thing works perfectly fine.
>> Thanks for the help.
>>
>> On Mon, Nov 24, 2014 at 3:05 PM, Tatyana Leontovich <
>> tleontovich at mirantis.com> wrote:
>>
>>> Guys,
>>> task like
>>> - role: ['controller']
>>> stage: post_deployment
>>> type: puppet
>>> parameters:
>>> puppet_manifest: puppet/site.pp
>>> puppet_modules: puppet/modules/
>>> timeout: 360
>>> works fine for me, so I believe your task should looks like
>>>
>>> cat tasks.yaml
>>> # This tasks will be applied on controller nodes,
>>> # here you can also specify several roles, for example
>>> # ['cinder', 'compute'] will be applied only on
>>> # cinder and compute nodes
>>> - role: ['controller']
>>> stage: post_deployment
>>> type: puppet
>>> parameters:
>>> puppet_manifest: install_keystone_ldap.pp
>>> puppet_modules: /etc/puppet/modules/"
>>>
>>> And be sure that install_keystone_ldap.pp thos one invoke other manifests
>>>
>>> Best,
>>> Tatyana
>>>
>>> On Mon, Nov 24, 2014 at 12:49 PM, Dmitry Ukov <dukov at mirantis.com>
>>> wrote:
>>>
>>>> Unfortunately this does not work
>>>>
>>>> cat tasks.yaml
>>>> # This tasks will be applied on controller nodes,
>>>> # here you can also specify several roles, for example
>>>> # ['cinder', 'compute'] will be applied only on
>>>> # cinder and compute nodes
>>>> - role: ['controller']
>>>> stage: post_deployment
>>>> type: puppet
>>>> parameters:
>>>> puppet_manifest: install_keystone_ldap.pp
>>>> puppet_modules: "puppet/:/etc/puppet/modules/"
>>>>
>>>>
>>>> fpb --build .
>>>> /home/dukov/dev/.plugins_ldap/local/lib/python2.7/site-packages/pkg_resources.py:1045:
>>>> UserWarning: /home/dukov/.python-eggs is writable by group/others and
>>>> vulnerable to attack when used with get_resource_filename. Consider a more
>>>> secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE
>>>> environment variable).
>>>> warnings.warn(msg, UserWarning)
>>>> 2014-11-24 13:48:32 ERROR 15026 (cli) Wrong value format "0 ->
>>>> parameters", for file "./tasks.yaml", {'puppet_modules':
>>>> 'puppet/:/etc/puppet/modules/', 'puppet_manifest':
>>>> 'install_keystone_ldap.pp'} is not valid under any of the given schemas
>>>> Traceback (most recent call last):
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/cli.py",
>>>> line 90, in main
>>>> perform_action(args)
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/cli.py",
>>>> line 77, in perform_action
>>>> actions.BuildPlugin(args.build).run()
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/actions/build.py",
>>>> line 42, in run
>>>> self.check()
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/actions/build.py",
>>>> line 99, in check
>>>> self._check_structure()
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/actions/build.py",
>>>> line 111, in _check_structure
>>>> ValidatorManager(self.plugin_path).get_validator().validate()
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/validator_v1.py",
>>>> line 39, in validate
>>>> self.check_schemas()
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/validator_v1.py",
>>>> line 46, in check_schemas
>>>> self.validate_file_by_schema(v1.TASKS_SCHEMA, self.tasks_path)
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/base.py",
>>>> line 47, in validate_file_by_schema
>>>> self.validate_schema(data, schema, path)
>>>> File
>>>> "/home/dukov/git/fuel/fuel-plugins/fuel_plugin_builder/fuel_plugin_builder/validators/base.py",
>>>> line 43, in validate_schema
>>>> value_path, path, exc.message))
>>>> ValidationError: Wrong value format "0 -> parameters", for file
>>>> "./tasks.yaml", {'puppet_modules': 'puppet/:/etc/puppet/modules/',
>>>> 'puppet_manifest': 'install_keystone_ldap.pp'} is not valid under any of
>>>> the given schemas
>>>>
>>>>
>>>> On Mon, Nov 24, 2014 at 2:34 PM, Aleksandr Didenko <
>>>> adidenko at mirantis.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> according to [1] you should be able to use:
>>>>>
>>>>> puppet_modules: "puppet/:/etc/puppet/modules/"
>>>>>
>>>>> This is valid string yaml parameter that should be parsed just fine.
>>>>>
>>>>> [1]
>>>>> https://github.com/stackforge/fuel-web/blob/master/tasklib/tasklib/actions/puppet.py#L61-L62
>>>>>
>>>>> Regards
>>>>> --
>>>>> Alex
>>>>>
>>>>>
>>>>> On Mon, Nov 24, 2014 at 12:07 PM, Dmitry Ukov <dukov at mirantis.com>
>>>>> wrote:
>>>>>
>>>>>> Hello All,
>>>>>> Current implementation of plugins in Fuel unpacks plugin tarball
>>>>>> into /var/www/nailgun/plugins/.
>>>>>> If we implement deployment part of plugin using puppet there is a
>>>>>> setting
>>>>>> puppet_modules:
>>>>>>
>>>>>> This setting should specify path to modules folder. As soon as main
>>>>>> deployment part of plugin is implemented as a Puppet module module
>>>>>> path setting should be:
>>>>>>
>>>>>> puppet_modules: puppet/
>>>>>>
>>>>>> There is big probability that plugin implementation will require
>>>>>> some custom resources and functions which are implemented in fuel-library
>>>>>> (e.g. service config resources, stdlib functions e.t.c). So in order
>>>>>> to use them plugin developer has to copy them from fuel-library into
>>>>>> plugin (if i'm not missing something). This is not really convenient
>>>>>> from my perspective.
>>>>>>
>>>>>> I'd like to suggest to treat puppet_modules parameter as an array and
>>>>>> pass it to puppet binary as
>>>>>> # puppet apply --modulepath=<modulepath1>:<modulepath2>
>>>>>> This will allow to add /etc/puppet/modules as module path and use
>>>>>> resources and functions form fuel-library.
>>>>>>
>>>>>> P.S.:
>>>>>> puppet_modules: "puppet/:/etc/puppet/moules/: <- is not allowed by
>>>>>> yaml parser (and yaml format I believe)
>>>>>>
>>>>>> Any suggestions here?
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Kind regards
>>>>>> Dmitry Ukov
>>>>>> IT Engineer
>>>>>> Mirantis, Inc.
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> OpenStack-dev mailing list
>>>>>> OpenStack-dev at lists.openstack.org
>>>>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> OpenStack-dev mailing list
>>>>> OpenStack-dev at lists.openstack.org
>>>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Kind regards
>>>> Dmitry Ukov
>>>> IT Engineer
>>>> Mirantis, Inc.
>>>>
>>>>
>>>> _______________________________________________
>>>> OpenStack-dev mailing list
>>>> OpenStack-dev at lists.openstack.org
>>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> OpenStack-dev mailing list
>>> OpenStack-dev at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>>
>>
>>
>> --
>> Kind regards
>> Dmitry Ukov
>> IT Engineer
>> Mirantis, Inc.
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
--
Kind regards
Dmitry Ukov
IT Engineer
Mirantis, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141126/c4f07b53/attachment.html>
More information about the OpenStack-dev
mailing list