Skip to content
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

Stand up VA CMS on Lagoon Saas Demo environment #12291

Closed
5 of 11 tasks
Tracked by #12231
timcosgrove opened this issue Jan 19, 2023 · 20 comments
Closed
5 of 11 tasks
Tracked by #12231

Stand up VA CMS on Lagoon Saas Demo environment #12291

timcosgrove opened this issue Jan 19, 2023 · 20 comments
Assignees
Labels
CMS Team CMS Product team that manages both editor exp and devops

Comments

@timcosgrove
Copy link
Contributor

timcosgrove commented Jan 19, 2023

Description

In order to evaluate Lagoon as a viable hosting platform for VA.gov CMS, we need to set up the CMS on an Amazee.io (Lagoon Saas) demo environment so that we can evaluate Lagoon features and potential shortcomings.

Acceptance Criteria

  • VA.gov CMS is functional on Amazee.io Saas
    • User can Login
    • User can create content
    • Content build runs successfully with Demo CMS instance as a content API endpoint

CMS Team

Please check the team(s) that will do this work.

  • Program
  • Platform CMS Team
  • Sitewide Crew
  • ⭐️ Sitewide CMS
  • ⭐️ Public Websites
  • ⭐️ Facilities
  • ⭐️ User support
@timcosgrove timcosgrove added the Needs refining Issue status label Jan 19, 2023
@github-actions github-actions bot added the CMS Team CMS Product team that manages both editor exp and devops label Jan 19, 2023
@timcosgrove timcosgrove mentioned this issue Jan 19, 2023
59 tasks
@olivereri olivereri removed the Needs refining Issue status label Jan 24, 2023
@EWashb
Copy link
Contributor

EWashb commented Jan 30, 2023

@olivereri @ElijahLynn do you have an update on this one?

@olivereri
Copy link
Contributor

@olivereri @ElijahLynn do you have an update on this one?

Still in the process of setting this up on Lagoon SaaS. Working with Lagoon support. Possible last technical hurdle to having a working CMS copy on Lagoon is importing the database.

@olivereri
Copy link
Contributor

One thing I may have mentioned out loud but not in writing is that this issue isn't part of the Pour Lagoon Foundation epic and is blocking this issue #12009

@EWashb
Copy link
Contributor

EWashb commented Jan 31, 2023

@olivereri thanks for the update. I'm going to pull this into Sprint 77. Looks like this needs to be done first. Also, added it as a blocker for #12009.

@ElijahLynn
Copy link
Contributor

I'm still working on this and have made decent progress refactoring our .env files so that composer install works correctly. This is arguably work that could have been post-poned, after the PoC, but I felt compelled to get it done correctly so we weren't left with tech debt if we go with Lagoon.

I think we are close to getting the ACs met within the next 1-2 days. This will have to come over to next sprint.

@ElijahLynn
Copy link
Contributor

@ElijahLynn
Copy link
Contributor

Eric just got AC #1 / User Login across the finish line:

image
image

@ElijahLynn
Copy link
Contributor

ElijahLynn commented Feb 3, 2023

Not all of the styles are not loading because the styles.css is 404ing because it wasn't generated. And that is because composer va:theme:compile isn't able to run (manually for now). This can be another issue but details are below:

nginx.main.demo-vago…st.us2.amazee.io/:1 Refused to apply style from 'https://nginx.main.demo-vagov-cmstest.us2.amazee.io/themes/custom/vagovclaro/dist/styles.css?rph09d' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
image

yarn is installed on the images so we can maybe update this to be /usr/bin/yarn

"cd bin && ln -sf ../docroot/libraries/yarn/bin/yarn yarn",
.

@ElijahLynn
Copy link
Contributor

ElijahLynn commented Feb 3, 2023

AC 2: Create content - is failing with this on https://nginx.main.demo-vagov-cmstest.us2.amazee.io/node/add/page.
image

image

The website encountered an unexpected error. Please try again later.

Twig\Error\LoaderError: Template "@cmsds/alert.twig" is not defined in "themes/custom/vagovclaro/templates/misc/status-messages.html.twig" at line 29. in Twig\Loader\ChainLoader->getCacheKey() (line 98 of vendor/twig/twig/src/Loader/ChainLoader.php).

@ElijahLynn
Copy link
Contributor

RE: AC3 (content build): The GQL query hung after like 15m or so. I'm also building this from my local, fwiw. I tested it by adding --drupal-address=https://nginx.main.demo-vagov-cmstest.us2.amazee.io to the end of

"cd web; INSTALL_HOOKS=no NODE_ENV=production yarn build --pull-drupal --no-drupal-proxy --buildtype=vagovdev --api=https://dev-api.va.gov",
then running ddev composer va:web:build.

image

image

@olivereri
Copy link
Contributor

Testing out AC3 too. I synced CMS and CMS-Test, then updated the database incase this might have been the problem. I did a web build as well, and it got as far as you did @ElijahLynn however I let it go and error:

