Staging instance, all changes can be removed at any time

Skip to content

deposit: Use explicit configuration

I kept the initial arborescence /etc/softwareheritage/deposit/ because there are other configuration file used (e.g. http_auth).

Related T1533 Related D1160 Depends on D1159

Test Plan

$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to update_worker_configuration moma
Found host moma.softwareheritage.org
Cloning into '/tmp/swh-ocd.dya0aqyH/environments/production/data/private'...
done.
Cloning into '/tmp/swh-ocd.dya0aqyH/environments/update_worker_configuration/data/private'...
done.
*** Running octocatalog-diff on host moma.softwareheritage.org
I, [2019-02-20T14:35:11.924914 #29704]  INFO -- : Catalogs compiled for moma.softwareheritage.org
I, [2019-02-20T14:35:13.240547 #29704]  INFO -- : Diffs computed for moma.softwareheritage.org
diff origin/production/moma.softwareheritage.org current/moma.softwareheritage.org
*******************************************
- File[/etc/softwareheritage/deposit/private.yml]
*******************************************
  File[/etc/softwareheritage/deposit/server.yml] =>
   parameters =>
     content =>
      @@ -10,3 +10,12 @@
         args:
           url: http://saatchi.internal.softwareheritage.org:5008/
      +private:
      +  secret_key: swh::deploy::deposit::runtime_secret_key
      +  db:
      +    host: db
      +    port: 5432
      +    name: softwareheritage-deposit
      +    user: swhstorage
      +    password: swh::deploy::storage::db::password
      +  media_root: "/srv/storage/space/swh-deposit/uploads/"
      _
*******************************************
  File[/etc/systemd/system/gunicorn-swh-deposit.service] =>
   parameters =>
     content =>
      @@ -14,4 +14,6 @@
       RuntimeDirectory=/run/gunicorn/swh-deposit
       WorkingDirectory=/run/gunicorn/swh-deposit
      +Environment=SWH_CONFIG_FILENAME=/etc/softwareheritage/deposit/server.yml
      +Environment=DJANGO_SETTINGS_MODULE=swh.deposit.settings.production
       ExecStart=/usr/bin/gunicorn3 -p /run/gunicorn/swh-deposit/pidfile -c /etc/gunicorn/instances/swh-deposit.cfg swh.deposit.wsgi
       ExecStop=/bin/kill -TERM $MAINPID
*******************************************
  Gunicorn::Instance[swh-deposit] =>
   parameters =>
     environment =>
       DJANGO_SETTINGS_MODULE =>
        + swh.deposit.settings.production
       SWH_CONFIG_FILENAME =>
        + /etc/softwareheritage/deposit/server.yml
*******************************************
  Package[python3-swh.storage] =>
   parameters =>
     ensure =>
      - latest
      + present
*******************************************
  Systemd::Unit_file[gunicorn-swh-deposit.service] =>
   parameters =>
     content =>
      @@ -14,4 +14,6 @@
       RuntimeDirectory=/run/gunicorn/swh-deposit
       WorkingDirectory=/run/gunicorn/swh-deposit
      +Environment=SWH_CONFIG_FILENAME=/etc/softwareheritage/deposit/server.yml
      +Environment=DJANGO_SETTINGS_MODULE=swh.deposit.settings.production
       ExecStart=/usr/bin/gunicorn3 -p /run/gunicorn/swh-deposit/pidfile -c /etc/gunicorn/instances/swh-deposit.cfg swh.deposit.wsgi
       ExecStop=/bin/kill -TERM $MAINPID
*******************************************
*** End octocatalog-diff on moma.softwareheritage.org

Migrated from D1161 (view on Phabricator)

Merge request reports

Loading