Page MenuHomeSoftware Heritage

staging/webapp: Deploy new production_db configuration
ClosedPublic

Authored by ardumont on Apr 1 2021, 5:15 PM.

Details

Summary

Staging first, the production should not be long to follow.

Note that I took a shortcut, I removed the creation of the dir and file used for the
previous sqlite db. Those are already created in our current instance and won't be cleaned
up so this should be fine (that should pose pb if we ever created a new node which won't
do right now)

Plus, recent backups were done.

Related to T2945

Test Plan

octocatalog:

bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging webapp.internal.staging.swh.network
Found host webapp.internal.staging.swh.network
*** Running octocatalog-diff on host webapp.internal.staging.swh.network
I, [2021-04-01T17:09:10.964511 #1471]  INFO -- : Catalogs compiled for webapp.internal.staging.swh.network
I, [2021-04-01T17:09:12.347255 #1471]  INFO -- : Diffs computed for webapp.internal.staging.swh.network
diff origin/production/webapp.internal.staging.swh.network current/webapp.internal.staging.swh.network
*******************************************
  File[/etc/softwareheritage/web/web.yml] =>
   parameters =>
     content =>
      @@ -58,5 +58,10 @@
             - 192.168.100.0/23
             - 129.168.130.0/24
      -production_db: "/var/lib/swh/web.sqlite3"
      +production_db:
      +  host: db1.internal.staging.swh.network
      +  port: 5432
      +  name: swh-web
      +  user: swh-web
      +  password: swh-deploy-webapp-db-password
       es_workers_index_url: http://search-esnode0.internal.staging.swh.network:9200/swh_workers-*
       deposit:
*******************************************
- File[/var/lib/swh/web.sqlite3]
*******************************************
- File[/var/lib/swh]
*******************************************
*** End octocatalog-diff on webapp.internal.staging.swh.network

It shows teeth but it won't bite (it won't actually do anything to the file it claims to remove)

bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging moma
*** Running octocatalog-diff on host moma.softwareheritage.org
I, [2021-04-01T17:16:25.210962 #27635]  INFO -- : Catalogs compiled for moma.softwareheritage.org
I, [2021-04-01T17:16:28.189355 #27635]  INFO -- : Diffs computed for moma.softwareheritage.org
diff origin/production/moma.softwareheritage.org current/moma.softwareheritage.org
*******************************************
- File[/var/lib/swh/web.sqlite3]
*******************************************
- File[/var/lib/swh]
*******************************************
*** End octocatalog-diff on moma.softwareheritage.org

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.
This revision is now accepted and ready to land.Apr 1 2021, 5:25 PM

Fix port using the right repository...