chef-run 0.1.21, не могу запустить удаленный рецепт - PullRequest
0 голосов
/ 02 октября 2018

Я следую этому учебнику и запускаю с рабочего стола на экземпляр EC2, развернутый с :

chef-run root@ec2instance-foobar /opt/aws/opsworks/current/merged-cookbooks/opsworks_custom_cookbooks/recipes/default.rb

, но получаю синтаксическую ошибку:

Please provide a recipe in the form 'path/to/recipe/file.rb',
'path/to/cookbook', 'cookbook_name' or 'cookbook_name::recipe_name'.

You provided '/opt/aws/opsworks/current/merged-cookbooks/opsworks_custom_cookbooks/recipes/default.rb'.

chef-run <TARGET[S]> <RESOURCE> <RESOURCE_NAME> [PROPERTIES] [FLAGS]
chef-run <TARGET[S]> <RECIPE> [FLAGS]

Я тоже пытался, без удачи, играя с chef-run:

 $ chef-run user@instance-ec2 opsworks_custom_cookbooks::default
[✔] Packaging cookbook... done!
[✖] Could not create local Policyfile bundle.

CHEFPOLICY001

Could not create local Policyfile bundle.

The following error was reported:

  Failed to generate Policyfile.lock

If you are not able to resolve this issue, please contact Chef support
at beta@chef.io and include the log file and stack trace from the
locations below:

  /home/me/.chef-workstation/logs/default.log
  /home/me/.chef-workstation/logs/stack-trace.log

Чего мне не хватает?

Журнал ошибок:

$ cat   .chef-workstation/logs/stack-trace.log

--------------------------------------------------------------------------------
2018-10-02 18:05:13 +0200: Error encountered while running the following:
  root@instance-ec2
Backtrace:
ChefApply::CLI::OptionValidationError: ChefApply::CLI::OptionValidationError
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/cli/validation.rb:31:in `validate_params'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/cli.rb:108:in `perform_run'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/cli.rb:71:in `block in run'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/telemeter.rb:85:in `block in timed_capture'
    /opt/chef-workstation/embedded/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/telemeter.rb:85:in `timed_capture'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/telemeter.rb:74:in `timed_run_capture'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/cli.rb:69:in `run'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/startup.rb:174:in `start_chef_apply'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/lib/chef_apply/startup.rb:61:in `run'
    /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-apply-0.1.21/bin/chef-run:23:in `<top (required)>'
    /usr/bin/chef-run:288:in `load'
    /usr/bin/chef-run:288:in `<main>'
...