Mura CMS, Git, Submodules, and project structure ideas - Seeking feedback

So I have been working with Mura CMS a lot lately and I have also migrated all of my projects to Git. But I find myself in a situation that I don't really like. I have an idea of how I might fix it, but I am not expert enough in Mura or Git to know if this is a good idea or if I will find myself in a tough position with it in the future.

[More]

Comments
Ben Nadel's Gravatar Jason, very interesting problem. As I've just started to get into Git, I am also very interested in the answer; though, I can't give any advice. I recently ran up against this very thing when I was playing with Node.js. I wanted to create a small Node.js application that had 3rd-party "node modules", some of which were in their own Git repos. So, do I just add them to *my* repo?

I saw arguments in both directions. Some said if its part of YOUR deployment code, it should be in YOUR repo. Other said that the submodule route was the best way to go. I know nothing about submodules, so I just put it all in my own repo.

Anyway, looking forward to seeing what other more knowledgeable people have to offer.
# Posted By Ben Nadel | 2/23/12 1:21 PM
Ben Farrell's Gravatar I'm not very familiar with Mura, but am getting there with Git.
If I understand this correctly though, sounds like you might need a build process - minimally with ANT maybe go as far as Jenkins (or whatever you want).

Since Mura is already under source control, it seems like a waste to dump it into yours. What you could do is just put all the custom bits to your blog under your Git repo as well as a build script. The build script could pull down whatever branch of Mura you want, and combine your custom work in a way that you specify. Sounds like maybe you're just writing plugins? Would be fairly easy to write an ANT task to copy the plugins folder to a final build.

Would also take care of minor updates - when you want to update a plugin you wrote, but don't want to replace all the Mura files. Simply make a task for this.

Sorry if I totally missed the point of what you're talking about, but to me it sounds like a deployment problem which can be automated!
# Posted By Ben Farrell | 2/23/12 2:13 PM
Jason Dean's Gravatar Ben,

At this point I am just developing, not deploying. I don;t want to have to go through a full deployment every time I make a change to code, but I do want to be able to commit when I make changes.

Also, I think you misunderstood. I am not adding Mura to my repo. I am making a fork of the existing project that will server as the master to the whole. I could pull directly from the Mura Github project but then I could not have my "master" project that contains all my submodules hosted anywhere unless I did it myself.

I don't think for what I am planning right now that I need any kind of a build process. And I don't want one, yet. When I am ready to move this project to production I will add it to my Jenkins server, but for right now I just want to be able to easily develop and still keep things in source control.
# Posted By Jason Dean | 2/23/12 3:34 PM
Adam Tuttle's Gravatar Git submodules are something I've yet to really grok, not for lack of trying. Maybe I'm doing it wrong, which is what's making it hard to understand.

I've been using them in the context of two projects, both of which I wanted to make changes to. For example, a framework we use at work (a custom blend of FW/1, OK!, ColdSpring, and others...), as well as plugins for it. The plugins each were their own git repo's and each was a submodule of the framework.

In the end I found it simpler to just keep their repositories separate; but that doesn't mean you can't keep the filesystem together. You could ignore the plugins folder as you mention, and then keep the individual plugin git repo's inside that plugins folder. Nothing stopping you from nesting git repo's as long as you make intelligent use of ignore.

This way I was able to keep things straight in my head -- when making changes to the parent project, commit to it. When making changes to a plugin, commit to it. Then the only possibly confusing part is deployment, but this is easily automated.
# Posted By Adam Tuttle | 2/24/12 8:48 AM
Matt's Gravatar I made a small update today to address this issue.

https://github.com/blueriver/MuraCMS/issues/366

Now, if you set autoDiscoverPlugins=true in your settings.ini.cfm you can simply navigate in to the root plugins directory in terminal and clone the the plugin repo from github. Once that's done you can reload Mura and it will automatically register the plugin in Mura.

If you set <autoDeploy>true</autoDeploy> in the /plugin/config.xml.cfm it will actually completely deploy using any settings that you have's default values.

In addition you can add a siteID element to your plugin/config.xml.cfm to tell Mura what sites to assign the plugin to when it is discovered an auto-deployed.

<siteID>siteA,siteB</siteID>

We're slowly trying improve the development work flow. :)
# Posted By Matt | 4/28/12 12:58 AM
Alex from SEOStyle's Gravatar Jason,

Thank you for sharing your ideas. Rather interesting observations, I have another, may be some off-topic question there. You've switched all your projects to Mura CMS as stated above.
How is it in terms of functionality and usability if compared to Wordpress, Drupal, Joomla or other popular CMS?
# Posted By Alex from SEOStyle | 5/17/12 2:54 PM
Joe Brislin's Gravatar Jason,

How is this workflow with Mura and Git Submodules working out for you since implemented? I've been running across some of the same issues with our Mura development. I don't love the current setup that we have in terms of Git and Mura. We currently maintain everything in a single repo per site and it just doesn't work well right now.

One question that I have is how do you handle the cache files that get generated by Mura? I have not been able to figure out a way to regenerate those cache files. If we don't include them in the repo, then another developer working on the project will receive a missing file error because he won't have the cache file.
# Posted By Joe Brislin | 6/20/12 9:33 AM
Jason Dean's Gravatar @Matt,

Sorry for the delay in responding. There was a problem with my email and I never saw you comment.

Thanks for doing that stuff, that's awesome. I've probably been using it and not even realizing it.

@Joe, I, honestly, have not fully implemented this yet. Currently I just have a repo for each plugin that I am able to work from directly in my local Mura instance.

As for the cache/assets directories. I do not put those into Git. Mine are currently 11GB. Instead I add them to .gitignore and do daily backups. If someone wants to make a local Mura instance with all of those assets they can download the .zip from the backup store. The backup store also has a current backup of the DB.
# Posted By Jason Dean | 6/20/12 11:11 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1. Contact Blog Owner