码迷,mamicode.com
首页 > 其他好文 > 详细

Omnibus Gitlab安装container registry报错

时间:2016-08-08 14:17:15      阅读:298      评论:0      收藏:0      [点我收藏+]

标签:

按照http://docs.gitlab.com/ce/administration/container_registry.html#container-registry-domain-configuration

官方文档配置gitlab.rb,结果报错:

Recipe: gitlab::default
* directory[/etc/gitlab] action create (up to date)

================================================================================
Recipe Compile Error in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb
================================================================================

NoMethodError
-------------
undefined method `[]=‘ for nil:NilClass

Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:35:in `from_file‘

Relevant File Content:
----------------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/recipes/default.rb:

28: group "root"
29: mode "0775"
30: action :nothing
31: end.run_action(:create)
32:
33: Gitlab[:node] = node
34: if File.exists?("/etc/gitlab/gitlab.rb")
35>> Gitlab.from_file("/etc/gitlab/gitlab.rb")
36: end
37: node.consume_attributes(Gitlab.generate_config(node[‘fqdn‘]))
38:
39: if File.exists?("/var/opt/gitlab/bootstrapped")
40: node.set[‘gitlab‘][‘bootstrap‘][‘enable‘] = false
41: end
42:
43: directory "/var/opt/gitlab" do
44: owner "root"


Running handlers:
[2016-08-08T13:25:18+08:00] ERROR: Running exception handlers
Running handlers complete
[2016-08-08T13:25:18+08:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2016-08-08T13:25:18+08:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
[2016-08-08T13:25:18+08:00] ERROR: undefined method `[]=‘ for nil:NilClass
[2016-08-08T13:25:19+08:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

 

原因:

gitlab版本太低!!不支持container registry。

gitlab-ce从8.8开始支持container registry:

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4040

 

查看gitlab版本:

https://gityu.com/help

 

升级gitlab-ce:

sudo yum install gitlab-ce

https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update/README.md#updating-using-the-official-repositories

 

使用yum info gitlab-ce查看版本,如果依然低于最新版本;

更新cache:

yum makecache fast

参照https://packages.gitlab.com/gitlab/gitlab-ce/install 使用rpm下面的

curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

更新reposiroty

此时yum info gitlab-ce查看到版本已更新:

技术分享

 

最后

sudo yum install gitlab-ce

安装最新版本。

 

Omnibus Gitlab安装container registry报错

标签:

原文地址:http://www.cnblogs.com/flasheryu/p/5748951.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!