Multiple Configurations sharing the same install folder

[Extracted from a support conversation]

We have multiple configuration directories for our various projects and they always include the ‘install’ directory which we do not modify. Is there a way to specify a single install directory for multiple configuration as that would save us a lot of space.

1 Like

So it sounds like you are using a centralized setup, which by default have what we call a localized core. This is where each project has its bundle cache in the install folder.

It is possible to have all the centralized configs share the same bundle cache. You can set this up using the tank command via a terminal/shell/commandprompt. If you run the tank command with no args, then it will list out all available options. The ones that will be useful here are:

attach_to_core
--------------
When new projects are created, these are often created in a state where each
project maintains its own independent copy of the core API. This command
allows you to attach the configuration to an existing core API installation
rather than having it maintain its own embedded version of the Core API. Note:
If you don't have a shared core API yet, instead use the share_core command.

...

localize
--------
Installs the Core API into your current Configuration. This is typically done
when you want to test a Core API upgrade in an isolated way. If you want to
safely test an API upgrade, first clone your production configuration, then
run the localize command from your clone's tank command.

...

share_core
----------
When new projects are created, these are often created in a state where each
project maintains its own independent copy of the core API. This command
allows you to take the core for such a project and move it out into a separate
location on disk. This makes it possible to create a shared core, where
several projects share a single copy of the Core API. Note: if you already
have a shared Core API that you would like this configuration to use, instead
use the attach_to_core command.
...

So the first thing to do is run the share_core command on one project to create a non project specific core, and then you can run the attach_to_core command on the rest of your projects to link them to the same shared core.

Note however that these commands won’t actually remove the app_store folder from inside the project-specific install folder, you will need to empty this your self once you’ve attached it to the shared core. Only empty the app_store folder and any core.backup folders.

Another option is to look into distributed configs, they can still be centrally stored using a path descriptor. By default the bundle cache is then kept on the user’s local drive cache, but it can be redirected using the environment variable SHOTGUN_BUNDLE_CACHE_PATH .
However, even when you do that, it will still create a copy of the actual core per-project config on the user’s local cache, but all apps, engines, and frameworks could be stored centrally. The nice thing about distributed configs is that you can set up a default site-wide config, which means you no longer need to have a project-specific config if you don’t want to.

3 Likes