Skip to content

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

Merged
merged 13 commits into from
Mar 16, 2018
Merged

Conversation

cmc333333
Copy link
Contributor

@cmc333333 cmc333333 commented Mar 14, 2018

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:

  • Export configured app
  • Review export for sensitive values; where needed inject them via the "secrets" service
  • Commit export
  • Load configs in bootstrap script
  • Add cron-job worker
  • Make config changes as described in Complete the SSR for the ATO. #124 these will be separate PRs
  • Multi-instance deploys (likely needs advagg)
  • rebuild cache on deploy?

@cmc333333 cmc333333 requested a review from fureigh March 14, 2018 20:24
@fureigh
Copy link
Contributor

fureigh commented Mar 14, 2018

@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": {
Copy link
Contributor

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": {
Copy link
Contributor

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?

Copy link
Contributor Author

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",
Copy link
Contributor

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?

@cmc333333
Copy link
Contributor Author

@fureigh heads up that I'm going to rebase this off the updates to your PR

CM Lubinski added 12 commits March 16, 2018 08:40
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.
@@ -44,7 +44,6 @@ module:
media_entity_brightcove: 0
menu_ui: 0
node: 0
nsf_brightcove: 0
Copy link
Contributor Author

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

Copy link
Contributor

@fureigh fureigh left a 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.

@fureigh fureigh merged commit f8ef1ae into WIP-cloud-gov-deployment Mar 16, 2018
@fureigh fureigh deleted the cloud-gov-edits branch March 16, 2018 21:36
fureigh added a commit that referenced this pull request Mar 19, 2018
The sites/default directory now lives inside `web`. This commit is
follow-up on #159 and #167.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants