可以使用 Opsworks 设置 jenkins 服务器
Can set up jenkins server with Opsworks
我正在尝试通过 AWS Opsworks 设置 Jenkins 服务器。我将 https://github.com/chef-cookbooks/jenkins 添加到自定义食谱部分。并将 jenkins::master 添加到事件生命周期的设置步骤中。但是,每当我尝试创建一个实例时,我都会收到以下错误:
[2015-11-07T21:12:41+00:00] ERROR: Running exception handlers
[2015-11-07T21:12:41+00:00] ERROR: Exception handlers complete
[2015-11-07T21:12:41+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2015-11-07T21:12:41+00:00] ERROR: 412 "Precondition Failed"
[2015-11-07T21:12:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
我也在日志文件中看到这个错误:
Missing Cookbooks:
------------------
No such cookbook: apt
如有任何帮助,我们将不胜感激。
查看 git 存储库中的 metadata.rb 文件:
它清楚地表明这些是您的 OpsWorks 存储库中可能缺少的依赖项:
- 取决于 'apt'、“2.0”
- 取决于 'runit',“1.5”
- 取决于 'yum'、“3.0”
您需要将这些说明书(在那些版本中)添加到您的 opsworks git 存储库中。
您可能需要 运行 OpsWorks 更新自定义说明书后才能生效,这里是 how。
使用 Berkshelf 管理说明书依赖项,无需将社区说明书存储在您自己的存储库中。
简而言之:在 Berksfile
中指定食谱依赖项及其约束(如果有),例如:
# Berksfile
source 'https://supermarket.getchef.com'
cookbook 'apt', '2.0.0'
然后执行berks install && berks vendor --path vendor/cookbooks
。确保通过执行 knife cookbook upload --all --cookbook-path vendor/cookbooks
或 knife cookbooks upload --all --include-dependencies
.
将所有食谱上传到您的厨师服务器(或正确管理任何其他实体,例如 test-kitchen)
如果你配置正确,那么你应该没有问题。
确保将 Berksfile.lock
存储在您的存储库中。
我正在尝试通过 AWS Opsworks 设置 Jenkins 服务器。我将 https://github.com/chef-cookbooks/jenkins 添加到自定义食谱部分。并将 jenkins::master 添加到事件生命周期的设置步骤中。但是,每当我尝试创建一个实例时,我都会收到以下错误:
[2015-11-07T21:12:41+00:00] ERROR: Running exception handlers
[2015-11-07T21:12:41+00:00] ERROR: Exception handlers complete
[2015-11-07T21:12:41+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2015-11-07T21:12:41+00:00] ERROR: 412 "Precondition Failed"
[2015-11-07T21:12:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
我也在日志文件中看到这个错误:
Missing Cookbooks:
------------------
No such cookbook: apt
如有任何帮助,我们将不胜感激。
查看 git 存储库中的 metadata.rb 文件: 它清楚地表明这些是您的 OpsWorks 存储库中可能缺少的依赖项:
- 取决于 'apt'、“2.0”
- 取决于 'runit',“1.5”
- 取决于 'yum'、“3.0”
您需要将这些说明书(在那些版本中)添加到您的 opsworks git 存储库中。 您可能需要 运行 OpsWorks 更新自定义说明书后才能生效,这里是 how。
使用 Berkshelf 管理说明书依赖项,无需将社区说明书存储在您自己的存储库中。
简而言之:在 Berksfile
中指定食谱依赖项及其约束(如果有),例如:
# Berksfile
source 'https://supermarket.getchef.com'
cookbook 'apt', '2.0.0'
然后执行berks install && berks vendor --path vendor/cookbooks
。确保通过执行 knife cookbook upload --all --cookbook-path vendor/cookbooks
或 knife cookbooks upload --all --include-dependencies
.
如果你配置正确,那么你应该没有问题。
确保将 Berksfile.lock
存储在您的存储库中。