Articles in this section
Category / Section

Setup a Staging Environment using the Production Environment Resources

Published:

The following steps explain how to set up a staging environment for the Bold BI application, using the resources of the production environment.

  1. For creating a staging environment using the production server resources, you need to backup and restore the application data and databases which are used in the production server.

    • App_Data – Contains the application resource files(dashboards and data sources)
    • Database – Contains the metadata information of sites.
  2. Follow the given guidelines to backup and restore the databases:

    Database type Help Link
    PostgresSQL https://www.postgresql.org/docs/8.1/backup.html
    MS SQL https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/back-up-and-restore-of-sql-server-databases?view=sql-server-ver16
    My SQL https://dev.mysql.com/doc/refman/8.0/en/backup-and-recovery.html
  3. Follow the given guidance to backup the app data.

    Environment App_Data Location
    Linux /var/www/bold-services/application/
    Windows {Deployed Location}/BoldServices/App_Data/
    Docker Need to backup the persistent volume used for app_data
    Kubernetes For Kubernetes need to backup the Fileshare for different cloud providers.
    EKS File storage https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html
    AKS File storage https://learn.microsoft.com/en-us/azure/backup/backup-afs
    GKE File storage https://cloud.google.com/filestore/docs/backups
  4. Before restoring the app data, you need to edit product.json and config.xml in the backup file and replace the staging DNS URL instead of the production DNS.

    product.json and config.xml path : /app_data/configuration/

    latest-config-file.png

    product-json.png

  5. Now, deploy Bold BI in the staging environment and do not do any startup configuration. For Docker and Kubernetes, you need to specify the restored App_Data(persistent volume file path or file share) during installation.

  6. Then, restore the App_Data files in the staging environment.

    Environment Restore Location
    Windows {Deployed Location}/BoldServices/App_Data/
    Linux /var/www/bold-services/application/
  7. Then, you need to update the database connection string in the config.xml file. Follow the given guidance document to reset the database connection for different environment.

    Note: You need to give the startup DB(restored DB) information here. The one you used during the initial Bold BI deployment.

    Reset Bold BI application database for different environment

  8. Now, you need to change the new URL in the restored databases. Then replace the new staging URL for the following tables on each restored database.

    Postgres MS SQL MySQL
    boldbi_systemsettings dbo.BOLDBI_SystemSettings boldbi_systemsettings
    boldtc_systemsettings dbo.BOLDTC_ SystemSettings boldtc_systemsettings
    boldtc_tenant dbo.BOLDTC_ Tenant boldtc_tenant
    1. Replace the new URL in the boldbi_systemsettings table.

      boldbi_systemsettings.png

    2. Replace the new URL in the boldtc_systemsettings table.

      boldtc_systemsettings.png

    3. Replace the new URL in bold_tenants table.

      boldtc_tenant.png

    Note: Repeat the same process for all the restored databases.

  9. Now, load the site using the staging environment’s new URL.

  10. Then, check whether the new URL is updated on UMS administration page. Navigate to URL/ums/administration in the browser and ensure that the new URL is updated. If not, you need to update the new URL on the administration page and save the changes.

    idp-url-binding.png

  11. You also need to check whether the new URL is updated on UMS sites page. To verify, open the Bold BI ums site listing page and check if it is updated properly.

  12. You also need to reset each site database manually. To do this, select the site and pick the edit option.

    ums-site-listing.png

    update-site-url-in-ums.png

  13. Click Next and provide the restored database details which are configured for the respective site.

    update-site-details.png

  14. Click Update to save the changes. Repeat the same process for all the sites.

  15. Then, navigate the page to the Settings Icon and click on it. Under the Settings option select the Data process or Data store.

    IMDB-datasource.png

  16. Update the restored database details and save the changes.

    Note: You also need to manually update the new restored database details for each site IMDB.

  17. Now, your site will be running with the updated site URL and ready to use.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SS
Written by Sivanesan Saravanan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied