Skip to content

prod/webapp: Deploy new production_db configuration

Related to T2945

Test Plan

octocatalog:

  • belvedere, update pgbouncer references to the new db
  • moma, webapp1: update the webapp configuration to use said db
  • webapp.staging: nothing changes
$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging belvedere
*** Running octocatalog-diff on host belvedere.internal.softwareheritage.org
I, [2021-04-02T10:12:23.161824 #21408]  INFO -- : Catalogs compiled for belvedere.internal.softwareheritage.org
I, [2021-04-02T10:12:24.309313 #21408]  INFO -- : Diffs computed for belvedere.internal.softwareheritage.org
diff origin/production/belvedere.internal.softwareheritage.org current/belvedere.internal.softwareheritage.org
*******************************************
  Concat::Fragment[_postgres] =>
   parameters =>
     content =>
      @@ -6,4 +6,5 @@
       swh-lister = host=db.internal.softwareheritage.org port=5434 auth_user=postgres
       softwareheritage-indexer = host=belvedere.internal.softwareheritage.org port=5435 auth_user=postgres
      +swh-web = host=belvedere.internal.softwareheritage.org port= auth_user=postgres
       * = host=127.0.0.1 port=5434 auth_user=postgres
      _
*******************************************
  Concat_fragment[_postgres] =>
   parameters =>
     content =>
      @@ -6,4 +6,5 @@
       swh-lister = host=db.internal.softwareheritage.org port=5434 auth_user=postgres
       softwareheritage-indexer = host=belvedere.internal.softwareheritage.org port=5435 auth_user=postgres
      +swh-web = host=belvedere.internal.softwareheritage.org port= auth_user=postgres
       * = host=127.0.0.1 port=5434 auth_user=postgres
      _
*******************************************
  Pgbouncer::Databases[pgbouncer_module_databases] =>
   parameters =>
     databases =>
      - [{"source_db"=>"softwareheritage", "host"=>"belvedere.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5433"}, {"source_db"=>"softwareheritage-deposit", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"softwareheritage-scheduler", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"swh-vault", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"swh-lister", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"softwareheritage-indexer", "host"=>"belvedere.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5435"}, {"source_db"=>"*", "host"=>"127.0.0.1", "auth_user"=>"postgres", "port"=>"5434"}]
      + [{"source_db"=>"softwareheritage", "host"=>"belvedere.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5433"}, {"source_db"=>"softwareheritage-deposit", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"softwareheritage-scheduler", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"swh-vault", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"swh-lister", "host"=>"db.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5434"}, {"source_db"=>"softwareheritage-indexer", "host"=>"belvedere.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>"5435"}, {"source_db"=>"swh-web", "host"=>"belvedere.internal.softwareheritage.org", "auth_user"=>"postgres", "port"=>""}, {"source_db"=>"*", "host"=>"127.0.0.1", "auth_user"=>"postgres", "port"=>"5434"}]
*******************************************
*** End octocatalog-diff on belvedere.internal.softwareheritage.org

$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging moma
I, [2021-04-02T10:12:09.769040 #16398]  INFO -- : Catalogs compiled for moma.softwareheritage.org
I, [2021-04-02T10:12:12.272936 #16398]  INFO -- : Diffs computed for moma.softwareheritage.org
diff origin/production/moma.softwareheritage.org current/moma.softwareheritage.org
*******************************************
  File[/etc/softwareheritage/web/web.yml] =>
   parameters =>
     content =>
      @@ -65,5 +65,10 @@
             - 213.135.60.146
             - 37.187.96.121
      -production_db: "/var/lib/swh/web.sqlite3"
      +production_db:
      +  host: db.internal.softwareheritage.org
      +  port: 5432
      +  name: swh-web
      +  user: swh-web
      +  password: swh-deploy-webapp-db-password
       es_workers_index_url: http://esnode1.internal.softwareheritage.org:9200/swh_workers-*
       deposit:
*******************************************
*** End octocatalog-diff on moma.softwareheritage.org

$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging webapp.internal.staging.swh.network
*** Running octocatalog-diff on host webapp.internal.staging.swh.network
I, [2021-04-02T10:14:43.669134 #26641]  INFO -- : Catalogs compiled for webapp.internal.staging.swh.network
I, [2021-04-02T10:14:45.276635 #26641]  INFO -- : Diffs computed for webapp.internal.staging.swh.network
I, [2021-04-02T10:14:45.276676 #26641]  INFO -- : No differences
*** End octocatalog-diff on webapp.internal.staging.swh.network

Migrated from D5406 (view on Phabricator)

Merge request reports