"Vardot Support" is a module used by Vardot for enhancing customer's Drupal sites by:
- A list of dependencies we want installed in every site, such as:
- Site Audit
- Raven for Sentry support.
- A standard global
settings.php
file.- Sets standard Drupal settings across projects.
- Automatic Acquia hosting config.
- Automatic Lando config.
- Automatic inclusion of "settings.production.php" for various hosts when in "Production Mode".
- Vardot Support-specific Site Audit Plugins.
- Helpful composer bin scripts such as
git-rm-ignored
. - Boilerplate files for easy copying into projects, such as composer.json, .lando.yml, drush files, etc.
This module is designed to make settings.php as automatic as possible.
The settings.vardot.php file is designed to be included by your project's settings.php.
The settings.default.php file is designed to be copied into new projects settings.php files.
When starting a new project with composer create-project vardot/varbase-project
, the settings.php file will be copied automatically.
If updating a new project, review your current settings.php file and either replace it or alter it to include the contents of settings.default.php.
The drupal/vardot_support
global settings file will include the default Acquia settings file, or the acquia/blt
settings file, if it exists and AH_ENVIRONMENT
was detected.
See settings.vardot.php, line 54 for details.
To make it easier for custom host providers to inform drupal of database credentials, Vardot Support module will
automatically set Drupal's $databases
connection array using environment variables, if available.
To use this feature:
- Add
loadEnvironment.php
file (included invardot/varbase-project
). - Add
"autoload": {"files": ["loadEnvironment.php]}
tocomposer.json
. - Write an
.env
file to the composer root containing the database credentials.
For example:
DRUSH_OPTIONS_URI=mysite.com
MYSQL_DATABASE=mysite
MYSQL_HOSTNAME=localhost
MYSQL_PASSWORD=secretpassword
MYSQL_PORT=3306
MYSQL_USER=mysite
The varbase/varbase-project
includes these things by default.
The drupal/vardot_support
global settings file will include settings.lando.php if LANDO
is detected.
This offers a few features:
- Sets
DRUSH_OPTIONS_URI
so all drush calls have the right URL set. - No need to add LANDO environment detection and settings to a project's
settings.php
. - Automatically configures
$databases
fromLANDO_INFO
. - Sets
$settings['hash_salt']
. - Sets
$settings['trusted_host_patterns']
for lndo.site and lando's "share" feature, localtunnel.me. - Enables "Developer mode" automatically by including Drupal's
example.settings.local.php
. (To skip this feature, setLANDO_PROD_MODE
in lando.yml.) - Disables redirect to www when using
drupal/httpswww
module. - More TBD.
This module uses the Site Entity Module to track status of your website, and to connect to the Vardot Support Network.
When enabled, your site will send status updates to the Vardot Drupal Support Dashboard to help us ensure the quality of your website.
To connect a site to the Vardot Drupal Support Dashboard, follow these instructions:
- Create a new user for each client and API key.
- Sign into Vardot DSD.
- Create a user for the client, or use another trusted user.
- Visit that user's account page (/user/X), and click "Key Authentication", then "Generate new Key" if necessary. Save the key for later.
- Visit "Sites" > "Vardot DSD Settings" to view the needed settings for a client site.
- Apply those settings to the client site either via settings.php or in the web UI of the client site.
- Check Vardot DSD Settings page to edit the support widget and URL.
-
Add and enable Vardot Support module:
composer require drupal/vardot_support drush en vardot_support
You will likely have to remove some dependencies from the project. Vardot Support requires some modules. Remove them from the project to allow vardot_support to be included.
-
Configure Site.module to send reports to DSD:
-
Open the new "About this Site" > "Settings" page under the top left menu. (/admin/about/site):
-
Ensure the settings are applied as shown on the DSD Settings page either to the client site's settings.php or manually on the "About this site > Settings" page.
-
For the "Site Data Destinations" field, enter the URL of the DSD Site with the API key created on the DSD site, like so:
-
Configure the desired State Factors for the site under the "State" tab.
-
-
Set up Vardot Support Status and Remote Login Links
- Get API key from the Client site.
- The DSD needs an API key from the client site to authenticate and retrieve login links.
- Sign into the client site. Visit My Account > Key Authentication and click "Generate new Key".
- Copy the Key and head to the DSD.
- Add API key to Site Entity in DSD
- Sign into DSD site.
- Visit "Sites" page.
- Scroll down to the Site Entity you are connecting and click the title to visit the Site Entity page.
- Click the "Edit" tab.
- Edit the "Vardot Support Expires" field as needed.
- Fill in the "API Key" field for that site.
- The API URL field can be left blank. For extra security, you could host the site under a separate domain for this API access.
- Hit Save Button.
- Sign into client site from DSD:
- Visit the DSD Site Entity page: Click "Sites" > Site Title.
- Click "Get Login Link" fieldset to expand the form.
- Enter your DSD password into "Confirm Password" field. If you do not have one, ask an adminitrator to create one for you.
- Press "Request login link from SITENAME".
- If successful, you will see a one-time-login link in the status messages. It will only be shown once. Copy it before leaving the page.
- Update client site Vardot Support status.
- Now that the DSD Site Entity has the Vardot Expires date, visit the client site.
- Click "About this site" > "Save Report" to send an update and retrieve the latest Vardot Support data.
- Clear caches to see the updated state in the Vardot Support toolbar widget.
- Confirm that the Vardot Support widget is embedded.
- Get API key from the Client site.
For more information, contact Vardot at https://www.vardot.com/en-us/contact-us.