Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.92 KB

README.cluster_seed_files.md

File metadata and controls

63 lines (43 loc) · 1.92 KB

Cluster Seed Files

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.

REQUIREMENTS

For both "seed" and "target" clusters:

  • You must have cluster_seed_bucket_name defined in your cluster config custom_json section,
  • You must have cluster_env set to "development" or "test" in your cluster config custom_json section,

HOW IT WORKS

Creating a cluster seed file

  • 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.

Applying a cluster seed file to a target 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.

LIMITATIONS

  • Videos in "On hold: review and trim video" do not carry over from the seed to the target.