We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6672
    • 4 Posts
    I want to sort out the upgrade process so I can automate deploys to test or production.

    For Revolution, what is the current thinking on deployment? I.e.


    • Deploying MyWebsite v1.2 (with new snippets, packages, static files, data) -> Test Environment (core install only)
    • Deploying MyWebsite v1.2.1 (with some bug fixes, template changes) -> Test Environment (hosting MyWebsite v1.2)
    • Deploying MyWebsite v1.3 (with new and removed snippets, packages, static files, data) -> Test Environment (hosting MyWebsite v1.2.1)
    • Upgrading MyWebsite v1.3 with new Revolution core on Development/Test/Production

    Is this where Transport Packages come in? For all files/data? I.e. moving site development from 1.2->1.3, as well as upgrading the core (or plugins) itself?

    Does this mean before deploy we need to create our own Transport Package? I.e. checkin to SVN so we have a stable version, then use our transport script to checkout from SVN, build Transport Package, (deploy package to internal Provider?), then manually deploy via target instances’ Manager?

    For the record, my directories are currently..
    ./webroot/[Revolution modx install directories]
    ./webroot/assets (seems to be added by occasional 3rd party packages)
    ./webroot/images (my own images)
    ./webroot/css (my own css)
    ./includes/templates (so html is edited from file w/o needing c&p, and outside webroot)
    ./includes/chunks (so html is edited from file w/o needing c&p, and outside webroot)

    Sorry if these questions are out of whack, I’m new smiley

    Thanks in advance.
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: serio at Sep 04, 2009, 11:40 PM

      Is this where Transport Packages come in? For all files/data? I.e. moving site development from 1.2->1.3, as well as upgrading the core (or plugins) itself?

      Does this mean before deploy we need to create our own Transport Package? I.e. checkin to SVN so we have a stable version, then use our transport script to checkout from SVN, build Transport Package, (deploy package to internal Provider?), then manually deploy via target instances’ Manager?

      Sorry if these questions are out of whack, I’m new smiley
      Not out of whack at all; these are problems we are working on, and yes, the intention is for Transport Packages to help ease the pain in this area, though there is still some work to do to make this a seamless process (for instance I’m working on a new Vehicle class that will allow packages to be imbedded in other packages).

      Unfortunately, there are a lot of unknowns still in this process so there really are no best practices established yet. But there will be. We’ve also been trying to come up with a UI for building transport packages for this purpose, but so far we’ve not been happy with the results. The flexibility we’ve built into Revolution makes it difficult to cover all the possibilities in migrating changes between deployments, but with the help of members willing to get their hands dirty, I think we’ll be able to get a handle on it before too long.

      If you have any more specific questions or suggestions in this respect, please don’t hesitate...
        • 6672
        • 4 Posts
        Thanks OG. I have some reading and coding to do before I can be specific, but for now...


        • What are the biggest problems faced when merging sites (website 1.2 >> website 1.3, core 2.1 >> website 1.3 (core 2.0), etc.)?
        • What do you recommend I work on in this area as as a newbie to MODx? Should I be trying to build my own Transport Packages (docs) for upgrading an entire site?
        • What deploy method do you currently recommend for upgrading Revolution sites as it stands now (2.0.0-beta-3)?

        IMHO, getting the data integrity/merging right across instances is the most important thing. I don’t mind creating lengthy scripts as long as they end up robust, repeatable and transportable.

        Based on the threads I’ve read so far (this and this) merging the databases seems to be the trickiest part. I.e. new development content (snippets, TV, etc.) plus production content (blogs, etc.) that is not in development. I had one idea for this...

        How about a central service for assigning unique content identifiers? Kind of like a dhcp/ldap service. I believe database content has unique identifiers (doc id’s etc.) and so the issue is new doc on production (ID11, some blog item) conflicts with new doc on development (ID11, container for new section). But if all instances used a centralized repository for assigning ID’s then new content requests would be unique across all instances...

        Production >> new blog item >> request ID from repository >>ID11
        Development >> new document container >> request ID from repository >> ID12

        This way content could be merged that doesn’t conflict. So you could deploy development to staging/production and even production back to development/staging because all unique content has unique identifiers across all instances. Does this seem worth looking at? It would be tricky with remote production servers, but with web services not impossible. The repository could even sit as a service in production and development machines just call on it. All this could be optional as extensions/plug ins so people can use as is, or adopt a central repository approach for managing content across several instances. This is something I don’t mind digging deep into because I think it’s critical to get upgrading websites safe and predictable.

        Cheers!
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: serio at Sep 06, 2009, 06:44 PM


          • What are the biggest problems faced when merging sites (website 1.2 >> website 1.3, core 2.1 >> website 1.3 (core 2.0), etc.)?
          • What do you recommend I work on in this area as as a newbie to MODx? Should I be trying to build my own Transport Packages (docs) for upgrading an entire site?
          • What deploy method do you currently recommend for upgrading Revolution sites as it stands now (2.0.0-beta-3)?

          IMHO, getting the data integrity/merging right across instances is the most important thing. I don’t mind creating lengthy scripts as long as they end up robust, repeatable and transportable.
          There are three main problems:

          1) keeping the data in sync with file system items that can basically go wherever a developer/designer decides to put them. This is manageable by establishing standards for a particular site on where file system items go
          2) some of the data has circular dependencies which complicates the process of primary/foreign key updates across separate databases
          3) there is no way to manage conflicts between two separate databases unless you make ALL changes go from dev site to production site (basically turn off management on production)

          Creating transport packages for specific changes is the best way to do this currently. And treat the core separately, as there is a lot more to updating the core since everything depends on it. We’re experimenting with several approaches to updating the core atm, but TBH, we are not doing any actual dev-to-production promotion yet and we generally update the core directly via SVN, building the core Transport locally and uploading it in preparation for the SVN update. Our typical workflow for components is to do functional development local and manage change via the Transport Packages we use to deploy our work. Most content changes are managed directly in the deployment however, unless they directly relate to a component in development.

          Quote from: serio at Sep 06, 2009, 06:44 PM

          Based on the threads I’ve read so far (this and this) merging the databases seems to be the trickiest part. I.e. new development content (snippets, TV, etc.) plus production content (blogs, etc.) that is not in development. I had one idea for this...

          How about a central service for assigning unique content identifiers? Kind of like a dhcp/ldap service. I believe database content has unique identifiers (doc id’s etc.) and so the issue is new doc on production (ID11, some blog item) conflicts with new doc on development (ID11, container for new section). But if all instances used a centralized repository for assigning ID’s then new content requests would be unique across all instances...

          Production >> new blog item >> request ID from repository >>ID11
          Development >> new document container >> request ID from repository >> ID12

          This way content could be merged that doesn’t conflict. So you could deploy development to staging/production and even production back to development/staging because all unique content has unique identifiers across all instances. Does this seem worth looking at? It would be tricky with remote production servers, but with web services not impossible. The repository could even sit as a service in production and development machines just call on it. All this could be optional as extensions/plug ins so people can use as is, or adopt a central repository approach for managing content across several instances. This is something I don’t mind digging deep into because I think it’s critical to get upgrading websites safe and predictable.
          This is a good idea, but at the moment we are slaves to the MySQL auto_increment primary key columns. I’m considering changing this functionality, starting with support at the xPDO level in the future, switching to using UUID/GUID primary keys that would be unique across deployments, but this comes with it’s own problems and limitations for developers we are working through. Your idea is interesting, but would not work with the current database architecture, again, due to the nature of auto_increment columns in MySQL that have no awareness of keys in other tables. It is likely this will require some major core refactoring to achieve, no matter the course of action we take, but I expect to solve this in time for the 2.1 release.