Pantheon Community

How to manage config in custom upstream

Hi Guys,

I’m just wondering about how to manage site config when creating/updating custom upstreams. Do I commit the config with the upstream or on the site? I’m getting errors about pre existing entities and site UUID’s not matching. The docs don’t seem to cover this.

Thanks,

Christian

3 Likes

Hi @cbiggins! I’d be happy to try to help you out. As one of Pantheon’s tech writers, I’m always interested when I hear that our docs aren’t covering enough.

Can we get a little more information? Specifically:

  • What CMS are you using?
  • At what step are you getting errors?
  • What’s the specific error? (feel free to obfuscate information like the UUID in the error message)
2 Likes

Hey @cbiggins, in your upstream you would include pantheon.upstream.yml, and then override or extend in your downstream using pantheon.yml. You can see examples of the upstream in our WordPress or Drupal upstreams.

For example, you can see the WordPress upstream declares 7.3 as the PHP version the platform should use for the site. That applies to any site that doesn’t use pantheon.yml to set a different value, but anyone using the WordPress upstream can modify that in their repo to any valid PHP version on the platform by including a different value in the pantheon.yml file.

The docs page for Pantheon YAML covers how this works.

1 Like

on a second read of this, it sounds like that’s not the issue at hand. It sounds more like a configuration management issue, we have some docs on that here.

1 Like

Thanks @doug_pantheon and @alex, the site is Drupal 8.

I think I’m confusing myself here which is not helping with my explanations.

I ran through the guide on updating a custom upstream - I created a new site to test with, I checked out my upstream and I added the contrib modules I needed and I also updated Drupal core (maybe I shouldn’t have done this?)

Then, in my test site I committed all changes and config but when trying to import config on multidev I get a lot of errors about entities existing and mis matched site UUID. This had me thinking that maybe the config should not be in the upstream ?

I guess my main questions are;
Does the custom upstream need to have Drupal updated in it? Or do I just pull from the pantheon upstream to manage that?
When adding contrib modules and making any config updates, do I add them to the custom upstream?

This is not a problem with docs I dont think, I 'm just having a hard time getting my head around the flow and process.

Thanks,

Christian

So, after today I was able to merge my composer.json with the upstream composer.json so that it installs whats needed.
I had to specify the drupal version in the composer and i added in the 4 or so requirements from the upstream.
I added a new module and added it to core.extensions config which doesn’t do anything though because I can’t import config as the site UUID is different.

I can feel I’m close to getting this running. The test environment I created looks good, I just cant manage the conf.

Thanks again!

Your upstream can be a fork of the Pantheon upstream, but it will not be updated automatically.

Config will generally be managed in the downstream repo.

1 Like

Thanks @doug_pantheon but doesn’t that cause trouble when rolling the upstream out to many sites? I was under the impression that each site would be a perfect clone of the next one.

Thanks again.