apigee / apigee-devportal-kickstart-drupal

A fast demo and starting point for Apigee Developer Portals for Drupal
https://www.drupal.org/project/apigee_devportal_kickstart
GNU General Public License v2.0
26 stars 34 forks source link

Unmet dependencies Exception during installation #609

Closed usshmah closed 1 year ago

usshmah commented 1 year ago

Description

Provisioning Apigee DevPortal Kickstart on Google Cloud platform returns "Unmet dependencies" on the first step of the installation wizard.

Steps to Reproduce

  1. Launch the https://console.cloud.google.com/marketplace/product/bap-marketplace/apigee-drupal-devportal to provision GCP components necessary for deploying a Drupal-based developer portal using Apigee Kickstart.
  2. Wait for all of the GCP resources to be completely deployed.
  3. Click on the IP address assigned to the load balancer to complete the installation.
  4. Login with HTTP Basic authentication credentials returned in the above steps.
  5. Choose English language".
  6. Wizard returns "Unmet dependencies" error.

Actual Behavior

The following error message is displayed.

Error
The website encountered an unexpected error. Please try again later.
Drupal\Core\Config\UnmetDependenciesException: Configuration objects provided by <em class="placeholder">apigee_kickstart</em> have unmet dependencies: <em class="placeholder">block.block.apigee_kickstart_actions (block), block.block.apigee_kickstart_help (help, block), block.block.apigee_kickstart_search_form (search, block), block.block.apigee_kickstart_title (apigee_kickstart_enhancement, block)</em> in Drupal\Core\Config\UnmetDependenciesException::create() (line 100 of core/lib/Drupal/Core/Config/UnmetDependenciesException.php).

Drupal\Core\Config\UnmetDependenciesException::create() (Line: 530)
Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall() (Line: 132)
Drupal\Core\ProxyClass\Config\ConfigInstaller->checkConfigurationToInstall() (Line: 216)
Drupal\Core\Extension\ThemeInstaller->install() (Line: 1636)
install_profile_themes() (Line: 700)
install_run_task() (Line: 571)
install_run_tasks() (Line: 119)
install_drupal() (Line: 48)

Expected Behavior

I expected the Wizard to continue to the next step of the Installation which is to Verify Requirements, and then the next steps.

Notes

I tried to visit the http://ipaddress/core/install.php again and get the same results.

Version Info

NGINX (1.18.0) Drupal (9.4.x) MySQL-Client (8.0.31) PHP (8.1.2) Ops Agent (2.22.0)

phdhiren commented 1 year ago

Hi @usshmah

I could not replicate the issue with the fresh install.

Generally restarting the install process fixes it. (Option 1: You can delete and create the devportal database from the CloudSQL instance that's the fastest way , Option 2: create a new marketplace instance and delete the old install.)

You will need to delete and recreate the schema from the GCP console > Cloud SQL instance> databases

One can truncate all the tables using drush sql:drop command also sudo vendor/bin/drush sql:drop

phdhiren commented 1 year ago

@usshmah

I'll recheck the whole flow again and get back to you.

usshmah commented 1 year ago

So I left out some details about my attempt at creating the Apigee Drupal DevPortal, we have locked down our organization policies to disable external IP addresses on VMs and required Trusted Images for VMs.

When the Instance Group tries to create the two instances, it fails with violations. However I disabled the externalIpAccess and added project/bap-marketplace to Trusted Images Projects and the two instances were successfully created.

Instance 'apigee-drupal-devportal-1-instance-nvmx' creation failed: Constraint constraints/compute.trustedImageProjects violated for project redacted. Use of images from project bap-marketplace is prohibited.

Instance 'apigee-drupal-devportal-1-instance-nvmx' creation failed: Constraint constraints/compute.vmExternalIpAccess violated for project redacted. Add instance projects/redacted/zones/us-central1-f/instances/apigee-drupal-devportal-1-instance-nvmx to the constraint to use external IP with it.

usshmah commented 1 year ago

Since many Google Cloud customers are using Google Cloud Security Foundations and Terraform blueprints, it would be ideal to warn users in Google Cloud marketplace to relax the two constraints before they try to provision it.

Another request is to remove the need for public IP addresses on the two VMs since there is a Load Balancer in front of it which has a public IP, this would remove the need to relax this constraint.

usshmah commented 1 year ago

@phdhiren based on your advice, I decided to delete the deployment and recreate it. The process has been very smooth, since I had disabled the external IP constraint and already added bap-marketplace to the trusted images. Thank you very much for your help, I have Apigee Developer Portal up and running.

usshmah commented 1 year ago

Issue resolved by making sure that external IP addresses are allowed in organization policies and by adding the projects/bap-marketplace to the trusted images. I had to delete and recreate the deployment.