• Kirill Smelkov's avatar
    gitlab: PostgreSQL service · 470719fe
    Kirill Smelkov authored
    Organize internal PostgreSQL database which will be used as DB for
    Roby-on-Rails GitLab and listens only on unix socket (for security and
    performance reasons - see earlier intro patch).
    
    To do it we use slapos.cookbook:postgres recipe, with disabling
    "listen-to-network" via passing empty sets to ipv4 and ipv6 recipe
    arguments.
    
    The promise to check whether DB is alive is just `psql -c '\q'` which
    will error if failing to connect to DB, but exit silently if connected ok.
    
    Explicit log rotation is not needed - as postgresql logs to
    stdout/stderr - not to a file - logs are handled by slapos - put into
    .slappartX_postgresql.log and automatically rotated there.
    
    XXX omnibus-gitlab tunes postgresql with shared_buffers and other
    parameters, most likely for performance reasons - see e.g.
    
        https://gitlab.com/gitlab-org/omnibus-gitlab/blob/8-2-stable/files/gitlab-cookbooks/gitlab/templates/default/postgresql.conf.erb#L113
    
    I decided not to fine-tune postgresql for now, and get on-field feedback
    first, and then, if needed, we can tune.
    
    /cc @kazuhiko, @jerome
    470719fe
instance.cfg.in 1021 Bytes