Create a New Chapter Site

To aid in the quick deployment of new chapter sites, a utility script has been installed at /var/www/

It takes care of ALMOST everything, including:

  • CMS database

  • domain record in the CRM

  • common settings

  • themes, modules, and extensions

  • default user roles

  • cron job

Some things have not been scripted. See needed Manual Steps for new chapter creation.

The task of creating a new chapter is complete after the automated and manual steps. The rest of the articles in this section just provide additional documentation.

Automated Chapter Creation

Automated Chapter CreationTo aid in the quick deployment of new chapter sites, a utility script has been installed at /var/www/ It takes care of everything from creating the CMS database; to creating a new domain record...


EnvironmentThe utility need not be run as root, but it does use sudo internally and may request your sudo password. Environment IDThe utility allows the administrator to specify the environment (with the e flag) in which to spin up the chapter site. It is recommend that deployments be te...

Manual Steps

Manual StepsEnsure Filesystem PermissionsHopefully, past issues with permissions have been resolved; but never say never.If after you run the chapter creation utility, you find there are issues with file permissions, use the setfacls utility located at /var/www/

Instantiate CMS

CMS Sitedrush -r ${drupal_root} site-install standard --sites-subdir="${domain}" --db-url="mysql://fis_${multisite_env}:${cms_db_pass}@localhost/${cms_db}" CMS Configrm -f ${config_dir}/settings.php cp ${abs_callpath}/settings.tpl.php ${config_dir}/settings.php cp ${abs_callpath}/instance....

Instantiate CRM

Instantiate CRMecho "Creating domain records..."domain_args="debug=1 sequential=1 name=${domain} is_transactional=0" if [ -n "${contact_id}" ]; then domain_args="${domain_args} contact_id=${contact_id}" fi if [ -n "${group_id}" ]; then domain_args="${domain_args} group_id=${group_id}"...

Extension Settings

Extension version settingsto prevent database updates running twice see [CRM-19252]DELETE FROM `civicrm_setting` WHERE `domain_id` = ${domain_id} AND `name` LIKE '%:version'; INSERT INTO `civicrm_setting` (`name`, `value`, `domain_id`, `contact_id`, `is_domain`, `component_id`, `created_date`...

Mailer Settings

Mailer Settings"from" email address${drush_cmd} -y cvapi OptionValue.create option_group_id="from_email_address" label="\"Friends of Israel Scouts\" " is_default=1Default Mailboxfirst delete the EXAMPLE.ORG record for the new domain so we don't have two default box...

Filesystem and Permissions

Filesystem and PermissionsCMS Directories and SettingsEach chapter is a drupal site, so each chapter will keep it's writable files in subfolder of /sites.The normal drupal settings.php is replaced by a custom file that merely includes two files. It includes the site-specific instance.s...

Admin User

Admin User DrupalRoles cron, Tal, and Sarah's users ${drush_cmd} urol "CRM consultants" 31,2,3 ${drush_cmd} urol administrator 2,3

Chapter CiviCRM Settings

Each chapter is a CiviCRM "domain". Most CiviCRM settings can be set for a specific domain.You can confirm the current domain ID's on the command line with the following:cv api domain.get return='id' --out=list | sort -hIf the list of active domains is consecutive you can retrieve a particu...