-
Notifications
You must be signed in to change notification settings - Fork 124
Contenta JSON API profile. #93
base: master
Are you sure you want to change the base?
Conversation
Nice, I was going to suggest we tackle Contenta as part of the ACE team Composer Week next week. |
I'm planning on using it for the updatinator server. |
The workflow set up by the build tools plugin no longer allows the installation profile to be changed in a PR, since we use the database from the dev environment rather than re-installing for pull requests as we used to do. This means that the passing test here doesn't mean much -- it simply installed the Contenta profile and ran the tests on the existing site w/out using any Contenta modules. Starting fresh:
This gave an error in site-install, but the message wasn't printed for some reason. Calling site-install again directly:
Not sure where that config-import is coming from, but presumably it is the Contenta profile. Not sure how this is supposed to work, but the error code is set to 1, which stops the Build Tools Plugin from continuing. Trying to install Contenta locally following their instructions to compare against my results. |
@e0ipso was working an Contenta repo with Circle 2.0 over in https://github.com/e0ipso/contentacms-demo/blob/master/.circleci/config.yml |
Neat. It would be good to have Circle CI 2.0 support in the Terminus Build Tools plugin too. |
I've been working on automated tests for the forthcoming pantheon_advanced_page_cache module and decided to use 2.0. It runs so much faster! https://github.com/pantheon-systems/pantheon_advanced_page_cache/pull/2/files |
Contenta has the following in their settings.php:
The build tools plugin relocates the configuration directory to be outside the document root; that directory is empty, ergo the message I was getting above. Updating the sync directory to what Contenta expected it to be allowed the installation to complete successfully. This strategy of putting the Config sync directory on top of the installation profile configuration directory was advanced by Alex Pott. It's a great idea in principal, but I'm not sure that it works well for a Composer workflow, as this directory is not committed to the git repository, and is overwritten by I'm not sure what the best solution is, both in terms of Contenta, specifically, and also in general for other profiles that we might wish to use with the Composer workflow. Note that these profiles might prefer to keep their config sync location inside the profile itself when not using the Configuration workflow. Maybe we need to detect this situation and copy the profile's initial config to our preferred config directory location once, at initial install time. |
Successful install: http://dev-updatinator.pantheonsite.io/ |
…tallation to work.
So much <3 happening here!
I think this is indeed a good idea for actual files ... the scripts in contenta partially are there in order to support development on contenta itself. I think chagning the folder for actual config to be somewhere else is a good idea! |
Thanks for the input @dawehner! I'd like to get to a point where doing an all Composer-based install of Contenta with Pantheon is a one-line command like what @greg-1-anderson mentioned above with
Once we validate that the |
That would be so great! |
The one line above already works, with just one deferred task: you need to update your configuration sync directory in settings.php after installation. I'm not sure how to "fix" Contenta so that this is not necessary. The config_installer manually imports configuration, but the Contenta profile seems to simply depend on setting config_install in its .info file. I suspect that the right thing to do is to move the Contenta default configuration to the standard location, |
I made a hack that points the config directory to the place Contenta expects it during installation, and reverts it back to its location outside of the document root after installation is complete. This works great (although hacky) in the Drupal GUI, but does not work in Drush site install. I need to either enhance the hack to also detect |
Well, this is all coming from the issue in core: https://www.drupal.org/node/2788777 which allows to install from scratch. I'm quite sure I'm using that patch on another project without any problems with using drush. Can you clarify why you think we should use a different way of installing configuration? |
@dawehner For Drupal sites that are not Composer-managed, the current technique is fine. For Composer-managed Drupal sites, the current mechanism works just fine for installation; however, the problem is that once you are done, the config directory points inside the Contenta profile. In a Composer-managed Drupal site, this location is not stored in the git repository, which makes future configuration exports problematic. My hack puts the config directory where Contenta expects it to be for installation, and then moves it back to a location that is saved in the repository after installation is complete. For Composer-managed sites, it would be better if Contenta would still install correctly even if the Config sync directory is not pointing at its initial configuration directory. Maybe moving the initial config directory from config/sync to config/install would do the trick. |
…ild of Contenta. This will not always result in stable results, but since Contenta is evolving rapidly, perhaps this is the best for now. This would work better if we had stable releases of Contenta available, so that we could put ^1 in our composer.json, for example.
@dawehner, @e0ipso I'm curious how you have handled oauth keys with Pantheon. I see that by default the installer will put them in a directory above the Drupal root: https://github.com/contentacms/contenta_jsonapi/blob/8.x-1.x/contenta_jsonapi.install#L45 And that the Are you instead putting the key files in the unversioned |
@stevector we did not have to worry about that since we always do a full reinstall when deploying. A part from that, we can just generate the keys via the UI if we need to. Unelegant, but we didn't have the need to solve it properly. |
Thanks @e0ipso! I'll keep investigating options. I think I'll start a |
Contenta (Take2)
Hello! How is it going with this one? I'm looking for a solid way to get Contenta running on Pantheon and keeping it running following best practices. Already skimmed through https://pantheon.io/docs/guides/build-tools/ and have been doing my best to familiarize myself with this thread and related files. But I could use some pointers. Any up to date recipes, guides? |
No description provided.