- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试通过以下命令通过 Knife Bootstrap 启动并运行服务器:
knife bootstrap "<ip-address>"
-x ec2-user
-r recipe[connector],recipe[all-servers]
-N "serv-name"
-E staging
-i "~/.chef/mycert.pem"
--sudo
--no-host-key-verify
全服务器配方包含在 Chef 13+ 中损坏的窗口的依赖项:
(TLDRS,完整堆栈跟踪位于底部)
13: undefined method “kernel” (outdated 7-zip cookbook dependency 3.0 instead of 2.0)
14: cannot load such file -- chef/mixin/language (windows cookbook dependency, 3.0 + for windows cookbook would fix this)
15: manual license acceptance required and cannot load such file -- chef/mixin/language error (windows cookbook dependency, 3.0 + for windows cookbook would fix this)
最大的问题是,一堆维护不足的服务使用旧版本,升级它们中的任何一个都可能会导致整个 Chef 组织出现大量问题,所以我想让这台服务器使用其中任一版本的较新版本Windows 或 7-zip Recipe 。
我试图解决这个问题的方法是创建一个新的说明书“all-servers-dev”,并在依赖树中创建所有说明书的开发版本,一直到“windows”,我在其中下载了更新的windows Recipe 并将其替换为依赖关系树的底部。然而,这不起作用,因为 Chef 不断尝试同步所有 Recipe ,甚至是 Windows Recipe ,即使它没有包含在我能找到的依赖关系树中的任何位置。
我什至尝试删除所有服务器配方,只安装连接器配方,其唯一依赖项是 yum-epel,其唯一依赖项是“compat_resource”,它没有依赖项。
2014年12月13日
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/seven_zip/attributes/default.rb
================================================================================
NoMethodError
-------------
undefined method `kernel' for #<Chef::Node::Attribute:xxxxxxxxxxxxxxxxx>
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/seven_zip/attributes/default.rb:21:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/seven_zip/attributes/default.rb:
14: # Unless required by applicable law or agreed to in writing, software
15: # distributed under the License is distributed on an "AS IS" BASIS,
16: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: # See the License for the specific language governing permissions and
18: # limitations under the License.
19: #
20:
21>> if kernel['machine'] =~ /x86_64/
22: default['seven_zip']['url'] = 'http://www.7-zip.org/a/7z1514-x64.msi'
23: default['seven_zip']['checksum'] = 'xxxxxxxxxx'
24: default['seven_zip']['package_name'] = '7-Zip 15.14 (x64 edition)'
25: else
26: default['seven_zip']['url'] = 'http://www.7-zip.org/a/7z1514.msi'
27: default['seven_zip']['checksum'] = 'xxxxxxxxxx'
28: default['seven_zip']['package_name'] = '7-Zip 15.14'
29: end
30:
System Info:
------------
chef_version=13.12.14
platform=amazon
platform_version=2017.03
ruby=ruby 2.4.5p335 (2018-10-18 revision 65137) [x86_64-linux]
program_name=chef-client worker: ppid=3493;start=17:29:14;
executable=/opt/chef/bin/chef-client
Running handlers:
[2019-12-04T17:29:32+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-12-04T17:29:32+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 17 seconds
[2019-12-04T17:29:32+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2019-12-04T17:29:32+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-12-04T17:29:32+00:00] ERROR: undefined method `kernel' for #<Chef::Node::Attribute:xxxxxxxxxx>
[2019-12-04T17:29:32+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
29.14.14
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/windows/libraries/windows_package.rb
================================================================================
LoadError
---------
cannot load such file -- chef/mixin/language
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/windows/libraries/windows_package.rb:7:in `<top (required)>'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/windows/libraries/windows_package.rb:
1: require 'chef/resource/lwrp_base'
2: require 'chef/provider/lwrp_base'
3:
4: require 'win32/registry' if RUBY_PLATFORM =~ /mswin|mingw32|windows/
5:
6: require 'chef/mixin/shell_out'
7>> require 'chef/mixin/language'
8: class Chef
9: class Provider
10: class WindowsCookbookPackage < Chef::Provider::LWRPBase
11: include Chef::Mixin::ShellOut
12: include Windows::Helper
13:
14: # the logic in all action methods mirror that of
15: # the Chef::Provider::Package which will make
16: # refactoring into core chef easy
System Info:
------------
chef_version=14.14.29
platform=amazon
platform_version=2017.03
ruby=ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef/bin/chef-client
Running handlers:
[2019-12-04T18:06:28+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-12-04T18:06:28+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 35 seconds
[2019-12-04T18:06:28+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2019-12-04T18:06:28+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-12-04T18:06:28+00:00] FATAL: LoadError: cannot load such file -- chef/mixin/language
17.5.15Chef 有一个新提示, Knife Bootstrap 未处理该提示:
Do you accept the 2 product licenses (yes/no)?
您无法从引导 CLI 接受这些,因此您必须 ssh 到服务器并手动运行 Chef,这会导致与 14 相同的错误:
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/windows/libraries/windows_package.rb
================================================================================
LoadError
---------
cannot load such file -- chef/mixin/language
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/windows/libraries/windows_package.rb:7:in `<top (required)>'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/windows/libraries/windows_package.rb:
1: require 'chef/resource/lwrp_base'
2: require 'chef/provider/lwrp_base'
3:
4: require 'win32/registry' if RUBY_PLATFORM =~ /mswin|mingw32|windows/
5:
6: require 'chef/mixin/shell_out'
7>> require 'chef/mixin/language'
8: class Chef
9: class Provider
10: class WindowsCookbookPackage < Chef::Provider::LWRPBase
11: include Chef::Mixin::ShellOut
12: include Windows::Helper
13:
14: # the logic in all action methods mirror that of
15: # the Chef::Provider::Package which will make
16: # refactoring into core chef easy
System Info:
------------
chef_version=15.5.17
platform=amazon
platform_version=2017.03
ruby=ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef/bin/chef-client
Running handlers:
[2019-12-04T18:14:03+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-12-04T18:14:03+00:00] ERROR: Exception handlers complete
Chef Infra Client failed. 0 resources updated in 18 seconds
[2019-12-04T18:14:03+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2019-12-04T18:14:03+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-12-04T18:14:03+00:00] FATAL: LoadError: cannot load such file -- chef/mixin/language
最佳答案
15.5.17 Chef has a new prompt that’s unhandled by knife bootstrap:
Do you accept the 2 product licenses (yes/no)?
You can’t accept these from the bootstrap CLI, so you have to ssh to the server and run chef manually
这是不正确的,您可以使用--chef-license accept
当您引导节点接受 Chef 许可证时
如果我理解你的权利,你希望固定同一 Recipe 集合的不同版本。如果是这种情况,您可以使用environment来实现它:
Cookbook versions can be pinned in each environment, which allows you to control the rollout of new cookbook releases through successive testing environments before releasing new cookbook versions into production environments. See the environment format examples below for the cookbook pinning syntax.
所以请记住将您的节点与特定的 Chef 环境相关联,这样每个环境都有自己的 Recipe 集合。
关于amazon-web-services - 是否可以选择性地将 Recipe 与 Knife Bootstrap 同步?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59257982/
我正在使用来自 chef 的软件包开发自定义 Recipe 。 我在 recipes 文件夹下创建了一个名为 apache.rb 的文件。 然后我通过 berks 上传了菜谱,并在一个节点上用 rec
I like to create a single Openrewrite migration jar that includes custom recipes and rewrite.yml
我正在尝试对一个模型进行 k 折交叉验证,该模型根据卫星图像预测树种断面积比例的联合分布。这需要使用 DiricihletReg::DirichReg() 函数,这反过来又需要使用 Dirichlet
在一本 Recipe 中,我有一个图书馆( client_helper.rb )。在其中定义了一个模块。模块名称为 客户 helper .这是模块代码。 module Client_helper #
我的 nginx Recipe 中有两个 Chef Recipe 。一个名为 default.rb,另一个名为 sites.rb。当我用 运行网站 Recipe 时 RUN_LIST=recipe[n
我有 Recipe base 和 Recipe myapp base 有 2 个配方 - my_java 和 java_with_custom_stuff 在 java_with_custom_stu
所以我使用以下配方: include_recipe "build-essential" node_packages = value_for_platform( [ "debian", "ubunt
我正在尝试使用 Vagrant 创建我的第一个 Chef Recipe ,但在第一步就遇到了问题。我的 Recipe 的第一行是: include_recipe "apt" 但是当我尝试 vagran
我已经下载了 Recipe “chef-jira”,现在我正在尝试在 Ubuntu 12.04 上使用 chef-solo/vagrant 运行它。 经过大量的谷歌搜索和 stackoverflow
我们有一个测试环境,由一台服务器、一台客户端和另一台作为工作站的客户端组成。 我知道命令 # knife cookbook site install apache2 但是这个命令会产生错误,因为我什至
我使用knife solo 使用.chef/knife.rb 定义的自定义模板创建了一个新文件夹和一个带有默认食谱的食谱。我的问题是我应该使用什么命令让刀使用该模板而不是使用 cp 创建新食谱? 类似
我是 Chef 的初学者。任何人都可以告诉我是否有一种方法可以将 Cookbook 的 files/default 目录中的目录复制到其他位置。 例如我在 files/ 目录中有一个包含文件 a.tx
我有一本包含 2 个食谱的食谱。 属性/default.rb default['vpn']['crt'] = 'nocrt' 默认配方具有创建通用 crt 文件的文件资源 file 'cert' do
我的情况是我有三本 Recipe ,每本都有一个写入/etc/hosts 文件的模板资源。 与其覆盖,我想附加: 第一本 Recipe 创建/etc/hosts 文件并写入第 1、2、3 行。 第二本
从我当前正在执行的食谱中,我想访问它在我的执行机器上的“当前”位置。 我需要它来访问它的缓存目录结构。 我有一种感觉,它位于“node[]”内的某个地方,但我根本找不到有关其结构的任何文档。 有什么建
z3c.recipe.scripts 和 zc.recipe.egg 似乎都在积极开发中。 z3c.recipe.scripts 描述为: The script recipe installs egg
我对 ModelMommy 有一段时间的烦恼,但我不知道如何正确地做到这一点。 让我们假设一个简单的关系: class Organization(models.Model): label =
我将一个 zip 文件放入 Recipe 中,然后将其上传到服务器后,我发现了这个错误。有人可以建议我解决此错误的正确解决方案吗... ERROR: Failed to upload ~/chef-r
我第一次使用 Chef,试图了解 Recipe 和 Recipe 。 我在配置我目前在我的角色文件中执行的标准 php 说明书后收到错误“mysql::client”失败: run_list( "
Glpk 需要使用configure make install 命令构建。所以我使用 zc.recipe.cmmi 配方来构建 glpk 包。它在 bin 目录中生成 glpsol 命令。我需要能够在
我是一名优秀的程序员,十分优秀!