-
Notifications
You must be signed in to change notification settings - Fork 8
Edits for cloud.gov configuration #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@cmc333333 This may be a useful touchpoint for config handling, etc: https://github.com/18F/project-planner/blob/master/scripts/composer/DrupalHandler.php |
composer.json
Outdated
}, | ||
"replace": { | ||
"drupal/core": "^8.4" | ||
"require-dev": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmc333333 I share your inclination to remove these.
composer.json
Outdated
"phpunit/phpunit": ">=4.8.28 <5", | ||
"symfony/css-selector": "~2.8|~3.0" | ||
}, | ||
"conflict": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmc333333 I'm surprised to see drupal/drupal
under conflict
; can you lend insight into why it's there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing -- and my understanding of this is definitely hazy, so apologies ahead of time. This all stems from cloud.gov using a different code generator (drupal-composer/drupal-project
) than we had on nsf. The conflict
directive in a composer file indicates that if any of these libraries are installed, this project's dependencies can't also be installed. That's important here because drupal/core
and drupal/drupal
shouldn't be installed together (there'd be namespace collisions).
composer.json
Outdated
"name": "drupal/drupal", | ||
"description": "Drupal is an open source content management platform powering millions of websites and applications.", | ||
"name": "18f/nsf", | ||
"description": "Project template for Drupal 8 projects with composer", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmc333333 How about something like The National Science Foundation's beta site
?
@fureigh heads up that I'm going to rebase this off the updates to your PR |
This doesn't include multiple instances and only covers the demo app, but should be enough to get us started.
In an effort to closer align with the cloud.gov Drupal example, this adds a handful of dependencies. It looks like the previous code was also built with a generator, so this shouldn't be a big issue. All of the previous Drupal modules should still be present. Notably, however, this *does* declare that we're using PHP 7.1.
These are largely auto-generated, but we don't want to recreate them every time an instance restarts, so we'll commit them to the repository. The exception is the settings.cf.php file, which configures the database connection, flysystem, and the hash salt based on values injected by cloud.gov services. The values can be missing (e.g. if running locally), and a local settings file can be used instead.
This pulls in more configuration from the cloud.gov example. It uses their bootstrap.sh as a guide, but ends up rewriting it to leak less information and to make use of our settings files.
It's not used and now misleading.
The uuid isn't sensitive, so we're safe to include it (it might be referenced by other configs in the future). This also removes the nsf-brightcove module, which we don't have anymore.
These are needed for the current config import. We'll likely remove some of these in the future.
The "standard" install profile adds a "shortcut_set" that conflicts with our configs, so we need to remove it. Similarly, we need to indicate that our Drupal install is downstream from a set of configurations (by giving it the same UUID as those configs).
This will effectively duplicate the latest config changes. It also clears the cache, in case it'd have been affected by code/theme changes.
We'll fetch these from the "secrets" service and set them via drupal config:override. Note that this sends its output to /dev/null, lest the sensitive data become part of the app longs.
923ec91
to
08e4409
Compare
@@ -44,7 +44,6 @@ module: | |||
media_entity_brightcove: 0 | |||
menu_ui: 0 | |||
node: 0 | |||
nsf_brightcove: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll circle back on this post merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all of this! Let's break the remaining TODOs into separate issues.
These updates allow our version of Drupal (and Drush and all the other dependencies) to redeploy successfully. This is targeted at the #159 branch for our pairing session.
Still todo:
Make config changes as described in Complete the SSR for the ATO. #124these will be separate PRs