PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Dec 10, 2018 1:54 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Oct 28, 2009 9:55 am 
Offline
Forum Commoner

Joined: Wed Nov 02, 2005 12:05 pm
Posts: 92
Location: Grand Rapids, MI
I have a question on how to set up my dev/staging/production environment. This isn't entirely a Linux-specific question, but that's what I'm using on my servers and this general question will probably lead to some more Linux-specific questions.

I have the following development situation and it's been working okay so far:
Dev server: Old Ubuntu box sitting in my house. I SSH into it from my Mac and develop from there.
Production server: Media Temple VPS. I use rsync to keep this machine up-to-date.

This solution isn't a terrible one but it does have some limitations:
- If I want to show someone the latest development version of my site, I have to have them actually come to my house and get on my network. I realize that I could use port forwarding to get around this, but in my experience that's slow and unreliable. Even if that weren't a problem, I'd like to have a dev URL that's more memorable than whatever my IP address happens to be. Maybe there's some magical way around these problems, but if there is I don't know about it.
- Similarly, if I want to work on my site, I have to be at my house on my network. This is pretty much just a different symptom of the same problem.

What I did recently was set up a new subdomain, dev.mysite.com, and rsynced my home dev box with this one. Now, if anyone goes to dev.mysite.com, they can see the latest dev version of my site, assuming I've kept it up-to-date.

What I've done, though, has only gotten me part-way to my ultimate goals. I can now access my dev site from anywhere but I still do all my development locally which limits me to one physical location.

Right now, the deployment cycle looks kind of like this:
1. Develop on my home dev box
2. Test on the home dev box
3. rsync from my home dev box to dev.mysite.com
4. rsync from my home dev box to mysite.com (I haven't actually done this yet)

It seems like I want something more like this:
1. Develop on dev.mysite.com
2. rsync (or something) from dev.mysite.com to staging.mysite.com
3. Test on staging.mysite.com
4. rsync (or something) from staging.mysite.com to mysite.com

What do you guys think about this approach? Do you see any gaping holes in my logic? I wouldn't be surprised at all if I'm thinking about this completely the wrong way, so any input would be greatly appreciated.

Thanks,
Jason


Top
 Profile  
 
PostPosted: Wed Oct 28, 2009 11:54 am 
Offline
Forum Commoner

Joined: Wed Nov 02, 2005 12:05 pm
Posts: 92
Location: Grand Rapids, MI
I just realized that I overlooked something pretty obvious: If I just get a static IP address from my ISP, the "unreliable" part of my problem with the home server approach probably goes away, at least for the most part. Then I could register a domain name for that address to solve the "hard to remember" part of the problem. What if I don't want a whole new domain name, though? Can I assign dev.mysite.com to an IP address other than the one that mysite.com points to?


Top
 Profile  
 
PostPosted: Wed Oct 28, 2009 12:57 pm 
Offline
Forum Contributor

Joined: Sun Sep 09, 2007 6:27 pm
Posts: 282
Quote:
Can I assign dev.mysite.com to an IP address other than the one that mysite.com points to?
Yes, you just need to add a host record in the DNS for the domain.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group