Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 3.46 KB

NewSite.md

File metadata and controls

52 lines (42 loc) · 3.46 KB

Provisioning a new site

SWS Developers: Please refer to internal Confluence documentation for more up to date step-by-step instructions for Site Provisioning.

Choose a final url and machine name

  • 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 be site_name
  • For a URL of site-name.third-domain.stanford.edu the site directory and database should be site_name__third_domain
  • Use these in the following steps.

Establish domains with Stanford

  1. Add the domains to the NetDB record
    • Keep with the pattern: [site-name]-dev, [site-name]-stage, and [site-name]-prod
  2. Wait for the DNS Refresh. This occurs every half hour at :05 and :35 past the hour.
  3. Ensure the Vhost points to Acquia by pinging the url. ping newvhost.stanford.edu

Setup Domains and SSL Certs in Acquia

  1. 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
  2. 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.

Site Directory and settings

  1. 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.
  2. 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
  3. Add the machine name to the blt settings for the multisites array.
  4. Edit the new drush alias file in drush/sites to add configuration for dev, test and prod environments.

Deploy and test

Once the code with the new files is merged and deployed to an Acquia environment (like staging), we can setup the site database:

  1. 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
  2. Install a new site drush @[site-name].stage si su_humsci_profile -y
  3. Visit the site and validate login and installation was successful
  4. Copy that database to stage and production environments. (This prevents deployment & testing errors)

Notes on the Installation Profile

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.