| GetNodePage__slice3 | 8s | 25 pages |
Error: HTTP error: 500: Internal Server Error
    at Object.query (/var/www/html/docroot/vendor/va-gov/content-build/src/site/stages/build/drupal/api.js:118:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RetryOperation._fn (/var/www/html/docroot/vendor/va-gov/content-build/node_modules/p-retry/index.js:50:12)
Failed to pipe Drupal content into Metalsmith!
/var/www/html/docroot/vendor/va-gov/content-build/src/site/stages/build/plugins/download-assets.js:11
  throw up;
  ^

Error: HTTP error: 500: Internal Server Error
    at Object.query (/var/www/html/docroot/vendor/va-gov/content-build/src/site/stages/build/drupal/api.js:118:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RetryOperation._fn (/var/www/html/docroot/vendor/va-gov/content-build/node_modules/p-retry/index.js:50:12) {
  attemptNumber: 11,
  retriesLeft: 0
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Script cd web; INSTALL_HOOKS=no NODE_ENV=production yarn build --pull-drupal --no-drupal-proxy --buildtype=vagovdev --api=https://dev-api.va.gov --drupal-address=https://nginx.main.demo-vagov-cmstest.us2.amazee.io handling the va:web:build event returned with error code 1
composer [va:web:build] failed, composer command failed: exit status 1. stderr=

image

@ElijahLynn
Copy link
Contributor

I'm having a weird nostalgia on this one:

Failed to pipe Drupal content into Metalsmith!
500 Internal Server Error

Something seems familiar but not sure what yet 🤷

I think we might want to look at ALB logs for the next step.

@olivereri
Copy link
Contributor

AC 3 Complete.

Raw troubleshooting in slack here:
https://dsva.slack.com/archives/CT4GZBM8F/p1675726049369389

The cause was a PHP out of memory error uncovered by using Kibana provided by Lagoon. Inspecting the Nginx container log revealed:

NOTICE: PHP message: PHP Fatal error:  Allowed memory size of 419430400 bytes exhausted (tried to allocate 163840 bytes) in /app/docroot/core/lib/Drupal/Core/Cache/Cache.php on line 53

Temporary solution was to add ini_set('memory_limit', '4G'); to settings.lagoon.php and redeploy. After that PHP reported the new limit:
image

and finally made it passed where it last errored:

| GetNodeLeadershipListingPages | 191s | 138 pages |
Finished 758 queries in 208s with 21028 pages
https://nginx.main.demo-vagov-cmstest.us2.amazee.io/ response time: : 3:29.239 (m:ss.mmm)
Total time to load content from GraphQL: 3:33.352 (m:ss.mmm)
Drupal successfully loaded!

@ElijahLynn
Copy link
Contributor

Good sleuthing @olivereri and @ndouglas!

@ElijahLynn
Copy link
Contributor

ElijahLynn commented Feb 7, 2023

@olivereri
Copy link
Contributor

Working with AC2 revealed some issues that we'll need to tackle. In certain instances the site will throw the below when it should be showing a pretty error:

The website encountered an unexpected error. Please try again later.

Twig\Error\LoaderError: Template "@cmsds/alert.twig" is not defined in "themes/custom/vagovclaro/templates/misc/status-messages.html.twig" at line 29. in Twig\Loader\ChainLoader->getCacheKey() (line 98 of vendor/twig/twig/src/Loader/ChainLoader.php).

@EWashb
Copy link
Contributor

EWashb commented Feb 8, 2023

Working with AC2 revealed some issues that we'll need to tackle. In certain instances the site will throw the below when it should be showing a pretty error:

The website encountered an unexpected error. Please try again later.

Twig\Error\LoaderError: Template "@cmsds/alert.twig" is not defined in "themes/custom/vagovclaro/templates/misc/status-messages.html.twig" at line 29. in Twig\Loader\ChainLoader->getCacheKey() (line 98 of vendor/twig/twig/src/Loader/ChainLoader.php).

Is this something we need a new ticket for, or does it completely block the demo environment?

@olivereri
Copy link
Contributor

Working with AC2 revealed some issues that we'll need to tackle. In certain instances the site will throw the below when it should be showing a pretty error:

The website encountered an unexpected error. Please try again later.

Twig\Error\LoaderError: Template "@cmsds/alert.twig" is not defined in "themes/custom/vagovclaro/templates/misc/status-messages.html.twig" at line 29. in Twig\Loader\ChainLoader->getCacheKey() (line 98 of vendor/twig/twig/src/Loader/ChainLoader.php).

Is this something we need a new ticket for, or does it completely block the demo environment?

We did satisfy AC2 because we could create content on the CMS so not blocked. However, we'll need a new ticket to track this. There's a good chance we'll find more things like this too but we can keep moving forward.

@EWashb
Copy link
Contributor

EWashb commented Feb 8, 2023

@olivereri That sounds fair. I assume we will find these things as we move along too. We can create new tickets when those come up. Thanks for the update!

@ElijahLynn
Copy link
Contributor

This is done. Closing.

@EWashb EWashb mentioned this issue Feb 14, 2023
48 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMS Team CMS Product team that manages both editor exp and devops
Projects
Status: Done
Development

No branches or pull requests

4 participants