Wednesday, November 6, 2013

sgtkConfigReplicator - Cluster Open Source


Here at Cluster Studio we have many projects running in parallel, and some times we need a patch in the Tank config for all of them, so we build this app to simplify the process of replicate configs between projects.

The app get a list of projects where you select origin and target projects, then specify what config folders will be synchronized.




You have a config file, where you configure different jobs (folders) that will be replicated from one project to the others.

 - jobs_config.yml

  The configs are based on the PyYAML syntax.
 
  Each job has the following structure:
 
  '''
 
Schema-Templates:
 path: /tank/config/core/
 exclutions:
 - 'hooks'
 - 'install_location.yml'
 - 'pipeline_configuration.yml'
 - 'roots.yml'
'''

The app have three modules:

 - get_projects_list.py

  This one finds all the projects from and to where you want to synchronize configs. If you need your custom behavior, edit this file.

 - sync_job.py
 
  This module manage the folder replication for each job, in
  our case select rsync, but configure it as you need.
 
 -build_path.py

  This module gets the job and project paths and based on a type that can be "origin" or target", builds a valid path to be used in the replicate job.
 
  Also, this module use the origin and target projects paths specified in the jobs_config.yml

You cant fork it from Github!!

Shotgun Pipeline Toolkit