# Updating Pipeline Configuration

**URL:** <https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137>\
**Category:** Pipeline Integrations\
**Tags:** configuration\
**Created:** [December 5, 2019, 1:14pm UTC](https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137 "2019-12-05T13:14:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![benwall](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/benwall/32/1386_2.png) [@benwall](https://community.shotgridsoftware.com/u/benwall)\
**Post date:** [December 5, 2019, 1:14pm UTC](https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137/1 "2019-12-05T13:14:36Z")

</div>

Hey there,  
I have some questions about sharing Pipeline Configuration and dev sandbox.

From the [dev help page](https://developer.shotgunsoftware.com/tk-core/initializing.html#managing-centralized-configurations) and topics [How do I find my pipeline configuration?](https://community.shotgridsoftware.com/t/how-do-i-find-my-pipeline-configuration/191) and [Shared project configs](https://community.shotgridsoftware.com/t/shared-project-configs/3284) I understand that I can have a default Studio configuration.

It is also possible to use different configurations per project, depending on the User Restriction field on the Pipeline Conf webpage.  
I need some more informations:

* * *

♦ The help is pretty vague about what folder path actually must be used in the Pipeline Conf page:  
• Windows Path shows the sgtk\_projectName path  
• Descriptor seem to need the sgtk\_projectName/config path

Is that correct? It seems logical (it would basically tell the project to use this project specific tank, etc created during the Advanced Install, but use those config files).  
Can anyone confirm this?

* * *

♦ What does using a studio configuration mean exactly?  
Is it possible to have a /config folder used by all my projects, with all projects having only some customized hooks in their own /config folders?

(eg: on projectName, if I only need to modify userSetup, then hooks/tk-maya/userSetup.py would be the only file in the project config folder while other hooks would be loaded in the studio config folder?)

Or is it just like the sgtk default config2 (the project will use 100% of this one studio config and that’s all) ?  
If I just want a very small change in a project, do I have to completly fork the whole project config?

* * *

♦ I initially created a Sandbox project, and I want to duplicate it’s configuration to use it as my Studio config.  
I’d like to use git as version control, so that I can update my Studio config from my Sandbox config easily, so basically I just push my sgtk\_sandbox/config folder to a git repo and use a branch in the descriptor field of my project to use it as my config.

Logically, once this is done, can I completly delete the original /config created from the advanced setup wizard? This should logicaly be useless now?

* * *

♦ I have a hard time with the setup of the descriptor when using a git url: I think I have the wrong “user@host”: for gitlab, is it “git@gitlab” ?

This template path does not work and crash SG Desktop when trying to load a project:  
`sgtk:descriptor:git_branch?path=git@gitlab:companyGitName/folder/repoName&branch=branchName`

* * *

♦ Is it ok to use tk.pipeline\_configuration.get\_all\_platform\_data\_roots() when the configuration is on git ?

* * *

Thanks!

---

<div class="post-metadata">

**Author:** ![philip.scadding](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/philip.scadding/32/30_2.png) [@philip.scadding](https://community.shotgridsoftware.com/u/philip.scadding)\
**Post date:** [December 5, 2019, 2:30pm UTC](https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137/2 "2019-12-05T14:30:20Z")

</div>

> [@benwall](#):
>
> The help is pretty vague about what folder path actually must be used in the Pipeline Conf page:  
> • Windows Path shows the sgtk\_projectName path  
> • Descriptor seem to need the sgtk\_projectName/config path
> 
> Is that correct? It seems logical (it would basically tell the project to use this project-specific tank, etc created during the Advanced Install, but use those config files).  
> Can anyone confirm this?

If you’re using a centralized config setup via the SG Desktop advanced setup wizard then the `PipelineConfiguration` entity will have the Windows, Mac, and Linux path fields filled in. These paths point to the root of the configuration which should look like this:

 ![sharing_caring_core](https://global.discourse-cdn.com/shotgunsoftware/original/2X/6/6d7f749bd88b9d009dff4ed89779193dd6f1cced.png)

If you are using the `PipelineConfiguration` entity’s descriptor field instead of the Windows, Mac, and Linux path fields, and the descriptor should point to a source that contains only the uninstantiated config. Such as this: [GitHub - shotgunsoftware/tk-config-default2: The second generation default configuration for Flow Production Tracking Toolkit.](https://github.com/shotgunsoftware/tk-config-default2).

So you are correct in a way, because the “config” folder in a centralized setup is the config that you need to point to in a descriptor based setup. However, when I say uninstantiated, I mean that the config folder should contain the following files:

- `./core/pipeline_configuration.yml`
- `./core/interpreter_{OS name}.cfg`
- `./core/install_location.yml`
- `./core/shotgun.yml`

And the `roots.yml` usually doesn’t have the actual paths filled in.

So in short what you were saying is correct. Though a `PipelineConfiguration` setup with a descriptor only needs the config folder, and not the install, cache, tank file.

> [@benwall](#):
>
> What does using a studio configuration mean exactly?

Studio config is not really a very well defined term, unfortunately. I’m not quite sure on the context around where you saw it mentioned, but it can sometimes be refer to a shared core. A shared core being where you have run `tank share_core /some_path/studio` and set up a “studio” core that all other configs would be attached to. A shared core means that you share the `tk-core` API, the bundle cache (ie all downloaded apps, engines, and frameworks), and some small specific elements of the config. However, the project specific configs attached to this shared core, still maintain their own separate configuration file such as schema, template environment YAML files.  
There isn’t a concept of overriding settings at a project specific level from the shared core. Though overriding hooks without changing the config is something we have thought about before, I’ll forward this on to our feature request portal.  
I guess a Studio config could also refer to maybe a site config, which is a non project-specific config that will be used by default by all projects unless they have their own config, which is maybe what you’re referring to as a studio config?

> [@benwall](#):
>
> I’d like to use git as version control, so that I can update my Studio config from my Sandbox config easily, so basically I just push my sgtk\_sandbox/config folder to a git repo and use a branch in the descriptor field of my project to use it as my config.
> 
> Logically, once this is done, can I completly delete the original /config created from the advanced setup wizard? This should logicaly be useless now?

I think what your mentioning there makes sense. Might worth taking a look at this:

> [@Distributed config management workflow](https://community.shotgridsoftware.com/t/distributed-config-management-workflow/232):
>
> I’ve seen the question come up a few times around how to test configuration changes and push them to production when using a [distributed config](https://developer.shotgunsoftware.com/tk-core/initializing.html#distributed-configurations) setup. My personal recommendation would be to do the following: Assuming your project already has a “primary” PipelineConfiguration entity with an uploaded config, I would create a second one called dev. Set a [dev descriptor](https://developer.shotgunsoftware.com/tk-core/descriptor.html#pointing-to-a-path-on-disk) to define a location to your config on disk. (If you haven’t got a config on disk you can download the primary config and unzi…

> [@benwall](#):
>
> I have a hard time with the setup of the descriptor when using a git url: I think I have the wrong “user@host”: for gitlab, is it “git@gitlab” ?  
> This template path does not work and crash SG Desktop when trying to load a project:  
> `sgtk:descriptor:git_branch?path=git@gitlab:companyGitName/folder/repoName&branch=branchName`

I’ve not used this syntax before either actually, so I’m not totally sure, but the path variable bit (`git@gitlab:companyGitName/folder/repoName`) is purely git syntax and nothing specific to Toolkit.

> <https://serverfault.com/questions/709617/git-clone-ssh-syntax-difference>

> [@benwall](#):
>
> Is it ok to use tk.pipeline\_configuration.get\_all\_platform\_data\_roots() when the configuration is on git ?

I’m not familiar with that method, and it doesn’t appear to be in our API documentation, however, I think the question would be more would it work with a distributed config vs a classic installed config. I tested it with a project using a dev path descriptor and that work fine, so I think the answer would be yes. The config would have to be bootstrapped before you could make such a call, and once it’s bootstrapped it’s cached locally and no longer in git.

## Summary

It sounds to me like you are considering switching from a classic installed config, also sometimes referred to as a centralized config, to a distributed config setup. And you are thinking of having a site config so all projects work off the same configuration by default?

---

<div class="post-metadata">

**Author:** ![benwall](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/benwall/32/1386_2.png) [@benwall](https://community.shotgridsoftware.com/u/benwall)\
**Post date:** [December 6, 2019, 12:59pm UTC](https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137/3 "2019-12-06T12:59:42Z")

</div>

Hi Philip,  
Thanks for your answer, it’s more clear now.  
I will stay on a centralized setup, use a default studio config to setup my project and use git push/pull to update different project configs. This seems like the safest way for now and I should be able ti user .gitignore to avoid copying files in /core.

* * *

A global studio config that could be overrided per project by simple hooks would be an awesome feature!

* * *

About the git “scp-like” ssh path, i’d have to use the actual username:  
`sgtk:descriptor:git_branch?path=username@gitlab:companyGitName/folder/repoName&branch=branchName`  
SG Desktop will then launch a cmd prompt to type the user password (but it is impossible to input anything, as stated in the [doc](https://developer.shotgunsoftware.com/tk-core/descriptor.html) privates repo are not supported.)

* * *

Do you know how I can query the config path setuped in the descriptor? Methods like would give a path to the project /install folder, not to the config:  
`sgtk.get_sgtk_module_path()`

This should work, but the doc don’t explain what the arguments to instantiate the class are:  
[sgtk.descriptor.ConfigDescriptor.get\_path](https://developer.shotgunsoftware.com/tk-core/descriptor.html?highlight=config%20path#sgtk.descriptor.ConfigDescriptor.get_path)

Thanks!

---

<div class="post-metadata">

**Author:** ![philip.scadding](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/philip.scadding/32/30_2.png) [@philip.scadding](https://community.shotgridsoftware.com/u/philip.scadding)\
**Post date:** [December 6, 2019, 2:51pm UTC](https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137/5 "2019-12-06T14:51:05Z")

</div>

> [@benwall](#):
>
> This should work, but the doc don’t explain what the arguments to instantiate the class are:  
> [sgtk.descriptor.ConfigDescriptor.get\_path](https://developer.shotgunsoftware.com/tk-core/descriptor.html?highlight=config%20path#sgtk.descriptor.ConfigDescriptor.get_path)

The class instantiation is described [here](https://developer.shotgunsoftware.com/tk-core/descriptor.html?highlight=config%20path#sgtk.descriptor.ConfigDescriptor) but usually you wouldn’t instantiate the config descriptor yourself. You can get the `sgtk` instance from the engine usually, and from there you can get the config descriptor:  
[https://developer.shotgunsoftware.com/tk-core/core.html#sgtk.Sgtk.configuration\_descriptor](https://developer.shotgunsoftware.com/tk-core/core.html#sgtk.Sgtk.configuration_descriptor)

So you can do something like this:

```python
tk.pipeline_configuration.get_all_platform_data_roots() 
# >> {'primary': {'win32': None, 'linux2': None, 'darwin': '/sg_toolkit/projects/my_project_config'}}

```

---

<div class="post-metadata">

**Author:** ![benwall](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/benwall/32/1386_2.png) [@benwall](https://community.shotgridsoftware.com/u/benwall)\
**Post date:** [December 6, 2019, 4:13pm UTC](https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137/6 "2019-12-06T16:13:38Z")

</div>

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![benwall](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/benwall/32/1386_2.png) [@benwall](https://community.shotgridsoftware.com/u/benwall)\
**Post date:** [December 9, 2019, 3:40pm UTC](https://community.shotgridsoftware.com/t/updating-pipeline-configuration/4137/7 "2019-12-09T15:40:34Z")

</div>

The correct function is:  
`tk.configuration_descriptor.get_config_folder()`

`tk.pipeline_configuration.get_all_platform_data_roots()` will return the local temporary repo of the config
