Best way to run a staging and production environment?

Does anyone have a good way using a single Linode to run both a staging and production environment at the same time?

For example, I could upgrade to a later mod_perl version on the staging area, test out the websites to make sure they work, and if so, make the change on the production area. Is this possible? I read a post here about someone wanting to use UML for that purpose, but that thread ended with the advice that it was a bad idea to use UML for that purpose (mainly because of system resources, etc.).

Is there a good way to upgrade or change configurations without affecting active websites?

8 Replies

Putting UML aside, I've done it with PHP between versions 4 and 5 by using CGI versions, keeping PHP4 on the main server, while throwing a virtual host up configured with the same DocumentRoot, but running PHP5. I don't think it's possible using apache modules for both, but you could keep production on mod_perl then use cgi perl on virtual host…

That sounds interesting, tierra. But I was even thinking more big picture than that as far as upgrading or changing programs on the Linode (in other words, changing more than just the webserver environment).

What I may do is keep a Gentoo box at home configured the same as my Linode and use that as my staging server. The only major disadvantage of this is that it is not REALLY the same, because any quirks caused by the UML subsystem on the real server would not show up on my home system (although I would think a problem like that would be rare).

Does anyone know of a case where a given Linux system did not behave the same on a Linode as it did on real hardware?

Interesting that this be posted now, I was thinking of doing the exact same thing in VMWare with my CentOS system

Well, you could always use a UML linux kernel on your home box….

Don't know if it is against Linode policy, but you can nest UML sessions.

http://jdike.stearns.org/uml/nesting.html

Just an idea, maybe you could run the test stuff under a chroot area. I ran into a similar situation trying to remotely convert a redhat box (not linode) to debian, and was able to do it by making a new partition, do a chroot to it to install debian. (I sure did appreciate Linode after going through that process, by the way) The point it you can install new library versions etc in the chroot area and when you run from in there it will use them instead of the main boot versions.

@kiomava:

Just an idea, maybe you could run the test stuff under a chroot area.
This is what I do. You can configure apache on the jail to run on a different port, then bind mount

mount --bind /var/www $yourjail/var/www

your webroot so the pages exist in both places.. works well for letting users/customers/etc test stuff out before you do the full upgrade.

Kenny

@wirehead:

Well, you could always use a UML linux kernel on your home box….

I had that thought a couple days ago… I wonder how much of a performance difference there is between the usermode Gentoo kernel and gentoodevsources.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct