Back To Top

Refreshing a Rock Dev/Sandbox Environment from Production

    Prep for Refresh

    1. ⬜ Review your internal change logs for significant features that exist or are being tested in Dev only.
    2. ⬜ If you plan to take production offline prepare a communication/maintenance notification for staff and public users.

    AZURE STEPS

    1. ⬜ In the Azure Portal, navigate to your Production DB click Copy on the top of the Overview panel.
    2. ⬜ Use the default settings for everything except the Database Name and Backup Storage Redundancy.
    3. ⬜ Change Name to rock-dev-sqldb-YYYYMMDD changing the date at the end to the current date.
    4. ⬜ Consider changing the Backup Storage Redundancy to Locally-redundant
    5. ⬜ Consider reducing the DTUs for the backup to save some money

    Production VM STEPS

    1. ⬜ Run the Copy Production wwwroot to Azure Storage PowerShell script via VS Code
      This script (after you configure it to your environment) will:
      1. Optionally Stop Default website and AppPool using appcmd.exe
      2. Compress the wwwroot folders
      3. Copy the compressed wwwroot folder to Azure Blob Storage
      4. Optionally Start Default website and AppPool using appcmd.exe if desired
    2. ⬜ When production is back up and running notify staff and pull down any public maintenance notifications.

    DEV VM STEPS

    1. ⬜ Open SSMS or Azure Data Studio
    2. ⬜ Open the COPY of the production database, make sure this is not your current dev database
    3. ⬜ Run RockTestPrep.sql
      This will make the copy of the production database ready for use on our dev system
    4. ⬜ Run Copy Azure Storage wwwroot to Dev VM PowerShell script via VS Code
      This script (after you configure it to your environment) will:
      1. Stop Default website and AppPool using appcmd.exe
      2.Delete the Avatar Cache File, this doesn't need to be back up
      3. Zip existing wwwroot folder and move it to the folder of your choice
      4. Download the wwwroot.zip from Azure Storage to C:\inetpub
      5. Extract the wwwroot.zip to a wwwroot folder
      6. Delete the wwwroot.zip file from azure storage.
      7. Update the connection string to the new database rock-dev-sqldb-YYYYMMDD in iis connection strings.
      8. Start Default website and AppPool using appcmd.exe
      9. Update the site logo and favicon

    Additional Manual Steps

    1. ⬜ Go to the System Information popup and check on the Diagnostics tab to be sure it is connected to copy of the production database.
    2. ⬜ Update the Rock Theme and change the Brand Color to a color specific to dev (#0098a1)
    3. ⬜ Update ACME Certificates plugin so that it reflects dev related domains and bindings
    4. ⬜ Update Azure Mgmt plugin so that scales the database according to our DEV needs
    5. ⬜ When ready Delete the old DEVELOPMENT database from Azure

    Additional Considerations

    • Are there other add-ons that need to be installed on the sandbox server which are found on the production server such as URL Rewrite?

    • Are there any integrations that you do/don’t want to run in dev. Do any of these integrations have different settings for dev? Make sure to inactivate any integrations that sync data to an outside source such as PCO Sync.