Giter VIP home page Giter VIP logo

Comments (5)

esalberg avatar esalberg commented on September 24, 2024

Just realized why gitlab-ci-rake of course wouldn't work - here's the output of the correct command:

[root@linvm2346 etc]# gitlab-rake db:migrate:status
Schema migrations table does not exist yet.

from puppet-gitlab.

esalberg avatar esalberg commented on September 24, 2024

I figured out that I needed to have the following code run:

if is_hash($postgresql) {
  unless $postgresql[enable] {
    exec { 'gitlab_setup':
      command     => '/bin/echo yes | /usr/bin/gitlab-rake gitlab:setup',
      refreshonly => true,
      timeout     => 1800,
      require     => Exec['gitlab_reconfigure'],
      unless      => "/bin/grep complete ${git_data_dir}/postgresql.setup"
    }
    ->
    file { "${git_data_dir}/postgresql.setup":
      content => 'complete'
    }

I don't see anything in the module documentation as to what should be placed into the postgresql hash - I would have tried just using enable => true, but it looks like that would also keep the setup code from firing, which is a bit confusing - am I reading this incorrectly? Is there a basic postgresql hash that can be used for an install that wants to use the defaults but configure the provided postgres db?

Also, it looks like $git_data_dir should be set to /var/opt/gitlab/postgresql/data (when using the default install location from the omnibus / module)? It looks like it defaults to undef, which means that the postgresql.setup file won't be created anywhere useful. The init file doesn't provide much clarification.

I'm happy to make a doc PR after I have this all figured out - I just want to make sure whatever I submit is correct. Thanks!

from puppet-gitlab.

tobru avatar tobru commented on September 24, 2024

Maybe we can ping @robbruce / @sd-robbruce, he did the implementation of this part in the module in #15

from puppet-gitlab.

tobru avatar tobru commented on September 24, 2024

As I didn't hear back any news on this issue, I'll close it right now. Feel free to open a new one.

from puppet-gitlab.

LongLiveCHIEF avatar LongLiveCHIEF commented on September 24, 2024

I re-opened this, as I ran into this block of code while working on #159.

I'm going to remove this block entirely, as it's likely to cause problems, (specifically this will cause #195).

Running this command will rebuild authorized keys, and will migrate the db, and neither will be wanted by the admin.

With gitlab 10.4 onward, gitlab has built in support for HA, which has many scenarios where postgres in disabled on a node, but the postgresql hash still has configuration in it allowing the application_role, consul_role, and pgbouncer_role nodes to connect to the postgres database.

from puppet-gitlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.