SWS Developers: Please refer to internal Confluence documentation for more up to date step-by-step instructions for Site Provisioning.
- To keep consistent with site directories, its important to structure the machine name and the url appropriately.
- For a final URL of
site-name.stanford.edu
the site directory and database should besite_name
- For a URL of
site-name.third-domain.stanford.edu
the site directory and database should besite_name__third_domain
- Use these in the following steps.
- Add the domains to the NetDB record
- Keep with the pattern: [site-name]-dev, [site-name]-stage, and [site-name]-prod
- Wait for the DNS Refresh. This occurs every half hour at :05 and :35 past the hour.
- Ensure the Vhost points to Acquia by pinging the url.
ping newvhost.stanford.edu
- Add the new domains to each of the Acquia environments (dev, stage, and prod). You can do this through the Acquia UI, or by using
blt humsci:add-domain
. For example:blt humsci:add-domain dev [site-name]-dev.stanford.edu
blt humsci:add-domain test [site-name]-stage.stanford.edu
blt humsci:add-domain prod [site-name]-prod.stanford.edu
- Confirm it worked by browsing to one of the new domains and verifying that it has a valid certificate and is directed to the default site.
- Create a new database in Acquia dashboard. Adding a database to one environment adds one to all environments.
- Use the database name as defined above.
- Execute blt command
blt recipes:multisite:init
and answer questions as desired.- Machine name of the site should match the final vhost to be desired. Use the same name as the database above.
- "remote drush alias" should be [machine_name].prod
- Add the machine name to the blt settings for the
multisites
array. - Edit the new drush alias file in drush/sites to add configuration for dev, test and prod environments.
- Use the default.yml file as a template
Once the code with the new files is merged and deployed to an Acquia environment (like staging), we can setup the site database:
- Ensure the new site is recognized in the Acquia environment:
- Check drush status
drush @[site-name.stage] st
- verify the database name is something like
swshumscidb######
- verify the "Site URI" is something like
[site-name]-stage.stanford.edu
- Check drush status
- Install a new site
drush @[site-name].stage si su_humsci_profile -y
- Visit the site and validate login and installation was successful
- Copy that database to stage and production environments. (This prevents deployment & testing errors)
New sites are launched using the su_humsci_profile
(as shown above).
Configs in su_humsci_profile
aren't really relevant because they get overridden by the config/default ones during the
site-install process. su_humsci_profile
is valuable because it serves as place to add update hooks and placeholder
content new multisites.