Comments (4)
Я поменял в рецепте захват атрибутов на что-то типа такого
node[:cpan_client][:bootstrap][:keep_autoupdate]
и у меня заработал бутстрап.
Но дальше дело не пошло.
* cpan_client[Sparrow] action install[2017-10-03T04:03:39+03:00] INFO: Processing cpan_client[Sparrow] action install (sparrow::default line 4)
================================================================================
Error executing action `install` on resource 'cpan_client[Sparrow]'
================================================================================
NameError
---------
uninitialized constant Chef::Resource::CpanClient
Cookbook Trace:
---------------
/home/vagrant/.chef/local-mode-cache/cache/cookbooks/cpan/providers/client.rb:4:in `load_current_resource'
Resource Declaration:
---------------------
# In /home/vagrant/.chef/local-mode-cache/cache/cookbooks/sparrow/recipes/default.rb
4: cpan_client 'Sparrow' do
5: action 'install'
6: install_type 'cpan_module'
7: user 'root'
8: group 'root'
9: end
10:
Compiled Resource:
------------------
# Declared in /home/vagrant/.chef/local-mode-cache/cache/cookbooks/sparrow/recipes/default.rb:4:in `from_file'
cpan_client("Sparrow") do
action [:install]
default_guard_interpreter :default
declared_type :cpan_client
cookbook_name "sparrow"
recipe_name "default"
install_type "cpan_module"
user "root"
group "root"
end
System Info:
------------
chef_version=13.2.20
platform=centos
platform_version=7.3.1611
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-client worker: ppid=17268;start=04:03:29;
executable=/opt/chef/bin/chef-client
[2017-10-03T04:03:39+03:00] INFO: Running queued delayed notifications before re-raising exception
Running handlers:
[2017-10-03T04:03:39+03:00] ERROR: Running exception handlers
Running handlers complete
[2017-10-03T04:03:39+03:00] ERROR: Exception handlers complete
Chef Client failed. 8 resources updated in 09 seconds
[2017-10-03T04:03:39+03:00] FATAL: Stacktrace dumped to /home/vagrant/.chef/local-mode-cache/cache/chef-stacktrace.out
[2017-10-03T04:03:39+03:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-10-03T04:03:39+03:00] ERROR: cpan_client[Sparrow] (sparrow::default line 4) had an error: NameError: uninitialized constant Chef::Resource::CpanClient
[2017-10-03T04:03:39+03:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
from cookbooks.
Приветствую! Скорее всего, что chef клиенте 13-й версии это работать не будет, код был написан давно, работает только под старые версии (11 .. 12.4 ), начиная с версии 12.5 шеф заменил LWRP на custom resources:
Вот цитата из док-ии об этом:
https://docs.chef.io/custom_resources.html
Custom resources were introduced in Chef version 12.5 and are now the preferred method of writing your own resources in Chef. If you are using an older version of the chef-client, please see our legacy documentation,
Я если честно сейчас вообще не использую данный кукбук и нет в планах его поддержки.
Однако, если у вас задача ставить sparrow через шеф, могу предложить два варианта:
-
кукбук sparrow - https://supermarket.chef.io/cookbooks/sparrow - он должен работать под любой версией шеф клиента, и использует для установки Perl и cpanm кукбук perl, который кстати майнтейнится опскодом. Опционально этот кукбук может так же ставить sparrow плгины из указанного списка ( по дефолту это список пустой )
-
использовать https://sparrowhub.org/bootstrap.sh , что называется дешево и сердито:
execute "curl -s -k -f https://sparrowhub.org/bootstrap.sh | bash"
bootstrap.sh более или менее совпадает с бутсрапом через sparrowdo ( минимальные различия )
Скажите, помогло ли вам.
from cookbooks.
Понятно. Спасибо за варианты, думаю один из них подойдет.
Тикет можно закрыть.
Вы не планируете делать нативные пакеты для sparrow?
from cookbooks.
Здравствуйте! Идея с нативными пакетами - хорошая, но мне пока не хватает навыков и времени ее воплотить. Если вы сможете чем-то помочь - буду признателен.
from cookbooks.
Related Issues (16)
- Prompt for intervention when chef-client run HOT 2
- FYI: New Pinto Release HOT 4
- CPAN cookbook iconv HOT 3
- /tmp/local-lib/ is deleted and created during every chef run. HOT 2
- CPAN install error on ubuntu HOT 10
- issue on some hosts on cpan::bootstrap HOT 1
- Undefined method or attribute `cpan_client' on `node' HOT 4
- Default CentOS sudoers file breaks CPAN HOT 1
- Consider breaking cookbooks into separate git projects HOT 2
- undefined method `cpan_client' after update to Chef 13 HOT 4
- Cpan installation issue HOT 2
- License HOT 3
- nginx-fcgi only works with socket file? HOT 1
- Install and run as the "pinto" user HOT 5
- Use the pinto installer instead of running cpanm directly HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookbooks.