Greg Smethells
Greg Smethells

Reputation: 430

gitlab development kit: how to setup postgres?

I have followed:

https://gitlab.com/gitlab-org/gitlab-development-kit

on a CentOS 6.7 box and have been mostly successful; however, I cannot get postgres to run because the gitlab-development-kit when cloned has no postgres config file.

How do I setup postgres to work with gitlab-development-kit?

I am stuck at the "Post-installation" step of the above linked instructions with a bundle exec foreman start giving me:

[me1@gitlabdevkit gitlab-development-kit]$ bundle exec foreman start
16:47:49 redis.1            | started with pid 1275
16:47:49 postgresql.1       | started with pid 1276
16:47:49 nginx.1            | started with pid 1277
16:47:49 gitlab-workhorse.1 | started with pid 1280
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 * Server started, Redis version 2.4.10
16:47:49 postgresql.1       | postgres cannot access the server configuration file "/home/me1/src/postgresql/data/postgresql.conf": No such file or directory
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 * The server is now ready to accept connections at /home/me1/src/gitlab-development-kit/redis/redis.socket
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 - 0 clients connected (0 slaves), 717512 bytes in use
16:47:49 gitlab-workhorse.1 | 2015/11/03 16:47:49 Starting gitlab-workhorse 0.4.0-1-ged976a2-20151103.202110
16:47:49 postgresql.1       | exited with code 2
16:47:49 system             | sending SIGTERM to all processes
16:47:49 gitlab-workhorse.1 | exited with code 2
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 # Received SIGTERM, scheduling shutdown...
16:47:49 nginx.1            | exited with code 0
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 # User requested shutdown...
16:47:49 redis.1            | exited with code 0
16:47:49 redis.1            | [1275] 03 Nov 16:47:49 * Removing the unix socket file.
[me1@gitlabdevkit gitlab-development-kit]$ 

The offending line of interest is, of course:

    16:47:49 postgresql.1       | postgres cannot access the server configuration file "/home/me1/src/postgresql/data/postgresql.conf": No such file or directory

and none of the files in the gitlab-development-kit seem to help satisfy this need.

Upvotes: 0

Views: 536

Answers (1)

Greg Smethells
Greg Smethells

Reputation: 430

The answer lies here:

http://www.postgresql.org/docs/9.3/static/install-short.html

The short version (what works with respect to the gitlab-development-kit instructions) is to do:

mkdir -p postgresql/data
/usr/pgsql-9.3/bin/initdb -D postgresql/data

None of the gitlab-development-kit documentation covers setting up postgres and it must have been assumed that the developer would be able to find the above page. Since the current guide I linked to in the question installed postgresql 9.3, I am linking to the proper doc page for that version on the postgres website.

Upvotes: 2

Related Questions