Promote from Dev to Production

Nov 4, 2017
Promote from Dev to Production
  • Challenge: I developed a Fabrik-based application that is deployed in production on Server PROD. I have developed a new version of the application the resides on server DEV_TEST. I want to push the new version of the application from PROD to DEV_TEST without otherwise impacting PROD.

    IMPORTANT NOTE: This method will completely replace ALL fabrik apps in the PROD site with the fabrik apps in the DEV/TEST site. You will lose all fabrik apps on PROD using this process. If you are looking to keep modifications to fabrik apps on PROD or if you have added Fabrik apps on PROD that don't exist in Dev/Test, you will lose these apps and/or app modifications using this process.

    My Method:
    1. Take the PROD site off-line using the Joomla off-line settings
    2. Backup PROD site (database and directories)
    3. Github update PROD to same release as DEV_TEST
    4. Using phpMyAdmin or other MySQL admin tool, perform a data only export from PROD of all tables/lists for my application. Don't backup any core jos_fabrik or other jos_ (joomla) tables with this export. Name the export file something like PROD_data_yymmdd.sql
    5. Using phpMyAdmin or other MySQL admin tool, perform a data+structure export from DEV_TEST of the following tables.
      1. All application tables (tables associated with relevant Fabrik Lists)
      2. All jos_fabrik_ tables EXCEPT for jos_fabrik_connections. (We don't want to import connections because we want the app to use the connection currently on the site, not the connections from the DEV_TEST site).
      3. Name this export file something like "DEV_TEST_newrelease_yymmdd.sql"
    6. Use phpMyAdmin or other MySQL admin tool and reference the PROD database. Select each of the application tables that you created in Fabrik when you created Fabrik Lists. Also, select each of the jos_fabrik_ tables EXCEPT for jos_fabrik_connections. Drop these tables.
    7. Using phpMyAdmin or other MySQL admin tool, reference the PROD database and import the dump DEV_TEST_newrelease_yymmdd.sql. This re-creates the tables that were dropped, creates new tables that were added in the new DEV_TEST release and re-configures the Fabrik core tables to reflect the changes necessary for the new release of the application.
    8. Using phpMyAdmin or other MySQL admin tool, reference the PROD database and select your application tables (do not select any of the jos_fabrik_ tables) and clear/delete all records (this removes any test data that may have come over from the DEV_TEST server)
    9. Using phpMyAdmin or other MySQL admin tool, reference the PROD database and choose 'Import'. Now, import the PROD_data_yymmdd.sql dump file.
    10. Place the PROD site on-line using Joomla settings
    11. Check-in any external scripts that are part of your application
    12. Install/upgrade and configure any Joomla components, plug-ins, templates or modules required to support the features of the new release into the PROD site using the Joomla installer
    13. Define any new application menus required for the new application using the Joomla menu administrator.
    14. Check the application in the back-end and front-end
    External Scripts
    If your application depends on external PHP scripts (scripts not entered using the Fabrik IDE but residing outside of Fabrik itself, these need to me moved to the PROD site)

    Menus
    If your new release incorporates new Joomla Menus, modules or plug-ins, these will need to be installed and/or configured in Joomla. The process above only moves the Fabrik applications themselves

    Themes
    Remember that any new templates/themes used by the new release will need to be installed. If you've tweaked a template or even redefined css for a theme, you'll need to import those changes required for the new application release into the PROD server