Why is this project named “iasedu”?
That is what Acquia named it.
When I run a site locally, why does the site report complain about memcache?
Disable the memcache modules if you are not going to be configuring and running memcached locally.
Why won’t a local site load with error “Base table or view not found: 1146 Table ‘crossroads.watchdog’ doesn’t exist’”.
Enabling the dblog module should fix this.
drush --uri=crossroads pm-enable dblog
If the dblog module is not enabled, where do logs go?
They go to syslog. On OSX, that is /var/log/system.log
.
Why is it that after setting up a local site, I can’t run some admin pages with “segmentation fault 11”?
Try removing the node_modules directory from the active theme then clearing caches. Yes, really.
This is a Drupal multisite hosted on Acquia Cloud Enterprise.
Issues are managed in Zivtech’s Jira.
We use the Git Feature Branch Workflow.
It is recommended to maintain Git remotes in working copies as follows:
$ git remote -v
acquia iasedu@svn-15689.prod.hosting.acquia.com:iasedu.git (fetch)
acquia iasedu@svn-15689.prod.hosting.acquia.com:iasedu.git (push)
github git@github.com:zivtech/ias.git (fetch)
github git@github.com:zivtech/ias.git (push)
origin git@gitlab.com:theias/di/iasedu.git (fetch)
origin git@gitlab.com:theias/di/iasedu.git (push)
For every pull request, Probo.CI executes jobs and builds a demo site.
Priority | Description | Example Issues |
---|---|---|
Low | It can wait | “Themes have no thumbnail screenshot” |
Normal | Most issues | “Sidebar links don’t look like links” |
High | Serious broken functionality, broken pages, very bad styling, client-identified priorities, important features | “File contextual links are displaying to anonymous visitors”, “Giving confirmation/error page is unstyled” |
Highest | Are almost always bugs: security issues, incorrect data displayed, broken sites | “EntityMalformedException if the homepage (maybe others) references a node that has been deleted” |
See the Pull Request Template.
Type | Runner | Execution |
---|---|---|
PHP coding standards | phpcs | CI |
JavaScript coding standards | eslint | CI |
CSS and SASS coding standards | stylelint | CI |
Behavioral | behat | Jenkins (nightly) |
Visual regression | backstop | Manual |
Unit | simpletest | CI |
Get the files and databases:
scripts/local/download_files.sh
scripts/local/download_database_backups.sh
Restore databases to local MySQL.
# iasedu main site example:
gzcat ~/Downloads/acquia-backups/prod-iasedu-iasedu-2016-05-07.sql.gz | mysql -u root -p iasedu
Set up /etc/hosts:
127.0.0.1 iasedu.local
127.0.0.1 crossroads.local
Add a settings.local.php to each site directory (connection details may vary):
// sites/default/settings.local.php
$base_url = "http://iasedu.local:8080";
$cookie_domain = '.local';
$conf['cas_cert'] = "../certs/ca-bundle.crt";
$conf['file_public_path'] = "sites/default/files";
$conf['file_private_path'] = "sites/default/files-private";
$conf['file_temporary_path'] = '/tmp';
$databases['default']['default'] = [
'database' => 'iasedu',
'username' => 'root',
'password' => '',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
];
// If you want to use memcached to be similar to the production
// configuration, uncomment these lines:
/*
$conf['memcache_key_prefix'] = __DIR__;
$conf['cache_backends'][] = './sites/all/modules/contrib/memcache/memcache.inc';
$conf['cache_default_class'] = 'MemCacheDrupal';
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
$conf['memcache_stampede_protection'] = TRUE;
$conf['lock_inc'] = './sites/all/modules/contrib/memcache/memcache-lock.inc';
$conf['memcache_key_prefix'] = __FILE__;
*/
// sites/crossroads/settings.local.php
$base_url = "http://crossroads.local:8080";
$cookie_domain = '.local';
$conf['cas_cert'] = "../certs/ca-bundle.crt";
$conf['file_public_path'] = "sites/crossroads/files";
$conf['file_private_path'] = "sites/crossroads/files-private";
$conf['file_temporary_path'] = '/tmp';
$databases['default']['default'] = [
'database' => 'crossroads',
'username' => 'root',
'password' => '',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
];
Configure virtual hosts (ports and directories will vary):
# The default virtual host.
<VirtualHost *:8080>
DocumentRoot "/Users/cjm/Sites/"
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "/Users/cjm/Sites/iasedu/docroot"
ServerName crossroads.local
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "/Users/cjm/Sites/iasedu/docroot"
ServerName iasedu.local
</VirtualHost>
# etc...
You may have to clear caches before a site will run. Example:
drush --uri=default cc all
Browse the sites:
This is super important. Anguish awaits those who don’t read this section.
Each of the sites in this project has a machine name which is also its database name. The machine name often is not the same as the site’s directory name.
In addition to the representing the database name, the site machine name is also used to construct the local site hostname, in the form:
{machine_name}.local
Every site has a development and a staging site. There is no point in writing them all down because the URLs are constructed according to a pattern, where “host” is the DNS hostname:
Examples:
On Acquia Cloud, all sites have SSL. SSL redirection
is handled in Drupal’s own .htaccess
file.
On Acquia Cloud, copy the production databases and files to staging.
Push the master branch to Acquia, git push acquia master
then deploy it
to staging.
Execute manual tests. Stop the release if there are surprises.
Tag and deploy one of two ways:
git fetch acquia
to fetch the tag to your
working copy then push the tag to GitLab: git push <tag> origin
.Tag the release yourself on the master branch using CalVer, push the tag to Acquia and to GitLab, then deploy the tag to production on Acquia Cloud. Tags should look like these examples:
The current Acquia Cloud hook scripts clear Varnish caches on staging but not on production. If it is desired to clear Varnish caches on production, do that manually in Acquia Cloud.
An Acquia Cloud hook script emails a short message to stakeholders about the deploy.
Mark completed issues done in Jira.