Drupal


Error

You must log in or register to view this page

Drupal is a free and open-source content-management framework that can be customized and is suitable for developing simple and complex websites.

Architecture

Drupal can run on any web server, but Apache, Nginx, and Microsoft IIS Web Server are the most compatible. Drupal version 11 and later do not support Microsoft IIS Web Server. The product also communicates with a database.

Software pattern summary

The following table gives an overview of the pattern characteristics:

Product componentOS typeVersioningPattern depth
DrupalUNIX, WindowsActive, FileInstance-based

Platforms supported by the pattern

The pattern discovers Drupal deployments on UNIX and Windows systems.

Pattern trigger

The pattern is triggered by a SoftwareInstance that matches one of the following criteria:

  • Type is Apache Web Server, and the config_file attribute is populated.
  • Type ends with Apache Web Server, and the config_file attribute is populated.
  • Type is Nginx Web Server, and the configuration_file attribute is populated.
  • Type is Microsoft IIS Web Server.

False positive checking

The following table shows the criteria used for false positive checking based on SoftwareComponents:

Pattern triggerEvidence that Drupal is running (at least one of these must be true)
Apache SoftwareInstance with SoftwareComponents
  • The SoftwareComponent instance name contains Drupal.
  • At least one of the SoftwareComponent configuration files contains an entry to DocumentRoot that references Drupal. We find the configuration files by looking at what DiscoveredFile nodes have contributed to this SoftwareComponent.
  • Versioning is successful.
Apache SoftwareInstance with no SoftwareComponents
  • The configuration file referenced in the config_file attribute of the SI contains an entry to DocumentRoot that references Drupal.
  • Versioning is successful.
IIS
  • The child of the IIS trigger process contains the -ap drupal argument.
  • The child of the IIS trigger process contains the -h drupal.config argument.
Nginx
  • The root obtained from one of the configuration files contains Drupal.
  • An include directory in one of the configuration files has the name Drupal.
  • An include directory in one of the configuration files contains a file drupal.conf.

Simple identification mappings

The pattern does not create Simple Identification Mappings.

Versioning

Version information for each SoftwareInstance is collected by using the active versioning and file versioning methods.

Installation root

The pattern obtains the installation root by using one of the following methods:

  • For Apache Web Servers, it is the DocumentRoot as reported in the config_file. If we have evidence that a SoftwareComponent is running Drupal, this config_file is the file linked to that SoftwareComponent. Otherwise, it is the file described in the config_file attribute of the SI.
  • For Microsoft IIS Webservers, it is the path to the drupal.config file. The pattern obtains this path from the -h option of the IIS child process.
  • For Nginx Webservers, it is the root as reported in one of the Nginx configuration files. If the pattern cannot find the install_root, the install_root is reported as any include directories that contain drupal.conf.

Active versioning

The pattern runs the <install root>/drush status command to obtain the value of the Drupal version.

File versioning

The pattern attempts to find the version from one of the following files:

FileMethod to read the fileText to search for in the file

<install root>/core/lib/Drupal.php

Read the file by using Discovery.const VERSION = <version>

<install root>/docroot/core/lib/Drupal.php

<install root>/web/core/lib/Drupal.php

<install root>/docs/CHANGELOG.txtParse the file by using findstr or grep.Drupal <version>

<install root>/includes/bootstrap.inc

Read the file by using BMC Discovery.Typical output 

"define('VERSION', '7.34');"

or "define('VERSION', '7.103.13+7.103.1:drupal');"

Application model produced by the software pattern

The pattern creates an instance-based SoftwareInstance with the key based on the type and the key of the trigger node (if we can link Drupal to a particular Apache SoftwareComponent, it is the SoftwareComponent node; otherwise, it is the SoftwareInstance node). The pattern creates a client-server relationship to the triggering node (the SoftwareInstance or SoftwareComponent).

Linked databases

The pattern attempts to find the linked database from the following attributes by using the drush status command:

  • DB hostname
  • DB driver (can be MySQL, MariaDB, MongoDB, MSSQL, or PostgreSQL)
  • DB port
  • DB name

If the drush command retrieves no result, the pattern obtains the linked database from the following attributes in the <install root>/sites/default/settings.php file:

  • host
  • driver (can be MySQL, MariaDB, MongoDB, MSSQL, or PostgreSQL)
  • port
  • database (the database name)

The pattern creates a client-server relationship to the database, with the database as the server.

Visualization

The following figure shows a pattern model visualization: 

1757948040764-581.png

Subject matter expertise

Inputs from subject matter experts are welcome on any other potential approaches not discussed in this topic.

Testing

The pattern has been tested against the available customer data.

Open issues

There are no known open issues with this pattern.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Discovery content reference