• Workflow development in modx 2.2.0 (version control, tests, deployment) ?#

  • jmeco Reply #1, 3 months, 2 weeks ago

    Reply
    Hello,

    We use modx for a web application with a lot of custom code in snippets, plugins, external files containing models classes. The site is currently in Evolution 1.0.5. At the beginning we put lots of code in Snippets, but know we put more code in external file to reuse more efficiently the code.

    We are in the process to migrate to 2.2.0

    Evolution was a pain in the ass to work with a proper workflow. We could never do
    dev env -> test env -> prod using git and Continuous Integration tools.
    We code with phpStorm by creating files with the same name as the elements and copy/paste in the manager the content. So we can version control thoses files but they are not the real code which reside in the DB.
    When we want to move code from a test env to prod, we dump tables in the database that contains the code (mainly site_ tables + few others) and rsync the content under /assets

    It is far from perfect. We want to move to an automated provisioning of test env (using Puppet) and an automated deployment in production.

    From my understanding of Revolution, those features are part of the solution to enhance dev worflow:


    How can we use those features/tools to improve our workflow (ideally removing any db dump) ?


  • blankcheck Reply #2, 3 months, 2 weeks ago

    Reply
    Transport Packages - not practical (takes time to package up stuff), although PacMan http://rtfm.modx.com/display/ADDON/PackMan can be very helpful

    Static Elements - good thing is that your files are synced with db, but you still have to create them in manager. Mirror plugin can help a lot here https://github.com/digitalbutter/MODX-Mirror

    CLI installation - haven't yet tried it

    VersionX 2 - haven't yet tried it, but I wouldn't use it for elements (svn, git...), maybe for clients (for their content)

    Still, problems remain with TVs, system settings, users...

    That is why I am developing a plugin which would enable all (I hope all) manager actions through xml and in combination with static elements I would be able to almost not use manager at all.

    What I am hoping to achieve is:

    Database: all db changes (functional changes, not content) done through files (which are in svn)

    Deployment: Ability to install fresh modx, install this plugin, copy files, run plugin and have same thing as on dev/test enviroment

    Team Collaboration: Every developer has his instance of modx and database (no need to have one database on remote server - insecure, slow...) and only xml and static elements are versioned

    I have done some work already, I hope to have it in a month.

    Suggestions are welcomed.


  • jmeco Reply #3, 3 months, 2 weeks ago

    Reply
    Youe plugin seems really interesting. If you need testers/review we can help you. Are you far from a working version?


  • blankcheck Reply #4, 3 months, 2 weeks ago

    Reply
    Not too far...I will have alpha version on gitHub sometimes next week, i will post a link here. Testers are always welcome, thanks


  • blankcheck Reply #5, 3 months, 1 week ago

    Reply
    Hi, just to inform you that it will take me some more time. Plugin is coming along nicely, it already works for basic elements (templates, snippets and chunks). I hope to be done completely soon and will post again here when done.

    Regards


  • jmeco Reply #6, 3 months ago

    Reply
    Hi,
    No problem, we are waiting to test your version.
    In the meantime, we are testing the CLI install with Puppet. It will be a good start.