Skip to content

hammer-space/hsft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hammertrack

image Hammertrack is a custom file metadata integration between Hammerspace and Ftrack allowing simple selection of files for instantiation in other sites

About The Project

Hammertrack is a Ftrack listener that monitors changes to custom location fields in the Ftrack application. Changes to location settings triggers updates to custom metadata on files and directories associated with specific tasks within Ftrack. This metadata can be used to drive data placement and location using SmartObjectives on a Hammerspace Global Data Environment.

Currently, hammertrack.py watches for location fields to be added to or removed from Tasks in Ftrack. When it sees a location label in the custom field it adds them as Hammerspace labels to the root of the specified task folders on a Hammerspace file system. The label schema is configured in Ftrack to match the configuration in hammertrack.py, and the label names are passed through directly as Hammerspace labels.

(back to top)

Built With

(back to top)

Getting Started

Here are some basics on getting up and running. Everyone's Ftrack instance is configured a bit differently and will require some configuration.

Prerequisites

  1. Ftrack API installed and configured $ pip install ftrack-python-api
  2. Hammerspace Toolkit (hstk) installed: $ pip install hstk
  3. Dotenv Installed - https://pypi.org/project/python-dotenv/
  4. Hammerspace file system mounted

Installation

  1. Clone this repository git clone https://github.com/kircktd/hsft.git
  2. Copy or link hammertrack.py to the working directory on your server

Configuration

  1. You first need to setup your storage location and storage senerio and define the centralized storage senerio using your Hammerspace fileshare. image image

  2. Go to the setting page with in Ftrack and selctect "Custom Attributes" image

  3. Create a new Custom Attribute where you define the locations of your Hammerspace clusters. You must enter a "menu' name that is normally the location, and then for each menu name you have to add a value which in this example the value is the 3 letter acronym for the local airport associated with the city name.

    image

  4. Next you need to add the custom attribute to your Ftrack project. Select Attributes, Custom Attributes, Task.

    image

  5. Edit the hammertrack.py script to set the location sites using a key word value and menu name to match the settings in Ftrack for the site locations (line 90).

    image

  6. One or more Hammerspace clusters set up with label-based objectives to drive data placement (e.g. IF HAS_LABEL("LOCATION") THEN {SLO('place-on-local-volumes)})

  7. Add the value labels to each Hammerspace cluster by logging into each Hammerspace primary anvil and adding the associated labels. Once completed do a "label-list" to verify all the required labels are defined. Repeat this step on all primary Anvil servers.

    image image

  8. Install dotenv and configure a .env file in the same working directory where the hammertrack.py script is installed. Below is an example of a .env file configured for use with Hammertrack.

image

  1. Launch the hammpertrack.py script in the backround on your Windows or Linux server. The listener will monitor for location changes in Ftrack project and will update the metatdata for the files on the Hammerspace fileshare with the appropiate labels. Once these labels are detected by the Hammerspace sweeper as valid objectives the files associated with the labels will be placed-on the Hammerspace cluster that is associated with the specified location.

Usage

Once the Ftrack instance and the hammertrack.py script have been configured it will recognize location change events on Tasks and act accordingly. Launch the hammertrack.py script on your windows or linux server where the Hammerspace Fileshare is mounted. With in the project view select a task and update the location field (make sure you hit the save button after the update). Once that is done the script will pick-up on the event and will update the directory for the specified project with the unique location metadata. image

(back to top)

Acknowledgments

This project wouldn't exist without these folks' contributions:

  • Patrick Boucher of LAIKA Studios for creating the baseline python code that integrates with Ftrack.
  • Kyla Lebon of Ftrack for technical support and Ftrack access.
  • Tram Le-Jones of Ftrack for technical support and Ftrack access.
  • Mike Bott of Hammerspace for Python support.

(back to top)

About

Hammerspace / Ftrack Integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages