Drupal
Drupal is a сontent management system.
Architecture
Drupal can run on a web server, but Apache, Nginx, and Microsoft IIS Webserver are the most compatible. Drupal version 11 and later do not support Microsoft IIS Webserver. The product also communicates with a database.
Software pattern summary
The following table gives an overview of the pattern characteristics:
Product component | OS type | Versioning | Pattern depth |
Drupal | UNIX, Windows | Active, File | Instance-based |
Platforms supported by the pattern
The pattern discovers Drupal deployments on the UNIX and Windows systems.
Identification
To run a discovery of the product, the pattern must be triggered. This section describes conditions under which the pattern can be triggered.
Pattern trigger
The pattern is triggered by a SoftwareInstance that matches one of the following criteria:
- Type equals “Apache Webserver” and the config_file attribute is populated.
- Type ends with “Apache Web Server” and the config_file attribute is populated.
- Type equals “Nginx Webserver” and the configuration_file attribute is populated.
- Type equals “Microsoft IIS Webserver”.
False positive checking
The pattern creates a SoftwareInstance only if one of the following conditions is true:
- There is a child SoftwareComponent whose instance name contains drupal.
- Versioning is successful.
- (Apache installations only) The DocumentRoot ends with drupal (the DocumentRoot is found in the config_file as reported by the SoftwareInstance).
- (Nginx installations only) The root ends with drupal. The root is obtained from one of the Nginx configuration files.
- (Nginx installations only) drupal.conf is one of the included directories as reported in one of the Nginx configuration files.
- (Microsoft IIS Webserver only) The child of the IIS trigger process contains the -ap drupal argument.
- (Microsoft IIS Webserver only) The child of the IIS trigger process contains the -h drupal.config argument.
Simple identification mappings
The pattern does not create Simple Identification Mappings.
Versioning
Version information for the product is collected by using the active versioning and file versioning methods.
Installation root
The pattern gets the installation root by one of the following methods:
- For Apache Based Webservers, it is the DocumentRoot as reported in the config_file described by the SI.
- For Nginx Webservers, it is the root as reported in one of the Nginx configuration files.
- 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.
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:
File | Method to read the file | Text to search for in the file |
<install_root>/web/core/lib/Drupal.php | Read the file by using Discovery | const VERSION = <version> |
<install root>/docs/CHANGELOG.txt | Parse the file with findstr or grep | Drupal <version> |
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 SoftwareInstance.
The pattern creates a client-server relationship to the triggering SoftwareInstance or the Drupal SoftwareComponent, which is its child. The triggering web server is the client.
The pattern finds the linked database from the following attributes given by the drush status command:
- DB hostname
- DB driver (could be MySQL, MariaDB, MongoDB, MSSQL, or PostgreSQL)
- DB port
- DB name
The pattern creates a client-server relationship to the database. The database is the server.
The following figure shows a pattern model visualization:
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.