Re-platforming to Strata

Part of re-platforming a store off of Shopify and on to Strata is by running an A/B test with 50% of all traffic split between the existing (original) Shopify store and the new Strata powered site. How we usually do this is by having the Strata site live on a shop. subdomain.

Steps for setting up the the Strata production site/environment.

  1. Make sure the code for the new site has been deployed and installed on the production environment.

  2. Create the shop.[DOMAIN].com DNS entry. This should be an A record pointing to the Forge server/load balancer.

  3. Update the Nginx config to include the new shop.[DOMAIN].com domain. This can be done in Forge by going to the "Meta" tab for the server and adding the domain to the comma separated string of domains in the "Aliases" field.\

  4. Obtain a new SSL certificate with the new domain included. Easiest way to get a new free certificate is through Let's Encrypt, again we can do this in Forge via the "SSL" tab on the server.

    1. First click on the black box for the currently activated certificate to copy the currently used domains. Important: If the DNS is controlled by Cloudflare and Cloudflare is also trying to provide a SSL certificate, then make sure to set the A DNS record to "DNS only" (not proxy).

    2. Then click the "Let's Encrypt" button and paste the copied domains string. Now add your new domain to the end of the string (separated with commas).\

    3. Click the "Obtain Certificate" button and wait for it to finish installing and then activate it.

  5. You should now be able to access the new domain

  6. Set up "Sender Signature" in Postmark for the new domain.

  7. Login to Strata and update the mail settings to have a "From name" and "From address".

  8. Invite the product team to the site.

Promoting the Strata powered site to be the primary store

Outlined below are the steps needed to be taken in order to move a "development" Strata site from shop.[DOMAIN].com to [DOMAIN].com. The main key takeaways is are, one, we need to point the TLD i.e. helixsleep.com to our Forge server that hosts the Strata application, we do this via the DNS records. Two, since we still need to use Shopify for the checkout portion we need to have Shopify live on a subdomain, usually checkout.[DOMAIN].com, we also accomplish that be creating a A DNS record that points to Shopify's servers and then instruct Strata (via the settings) to use that "checkout" subdomain. To accomplish all of this you need access and permission to alter the DNS records for the given domain.

  1. Make sure that the Terraform script has the new domain and run Terraform

  2. Make sure the installed SSL certificate has the new domain installed on the load balancer in Digital Ocean.

  3. Create a DNS A record that points checkout.[DOMAIN].com to Shopify (23.227.38.65 - double check with Shopify docs).

  4. Create a DNS CNAME record that points www.checkout to shops.myshopify.com

  5. Connect the checkout.[DOMAIN].com domain in Shopify (under Settings -> Domains).

  6. Make checkout.[DOMAIN].com the primary domain in Shopify.

  7. Make sure no other domain are listed in Shopify (except for [DOMAIN].myshopify.com).

  8. Update the DNS A record for [DOMAIN].com to point to the load balancer.

    1. 167.172.14.23 as of August 15, 2023

  9. Set the checkout URL in Strata (Apps -> Shopify) to checkout.[DOMAIN].com.

  10. Update database entities URLs. (See MySQL snippets)

  11. Make sure the new domain is associated with the tenant in the "Playset" database (domains table).

  12. Remove site protection

    1. Remove site from the "Protect Sites" deployment hook in Envoyer.

    2. Remove site from resource "laravelenvoyer_hook" "protect_sites" { in the Stratasphere Terraform main.tf file.

    3. Remove password protection in Admin (if enabled).

      As of Aug 15, 2023 there Strata/(sphere)'s password protection does not work great with multi tenancy application, so make sure this removed on all the webservers.

  13. Mark pages as indexable.

  14. Install Shopify webhooks via the Shopify app in the Strata admin

  15. Redirect any traffic from checkout.[DOMAIN].com -> [DOMAIN].com (this won't impact customer redirect from their cart in Strata to their checkout.

    1. Add following as the very first line in the <head> section of the theme.liquid file in Shopify.

  • Let a PM know when process is complete

MySQL snippets

table
column

sections

bricks

menus

items

metafield_values

value

Was this helpful?