Cluster seed files allow you to:
- Set up a base cluster with videos (in various stages of production),
- Create a tarball archive of that cluster, storing it into a configured s3 bucket,
- Apply that cluster seed to another "target" cluster, and
- Separately, reset a cluster's database, solr and filesystems to clear state from the application.
This allows us to have reproducible cluster data for testing, debugging and demonstration purposes.
For both "seed" and "target" clusters:
- You must have
cluster_seed_bucket_name
defined in your cluster configcustom_json
section, - You must have
cluster_env
set to "development" or "test" in your cluster configcustom_json
section,
-
Create a cluster. Add videos to it and do things to those videos - apply trims, etc.
-
When the cluster's content is in the state you want, run
./bin/rake cluster:create_seed_file
This will create a seed file including:
- The cluster's files,
- A database dump,
- The processed videos stored to s3,
- A manifest that describes the hostnames and environment of the original seed cluster.
The seed file will be named after the seed cluster you started from. There is currently no way to generate different seed files from the same cluster.
-
Switch into a separate cluster.
-
Run this:
./bin/rake cluster:apply_seed_file
-
You'll be given a choice of known seed files.
-
Choose a seed file by number. You can also pass in a seed file when running the rake task above - see the usage docs for
cluster:apply_seed_file
.
The target cluster's database, files, and solr indexes will be cleared. The seed file you chose will be loaded, creating the database, files, and s3 assets anew.
- Videos in "On hold: review and trim video" do not carry over from the seed to the target.