Page MenuHomeSoftware Heritage

webapp: install read-only services on all frontend servers
ClosedPublic

Authored by vsellier on Jul 7 2021, 5:38 PM.

Details

Summary
  • move the storage and search installation in an upper level in the webapp classe tree because all the webapps will now have the same components installed
  • Remove the useless swh_rp_webapp_with_swh_search_and_storage classe
  • configure the webapp to use the local search and storage services
  • fix an issue on the storage configuration on webapp1 that was not using the r/o credentials to access the database

Related to T3408

Test Plan
  • no changes on storage and search servers
  • moma:
*** Running octocatalog-diff on host moma.softwareheritage.org
I, [2021-07-07T17:27:13.993992 #13909]  INFO -- : Catalogs compiled for moma.softwareheritage.org
I, [2021-07-07T17:27:15.838848 #13909]  INFO -- : Diffs computed for moma.softwareheritage.org
I, [2021-07-07T17:27:15.838896 #13909]  INFO -- : No differences
*** End octocatalog-diff on moma.softwareheritage.org
  • webapp1
diff origin/production/webapp1.internal.softwareheritage.org current/webapp1.internal.softwareheritage.org
*******************************************
  File[/etc/softwareheritage/storage/storage.yml] =>
   parameters =>
     content =>
      @@ -3,6 +3,6 @@
         cls: local
         args:
      -    db: host=somerset.internal.softwareheritage.org port=5432 user=swhstorage dbname=softwareheritage
      -      password=swh-deploy-storage-db-password
      +    db: host=somerset.internal.softwareheritage.org port=5432 user=guest dbname=softwareheritage
      +      password=guest
           objstorage:
             cls: multiplexer
*******************************************
*** End octocatalog-diff on webapp1.internal.softwareheritage.org
  • webapp.internal.staging

truncated because to long

*** Running octocatalog-diff on host webapp.internal.staging.swh.network
diff origin/production/webapp.internal.staging.swh.network current/webapp.internal.staging.swh.network
*******************************************
+ Concat::Fragment[nginx-swh-search-500-6666cd76f96956469e7be39d750cc7d9] =>
   parameters =>
     "content": "\n  location / {\n    proxy_pass            http://swh-search-gu...
     "order": 500,
     "target": "/etc/nginx/sites-available/nginx-swh-search.conf"
*******************************************
+ Concat::Fragment[nginx-swh-search-default-500-6666cd76f96956469e7be39d750cc7d9] =>
...
*******************************************
+ File[/etc/softwareheritage/search/server.yml] =>
   parameters =>
     "content": "---\nsearch:\n  cls: elasticsearch\n  hosts:\n  - host: search-e...
     "ensure": "present",
     "group": "swhstorage",
     "mode": "0640",
     "notify": "Service[gunicorn-swh-search]",
     "owner": "root"
*******************************************
...
     "owner": "swhstorage"
*******************************************
+ File[/etc/softwareheritage/storage/storage.yml] =>
   parameters =>
     "content": "---\nstorage:\n  cls: local\n  args:\n    db: host=db1.internal....
     "ensure": "present",
     "group": "swhstorage",
     "mode": "0640",
     "notify": "Service[gunicorn-swh-storage]",
     "owner": "root"
*******************************************
...
*******************************************
  File[/etc/softwareheritage/web/web.yml] =>
   parameters =>
     content =>
      @@ -2,10 +2,10 @@
       search:
         cls: remote
      -  url: http://search0.internal.staging.swh.network:5010/
      +  url: http://webapp.internal.staging.swh.network:5010/
       metadata_search_backend: swh-search
       storage:
         cls: remote
         args:
      -    url: http://storage1.internal.staging.swh.network:5002/
      +    url: http://webapp.internal.staging.swh.network:5002/
       vault:
         cls: remote
...
*******************************************
*** End octocatalog-diff on webapp.internal.staging.swh.network

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

vsellier created this revision.
ardumont added a subscriber: ardumont.

Great and good idea about the comment into the role files.

This revision is now accepted and ready to land.Jul 7 2021, 5:56 PM