我已经通过puppet模块located here安装了gitlab 6:
我根据example here创建了以下木偶清单:
root@gitlab2:/etc/puppet# cat /etc/puppet/manifests/site.pp
stage { 'first': before => Stage['main'] }
stage { 'last': require => Stage['main'] }
class { 'apt': stage => first; }
class { 'redis': stage => main; }
class { 'nginx': stage => main; }
class {
'ruby':
stage => main,
version => $ruby_version,
rubygems_update => false;
}
class {
'ruby::dev':
stage => main,
require => Class['ruby']
}
if $::lsbdistcodename == 'quantal' {
package {
['build-essential','libssl-dev','libgdbm-dev','libreadline-dev',
'libncurses5-dev','libffi-dev','libcurl4-openssl-dev']:
ensure => installed;
}
$ruby_version = '4.9'
exec {
'ruby-version':
command => '/usr/bin/update-alternatives --set ruby /usr/bin/ruby1.9.1',
user => root,
logoutput => 'on_failure';
'gem-version':
command => '/usr/bin/update-alternatives --set gem /usr/bin/gem1.9.1',
user => root,
logoutput => 'on_failure';
}
} else {
$ruby_version = '1:1.9.3'
}
class { 'mysql::server': stage => main;}
mysql::db { 'gitlabdb':
ensure => 'present',
user => 'gitlab',
password => 'foo',
host => 'localhost',
grant => ['all'],
}
class {
'gitlab':
git_email => 'git@someserver.net',
git_comment => 'GitLab',
gitlab_branch => '6-0-stable',
gitlabshell_branch => 'v1.4.0',
gitlab_dbtype => 'mysql',
gitlab_dbname => 'gitlabdb',
gitlab_dbuser => 'gitlab',
gitlab_dbpwd => 'foo',
gitlab_dbhost => 'localhost',
gitlab_dbport => '3306',
ldap_enabled => false,
ldap_host => 'foo',
ldap_base => 'dc=foo,dc=foo',
ldap_uid => 'uid',
ldap_port => '636',
ldap_method => 'ssl',
ldap_bind_dn => 'foo',
ldap_bind_password => 'foo',
}
我安装了以下木偶模块
root@gitlab2:/etc/puppet# puppet module list
/etc/puppet/modules
├── fsalum-redis (v0.0.6)
├── gitlab (???)
├── nginx (???)
├── puppetlabs-apt (v1.2.0)
├── puppetlabs-gcc (v0.1.0)
├── puppetlabs-mysql (v0.9.0)
├── puppetlabs-ruby (v0.0.2)
└── puppetlabs-stdlib (v4.1.0)
gitlab模块是from here:
root@gitlab2:/etc/puppet/modules/gitlab# git remote -v
origin https://github.com/sbadia/puppet-gitlab.git (fetch)
origin https://github.com/sbadia/puppet-gitlab.git (push)
root@gitlab2:/etc/puppet/modules/gitlab# git branch
* master
我不得不使用guilherme的nginx模块而不是jfryman / puppet-nginx模块,因为issue #22尚未被拉入puppet forge模块。
root@gitlab2:/etc/puppet/modules/nginx# git remote -v
origin https://github.com/guilherme/puppet-nginx.git (fetch)
origin https://github.com/guilherme/puppet-nginx.git (push)
我已经安装了puppet模块而没有错误,但是当我导航到服务器时仍然遇到502 Bad Gateway错误(10.2.192.28)
根据日志,nginx无法连接到套接字。果然套接字文件不存在。
tail /var/log/nginx/gitlab_error.log
2013/09/07 01:26:59 [crit] 1042#0: *3 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (2: No such file or directory) while connecting to upstream, client: 10.1.11.12, server: gitlab2.ac, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/", host: "10.2.192.28"
2013/09/07 01:32:00 [crit] 1042#0: *6 connect() to unix:/home/git/gitlab/tmp/sockets/gitlab.socket failed (2: No such file or directory) while connecting to upstream, client: 10.1.11.12, server: gitlab2.ac, request: "GET / HTTP/1.1", upstream: "http://unix:/home/git/gitlab/tmp/sockets/gitlab.socket:/", host: "10.2.192.28"
根据谷歌的说法,当gitlab进程没有运行时就会发生这种情况。
为什么gitlab进程无法继续运行?
root@gitlab2:/var/log/nginx# service gitlab start && service gitlab status
GitLab service started
GitLab service is not running.
我已尝试过建议offered here:
root@gitlab2:~# sudo -u git -H touch /home/git/gitlab/config/puma.rb
如何解决gitlab进程死亡原因的任何想法?
任何想法如何解决502错误?
我如何安装gitlab有什么明显的错误吗?
在Ubuntu 12.10 Openstack VM上运行,端口22和80打开到内部网络。
答案 0 :(得分:1)
6.0版puma
被unicorn
取代,所以您尝试的内容无效。
查看/home/git/gitlab/log/unicorn.stderr.log
中是否还有任何错误。
我建议您尝试从主here下载新修订的init脚本。
答案 1 :(得分:0)
Gitlab不再使用puma,我修复了这个创建新的ubuntu安装,并使用this puppet模块。
答案 2 :(得分:0)
此外,如果您尝试在已使用端口8080的服务器上运行Gitlab,则需要更改两个文件中的端口号(基于omnibus安装)。 /var/opt/gitlab/gitlab-shell/config.yaml
和/var/opt/gitlab/gitlab-rails/etc/unicorn.rb