Omnibus installation on CentOS fails when system postgres already exists
Following the installation steps from https://about.gitlab.com/downloads/ on default CentOS 7 installation won't provide working gitlab instance.
After installing rpm and running sudo gitlab-ctl reconfigure
the installation fails with following output:
Running handlers:
[2015-03-12T20:05:08+01:00] ERROR: Running exception handlers
Running handlers complete
[2015-03-12T20:05:08+01:00] ERROR: Exception handlers complete
[2015-03-12T20:05:08+01:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 91 resources updated in 164.469897411 seconds
[2015-03-12T20:05:08+01:00] ERROR: bash[migrate gitlab-rails database] (gitlab::database_migrations line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20150312-31255-1y0gq30" ----
STDOUT: rake aborted!
PG::Error: FATAL: Peer authentication failed for user "gitlab"
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20150312-31255-1y0gq30" ----
Ran "bash" "/tmp/chef-script20150312-31255-1y0gq30" returned 1
[2015-03-12T20:05:08+01:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
changing peer setting in pg_hba.conf to trust and md5 yields no better results:
[2015-03-12T21:55:11+01:00] ERROR: Exception handlers complete
[2015-03-12T21:55:11+01:00] FATAL: Stacktrace dumped to /opt/gitlab/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 93 resources updated in 73.263959721 seconds
[2015-03-12T21:55:11+01:00] ERROR: bash[migrate gitlab-rails database] (gitlab::database_migrations line 19) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20150312-18093-h77a4v" ----
STDOUT: rake aborted!
ActiveRecord::NoDatabaseError: FATAL: database "gitlabhq_production" does not exist
Run `$ bin/rake db:create db:migrate` to create your database
PG::Error: FATAL: database "gitlabhq_production" does not exist
Run `$ bin/rake db:create db:migrate` to create your database
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20150312-18093-h77a4v" ----
Ran "bash" "/tmp/chef-script20150312-18093-h77a4v" returned 1
[2015-03-12T21:55:12+01:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)