mozilla-services / kinto-dist

Kinto Distribution for Mozilla Services
Apache License 2.0
12 stars 11 forks source link

Default configuration and automatic setup on empty database #1963

Closed leplatrem closed 2 years ago

leplatrem commented 2 years ago

Projects integrating with Remote Settings want to have integration tests. Running a local remote settings instance should be super simple.

Currently, our consumers setup servers that look more like a Kinto instance than Remote Settings. For example, they push the records to the main bucket directly to setup their tests. This differs from our DEV/STAGE/PROD environments. In order to unify the experience of a local container with our environments requires a lot of setup (config and objects creation) that we don't want to duplicate in every consumer repo.

We want to provide a Remote Settings docker container that works out of the box.

One idea would ship a config file for tests, and the container be ran with KINTO_INI=/etc/testing.ini

With this config, the container would:

leplatrem commented 2 years ago

An other idea would be to add a YAML file inside the container (similar to these) that gets loaded with kinto-wizard along with the database creation / migration.

  main-workspace: 
    collections: []

Assuming the preview and final buckets will be created implicitly.

Consumers could mount their own YAML in order to have their collection in place:

  main-workspace: 
    collections:
      quicksuggest:
        data:
          schema: ....
leplatrem commented 2 years ago

Moved to https://github.com/mozilla/remote-settings/issues/151