You are viewing...

IDEA: Development Environment to Production

Updated on February 04, 2012 at the 18th hour
Posted under:

DISCLAIMER: Expressed views on this blog are my own.

This is just an idea to improve my workflow. Yes, I still use SVN! As much as git is new, hip and cool. Its just like how I still use MySQL vs. NoSQL. Don't be a hater. Use what you need now and adaptively change later.

So far, I've been looking/thinking about how to setup a development to production environment and I've come to a interesting solution. My development environment I have a Windows PC (Apache and TortoiseSVN installed) with all of my projects then I have a Virtual Machine with linux installed with anything else I need (MySQL, Nodejs, MongoDB). On production, it holds SVN, web/db servers, and my live projects. That's the basic summary.

Let's think about dev-production interaction. What is it that we'd like? Pushing changes from our local server to the production server. Well, let's go with SVN and setup what we'd want.

Okay, the high level structure is basically branches and production. Simple as pie and then you import your projects into branches while importing whatever live folders into the production folder. Perfect, except we don't know how to merge changes between production and dev. Well, thats where svn merge comes in. Keep in mind this is only my idea of how it would go. First, we push whatever changes from local dev to the repository dev, then we'd use svn merge to merge the dev repository with the production repository and then test whatever changes. Perfect right? Haha, hopefully!

Adding a testing area. Let's add a testing area to the production live folder and check out the dev repository to the test area of the site. (Make sure only you can access this unless you want to serve it out). Now we can test changes easily by pushing changes to the dev repository and then push changes to the test area of the site. Hopefully, this works.

I will be testing this process and will update this post accordingly.

UPDATE: So far, so good. I've done everything, now I just need to attempt a merge then my thought/idea will have worked. Seems you could use tortoiseSVN to do merging for you. Looks like my idea is validated and I like it. Much better workflow.

For all of the git hipsters out that: I think you could adapt this method to serve your git needs.
You just read "IDEA: Development Environment to Production". Please share if you liked it!
You can read more recent posts here.