Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-26 Thread Dmitry Ukov
Evgeniy,
Thanks a lot!

On Mon, Nov 24, 2014 at 5:15 PM, Evgeniy L  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  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 <
>> tleontov...@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 
>>> 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 <
 adide...@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
>
>
>

Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Evgeniy L
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  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 <
> tleontov...@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  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 <
>>> adide...@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 
 wrote:

> Hello All,
> Current implementation of plugins in Fuel unpacks plugin tarball
> into /var/www/nailgun/plugins/.
> If we implement deplo

Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Mike Scherbakov
> I did not expect that timeout parameter is a mandatory requirement for
task

UX is obviously has to be improved here. Can we make a clear error, if
there is no required parameter, instead of throwing unclear exception?

On Mon, Nov 24, 2014 at 2:34 PM, Dmitry Ukov  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 <
> tleontov...@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  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 <
>>> adide...@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 
 wrote:

> Hello All,
> Current implementation of plugins in Fuel unpacks plugin tarball
> into

Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Dmitry Ukov
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 <
tleontov...@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  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 > > 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 
>>> 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
 custo

Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Dmitriy Shulyak
I tried to reproduce this behavior with tasks.yaml:

# Deployment is required for controllers
- role: ['controller']
  stage: post_deployment
  type: puppet
  parameters:
puppet_manifest: site.pp
puppet_modules: "puppet/:/etc/puppet/modules"
timeout: 360

And actually plugin was built successfully, so as Tatyana and Alex said -
the problem is not with puppet_modules format.

I would sugest to update fuel-plugin-builder, and if this issue will be
reproduced - you can show your plugin on gerrit review or personal github,
and we can try to build it.


On Mon, Nov 24, 2014 at 1:05 PM, Tatyana Leontovich <
tleontov...@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  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 > > 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 
>>> wrote:
>>>
 Hello All,
 Current implementation of plugins in Fuel unpacks plugin tarball
 into /var/www/nailgun/plu

Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Tatyana Leontovich
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  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 
> 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  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 pup

Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Dmitry Ukov
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 
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  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=:
>> 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@lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
> ___
> OpenStack-dev mailing list
> OpenStack-dev@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Kind regards
Dmitry Ukov
IT Engineer
Mirantis, Inc.
___
OpenStack-dev mailing lis

Re: [openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Aleksandr Didenko
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  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=:
> 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@lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Fuel] Plugins improvement

2014-11-24 Thread Dmitry Ukov
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=:
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@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev