Slashdot Mirror


How Do You Manage Dev/Test/Production Environments?

An anonymous reader writes "I am a n00b system administrator for a small web development company that builds and hosts OSS CMSes on a few LAMP servers (mostly Drupal). I've written a few scripts that check out dev/test/production environments from our repository, so web developers can access the site they're working on from a URL (ex: site1.developer.example.com). Developers also get FTP access and MySQL access (through phpMyAdmin). Additional scripts check in files to the repository and move files/DBs through the different environments. I'm finding as our company grows (we currently host 50+ sites) it is cumbersome to manage all sites by hacking away at the command prompt. I would like to find a solution with a relatively easy-to-use user interface that provisions dev/test/live environments. The Aegir project is a close fit, but is only for Drupal sites and still under heavy development. Another option is to completely rewrite the scripts (or hire someone to do it for me), but I would much rather use something OSS so I can give back to the community. How have fellow slashdotters managed this process, what systems/scripts have you used, and what advice do you have?"

244 comments

  1. How slashdot does it by sopssa · · Score: 5, Funny

    How have fellow slashdotters managed this process, what systems/scripts have you used, and what advice do you have?"

    I do the same as Slashdot.org does - Make the changes on live code, except a little downtime and weird effects and then try to fix

    it - while actually never fixing it. After all the results are not that significant:

    - if someone posts about it on a thread, mods will -1 offtopic it and no one will hear your complain
    - many people will "lol fail" at the weird effects, like when kdawson decides to merge two different stories together

    1. Re:How slashdot does it by Anonymous Coward · · Score: 0

      Aaahh, I see the Angel of Cynicism has blessed you.

    2. Re:How slashdot does it by cayenne8 · · Score: 3, Insightful
      "I do the same as Slashdot.org does - Make the changes on live code, except a little downtime and weird effects and then try to fix"

      That's not that far from the truth in MANY places and projects I've seen.

      I've actually come to the conclusion, that on many govt/DoD projects, that the dev. environment in fact becomes the test and production environment!!

      I learned that it really pays, when spec'ing out the hardware and software that you need, to get as much as they will pay for for the 'dev' machines....because, it will inevitably become the production server as soon as stuff is working on it, the deadline hits, and there is suddenly no more funding for a proper test/prod environment.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    3. Re:How slashdot does it by AugstWest · · Score: 1

      1) A solid, well-defined subversion structure
      2) Ant
      3) SSH keys that Ant can use

      Done and done. I work for a major broadcast network, pushing out hundreds of Java, .Net and Oracle Forms applications day in and day out to some number of servers I haven't bothered to count.

      90% of them can be pushed out from a single shell script with just a couple of command line switches. Most of this is done through identifying environments and destination paths for each of them in a build.properties file, then specifying the target server/environment at build time.

      Ant (or Nant) works for pretty much any programming technology. It's primarily used for Java, but is very straightforward to adapt to everything else, and handing over an XML-formatted build script can be a *lot* cleaner than most of the perl, shell or python scripts I've dealt with in the past.

    4. Re:How slashdot does it by egork · · Score: 1

      Better approach is to tell management to buy at least two lines of machines before starting the project: development and production. I found it relatively easy to explain that if some hardware dies, we should at least have a spare around (to be dev environment otherwise).

    5. Re:How slashdot does it by chdig · · Score: 1

      Unfortunately, this isn't a solution for the question at hand (not that I've got one to offer).

      The challenge of web development brings a database and its changes together with that of code. A database's structure will change with the evolution of a code base, and subversion doesn't help deal with that. It also makes it awkward, for me at least, to deal with dev and live environments. Maybe it's an inherent problem that comes with using relational databases, but I've yet to see any solid open-source, cross-framework tool to help with versioning of both database and code in a user-friendly way.

      If one existed that could also manage both a live and dev environment, each with different data in a possibly differently structured database, it would be a very valuable application.

    6. Re:How slashdot does it by RichardJenkins · · Score: 1

      That's crazy. You need to have a stage and live. Fortunatlythese daysyou can doosixmachines on one virtual machine. I suggest you:

        * Buy one server (it needs to be powerful, so maybe one of those ones that goes in a rack (don't worry about a rack though)
        * Install Windows on it and VMWareServer (the free one)
        * Install 3VMs and put Windows on each.
        * You'll need one web server and one database server for live and stage. So use two VMs for production, and the other VM and the machine with VMware server installed for stage.
        * Eventually this might not be enough performance, if so you can just add more virtual machines to spread the load. Maybe but more virtual CPUs in them?

      Slashdot is a great source for expert info like this: be sure to ask about backups later too!

    7. Re:How slashdot does it by FilthCatcher · · Score: 1

      Here's the quick-and-dirty process we use around this.

      1) Never ever make DDL changes directy to a dev database. always write a .sql file to apply changes.
      2) These .sql files are kept in subversion along with the Data-access layer code.
      3) nant scipts handle pushing the code to test/production servers and applying any pending sql patches
      4) nant has an sqlTask that can run arbitrarty SQL statements against a database.

      I agree that a framework that could manage this in a more robust manner would be useful.

    8. Re:How slashdot does it by Anonymous Coward · · Score: 0

      cavenne8 speaks the truth.

    9. Re:How slashdot does it by sgbett · · Score: 1

      you pay quite a premium for a rack chassis imho. Dont get rackmount unless you need to put it in a rack, you can spend the extra cash on better internals.

      you can get a dual quad core, 8gig ram, 500gig raid 1 for just over 1200gbp from dell in a tower, same config in rackmount is 110gbp more.

      --
      Invaders must die
    10. Re:How slashdot does it by RMH101 · · Score: 1

      This approach works great when you have a hardware problem that means you need to failover preproduction into production.

    11. Re:How slashdot does it by Anonymous Coward · · Score: 0

      Don't forget about licensing! Make sure you follow the EULAs and pay for every copy of Windows.

      But seriously, using Windows for virtualisation is a royal pain. I don't want to have to call my lawyer every time I set up a server or clone an existing VM.

      Want something simple, just use Linux and KVM/Xen/VMware and be happy. If you really need Windows for a project, you can still have it for that specific VM.

  2. You are not a n00b by davidwr · · Score: 5, Insightful

    You may be a new system administrator, but you are not a n00b.

    A n00b wouldn't realize he was a n00b.

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
    1. Re:You are not a n00b by Anonymous Coward · · Score: 0

      A n00b wouldn't realize he was a n00b.

      You, sir, just changed my life.

      - mr. n00b

    2. Re:You are not a n00b by sakdoctor · · Score: 0, Offtopic

      They could be a n00b.
      If they only have a wooden sword and shield, and 100 gold pieces then they're probably a n00b.

    3. Re:You are not a n00b by Anonymous Coward · · Score: 0

      the n00bs wouldn't believe it.

    4. Re:You are not a n00b by N!k0N · · Score: 0, Offtopic

      probably not... but then said n00b will be spamming help/shout/local/whatever about how they changed the controls since beta...

    5. Re:You are not a n00b by sopssa · · Score: 0, Offtopic

      but since the n00b is a n00b, will anyone actually hear a n00b screaming?

    6. Re:You are not a n00b by N!k0N · · Score: 0

      depends on whether or not they're watching aforementioned shout/local/help/whatever channels...

    7. Re:You are not a n00b by hydroponx · · Score: 3, Funny

      OR they're Link.....

    8. Re:You are not a n00b by Sam36 · · Score: 0

      Hey I am a n00b you insensitive cod!

    9. Re:You are not a n00b by Eil · · Score: 3, Interesting

      If he is indeed allowing FTP logins over the public Internet (as the submission suggests), he is a n00b whether or not he realizes it.

    10. Re:You are not a n00b by Anonymous Coward · · Score: 0

      and your alternative is?

    11. Re:You are not a n00b by TaggartAleslayer · · Score: 1

      VPN, SSH, SFTP.

    12. Re:You are not a n00b by hesaigo999ca · · Score: 0, Redundant

      Yeah, right, see if that one works on WoW!

    13. Re:You are not a n00b by Hurricane78 · · Score: 1

      I think the word is "rookie".

      Or you could look at it in the evil way, in that he is a n00b, and before realizing it, he was even worse than that. (What I call a "z00b". A zero-knowledge n00b.)

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    14. Re:You are not a n00b by Anonymous Coward · · Score: 0

      Wouldn't that be a zkn00b?

    15. Re:You are not a n00b by Anonymous Coward · · Score: 1, Interesting

      n00b is unknowable?

    16. Re:You are not a n00b by Dragonslicer · · Score: 1

      It's the difference between "n00b" and "newbie".

    17. Re:You are not a n00b by nametaken · · Score: 4, Insightful

      Or maybe they're not over public internet, or are tunneled, or they're sftp and he just calls it ftp? We dunno.

    18. Re:You are not a n00b by SanityInAnarchy · · Score: 1

      VPN, SSH, SFTP, SCP, SSL'd FTP, DAV in HTTPS, the list goes on.

      --
      Don't thank God, thank a doctor!
    19. Re:You are not a n00b by NuShrike · · Score: 1

      check out to staging directory, then rsync or bittorrent it to servers

    20. Re:You are not a n00b by fuzzyfuzzyfungus · · Score: 2, Interesting

      How Socratic...

    21. Re:You are not a n00b by SanityInAnarchy · · Score: 1

      Better yet, git push it over ssh.

      I had a set of Capistrano stripts to do just that.

      --
      Don't thank God, thank a doctor!
    22. Re:You are not a n00b by selven · · Score: 1

      Not really, it's just the modern definition of the word "n00b", which is often closer to "idiot" than "newbie".

  3. Separate SVN deploys by Foofoobar · · Score: 3, Informative

    Create separate SVN deploys as separate environments. Deploy them as subdomains. If they require database access, create a test database they can share or separate test databases for each environment. Make sure the database class in the source is written as DB.bkp so when you deploy it, your deployed DB class won't be overwritten by changes to the source DB class.

    --
    This is my sig. There are many like it but this one is mine.
    1. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 2, Informative

      Do _not_ use Subversion for this. Use git, even if you have to use gitsvn to point it to an upstream Subversion repository. Subversion's security models in UNIX and Linux are exceptionally poor, and typically wind up storing passwords in clear-text without properly notifying you. (Now it notifies you before storing it, but usex it automatically.) Subversion also has very poor handling of multiple upstream repositories, and there is no way to store local changes locally, for testing or branching purposes, and only submit them to the central repository when your changes are complete.

      git is faster, lighterweight, and performs far better for distributed systems each of which may require local configurations.

    2. Re:Separate SVN deploys by Foofoobar · · Score: 4, Insightful

      Git does not have integration with Apache and other tools that developers still find useful. TRAC integrates with Subversion as do several other tool. You also cannot coordinate Git with your IDE. Don't get me wrong, it is definitely where version control will be in the future but the tools to support it have to get there first before widespread adoption should be advised for day to day use.

      --
      This is my sig. There are many like it but this one is mine.
    3. Re:Separate SVN deploys by AlXtreme · · Score: 4, Informative

      Subversion's security models in UNIX and Linux are exceptionally poor, and typically wind up storing passwords in clear-text without properly notifying you.

      Auth token caching can be easily disabled and svn export, not svn checkout, should be used for deploying test/prod environments (like I've seen way too many people do).

      Git (or any other distributed version control system) is great if you are into distributed development, but don't blame the tool when you don't know how to use it properly or expect it to be something that it's not.

      --
      This sig is intentionally left blank
    4. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 2, Informative

      What do you mean, git doesn't integrate with Apache? It works well as an Apache client, there's 'viewgit' if you need a bare web GUI. And for this purpose, locally recordable changes seems critical.

    5. Re:Separate SVN deploys by garaged · · Score: 3, Informative
      --
      I'm positive, don't belive me look at my karma
    6. Re:Separate SVN deploys by IMightB · · Score: 1

      I prefer Mercurial>git>SVN, otherwise grandparent is a good suggestion.

    7. Re:Separate SVN deploys by Anonymous Coward · · Score: 0

      By integration with apache I believe he means the ability to serve content from branches within git. For example if you have 3 branches dev, prod, stage. You can't point apache to stage ... because with a branch there are no copies of files

    8. Re:Separate SVN deploys by Foofoobar · · Score: 1

      You are talking a repo browser vs an Apache module. Git does not have anything like mod_dav_svn yet so there is not full integration with Apache yet. Many people in the Git community want something like mod_dav_svn but there isn't anything like it yet.

      As I stated, the tools aren't there yet. Good version control but ther support tools have to be built yet.

      --
      This is my sig. There are many like it but this one is mine.
    9. Re:Separate SVN deploys by Jack9 · · Score: 1

      Do _not_ use Subversion for this. Use git, even if you have to use gitsvn to point it to an upstream Subversion repository. Subversion's security models in UNIX and Linux are exceptionally poor, and typically wind up storing passwords in clear-text without properly notifying you. (Now it notifies you before storing it, but usex it automatically.) Subversion also has very poor handling of multiple upstream repositories, and there is no way to store local changes locally, for testing or branching purposes, and only submit them to the central repository when your changes are complete.

      Ahem, DO_USE_SUBVERSION for this. It's simple, fast, easy to manage and teach. Keeping your dev/test secured by ip filtering to your network, there's no reason to use anything more elaborate for security. There's no need to version local changes as the users can decide and implement their own local versioning. Sheesh.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    10. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      "Auth token caching" is enabled by default, with no server or system to disable it. It's only disabled on a client by client basis: this is completely unacceptable in security terms and always has been. So unless you have direct control of the source code for Subversion for all the systems, then no, you can't "easily disable it".

      'svn export' is fairly insane for most configuration environments, since it provides little single hint of what files have been altered or modified locally against the base repository's version, provides no access to the log history, does not report 'svn:ignore' properly to ignore or report differences as needed, and it does not provide any later hint of where the configuration files came from. One can _write_ a complex set of configurations and tools to try and provide that, but once you do this, you've once again gotten into more scripting than the original poster wants to deal with.

      Don't blame subversion's poor excuse for a security model nor its mishandling of multiple simultaneous branches on my "lack of understanding". I understand it thoroughly, and these are unnecessary flaws when git is around.

    11. Re:Separate SVN deploys by Foofoobar · · Score: 1

      Yes that and this example uses web_dav rather than dav_svn. Alot of Git users would prefer to use something similar to dav_svn rather than web_dav but as I stated, the tools just aren't there so full you have to get by with lesser substitutes. Eventually I suspect someone wil make a mod_dav_git module for Apache but there isn't one now and there isn't Eclipse support and a whole bunch of other things that make developers lives easier rather than harder.

      The tools need to be in place to make development easier before an approach should be adopted and promoted. It may be a better approach but without the tools to make that approach as easy and accessible as the current approach, why should adoption take place? Why should development slow down in the meantime?

      --
      This is my sig. There are many like it but this one is mine.
    12. Re:Separate SVN deploys by Anonymous Coward · · Score: 0

      I humbly submit this container of beard oil in submission.

    13. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      Oh, dear. "We trust the people we work with" to prevent people reading the unencrypted passwords in $HOME/.svn/auth/. Yes that trick works really well for root owned system configuration files. No one would _ever_ steal those or modify them behind your back, even when they put their write-authorized passwords in their NFS shared home directories, even when those passwords are also used for email and sudo, and even when those passwords can be used to alter root-owned system configuration files. This certainly wouldn't have occurred at _every single site_ I've ever seen Subversion used for configuration management at.

      I'm up to 5 in a row now. Every single one has been shocked when I plugged in a Knoppix laptop and walked through the NFS home directories of their technical and development personnel to gather root access this way. Subversion is _bad_ this way.

      And local system changes are particularly to record and provide logged changes for in development environments, where the changes need to be coordinated as a set to enable or disable particular features. That's what development environments are for; burdening the central repository with those changes, pre-release, is a tremendous source of instability.

    14. Re:Separate SVN deploys by statusbar · · Score: 1

      This is why I like Mercurial better; It integrates easier and better with apache and is much faster than svn for the same source code!

      However I decided to not use 3 branches (dev,test,release) inside one repository - I use 3 separate repositories. They are all related, and the release repo has different authentication requirements so you have to be certain that you want to push to the release repo.

      In addition, I set up hudson to do automatic builds of each repo and automatic deploy to the related servers. This is more controversial, some people prefer to have release deployments to be triggered manually. Either way they are fairly easy to revert.

      --jeffk++

      --
      ipv6 is my vpn
    15. Re:Separate SVN deploys by nahdude812 · · Score: 3, Informative

      svn+ssh doesn't store anything in clear text. If that's a security concern for you, there's already a solution in place. Git is not the be-all and end-all solution to source control; it does many things very well, but there are a few things it does very poorly (repository control; with git, developers have a local copy of the repository which means that a stolen laptop comes with complete revision history). When the systems you're working on have certain sensitivities (legal, patent, security, etc), this can be a major weakness.

      We do something very similar to the original submitter at work. We have 10-15 project branches open at a time. For us, we make sure that our code is subdirectory-agnostic (meaning it can run on the root of the website, or it can run out of a subdirectory). We use directory paths for branches, and we use internal DNS records for environments. http://de-appname/branchname would be a development branch while http://va-appname/branchname would be a validation branch.

      For our lifecycle, we have development, validation, staging, pre production, and production. Development and validation are the only branching locations; staging, pre, and production are each single-path locations (though staging is a branch reserved for this purpose, pre production and production are /trunk)

      On http://de-appname/ and http://va-appname/ there is essentially a directory listing along with the fully qualified branch name, revision, most recent contributor's name (even spelled out by looking up their record in LDAP), commit time, and most recent log message. Developers get a drop-down menu next to project branches which they can use to update the working copy there on that shared server (does a little ajax call and shows you the result in real time as though you were at a terminal). You can also create clean checkouts and even create new branches (either off of trunk or off of another branch). Finally you can even close a branch through this interface; it deletes the branch with a meaningful log message, and cleans up the files on that server. All through a web interface, no need to remotely log into a machine for this purpose. There's no reason for someone to administer this, each developer creates a working copy when and where he thinks it makes sense for himself.

      Because our back end is SAP, we don't have to deal with multiple database environments. There's no "create a new copy of SAP" - indeed when this is something that's organizationally important (testing a major upgrade), it's a multiple day long process. We have a fixed set of data environments, and these are tied to hostname (going back to de-appname, va-appname, stage-appname, etc). If there were multiple database environments to worry about (eg, you wanted to be able to effectively branch database environments too), it wouldn't be a huge deal to set up a template database and have the same scripts we use to manage branches through a web API clone that database and update config in the appropriate app.

      The key that I'm trying to get at is that you should create a web based tool to allow developers to manage this themselves. The developers will thank you because they'll be able to get what they want faster than you could have provided it, and they'll have control over when where and why working copies of their work in progress appear.

    16. Re:Separate SVN deploys by Nefarious+Wheel · · Score: 2, Informative

      There are so many things to do to get this right - basically I'd add that you need a three-silo people model to match the three silos of dev,test,prod. Your development side are the creative ones; give them the tools they ask for and let them play. You need a critical, intelligent and demanding test manager in the middle, and for the production gatekeeper you need someone with absolutely no imagination at all (follow the rules, tick the boxes, or *zero* chance of advance to production. Seriously. Tell the people who think otherwise the *boat*will*sink* if all the test boxes aren't ticked. Just don't try to run development that way, mutiny isn't pretty.)

      For the test through production phases, make sure you have your servers virtualised. Test because test environments tend to proliferate (try, just try to keep a baseline somewhere? Careful when you update it...) and Production because you'll need speedy rollback if you auger it, and strict version control on the server versions. This applies whether your virtual:physical server ratio is 1:1 or otherwise.

      Look into data de-duplication solutions to keep the total disk space used by virtual images down.

      ITIL is nice but it's really only the scaffolding. You still have to provide the cathedral.

      --
      Do not mock my vision of impractical footwear
    17. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      You're correct. svn+ssh doesn't store passwords. But it's the least supported, least documented, and most difficult way to set up Subversion. And I can understand the problem of revision history being stolen with git, but compared to the chronic risks of repository access and associated account access of most Subversion setups, I'd say it's a much smaller problem. In fact, revision history is a _useful_ component to have without having to contact the central repository every time you want to check logs or do a diff.

      The back end structure you've described is very interesting. But it's not inherent to Subversion: that sophisticated of a backend can be integrated to almost any source management technology. It's an entire, enterprise class backend technology, that requires its own maintenance. You've already paid the price for that, in manpower and development time.

    18. Re:Separate SVN deploys by nahdude812 · · Score: 1

      It's certainly true that the branching tools we wrote aren't specific to any given source control system; the git-vs-svn opening of my response was mostly just to point out that there's a better way to use SVN.

      You might be right about svn+ssh being poorly documented; I never had a hard time getting it up and running, but most of the concepts were pretty familiar before I started, so I might not be the most representative. As to it being poorly supported, I'd be surprised; it's essentially filesystem access over an SSH tunnel. Local filesystem access is what you use when you want to debug things to know if it's a problem with your transport protocol or a problem with your repository. You don't have to use authz access, you can rely on disk permissions, and especially if you have root access this is extremely easy to debug any issues with.

      You can do diffs while offline with SVN as well; inside the .svn folder is a text-base folder within which is an original copy of each file. You can't access revision logs, but you can compare local changes.

      I know where I work, I can't go into a lot of details, but I can say that it would be unwise of us to use a source control system where each laptop contained revision history on it. There are certain things from a legal or a patent perspective which we need to be able to prove we're the original creators of. Source history is a good way to demonstrate this. If a competitor got access to a complete revision history, it could be a very expensive compromise. This is a major weakness for us for git or other distributed source control models, no matter the benefit such a system brings.

    19. Re:Separate SVN deploys by AlXtreme · · Score: 1

      "Auth token caching" is enabled by default, with no server or system to disable it. It's only disabled on a client by client basis

      You can say exactly the same about any form of password caching. You don't use Firefox because it can store your passwords?

      I don't allow Firefox to store my passwords, just as I don't allow my subversion client to store my passwords. It's one or the other, security or ease-of-use. Most go for the latter, so it's on by default. I don't see the issue, as this can be disabled with one measly option in your svn config file.

      'svn export' is fairly insane for most configuration environments,

      Then you're doing it wrong. Configure in your dev environment, export to test, export to prod. If you're modifying your test/production environments without going through your development environment, even git can't help you.

      Don't blame subversion's poor excuse for a security model nor its mishandling of multiple simultaneous branches on my "lack of understanding". I understand it thoroughly, and these are unnecessary flaws when git is around.

      If decentralized development is your thing, have fun with git. If you are choosing a version control system based on incorrect assumptions and bias, be my guest. I just have the feeling you're judging a screwdriver as if it were a hammer.

      --
      This sig is intentionally left blank
    20. Re:Separate SVN deploys by Anonymous Coward · · Score: 0

      It integrates with my IDE: http://www.eclipse.org/egit/

    21. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 2, Informative

      You wrote:

      > You can say exactly the same about any form of password caching. You don't use Firefox because it can store your passwords?

      No, I can't say exactly the same thing. Subversion, by default on UNIX and Linux, stores the passwords in cleartext. That is one of the stupidest things I've ever seen for allegedly "enterprise" class software. The only other source control I've seen do something that stupid is CVS, which is what Subversion is descended from.

      "Configure in your dev environement" means that your dev environment has the configurations checked out, as a Subversion environment, not an export. This means that your dev environment has precisely the problems I mentioned, and your production environment cannot make _any_ recorded changes, not even local configuration changes, without routing them through the development environment. This is, in practice, insane, because it inserts a full testing and commit cycle to what should be a very modest in-place repair or a modification that belongs only in the production branches, not the development branches or environment.

      Yes, I've had to deal with this. It is fundamentally an error to rely on pure 'svn export' for configuration management.

    22. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      Your response is cogent, but let's be clear. svn+ssh is _daemon_ access, not file-system access, to a locally operated svnserve daemon. Because the SSH connection starts up the daemon, that daemon has only the permissions of the svn+ssh target user, which is why a well-configured svn+ssh setup uses a common user, with URL's such as svn+ssh://svnuser@svnhost/svnparentdir/reponame. There is no direct filesystem access involved, which is why the svn+ssh user can be a common user for multiple SSH clients.

      There is no good published tool, at least mentioned anywhere at svn.tigris.org or its related sites, to manage svn+ssh keys or such repositories. It's all manually done, and thus error prone, unless you write your own tools. This detracts terribly from the usefulness of the technique. Sourceforge has used it successfully for years, but they're switching to git wherever feasible, and with good reason.

      Your concern with the legal consequences of log histories is one I've never even thought of. The idea that the central log history is critical to protecting your intellectual property, and that a stolen log history is dangerous in this sense, is a fascinating one I've not seen before and which deserves thought. Mind you, I hope you're very careful of the provenance of your Subversion backups, because it's frankly quite easy to modify Subversion logs if you've actually read the Subversion book or use a recent Subversion version. Or is it that you need the centralized log history? git can certainly be used this way, with a central 'master' which all developers are expected to refer to and from which signed tags are generated. The signing of tags could, in fact, be useful in such circumstances: Subversion has _no_ inherent way to verify the contents of a repository or tag as being the release version.

    23. Re:Separate SVN deploys by Anonymous Coward · · Score: 0

      You also cannot coordinate Git with your IDE.

      Not sure what you mean by coordinate, but Komodo IDE handles source control on git repositories fine.

    24. Re:Separate SVN deploys by GPLHost-Thomas · · Score: 1

      I was surprised when I googled for it. It seems to me that 'viewgit' is the same as 'gitweb' that we use. Is it that the project got renamed? Is it a fork? Please let me know.

    25. Re:Separate SVN deploys by GPLHost-Thomas · · Score: 1

      What do you mean here exactly? That there's no windows-like click-click type of GUI for Git? Well, do you really need that? For what reason exactly? Also, ever thought about the fact that only an ssh account is enough to manage a Git repo?

    26. Re:Separate SVN deploys by Jack9 · · Score: 1

      Oh, dear. "We trust the people we work with" to prevent people reading the unencrypted passwords in $HOME/.svn/auth/. Yes that trick works really well for root owned system configuration files. No one would _ever_ steal those or modify them behind your back, even when they put their write-authorized passwords in their NFS shared home directories, even when those passwords are also used for email and sudo, and even when those passwords can be used to alter root-owned system configuration files.

      Huh? $HOME/.svn/auth/ Root owned system configuration files? I'd like some explanation as it looks like nonsense to me, when you had ample space to explain it and chose to pick random sentences to illustrate your own specific gripe that doesn't look like anything scary to me.

      even when they put their write-authorized passwords in their NFS shared home directories, even when those passwords are also used for email and sudo, and even when those passwords can be used to alter root-owned system configuration files.

      There's pragmatism and paranoia. For such a shop (or larger, until you have an independent staff to do audits) there's no reason for me to write out "you should make sure all your passwords differ and are secure". You can't hand-hold security. This is about environment management and there are many strategies other than "you have to choose an app with rigorous security support". That's just throwing out the baby with the bathwater because you know water can erode things.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    27. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      Please excuse my lack of clarity: I assumed from your support of Subversion that you were actually familiar with how it works on UNIX and Linux. Their subversion clients, by default, store all passwords in clear text in repository specific text files in the user's hoome directory. I mistyped the directory name: it stores them in $HOME/.subversion/auth/. This is entirely irrelevant to the protocol used: if svn+ssh is used, HTTP, or HTTPS, as long as the access is password based, it stores them, unless such storage is turned off in $HOME/.subversion/config or if you use a recent version of Subversion and specifically answer "no" to the question it asks before storing the password.

      This means that anyone with access to your backup tapes or your home directory has access to any and all Subversion passwords you've ever used and stored, even ancient ones, even ones to other sites not part of your local network. If you couple this with the use of common passwords for both user logins and Subversion access, which may be forbidden but which can be nightmarish to support, you have complete access to that person's account. If you couple that with "sudo" access, as is common for non-administrative users in development or desktop environments, you have access to root accounts. If coupled with typical NFS home directory access, you have a complete disaster just waiting for anyone with a "live CD" to come in and shred your network.

      That said, the idea that a small or large shop shouldn't bother to have a security policy until they can afford auditors is both insane, and not my point. The point was that the _admins_ were either unaware of the widely publicized issue, as you apparently were, or were actively blocked by their management from instituting the basic step of switching to svn+ssh and the very modest amount of time taken to stop storing passwords in cleartext.

      There is simply no excuse for that level of carelessness. Whether you "trust the people you work with", any malicious or merely curious cracker can invade, manipulate, steal from and possibly destroy your systems if the people who follow these sorts of policy are like those who refuse to put down their cell phones in traffic. They cause accidents for themselves and for anyone nearby who gets caught in the pile-up.

    28. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      viewgit seems to be a fork from viewvc. I've not dived into its history, but it's a very useful tool, much like viewvc is a very useful tool for browsing Subversion and CVS repositories without installing a client.

    29. Re:Separate SVN deploys by Anonymous Coward · · Score: 0

      Dude, don't be a n00b at least google it... http://trac-hacks.org/wiki/TracGitPlugin

    30. Re:Separate SVN deploys by jumpfroggy · · Score: 1

      nahdude's system sounds great... automate all the day-to-day sys admin into a GUI that devs can use.

      I use something simpler, a homegrown remote-scripting system like capistrano but in python. I think a web based complex system would be much better, but it's hard to justify for smaller projects (or budgets). However, it's very nice to setup remote scripting. You can do pretty much anything remotely that you can do locally (ie. on each server), but the benefit of having it all centralized makes things easier.

      I have a script on my dev machine that updates my dev server with the latest code, migrates the DB, and restarts apache. I have similar scripts for the testing and production servers. I also have a script that exports the DB from the production server and imports it into my dev machine for me to play with. Having these tasks automated is very nice, since all these utilities can be kept in source control for each developer to be able to use. They speed up simple tasks and lower the barrier of entry. When updating the dev server or getting a copy of the live DB is a single-click deal, you're more likely to use it.

      For more in-depth server admin, a more complex solution should be considered. But in the OP's post, it seems like the target is simplifying daily server-admin tasks for web dev's, and a remote scripting solution might be a low-effort improvement.

      Or do the same thing but add a web gui and get a neat system like nahdude's. I wouldn't mind having that... but it wouldn't really gain me much over my current command-line system.

    31. Re:Separate SVN deploys by Jack9 · · Score: 1

      Please excuse my lack of clarity: I assumed from your support of Subversion that you were actually familiar with how it works on UNIX and Linux. Their subversion clients, by default, store all passwords in clear text in repository specific text files in the user's home directory.

      This is not "how SVN works on *nix". There are lots of clients that have varying levels of reliability and security. That's an svn client problem (I've never met anyone who uses the SVN stock CLI client for lots of reasons). I can just as well say that Oracle is insecure because I use some trash app that stores my passwords locally in plaintext. Not a reason not to use svn, but a good warning that the client is insecure.

      that said, the idea that a small or large shop shouldn't bother to have a security policy until they can afford auditors is both insane, and not my point.

      I didn't say that. I did say "there's no reason for me to write out" in response to "even when they put their write-authorized passwords in their NFS shared home directories". It's assumed that an admin understands security basics, in my support of SVN as a deployment tool. I apologize for typing that retarded statement.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    32. Re:Separate SVN deploys by Anonymous Coward · · Score: 0

      with git, developers have a local copy of the repository which means that a stolen laptop comes with complete revision history).

      It's worse than that, because it also exposes your source code, not just history...

      Don't make me laugh.

    33. Re:Separate SVN deploys by TheRaven64 · · Score: 1

      I've never met anyone who uses the SVN stock CLI client for lots of reasons

      I do, and I've not had problems with it. Mind you, all of the svn servers I use are configured to use either svn:// or http:/// with not authentication (read-only) or use svn+ssh:// and delegate authentication to ssh. Not sure why you'd want to set it up any other way. With GNA there's even a nice web interface for users to upload their public keys, so the server never knows the password.

      --
      I am TheRaven on Soylent News
    34. Re:Separate SVN deploys by TheRaven64 · · Score: 1

      You're correct. svn+ssh doesn't store passwords. But it's the least supported, least documented, and most difficult way to set up Subversion

      Wait... what? svnadmin create... and then you're done. As long as your users have accounts on the machine, it just works. No extra configuration required. Setting up an svn+ssh repository takes about five seconds. I use it for my own private repositories and also for open source projects (hosted on GNA, which has a simple-to-use web interface for uploading your ssh public keys, which is part of Savannah [GPL] if you want to use it).

      Please stop attacking a straw man. Almost every svn repository I have ever used that requires authentication has been using ssh+svn. It is well documented, easy to configure, and works well.

      --
      I am TheRaven on Soylent News
    35. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      Oh, no. Oh, dear god, no. You're giving all your svn+ssh users shell accounts on your Subversion server, givin them all write access to the full contents of your Subversion server, and _you expect this to be secure_? You do realize that if _any_ of them don't bother to use SSH keys, they're storing their shell account passwords in $HOME/.subversion/auth on any UNIX or Linux client machine they use, correct? And that they're vulnerable to umask problems of the creator of the subversion repository not granting them write privileges, without additional 'chmod' steps, and that setting universal write access means that anyone with shell access can deliberately or accidentally modify anything in the repository, right?

      You are right in the "we trust everyone we work with" world, and it's incredibly dangerous in security and support terms.

    36. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      You're making a reasonable assumption about admins, but one which in my observation is usually mistaken. If you look at the notes by 'TheRaven64, you see someone who apparently has either no klnowledge about how to protect their repository from random user access, or no desire to do so. The result is a security nightmare, and it's far too common in far too many environments.

      There are some useful clients, such as the Gnome 'wallet', for storing the passwords more safely. But But you can't enforce the use of this, and it becomes increasingly likely as a site grows that some fool will store their passwords in $HOME/.subversion/auth because they use the built-in command-line clients which are _required_ for those wallets to work. And the original thread was for unattended system configuration deployment.

      Even if such system configuration deployment is done via read-only HTTP access, where is the minimum configuration for this documented for Subversion?

    37. Re:Separate SVN deploys by TheRaven64 · · Score: 1

      Subversion users are in a login group that doesn't permit password login (only via SSH keys) and is only allowed to run the svn binary. See how it works on GNA.org. The same ssh key is also used for login access to some of their other machines, for example the one that hosts the downloads directory for the project (so you can sftp files there and then rename / move / delete them from a shell if you need to).

      I'm assuming that you realise that ssh has the ability to limit the programs people can run and what authentication options they are allowed, but if you didn't then you should probably learn something about the tools that you are spending so much effort criticising.

      Oh, and the svn repository doesn't need to be writeable by the users. The repository needs to be writeable by the svn binary. You can make this owned by the svn user, make the repositories only accessible to this user, and make the program setuid and only executable by people in the svn group.

      Please learn the basics of UNIX security before you start criticising tools that use it.

      --
      I am TheRaven on Soylent News
    38. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      So GNA, in fact, is an off-site repository, not an in-house service? That's completely unsuitable, for fairly obvious security and availability reasons, for an in-house development and testing environment management approach. Building up that 'login group' and the tools to manage accounts for Subversion has no commonly available toolkit: it's all hand-done by different hosting sites.

      Yes, I'm very familiar with SSH's authorized_keys options to restrict operations. It's useful: but it's not well supported for Subversion. The git community has a tool called 'gitosis' for just such key management, and a dedicated shell for such access: this is a much better approach than the svn approach, snce you don't have to build your own mangement tools yourself.

      The potential adventures of making the svn binary suid, and the security adventures of trying to figure out which bets of a new Subversion repository need to be writable by that user and which should have access blocked, should be considered a fascinating adventure in programming. Making system programs suid is _not_ something that should be done casually.

    39. Re:Separate SVN deploys by Foofoobar · · Score: 1

      Nope. There is of course. I said it is missing tools. I listed one such tool (mod_dav_svn) as an example which is used by multiple resources and is pined over by Git developers. I listed how it failed to integrate with Trac and IDE's. Git still is missing alot of tools and resources that make it useful to developers and more able to compete in a development environment.

      It can be better as a version control system but without the support tools in place, it's just another neat toy.

      --
      This is my sig. There are many like it but this one is mine.
    40. Re:Separate SVN deploys by TheRaven64 · · Score: 1

      So GNA, in fact, is an off-site repository, not an in-house service?

      Yes, it's an example of a system that is set up securely using svn+ssh. In the case of GNA, it's for hosting open source projects, but the Savanah system that they use for managing it all is open source. I use similar techniques on my own repositories but, obviously, I can't point you at those and tell you to take a look at how they work, while I can point you at GNA because it's a public service that anyone can use.

      That's completely unsuitable, for fairly obvious security and availability reasons, for an in-house development and testing environment management approach.

      You really love attacking straw men, don't you?

      Making system programs suid is _not_ something that should be done casually.

      Making programs setuid is fine. Making root-owned programs setuid is more of a problem, but that wasn't what I was suggesting.

      --
      I am TheRaven on Soylent News
    41. Re:Separate SVN deploys by Anonymous Coward · · Score: 0

      If you believe in "in-place repair", clearly you don't believe in "testing" and having separate environments. So, your opinion isn't relevant.

    42. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      Oh, dear. Let's try this carefully.

      GNA's system for handling Subversion access is unavailable to the Subversion community. It' sinhouse, and as near as I can tell, unpublished. So it's not useful for your own repository. A development and production system configuration tool shold be able to handle system-specific setings that are internal only. This may include SSH keys, password files, and unencrypted passwords (particularly for HTTPS and MySQL passwords, but for other features as well.) That means that GNA's apparently very useful system is unsuitable for the oritinal poster's development environment, and for any other environment, unless you want to go to quite a bit of extra work to encrypt such configuration handling for off-site storage. But encrypting it creates other problems, such as difficulties doing Subversion 'diff' commands.

      Making programs suid is an _old_ technique, and it's historically very dangerous. It's far more dangerous if the suid program is suid root, true, but without a very careful code review, neither you nor I can be sure what other consequences of making Subversion tools suid might occur. It is therefore dangerous and unsuitable for a production environment.

      For example, a few moments of thought already reveals a booby trap: checking out files with it could make them owned by the shared Subversion user, not the actual user. If the Subversion server itself is checking out its own configuration files, for this instance, setup files will suddenly be checked out as owned by 'svn', not 'root'. That means that any other user on the Subversion server, with the suid binary, could check out and _overwrite_ those system configuration files.

    43. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      So, that's not just "svnadmin create" is it? You've left out of your message all the extra hand-created work to put all the users in a particular login group: since your setup is in-house, there is no opportunity to review it for other security issues or dangers. Please do not tell a nice "n00b" asking for sensible advice such an approach and leave out these very important parts.

      And besides, this is normally done by using a single Subversion user account, not a set of accounts, and storing the SSH public keys in that user's "authorized_keys" file, with the svnserve command in the authorized_keys using the "--tunnel-user=[user]" option to get the Subversion changes attributed to the correct user. Yes, I've been through this before in a number of environments. This is workable, but pesky to set up the first time and to maintain as your list of users grows.

      Now, git does this better. It provides and uses a restricted shell for the shared "git" user account, and there is a reasonably effective tool precisely for managing such keys called gitosis. I recommend it for people tired of writing the missing components for Subversion management.

    44. Re:Separate SVN deploys by GPLHost-Thomas · · Score: 1

      Seems to me, after reading this, that you never used Git. It's all but a toy. In fact, after using it for 2 years, I think that CVS and SVN are the toys here. Just think about the fact that both CVS and SVN are unable to manage properly such a simple thing as a Unix right, and you get the whole picture. Even if there was only the command line tool for Git, it would still be light-years ahead of SVN. The only SVC that you can compare it (in the free software world) is mercurial. I would NEVER return back to CVS. Are you still using RCS or what???

    45. Re:Separate SVN deploys by nahdude812 · · Score: 1

      I don't want to speak as an authority because it's been a long time since I did svn+ssh setup; but I don't believe there is svnserve involved in svn+ssh:// like there is in svn://. It's my understanding that you could use a box which has no svn software installed on it as long as it has a correctly formatted repository and an ssh server. User access is controlled not through svn's built-in authz file, but via filesystem permissions and user accounts on that machine.

      I might be wrong; as I mentioned, it's been a while - we use mod_dav_svn on Apache - but what you're describing differs from how I remember it.

      Anyway, it's a bit of a tangent.

      The legal consequences come in the form of corporate espionage. It's a very real problem that is rarely talked about at large. We talk about it a lot where I am because we have experienced it first hand. Although it's true that there's value in being able to prove when and why a change was made, and by whom; this wasn't what I was speaking about (and you're right, svnadmin commands mean that if you have administrative access to the repository, you can make it look like whatever you like).

      Instead I meant to talk about being able to prove that my company developed a technology, and not a competitor who shows up on the scene with an identical offering (same code and everything). If we can produce revision history including bug fixes, feature additions, etc, while our competitor can only produce a single build and possibly changes after the date they illicitly acquired the code base, then we have the legal recourse necessary to shut that down.

      If they steal a laptop with a SVN working copy on it, they get that version of the code but nothing else. If they steal a laptop with a git repository on it, they have all the same ability to produce complete revision history as we do. They also potentially get access to in-progress projects that the owner of the stolen laptop wasn't even working on.

      Laptops can be legitimately stolen (guy's bag gets switched at a coffee shop he frequents every morning), or they could be stolen through espionage (we'll give you $30,000 if you "lose" your laptop in our favor).

      With SVN we have the access logs on our server that shows who checked out what working copy and when. If someone wants to steal complete revision history and they're not an SVN admin, they're going to leave fingerprints all over that operation (one project is about 12,000 files and about 15,000 revisions; getting complete revision history for this is going to leave a very easy to find access pattern).

      Don't get me wrong; git is fantastic, and certainly has many useful functions. The fact that you have a local copy of the complete repository (aside from disk space) is fantastic for offline work. The fact that it's distributed means that you don't have a single point of failure source control server, etc. There are just a handful of design decisions which make it a non-option for us.

      Also, regarding authenticity of release tags; I'm not sure I get this point. We generate a tag (eg /tags/release_4.1.7e) at revision 15489; that then is the build number of the release. Unless you're an svnadmin, there's no way you could ever forge this; even if you deleted and recreated /tags/release_4.1.7e pointing at a different version of the code, the build number would still be wrong (as would the date), and the svn log would show who was trying to falsify a build. In addition for us, a specific service account creates the build and the release tag; so it would also have the wrong user ID. Users don't have access to tag in this space (in fact, we use tags for more than just releases, so we break from convention by making /tags/releases/2009/release_4.1.7e - with nearly weekly minor releases and monthly feature releases, this just makes it a bit easier to drill in), so again unless you're an svnadmin, you don't even have the capacity to try to forge a release no matter how obvious it would have been.

    46. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      Your points are quite cogent: please allow me to add 3 details.

      The 'svnserve -t' is usually added at the start of the authorized_keys: it's described in the Subversion FAQ at http://subversion.tigris.org/faq.html. Of course, that FAQ fails to set the '--tunnel-user=[username]' to get the logs recorded correctly. This kind of ignoring of necessary details is rampant among Subversion administrators and users, as we saw earlier with someone claiming 'svnadmin create' is all you need, and completely ignoring the handling of SSH keys.

      If any user has write access to the bare files of the Subversion repository, they can modify _anything_. Logs, revision history, or files can all be modified with enough work. Logs, in particular, are easily modified by modifying the 'pre-revprop-change' hook script to enable easy modifications of the 'svn:log' property for a particular revision. This is potentially very nasty, but also helpful for correcting typos in logs or adding details to them after the fact.

      Controlling the 'tags' space the way you describe is useful, but is unauthenticated. If I can edit the bare repository, I can modify the contents of your tags, pretty much without your knowledge unless you already have a checked out copy. Git has a very helpful option for GPG signing tags: this helps assure that the contents of a tag are, in fact, approved for release and helps prevent various man-in-the-middle attacks or deceitfully presented tags from being used to replace authorized code.

    47. Re:Separate SVN deploys by Jack9 · · Score: 1
      Even if such system configuration deployment is done via read-only HTTP access, where is the minimum configuration for this documented for Subversion?


      If you deploy via http, there is a webserver component (per web path security policy) that should use credentials (user from svn-auth-file, app specific user file) through the svn-acl (specific user associations to app groups, read, write permissions).

      example Apache component:
      <blockquote>
      <Location /myrepo >
          DAV svn
          SVNPath /repositories/myrepo

          AuthType Basic
          AuthName "My Subversion repository"
          AuthUserFile /etc/svn-auth-file

          Require valid-user

          AuthzSVNAccessFile /etc/svn-acl
      </Location>
      </blockquote>

      example svn-acl:
      <blockquote>
      [groups]
      team1 = user1
      team2 = user2

      [myrepo:/]
      @team1 = r
      user2 = rw
      </blockquote>

      example svn-auth-file:
      <blockquote>
      user1:$apr1$923.....$SbWzZcrQeCMfiqCcS6U6S0
      user2:$bz2ff112.....$HedeEqWWR3SQ5NfeS343SS
      </blockquote>

      This is a basic setup (paths vary).
      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    48. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      This is not the "minimum" configuration. That's yet another authentication layer, with yet another set of passwords and rather poorly documented group access setttings.

      The "minimum" configuration would be read-only, no password access, much like that provided by Sourceforge the Tigris Subversion repository itself. This is not directly documented in the Subversion documentation or FAQ, anywhere.

    49. Re:Separate SVN deploys by nahdude812 · · Score: 1

      I'll agree, although I don't have much experience with svn+ssh; it is easy to misconfigure it in a way that would allow data forging (or perhaps more aptly put, it's hard to configure it in a way that doesn't). This is in part why we went with mod_dav_svn as our SVN protocol. This does have the concern you voiced earlier about storing passwords in plain text on the client machine.

      I haven't done it, but it's supposedly possible to configure DAV SVN to utilize client certificates for authentication (TLS auth among others). Your communications would be encrypted, and only people who have access to a user's personal certificate would be able to pretend to be that user. It's discussed at http://svnbook.red-bean.com/en/1.4/svn.serverconfig.httpd.html#svn.serverconfig.httpd.authn.sslcerts . Then your SVN server has a CA it trusts, as do your SVN clients. The client cert can even itself be password protected if you want so that even if the client cert gets intercepted it still can't be used without a password (this of course defeats saving your password so you don't have to retype it each time you do a svn operation).

      This is about the highest order security and authentication available; it's all OpenSSL stuff. So it all depends on what level of security is appropriate.

      I get your point about not being able to trust the repository if developers have unlimited access to it. That's not the case for us; only I and one other person have that kind of access to the repository, but he or I could do it. GPG signing tags is an interesting idea. What is the unique data that is signed (to protect against a replay)? I may borrow that idea and have our build system GPG sign an MD5 manifest when it creates the release tag. Even if someone had svnadmin access to be able to forge entries in the repository; they wouldn't have the build system's GPG key.

      Authenticity of the code isn't as important to us as being able to prove ownership of the code, so although I respect that what you're describing is valuable to some people, I'm not sure how much benefit it brings us (but like I said, if I can cryptographically sign a hash manifest, might as well).

      FWIW, thanks for the conversation, this has been enjoyable.

    50. Re:Separate SVN deploys by Jack9 · · Score: 1

      The "minimum" configuration would be read-only, no password access, much like that provided by Sourceforge the Tigris Subversion repository itself.

      I'm not sure what you're getting at. Unless you know it's implemented differently, the configs I posted can mimic that behavior.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    51. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      No, the configs you posted do not allow anonymous access. They require authorized access via a password file (which the Subversion documentation does not mention how to manage), and an access configuration file (which you designate as svn-acl) which the administrator for Subversion has to figure out where to put, how to manage for multiple repositories, and other handwaving "just read the manual" steps which the manual does not, in fact, explain.

    52. Re:Separate SVN deploys by Antique+Geekmeister · · Score: 1

      Unattended access, and the requisite password saving, is an old and intriguing problem. It's one I've seen mishandled so many times throughout my career that I get somewhat upset to see people repeat it, and may sound like a Cassandra when I try to warn more experienced or aware people of what is consistently happening behind their backs in the real world. It's frightening in security terms.

      Authentication of code is another old issue: I'd add checksums to your manifest to GPG sign, if I were in your situation. You clearly understand the usefulness of GPG authentication of code. I've not taken apart how git signs it, but git uses identifiers and checksums for the repositories in fascinating ways: I assume the checksum for the repository and its contents and its history up to that point are used to provide a key, which is GPG signed, associated with the contents of that particular tag.

    53. Re:Separate SVN deploys by Jack9 · · Score: 1

      the configs I posted CAN mimic that behavior.

      The docs are poor, but the triumvirate can achieve it...just from the apache config (remove the http auth). Lots of people do, and will continue to, use SVN to deploy because it just works and it's good experience that's transferable. I give up on trying to figure out what your point is.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    54. Re:Separate SVN deploys by ZerdZerd · · Score: 1

      When the systems you're working on have certain sensitivities (legal, patent, security, etc), this can be a major weakness.

      As if losing the repository history is so more dangerous than losing the current version...
      If that is a concern, you should encrypt your repository, or subdivide it in sensitive and insensitive parts.

      --
      I'm not insane! My mother had me tested.
    55. Re:Separate SVN deploys by Foofoobar · · Score: 1

      Seems I'm the one marked +5 insightful TWICE while you are treading water. I guess the community realizes I know what I'm talking about and you are still trying to grasp what the topic of the thread.

      --
      This is my sig. There are many like it but this one is mine.
    56. Re:Separate SVN deploys by nahdude812 · · Score: 1

      You'll find in the followup conversation that I describe why losing complete revision history is a big deal. Specifically WRT being able to prove ownership of code in the event of code theft.

    57. Re:Separate SVN deploys by The+Original+Yama · · Score: 1

      <quote><p>I know where I work, I can't go into a lot of details, but I can say that it would be unwise of us to use a source control system where each laptop contained revision history on it.</p></quote>

      We use encrypted hard drives on all of our laptops. It's damn easy to set up from the Fedora installer.

  4. happy with phing by tthomas48 · · Score: 2, Informative

    There's really only so much you can do generically. I'm really happy with phing. I use the dbdeploy task to keep my databases in a similar state. I build on a local machine, deploy via ssh and then migrate the database.

    I'd suggest that rather than checkout at each level you create a continous integration machine using something like cruise control or bamboo, then push out build tarballs and migrate the database.

    1. Re:happy with phing by eratosthene · · Score: 1

      I second this approach. My company has used phing quite successfully to manage both the staging and production instances of our code.

      --
      -- There, everybody likes a gorilla.
    2. Re:happy with phing by Jaime2 · · Score: 1

      I can't agree more, especially for data. I take great care in source controlling database and I would never dream of auto-building a deployment package.

      Myself and all of the developers don't have access to the database schemas in the dev environment with our normal accounts. I have a SubVersion hook script that runs all checkins to the database schema files on the dev DB. If the script errors, the commit is rejected. This guarantees that the only way to get changes into the database is to put those changes in source control. Even with this level of control, every once in a while someone checks in a drop-create script on a table, or does similar nonsense. Of course we have to recover the database from a backup, but the script is now forever in source control. If I blindly turned the commits into a deployment script, there would be a lot of these things. So, I have a custom tool that allows me to find all of the changed files in the database schema code in a range of revisions, allows me to choose and reorder them, and it generates a deployment script. Sometimes the script needs hand tweaking.

      The process goes like this --
      1. Work on dev server, get all unit tests to pass.
      2. Create deployment script. Deploy to test server, do unit tests again.
      3. Give deployment script (and app changes) to QA. They run them on the Stage server and do user acceptance testing.
      4. If all is well, both the final code and the deployment process have been verified, roll out to production.

      I'm also a big fan of using test data in test, not production data (for new development, bug fixing often requires production data). I can put far more taxing scenarios in than the users ever will. Production data rarely tests the edge cases. I also have an issue in my production environment that all work begun on a given day is closed out by the end of the day. So, my nightly backups rarely have any variety of data in them.

      I don't see any value in automating the process any farther, but I do automate the heck out of compiled code and content deployment. The best tool depends on the environment. I currently use WiX to package up static deployables as MSI packages as I do mostly Windows development.

  5. global config by Anonymous Coward · · Score: 0

    I use a config file that sets a global variable that all scripts reference to determine what site (dev/test/prod) the code is running on. I also use CVS and RPM to handle code management and pushes.

  6. Have the hosts email problems to an email account by denis-The-menace · · Score: 1

    When I did this years ago, each server would run scripts to read logs, etc and if they found something bad they would email me with what they found.

    Simple and scalable

    --
    Obama's legacy: (N)othing (S)ecure (A)nywhere and (T)error (S)imulation (A)dministration
  7. puppet by Anonymous Coward · · Score: 0

    Not sure if this is what you're looking for, but a common solution is a configuration management tool.

    Try puppet http://reductivelabs.com/products/puppet
    It's simple, fast, and written in ruby

  8. Duct tape by Anonymous Coward · · Score: 0

    We do it the unix way: duct tape svn, sqsh, rsync, and sendmail together with shell scripts. Reconciliation of what went where can be a little hairy, documentation is sparse, and some safeguards I'd like to see are not there, but it's a good base. I'm actually taking a break from documenting the deployment system at this very moment...

  9. go virtual by Anonymous Coward · · Score: 1, Interesting

    Have a perfect virtual machine image ready. You can bring up a new server in about 5 minutes.

    1. Re:go virtual by palegray.net · · Score: 2, Interesting
      I was going to suggest using virtualized environments as well, but that still leaves the admin with the task of automating the management of all his difference systems. Frankly, I've always approached this the way he's already doing it: a set of scripts that manage things.

      I'm not aware of any systems that do all this for you while still being flexible enough to accommodate lots of unique requirements. The script-based systems I've employed over the years all followed some basic rules:
      • Increment the version number and make a new DNS entry for each committed changeset.
      • Only allow migrations to "test" from "dev", and from "test" to "prod".
      • Allow automatic reverting to a previous version in test or prod, but require manual merging of changesets from later revisions to put them back into the older upper stage.

      I've successfully managed hundreds of sites and web apps in this manner, with minimal fuss. Virtualization adds in extra complexity in some respects, but makes other things easier as each VPS can have its own customized environment. As long as everything in dev, test, and prod uses the same base VPS environment, problems should be minimal.

    2. Re:go virtual by Nazlfrag · · Score: 1

      Yep, the poor sucker is going to explore all sorts of fun options like barely functional UIs, complex VM and repository setups before going back to the simple yet elegant command line he's so keen to get away from.

  10. Final Solution by Javarufus · · Score: 0

    Put all of your application workspaces in an easily escapable situation involving an overly elaborate and exotic death.

    But, if in doubt, add laser beams.

  11. Re:Have the hosts email problems to an email accou by BitZtream · · Score: 3, Informative

    Never heard of a loghost eh?

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  12. I thought... by pyrr · · Score: 1
    ...testing was what the production environment was for. Nothing like having dozens of end users flooding the help desk with calls because someone messed with a server or an active database. They take care of all that pesky and tedious testing for you!

    /sarcasm (in case you couldn't tell)

  13. Start an OSS Project by royallthefourth · · Score: 1

    If there's not a project to fit your bill, develop it internally and release it as an OSS project. It'll add some nice OSS experience to your resume and also add visibility to your employer. If it succeeds, it'll be a big deal for your company. If it doesn't succeed, at least you got the project done. Sounds like everyone wins.

    I've never actually done this (my employer balks at the suggestion), but I'd love to have that sort of opportunity.

    1. Re:Start an OSS Project by Anonymous Coward · · Score: 1, Insightful

      Or... if you want a solution that's actually ever completed: go with some of the other suggestions ;)

  14. Acronym hell... by Anonymous Coward · · Score: 1, Funny

    I am a n00b system administrator for a small web development company that builds and hosts OSS CMSes on a few LAMP servers (mostly Drupal). I've written a few scripts that check out dev/test/production environments from our repository, so web developers can access the site they're working on from a URL (ex: site1.developer.example.com). Developers also get FTP access and MySQL access (through phpMyAdmin). Additional scripts check in files to the repository and move files/DBs [...]

    If you have a WYSIWYG front end done DIY style then you need to CYA and RTFM, simply because the newer style AJAX IDEs dont support IDEA. Make sure that you mind your P's and Q's, or the FBI will make you MIA thanks to the P.A.T.R.I.O.T. act. It's pretty much a PEBKAC issue. Oh, did I mention that you should leverage as many TLA's as possible?

    1. Re:Acronym hell... by Anonymous Coward · · Score: 0

      To bad he only used 5 TLDs for the 8 you highlighted (and one of those is part of a larger name 'phpMyAdmin', but I gave credit for it).

      Don't fret, 5/8 isn't bad!

  15. SVN etc. by djkitsch · · Score: 2, Informative
    My company (for upwards of 10 years) has been using:
    • An SVN (Subversion) server on our dev box
    • Developer or group specific subdomains in IIS / Apache on the dev server, to which working copies are checked-out
    • Deployment to live servers via SVN checkout when the time comes
    • Global variables to check which server the app's running on, and to switch between DB connection strings etc.

    Still not figured out an efficient way to version MSSQL and MySQL databases using OSS, though. Open to suggestions!

    --
    sig:- (wit >= sarcasm)
    1. Re:SVN etc. by Anonymous Coward · · Score: 0

      version MSSQL and MySQL databases using OSS

      mysqldump, mysqlimport, hg or git, and a couple short bash scripts

    2. Re:SVN etc. by dhasenan · · Score: 1

      My company wrote a small project for this (not released in any form, though). It has a collection of SQL scripts identified by date (eg "2009-10-15 1415 Renamed Foo.Bar to Foo.Baz.sql") and a table with columns for script name and date applied. Any scripts it finds that aren't listed in that table, it applies in order according to the date in the script name.

      You should be able to hack this together in a day or so.

    3. Re:SVN etc. by Anonymous Coward · · Score: 0

      I've had decent results with Liquibase.

      "LiquiBase is an open source (LGPL), database-independent library for tracking, managing and applying database changes. It is built on a simple premise: All database changes (structure and data) are stored in an XML-based descriptive manner and checked into source control. "

      http://www.liquibase.org/

    4. Re:SVN etc. by Erskin · · Score: 2, Informative

      Deployment to live servers via SVN checkout when the time comes

      Side note: I humbly suggest (as someone else mentioned elsewhere) you use export instead of checkout for the live deployments.

      --

      Erskin
      geek.

    5. Re:SVN etc. by Anonymous Coward · · Score: 0

      # Deployment to live servers via SVN checkout when the time comes

      Wait, checkout, are you serious? Are the .svn folders on the server? If they are make sure that the webserver does not serve the files, because otherwise everyone can see your source code!

    6. Re:SVN etc. by Anonymous Coward · · Score: 0

      Versioning databases, a hack:

      We write all our database changes in uniquely numbered scripts with useful, long names. We have a single way to execute them through a piece of code that logs the name to the database we're updating.

      This way we avoid double runs and can always see exactly which version of the database we're running by comparing up date scripts to the source repository whether on dev, test or live.

    7. Re:SVN etc. by AdamPiotrZochowski · · Score: 1

      svn export is a terrible way to update live site.

      - slow link or large website: svn export will take a long time, your users will love you
      - certain apps will kill user sessions on code reload. Specifically I am looking at you Microsoft, with your global.asa / global.asx (out of open source PHP seems best. Not sure how Django/RoR enjoy code changes to pages that are already running)

      Best setup I am aware of:

      Point your website to something like ../[website]/live
      Checkout your website to ../[website]/checkout
      run remote svn udpate: ssh [server] -p [port] -u [user] svn update ../[website]/checkout
      trick: you can force export from checked out folder
      run remote svn export: ssh [server] -p [port] -u [user] svn export ../[website]/checkout ../[website]/r[evision]
      note: you export to a new folder, that is marked explicitly as specific revision number
      symlink ../[website]/live into latest ../[website]/r[evision]
      trick: this way, if website gets broken, you change symlink to revert to a known stable version

      This is safe on bandwidth (svn checkout between servers), fast atomic upgrade on the server (since symlink is changed once export is completed).

    8. Re:SVN etc. by Erskin · · Score: 1

      All very valid caveats. My core point (which you also addresses) was that using a working copy instead of an export of the files puts tons of extra copies of your files and subversion management data under you don't need for web pages.

      I do love the atomicity of your method however, and the trick of exporting from a working copy made my day. Thanks!

      --

      Erskin
      geek.

  16. Leverage your issue tracking and cvs by dkh2 · · Score: 3, Interesting

    If you're able to script deployments from a configuration management host you can script against your CVS (SVN, SourceSafe, whatever-you're-using).

    There are a lot of ways to automate the management of what file version is in each environment but a smart choice is to tie things to an issue tracking system. My company uses MKS (http://mks.com) but BugTracker or BugZilla will do just as well.

    Your scripted interface can check-out/export the specified version from controlled source and FTP/SFTP/XCOPY/whatever to the specified destination environment. For issue-tracker backed systems you can even have this processes driven by issue-id to automatically select the correct version based on issues to be elevated. Additionally, the closing task for the elevation process can then update the issue tracking system as needed.

    Many issue tracking systems will allow you to integrate your source management and deployment management tools. It's a beautiful thing when you get it set up.

    --
    My office has been taken over by iPod people.
  17. Ant. by Anonymous Coward · · Score: 0

    Ant.

  18. Hilarity by eln · · Score: 1, Interesting

    Another option is to completely rewrite the scripts (or hire someone to do it for me), but I would much rather use something OSS so I can give back to the community. How have fellow slashdotters managed this process, what systems/scripts have you used, and what advice do you have?"

    I'm sure you have a legitimate problem, and there are lots of ways to solve it, but this line just cracks me up. You COULD write it yourself or pay someone but if you use someone else's Open Source work (note: nothing is said about contributing to an OSS project, just using it) you'd be "giving back to the community.

    Translation: I have a problem, and I don't want to spend any of my own time or money to solve it, so I'm going to try and butter up the people on Slashdot in hope of taking advantage of the free labor force that is the OSS community.

    Simply using Open Source software is not giving back to the community...using open source software is what gives you the moral imperative to give back to the community, which you can do through contributing code, documentation, beta testing, providing support on the mailing lists, or whatever.

    1. Re:Hilarity by plague3106 · · Score: 1

      Um, the OSS community IS a free labor force.

    2. Re:Hilarity by Anonymous Coward · · Score: 0

      When you use OSS for a serious project, you will find bugs. The best way to deal with those bugs is to report them and share any workaround you may have found. That is already giving back to the community, and it's done out of entirely selfish motives, to make it work in your concrete project.

  19. I manage them with an Iron Fist Of Death by wiredog · · Score: 1

    Or I would if I were in management. For some reason they won't promote me here.

  20. Most important thing in my book by BlueBoxSW.com · · Score: 5, Interesting

    Most important thing is to treat your code and data separately.

    Code:

    Dev -> Test -> Production

    Data:

    Production -> Test -> Dev

    Many developers forget to test and develop with real and current data, allowing problems to slip further downstream than they should.

    And make sure you backup you Dev code and you Production Data.

    1. Re:Most important thing in my book by Anonymous Coward · · Score: 0

      Many developers forget to test and develop with real and current data, allowing problems to slip further downstream than they should.

      Some companies don't allow developers to test with real/production data. Production data may not belong to the company (e.g. cloud computing providers) so they have strict controls over who has access to the data.

    2. Re:Most important thing in my book by mcrbids · · Score: 1

      Dang. Out of mod points, so I'll reply.

      Parent covers an EXCELLENT point. We've gone to great lengths to replicate data from production to test/dev modes. We have scripts set up so that in just a few commands, we can replicate data from production to test/dev, and that do data checks to make sure that something stupid isn't done. (EG: copying a customer's data from test -> production and wiping out current data with something 2 weeks old, etc)

      In our case, each customer has their own database, and their own set of files. A single command sends it all, EG:

      production$ senddata.sh customer3 testserver;

      And that sends all the data for "customer3" to the test server, to a temp folder where it can be loaded as needed. This last bit is important, because often, when testing data, you screw things up and need to "start fresh" without having to wait another hour for the data to re-replicate over rsync. In order to keep things fast, all customers' data gets sent over to the test server nightly, and to the dev server weekly. (a la cron) By keeping the data off-site fresh, it takes some 8-12 hours to get all of our customers by rsync at night.

      testserver$ loaddata customer3;

      That loads the data for customer3 from the temp directory into the test server. We have similar interfaces for publishing scripts from our dev server to test and production servers. We do something similar for backups, which are off-site to a separate location, behind a strict firewall, mirrors across multiple drives. (no, not RAID, 3 actual separate copies on separate disks) We back up our entire SVN repo, all scripts, all databases, and all files for all customers offsite nightly.

      We have our test environment virtually identical to our production, only with fewer servers in the cluster. In this way, we have a "hot fail" server that has recent data at all times, and enough performance to do a meaningful job if we should somehow lose our primary production cluster.

      All 4 environments would have to be compromised before we lose meaningful amounts of data. We have a tested and continuously verified D/R server that doubles as our test environment. We use SVN in our dev environment so that we can all work together smoothly.

      All with virtually zero administration overhead after setup. It's amazing what you can do with bash, cron and a few PHP/perl scripts!

      --
      I have no problem with your religion until you decide it's reason to deprive others of the truth.
    3. Re:Most important thing in my book by Anonymous Coward · · Score: 1, Insightful

      And don't forget: it's DTAP:

        Development -> Test -> ACCEPT -> Production

        and vv.

    4. Re:Most important thing in my book by elnyka · · Score: 1

      Many developers forget to test and develop with real and current data, allowing problems to slip further downstream than they should.

      Some companies don't allow developers to test with real/production data. Production data may not belong to the company (e.g. cloud computing providers)

      Production data might not belong to the hosting company, but the developers that will test against it work for the client company. So, for a hosting company or a sysadmin, it is simply a matter of moving production data (belonging to the client company) from a production env (owned by the hosting company and leased to the client) into another environment (the test environment, owned by the hosting company, but leased to the client as well.)

      This would be different from the hosting company moving production data around for purposes other than backups or recoveries without approval from the client company that owns the data.

      so they have strict controls over who has access to the data.

      Nope, they might have strict controls over who has access to a production environment. That is, the only entity accessing production data in a production environment is a production app running on a production server using a specific mean (.ie. JDBC on port 1521 from machine A to machine B.) Nobody else, not even developers get access to it.

      But accessing production data moved at the client's request to a non-production server (done off-hours) that developers have access to according to the SLA, that's totally feasible, cloud or not.

      The only time where accessing production data is a concern is for things that fall under HIPAA (.ie. medical records.) Then and there, other restrictions apply, but these are business side restrictions (forced on a business by itself to comply with federal law), not hosting or data-ownership issues.

    5. Re:Most important thing in my book by elnyka · · Score: 1

      The only time where accessing production data is a concern is for things that fall under HIPAA

      (.ie. medical records.) Then and there, other restrictions apply, but these are business side restrictions (forced on a business by itself to comply with federal law), not hosting or data-ownership issues.

      I meant to say that the only time where accessing production data is with data subject to some sort of confidentiality agreements, security clearance, or data subject to privacy laws (such as medical records and HIPAA).

    6. Re:Most important thing in my book by zztong · · Score: 4, Insightful

      Testing with real data is not necessarily a good practice. Consider sensitive data, such as social security numbers. Auditors may ding your development practices for providing developers access to information they do not need. You need realistic data, not necessarily the real data. If you're bringing real data from prod back to test and dev, consider having something scrub the data.

    7. Re:Most important thing in my book by TaggartAleslayer · · Score: 1

      I often work on projects that involve sensitive data.

      Even in those circumstances, you need a realistic representation of live data. I've accomplished this in the past by obfuscation and approximation. If the live data grew by 50,000 records today, have a script populate your test environments with similar amounts of data during your nightly build. It doesn't matter if you're testing against Mr. Daffy Duck at 123 Anywhere St., Anytown, USA, as long as his information is an approximation to that of the real quacks in the system. If you aren't testing against realistic data, you're setting yourself up for major issues down the road.
       

    8. Re:Most important thing in my book by Anonymous Coward · · Score: 0

      Don't forget in some environments the production data cannot be given to developers, for legal, ethical or other reasons. Generating decent test data is a harder problem here.

      Also there's no guarantee your production data tests all edge cases, etc (yet). If you don't have decent actual test data that actually tests your code, you're sunk. You can't actually go into every customer account to see if your presentation code handles all the foreign characters for example.

      The production data will be useful for load and scale testing for processes that need to search or filter the entire dataset - but it'd be fairly easy to generate test data to the correct scale - and once you can generate it, you can generate bigger so you know how big you can get before you need a bigger server.

      Having said all that, I do often use the production data in my dev instance (in my application the data in question has no particular sensitivity and I have full access to the production instance anyway).

    9. Re:Most important thing in my book by Anonymous Coward · · Score: 0

      I'd have to contest the Data settings...

      Most SOX audits as well as customers demand that you NOT use live/real data for testing...
      Develop a tool that will *morph* live data to semi-mangled data, before using in test/dev... Or just write a tool to generate good / random data for dev and test...

    10. Re:Most important thing in my book by cjb110 · · Score: 1

      Cept when Data Protection laws/policy are properly enforced!

      Just had these come from high ups through to our dev team, they say 'no prod data in test', however they offer no alternatives or budget to overcome the massive limitation they've just placed upon us.
      So in order to keep functioning the rules will be the subject a few poor jokes, and then ignored.

      --
      ----- I refuse to have an argument with an unarmed person
    11. Re:Most important thing in my book by Anonymous Coward · · Score: 0

      Production data might not belong to the hosting company, but the developers that will test against it work for the client company.

      The problem is that the client company has no developers or testers and has no interest in hiring any. That's why they're using cloud software in the first place. So it's up to the hosting company to provide developers and testers for their software and these people aren't given access to production data because the client company wants to minimize the number of non-employees touching their data. Every client wants testing to be done without using their data.

  21. Puppet by philipborlin · · Score: 2, Informative

    If you are in the unix/linux world take a look at puppet. You provision out a set of nodes (allows node inheritance) and manage all your scripts, config files, etc from one central location (called the puppet master). Changes propagate to all servers that the change applied to automatically. It is built around keeping the configuration files in a versioned repository and is ready to use today.

  22. Tools, Practices and Standards by HogGeek · · Score: 5, Informative

    We utilize a number of tools depending on the site, but generally:

    Version Control (Subversion) for management of the code base (PHP, CSS, HTML, Ruby, PERL,...) - http://subversion.tigris.org/
    BCFG2 for management of the system(s) patches and configurations (Uses svn for managing the files) - http://trac.mcs.anl.gov/projects/bcfg2
    Capistrano/Webistrano for deployment (Webistrano is a nice GUI to capistrano - http://www.capify.org/ / http://labs.peritor.com/webistrano

    However, all of the tools above mean nothing without defining very good standards and practices for your organization. Only you and your organization can figure those out...

    1. Re:Tools, Practices and Standards by wayland · · Score: 1

      There are a number of aspects to setting this sort of thing up. Here's what I'd be looking at:

      1. Personally I recommend the tool called "puppet", especially making heavy use of the "augeas" module. cfengine is a traditional tool for this too. You may also want to use the tool "cobbler" with this. These tools between them would deal with deployment of new machines, and are especially useful for similar machine, as your dev/test/production machines are likely to be.

      2. Someone recommended using packaging; that would be my personal suggestion.

      3. People have been arguing SVN vs. Git. Use only one of these :).

      You'll notice that the breadth of argument has occurred because there are quite a number of areas in which various pieces of sysadmin software could be used, and you haven't been clear about what areas you need covered. I'd recommend a post that clarifies what you're already using in each of these areas.

      HTH,

    2. Re:Tools, Practices and Standards by Anonymous Coward · · Score: 0

      Capistrano/Webistrano for deployment (Webistrano is a nice GUI to capistrano - http://www.capify.org/ / http://labs.peritor.com/webistrano

      Webistrano is a *great* way to do this - I've used it for a while at our medium-sized webdev+hosting shop. It can even do DB moves between environments with the right Recipes (code snippets called at defined points in the workflow or by themselves). Check it out.

  23. build a self service virtual lab by Anonymous Coward · · Score: 0

    If you have some $$ off the shelf tools like vmware lab manager will kick some serious butt in this type of environment.

  24. Check out Springloops by Fortunato_NC · · Score: 3, Informative

    It's hosted Subversion, with a slick web interface that walks you through darn near everything. You can configure development / test / production servers that can be accessed via FTP or SFTP and deploy new builds to any of them with just a couple of clicks. It integrates with Basecamp for project management, and it is really cheap - it sounds like either their Garden or Field plans would meet your needs, and they're both under $50/month.

    Check them out here.

    Not affiliated with them in any way, other than as a satisfied customer.

    --
    Blogging Weight Loss, Distance Education, and more at verlin.com
    1. Re:Check out Springloops by sochdot · · Score: 1

      My team has been using Springloops for about a year now and I'm very happy with it. The ability to configure multiple servers and deploy any revision to any server at any time is really fab. You can also set autoupdate to any server on every commit.

      --
      If at first you don't succeed, destroy all evidence that you tried.
  25. Look at Capistrano, steal ideas from Rails by bokmann · · Score: 4, Informative

    Capistrano started life as a deployment tool for Ruby on Rails, but has grown into a useful general-purpose tool for managing multiple machines with multiple roles in multiple environments. It is absolutely the tool you will want to use for deploying a complex set of changes across one-to-several machines. You will want to keep code changes and database schema mods in sync, and this can help.

    Ruby on Rails has the concepts of development, test, and production baked into the default app framework, and people generally add a 'staging' environment to it as well. I'm sure the mention of any particular technology on slashdot will serve as flamebait - but putting that aside, look at the ideas here and steal them liberally.

    You can be uber cool and do it on the super-cheap if you use Amazon EC2 to build a clone of your server environment, deploy to it for staging/acceptance texting/etc, and then deploy into production. A few hours of a test environment that mimicks your production environment will cost you less than a cup of coffee.

    I have tried to set up staging environments on the same production hardware using apache's virtual hosts... and while this works really well for some things, other things (like an apache or apache module, or third party software upgrade) are impossible to test when staging and production are on the same box.

    1. Re:Look at Capistrano, steal ideas from Rails by Anonymous Coward · · Score: 0

      This is the best advice. I use Capistrano with Django and some PHP apps and it works like a dream. It's pretty easy to setup symbolic links to control different environments on deploy. Another option from the Ruby world is Vlad the Deployer, though I haven't used it as much.

    2. Re:Look at Capistrano, steal ideas from Rails by Anonymous Coward · · Score: 0

      Parent has some good ideas.

      h2. How to Manage Dev, Test, Pre-Production, Production and Disaster Recovery Environments.

      First, let's agree that you need most of these environments. You may be able to drop 1 of them and you may require even more to support multiple development environments for different product lines to be deployed 6 months apart. Ok? Ok.

      Next, let's agree that you have developers, Testers, QA and Production Support teams. These may overlap, but that wouldn't be a best practice. Developers should never be production support. There are many reasons this is a bad idea. See other articles for why that is.

      If you aren't doing custom development, dropping many of these environments may be possible without risking everything.

      Finally, let's assume you are the system administrator for all these environments
      and don't get overruled by the development teams. You CONTROL THE OS and DEPLOYMENT to all the systems that aren't Dev.

      h3. Maagement Best Practices
      # Use Virtual Machines for all these environments. There are many, many reasons why this is a good idea. See other blog posts for those reasons.
      # Never allow a developer root access on **any** of the systems.
      # Never allow a developer write access to any systems that aren't development. Don't let them quickly login to fix a tiny error. They need to provide deployment packages that deal with everything necessary.
      # Installations and upgrades need to be scripted and part of the development deliverables. If the installation and/or upgrade scripts don't work, then that entire build is broken. Send it back.
      # Automate server management using some kind of tool that builds a server from bare metal hardware to production ready. Only the data should be missing. Check out Puppet for doing this, but there are other alternatives.
      # Server configurations need to be configuration managed too, just like source code for developers is. You should be able to deploy the server config from last month or last year or 3 days ago.
      # Instrument each of the servers with performance monitoring tools. It could be a complex solution or something fairly simple like SysUsage.
      # Instrument specific process monitoring for the main processes on a server. Web server, DB server, and any specific applications.
      # Place alarming scripts/tools that verify applications are actually working - naganos is an option.
      # Use Distributed Version Control Systems, DVCS, for code deployment. Git and Bazaar are good choices. These allow branch and merge constantly without a big commitment to a specific branch required. Your development team may have a different tool in mind. You may use their tool, but be certain that the code to be deployed to a specific server is carefully matched.
      # Be lazy once you get this setup. It should become 1 cmd to do everything necessary to build a server, install all necessary packages, install the custom code for the environment, configure everything, deploy data to it and verify that the application is running. Lazy is good for an admin.
      # Backup, Backup, Backup. Then verify that the backup can be deployed. Backups that have never been validated with a recovery are _make work_ and not really backups. This is really important.
      # Verify that your disaster recovery play works. Best practice is to load balance users all the time, but switching **primary** location weekly is also good enough.

      Let's reiterate that if you are afraid to type **drop database your_db_name;** because you aren't certain you can recover, then you have failed as a system admin in my book.

      Finally, document the the process you use to deploy to each environment. This document should be trivial since it will be login to X-server as Y-userid and run Z-command.

    3. Re:Look at Capistrano, steal ideas from Rails by kuzb · · Score: 1

      We use this where we work, it's incredibly flexable and works well. While we do have ruby apps, we have apps in other languages as well, and use capistrano/git for deploying everything.

      Frankly though, I wouldn't deploy anything to amazon's hardware due to privacy/security concerns. It might just be me tinfoil hatting it up, but when you spend a quarter million in development time and resources on something, the last thing you want to do is run it on some other companies' machines.

      --
      BeauHD. Worst editor since kdawson.
  26. Seperate Development and Production First . . . by crrkrieger · · Score: 1

    . . . everything else comes after that. A small illustration:

    When I was system admin for a small brokerage, one of my first tasks was to determine the hardware configuration of every server. There was one particular server that I needed to shutdown in the process. I asked every employee (it was that small) if there were any critical services on that machine. All agreed it was ok to take it off line. For the next 15 minutes, while the machine rebooted, no trading happened because the main program was linking to some libraries that were served off of that server.

    I immediately put a new task at the top of my to-do list: reconfiguring the network. Thereafter, production was done on one network and development on another. The router between them would not allow nfs mounts. Production users were not given accounts on development machines. Developers were no longer given the root password, but it was kept in a safe for emergencies.

    I know that wasn't what you were asking, but that is the first thing I would take care of.

    1. Re:Seperate Development and Production First . . . by theNAM666 · · Score: 1

      Really, it depends on context, greatly.

      You cite a fairly mission-critical app (etc.) OP cites a "small web development firm."

      Most clients may think they want enterprise level service, but not have the money to fund it. And the reality is-- for a small web development firm, many sites may get only 100 uniques/day.

      In this case, the overhead of separating dev and production on a Drupal server-- depending on what you do-- is likely very high versus other common-sense solutions. Always have a backup and be in a position to revert within 10 minutes or less. Develop themes in their own sandboxes. Etc.

      In the end, what I was saying in the below-- this is indeed a very case-specific example, and while there is some great advice here from a number of contexts, I am not so sure they answer the question when it comes to Drupal or any small web company's situation. Backup, backup, backup-- understand what you need to backup, what it is and why you need it (what's in Drupal /sites, /modules-- what the db is). Subversion: simply yes (there's a handbook article about it, and several articles-- but in short, create a repository for your entire install and for all your sites). Other than that? I would guess that the OP doesn't have as big as a problem as they think they do... if one is careful, one will rarely have a conflict/problem, and if one does, one can revert to safety.

      Libraries on a random server, undocumented? Ouch.

  27. Bash and git by Phred+T.+Magnificent · · Score: 1

    I do mine with ssh, bash and git, for the moment. I'm looking at moving to something like puppet for system configuration, though. I've also heard good things about cobbler for initial provisioning, but it's mainly aimed at an RHEL environment and that's not what we're using.

    The 2009 Utah Open Source Conference had several good presentations on infrastructure automation. See, in particular, Phil Windley's slides on puppet and cobbler (hopefully audio and maybe video will be available soon).

    --
    Where is the wisdom we have lost in knowledge?
    Where is the knowledge we have lost in information?
  28. best practice by petes_PoV · · Score: 1
    ... is just to call everything beta, then you never have to bother with testing, or documenting anything (though, to be fair, you didn't ask about documentation - so I guess you'd already decided not to bother with that detail). That way you get much faster development time and keep your time to market down to the same as your competitors - who are using the same techniques.

    The trick then is to move on to another outfit just before it hits the fan. Don't worry about your customers - if they are running web based businesses, chances are most of them will have gone down the tubes in a year or so. Long before they get anywhere near release 1.0.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
  29. What's a DEV environment? =:O by starglider29a · · Score: 1

    People are supposed to TEST this stuff first!?


    Did he forget the Sarcasm Mark ~, or does he not know about it?

  30. TPS reports by Joe+The+Dragon · · Score: 1

    TPS reports with lots of cover letters.

  31. I didnt know by SolarStorm · · Score: 1

    that /. allowed religious discussions

    1. Re:I didnt know by Anonymous Coward · · Score: 0

      I'm agnostic, you insensitive clod!

  32. Packaging Packaging Packaging... by keepper · · Score: 4, Informative

    Its amazing, how this seemingly obvious question, always gets weird and overly complex answers.

    Think about how every unix os handles this. Packaging!

    Without getting into a flame war about the merits of any packaging systems:

    - Use your native distributions packaging system.
    - Create a naming convention for pkgs ( ie, web-fronted-php-1.2.4, web-prod-configs-1.27 )
    - Use meta-packages ( packages, whose only purpose is to list out what makes out a complete systems )
    - Make the developers package their software, or write scripts for them to do so easily ( this is a lot easier than it seems )
    - Put your packages in different repositories ( dev for dev servers, stg for staging systems,qa for qa systems , prod for production, etc et c
    - Use other system management tools to deploy said packages ( either your native package manager, or puppet, cfgengine, func, sshcmd scripts, etc )

    And the pluses? you always know absolutely whats running on your system. You can always reproduce and clone a systems.

    It takes discipline, but this is how its done in large environments.

    -

    1. Re:Packaging Packaging Packaging... by Antique+Geekmeister · · Score: 1

      Now hire me 3 engineers to preserve and bundle all this arcane packaging, and to do the package management itself. If you've created something smart enough to compare and manage all the packages, you've simply transferred the scripting to the package management, with a net cost in engineering of all the time building all those packages.

      There are several several tools I favor:

      1: Checklists (to keep track of features needed or enabled for each machine)
      2: Actual package management: installing Apache or Perl modules needs to be of a specific version with a well-defined release and configuration files, not just "install the one from CPAN" or "update it from the Subversion repository".
      2: git, not Subversion, to store local configuration files. Changes can be recorded locally, then submitted centrally, which Subversion and CVS have never worked well to do.

    2. Re:Packaging Packaging Packaging... by chrome · · Score: 2, Informative

      +1 also, use the package signing system to verify that the packages distributed to machines are really released. use the package dependencies to pull in all the required packages for a given system. If you do it right, all you need is an apt repository, and you type "apt-get install prod-foobar-system" and everything will be pulled in and installed. In the correct order. I converted a site to this method (on Fedora Core many years ago) and we went from taking a day to build machines to 30 minutes. 1) Put the mac address in the kickstart server and assign the appropriate profile. 2) Boo the machine from the network 3) Watch it build. The profile for that machine would have the packages for the environment we were building listed. 4) Reboot. Machine would have the right IP and be completely configured and running. It just works.

    3. Re:Packaging Packaging Packaging... by keepper · · Score: 1

      What's hard about building packages?

      The thing you are not getting, is that with packages, and the infrastructure to support them, you only do the hard work ONCE. So you say its hard to package your software?

      A good systems engineer or admin, knows that sometimes taking a little time more to setup things right in the first place, saves an invalable amount of time later.

      And to your staff snide.. well, i've managed 300 os installs ( virtual and physical ), with only a developer as a release engineer and me as the admin. Yes, eventually we needed more admins, but it was because of the complexity of our environment, and SLA's, not because of the work of packaging + deployment.

    4. Re:Packaging Packaging Packaging... by keepper · · Score: 1

      Missed a part..

      So you say its hard to package your software? Most scripting languages have modules that allow you to automatically build rpm or debs. Java and C are also trivial to general .spec or deb definition files. Its at most a few days worth of work for one person, and weeks of work in savings.

      Automation is key!

    5. Re:Packaging Packaging Packaging... by keepper · · Score: 1

      Yeah, agreed. Most people get scared of the work, not realizing the savings in time later.

    6. Re:Packaging Packaging Packaging... by chrome · · Score: 1

      The biggest obstacle is learning it the first time. If you're smart, you then write a Makefile or shell script or whatever to the automate it for the next package. Its Not That Hard (tm) Really, I'm a lazy sysadmin, so I prefer the software does all the hard work, not me. :)

    7. Re:Packaging Packaging Packaging... by Antique+Geekmeister · · Score: 1

      It's not that "hard". It's time-consuming. Building RPM's or .deb's to deploy a single configuration file change is time-consuming: the same time spent to build and configure and manage the arcaneries of dependencies for RPM's or deb's would often be better spent on a single management system. Setting up hostnames and enabling particular authentication configurations or X configuraitons or printer setups, for example, seems a bit misplaced in an actual software package.

      I agree that package management is very, very useful for components over a certain size, or for which package management is already woven into the OS.

  33. In a word... by Gordonjcp · · Score: 1

    Fabric.

    http://www.gjcp.net/articles/fabric/

    Saves so much hassle and buggering about.

  34. Hudson by Anonymous Coward · · Score: 0

    Deploy a continuous build server. You've already done most of the work by writing all of these scripts. It will transfer nicely over to Hudson or maybe CruiseControl. As a bonus, if you guys use Selenium tests, you can automate those too.

    Also, get a ticketing system (Jira/Trac/whatever) with a configurable workflow that you're comfortable with so you can track deployments and approvals/disapprovals. The workflow should be configurable because you never know if you'll start adding environments or release steps (your company's packaged releases won't really get deployed to production as the final step or you might add a customer environment).

    Finally print out instructions for the developers and post them on a wall or wiki where they are plainly visible. It's all useless if you're the only one who knows how the system works.

  35. No, thanks by Anonymous Coward · · Score: 0

    OSS CMS !? Call me old fashioned (and it won't be the first time), but I will use plain HTML, thank you.

  36. How do i manage those environments? by Mister+Whirly · · Score: 1

    Carefully. And you?

    --
    "But this one goes to 11!"
  37. Re:Have the hosts email problems to an email accou by denis-The-menace · · Score: 1

    Ever heard of Unixware!

    remember this WAS 10 years ago!

    (Now, get off my lawn!)

    --
    Obama's legacy: (N)othing (S)ecure (A)nywhere and (T)error (S)imulation (A)dministration
  38. Use CVS if you're feeling burly by rho · · Score: 1

    CVS (of whatever flavor) can help you do this. It's a pain in the ass, and everybody will hate it, but it works.

    I've done this with virtual machines as well. It's kinda whizzy to do, but probably overkill.

    The simplest way for me was to simply use rsync. Rigid delineation between live and test/dev environments is important. Use a completely separate database (not just a different schema), and if possible a completely separate database server. Changes to the database schema should be encapsulated in update scripts and tightly controlled and thoroughly tested in the test environment. Use a database that supports transactions and use them. Updating the live site should be performed by updating a clone of the live site in another directory. That way if everything goes tits up for some unexpected reason you can revert back to the old site while you lick your wounds. Virtual machines definitely make this all techy and bitchin', but editing httpd.conf and restarting Apache also works.

    The best solution is going to be customized to the needs of the project. Most projects don't need a dev/test/live arrangement. Dev and live are sufficient. The most important thing is to establish a framework of how changes are to be made to the code base or database, and stick to it. CVS will help enforce this, but at the cost of having to use CVS.

    --
    Potato chips are a by-yourself food.
  39. Mod Parent Up! by acklenx · · Score: 1

    How can this be a troll? This is so true. I would however grant the extending the user base for an OSS project isn't exactly a bad thing, nor is having your company exposed to more OSS - but I sure would call it "giving back to the community".

    --
    Never let a mediocre career stand in the way of a good time
    1. Re:Mod Parent Up! by Like2Byte · · Score: 3, Insightful

      Where eln failed is in how his post turned into nothing more than a personal attack against the parent story poster. In the open source world there are users, documenters, developers and visionaries. And guess what - a majority of those are users and most users will never contribute to your project.

      Simply attacking the guy with crass, harsh statements is not in the vein of "The Gift Culture."

      So, yes, eln's comment is a troll comment.

      As for a "moral obligation?" That's laughable. If you give someone something for free don't expect them to do anything for you. Maybe that person doesn't have the time to invest in giving back at the moment. Making inflammatory comments will certainly push them away from your base of constituents. And that means less users. So attacking people who don't know is counter-productive and does not serve the OSS causes or beliefs.

      If the someone feels to compelled to "give" or "give back" to the open source community - in whatever manner - count the community fortunate. Expecting anything is counter to the ideals of "The Gift Culture."

      Please reread ESR's book.

    2. Re:Mod Parent Up! by Like2Byte · · Score: 1

      If the someone feels to compelled to "give" or "give back" to the open source community - in whatever manner - count the community fortunate. Expecting anything is counter to the ideals of "The Gift Culture."

      Gad! How did I miss that in my 4th preview!?

      CORRECTION: If someone feels compelled to "give" or "give back" to the open source community - in whatever manner - count the community fortunate. Expecting anything in return is counter to the ideals of "The Gift Culture.

    3. Re:Mod Parent Up! by eln · · Score: 1

      I never said he was compelled to give back. Okay, using the term "moral imperative" was not the right choice of words. What I meant was that people feel compelled to give back because they've used the product to their benefit, not that using the product is in and of itself giving back, which is what the article writer seemed to be implying. This is not to say that the OSS community is forcing you to give back, but rather that you feel in your gut that you ought to give back because the project has given you a tangible benefit at no cost to you. You're under no obligation to follow that gut feeling, of course.

      Basically, the writer said he wanted to "give back" by using the software. My assertion is that simply using the software is not giving back, and by using that language when you have no apparent (at least not stated) intention of actually giving back in a substantive way, you're essentially trying to take advantage of the idealism of the OSS community to get free stuff. Had he said he wanted to explore getting involved in an OSS project, rather than just using the software, that would have been something entirely different. Hell, he could have just flat out said he wanted a free solution that was already done, and that would have been okay too. What I objected to was specifically the fact that he equates simply using the software with giving back to the community in some way, and that it seemed he was trying to garner more positive responses by hinting that his motivation for using OSS was to "give back" rather than just to get free software.

      Again, if your motivation for using OSS is simply because it's free, that's fine. Just don't jerk us around about it and act like you're doing us a favor by doing so.

    4. Re:Mod Parent Up! by goofyspouse · · Score: 2, Informative

      Basically, the writer said he wanted to "give back" by using the software.

      That is an interesting take on what what "I would much rather use something OSS so I can give back to the community" means. Sure, it could mean what you said, but I suspect it was meant more in the spirit of having the opportunity to report any issues with the program back to the author(s). Perhaps I am reading into his statement as well...I don't know. What I do know is that he clearly hit one of your hot buttons.

  40. KVM/Vmware/OpenSolaris zfs go virtual by jwhitener · · Score: 1

    The simple answer? Virtual Machines. If you have to stay with linux, go with vmware or for a free solution, KVM. See http://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine

    If you want to run LAMP on open solaris/solaris, ZFS has very robust and easy to manage virtual machines called zones. Sun also provides enterprise ops center software that can be used to manage the zones via a gui. Copy/create/rollback, etc..

    After that, smart system administration is required to keep things easy to manage.

    How you choose to separate data, apps, and the OS will depend on your requirements, but in general, keeping them separate is a good idea.

    Another good idea, is a /mnt/safe or area mounted inside the prod/test/dev boxes that is nfs shared between them. Often times, I'll make a request of my sys admin "Please refresh test and dev with prod". So I copy changes or other work to /mnt/safe and then he overwrites dev and test with a recent zfs snapshot (virtual machine snapshot) of production.

      I see you use the word check-in/out. I'm assuming you have subversion or something similar running that you use to check in/out to a new location. Do your developers need access to a CVS? If so, I'd just build it into the virtual machine, so each developer has their own subversion installation.

    The only thing you need to do when using zones/virtual machines (at least in zfs) is change the hostname and IP, but that is easily scripted.

    1. Re:KVM/Vmware/OpenSolaris zfs go virtual by rho · · Score: 1

      Sun also provides enterprise ops center software that can be used to manage the zones via a gui. Copy/create/rollback, etc..

      This is very important. One of the most important traits of a 3-tiered development system is setting it up so that the "test" environment can be rebooted back to a clone of the live site. "Test" should be just that--for testing. If your test environment goes pear-shaped, who cares? Clone the live site, run the updates from "dev", and your "test" is back.

      In general it's rarely a good idea to provide a migration path from "test" to "live". As development teams get larger it may make sense to have intermediate changes done on "test" and then ported up to "live" and down to "dev". At this point you'll be looking at a migration manager of some sort.

      --
      Potato chips are a by-yourself food.
    2. Re:KVM/Vmware/OpenSolaris zfs go virtual by garaged · · Score: 1

      justo to be the anal in the thread, have you head of linux-vserver or openvz ?? sticking with linux would be much more efficient with those that vmware or kvm

      --
      I'm positive, don't belive me look at my karma
    3. Re:KVM/Vmware/OpenSolaris zfs go virtual by jwhitener · · Score: 1

      http://virt.kernelnewbies.org/TechComparison

      I was curious about the differences. It looks like linux-vserver and openvz use the container method (same as zfs zones). Meaning, there is only one kernel shared by all the virtualized servers.

      KVM and Vmware on the other hand, use full virtualization, meaning the virtual machine is a complete operating system.

      None of that probably matters much if it is just drupal instances or something like that. It would come down to what management tools are available.

      Is linux-vserver or openvz comparable in its ease of management with Vmware or zfs zones? I've never used them.

  41. Re:Have the hosts email problems to an email accou by Simon+(S2) · · Score: 1

    That's interesting. At the moment we have a loghost, and all logs of all applications go to that syslog server. Now we face the problem of allowing access to those logs to developers. Say you have 50 production apps logging to that logserver, do you know some software (best would be a webapp) that can be configured to let developers login and see the logs for the application they are responsible for? We could simply share the log files with a samba share, but a webapp that has some kind of integrated tail, deep linking to specific lines, color highlighting and stuff like that would be über cool.

    --
    I just don't trust anything that bleeds for five days and doesn't die.
  42. Quick Brief by kenp2002 · · Score: 4, Informative

    Develop 4 Environment Structures

    Development (DEV)
    Integration Testing (INTEG)
    Acceptance (ACPT)
    Production (PROD)

    For each system create a migration script that generically does the following:
    (We will use SOURCE and DEST for environments. You migrate from DEV->INTEG->ACPT->PROD)

    The migration script as it's core does the following:

    1) STOP Existing Services and Databases (SOURCE and DEST)

    2) BUILD your deployment package from SOURCE (This means finalizing commits to an SVN, Creating a dump of SOURCE databases etc.) If this is a long process then you can leave the DEST running and STOP DEST at the end of the build phase. I do this as builds for my world can take 2-3 days.

    3) CONDITION your deployment package to be configured for DEST environment (simple find and replace scripts to correct database names, IP address, etc. These should be config files that are read and processes.) This is common if there are different security SAPs, Certificates, Etc that need to be configured. For instance you may not have SSL enabled in DEV but you might in INTEG or ACPT.

    4) BACKUP DEST information as an install package(this is identical to the BUILD done on the source. This BACKUP can be deployed to restore the previous version.) This should be the same function you ran on SOURCE with a different destination (say Backups verus Deploys)

    5) MIGRATE the install package from SOURCE to DEST
    START DEST

    6) TEST TEST and RETEST

    7) If all tests pass then APPROVE. This is the green light to re-start the SOURCE services so development can move on.

    That is a brief of my suggestion.

    DEV is obvious
    INTEG is where you look for defects and resolve defects. Primary testing.
    ACPT is where user and BL acceptance testing occurs and should mirror PROD in services available.
    PROD ... yeah...

    I handle about 790+ applications across 2000+ pieces of hardware so this may appear to be overkill for some but it can be as simple as 4 running instances on a single box with a /DEV/ /IT/ /ACPT/ /PROD/

    Directory structure with MYSQL running 4 different databases. The "Script" could be as simple as dropping the DEST database and copying the SOURCE database with a new name. Other options are creating modification SQLS for instance that are applied onto the exist database.

    e.g. STOP, UPDATE, START

    to preserve existing data. In the case of Drupal your DEV might pull a nightly build and kick out a weekly IT, a biweekly ACPT, and a monthly PROD update.

    JUST REMEMBER THAT YOU MUST MAKE SURE THE PROCESS IS ALWAYS REVERSABLE!!

    The script to deploy needs to handle failure. There has to be a good backout.

    You should have a method to backup and restore the current state. Integrate that into the script. Always backup Before you do changes and AGAIN after you change. DEV may need to look at the failed deploy data (perhaps a substitution or patch failed, they need to find out why.)

    Before Backup and After Backup in the migration script.

    And always 'shake out' a deployment in each environment level to make sure problems to propogate. You find problems in IT, you test to make sure what you found in IT is resolved in ACPT. Your testers should NOT normally be finding and filing new defects in ACPT environments with the exception of inter-application communication that might not be available in earlier environments. (Great example might be ACPT has the ability to connect to say a marketing companies databases where you use dummy databases in IT and DEV.) 80/20 is the norm for IT/ACPT that I see.

    Good luck. Use scripts that are consistent and invest in a good migration method. It works great for mainframes and works great in the distributed world too.

    A special condition is needed for final production as you may need temporary redirects to be applied for online services (commonly called Gone Fishing pages or Under Construction Redirects)

    --
    -=[ Who Is John Galt? ]=-
    1. Re:Quick Brief by ScooterComputer · · Score: 1

      I agree with this approach. Having worked in a three tier system (DEV, TEST, PROD), I can say first-hand that the lack of an integration testing environment can be devastating. Although adding one increases your costs (arguable with good virtualization/VM management), an integration testing environment is invaluable.

      I tried to implement such a four-tier design at my last gig during an intensive environmental redesign, in which we moved most of the iron to VMware and implemented DNS indirection in each environment, but ultimately got shot down on trying to break TEST into separate INTEG and ACPT. The managers simply couldn't grok the usefulness...even most of the testers thought it would be a hassle.

      Shortly before the end of my consulting involvement with the project, there was a major production meltdown due to a confusion of installed inter-dependent testing versions in TEST with several days of mission-critical PROD downtime as a result. [Thankfully I was not involved in that project.] Unfortunately, to this day, similar problems persist.

      An INTEG environment doesn't have to be fully built out, and it shouldn't be used for performance testing. Simply keeping early testing code corralled in the INTEG environment makes sense for when a problem in PROD requires an IMMEDIATE "stable TEST" environment, and if there is pre-ACPT code in there you just can't perform adequate troubleshooting as your infrastructure grows.

      --
      Scott
      "Hokey religions and ancient weapons are no match for a good blaster at your side, kid."
    2. Re:Quick Brief by kuzb · · Score: 1

      ...and then you realize he's part of a small web firm, and probably doesn't have the budget for full-blown QA team (which is often expensive, as it's a tedious job).

      --
      BeauHD. Worst editor since kdawson.
  43. AppLogic by ldgeorge85 · · Score: 1

    I would suggest using some virtualization technologies for that. Something that would make it easy to deploy multiple copies of the same template, easily manage different large scale architectures, and such. I have personally used 3tera's AppLogic, and have had a lot of great experiences there. With a few physical servers you can manage multiple separate VM's, create templates, automate functionality... blah blah. Good luck finding the best solution for you though.

  44. Slashdot and this company ... by Krishnoid · · Score: 2, Funny

    Just roll them into one. It's even got a catchy name.

  45. FTP? phpMyAdmin? by Culture20 · · Score: 1

    Web devs need to have security enforced or they won't think about it for their sites. Shut off FTP and enforce SFTP only. If bandwidth is a factor is choosing FTP over SFTP, at the very least, use kerberized FTP. Make certain that phpMyAdmin is behind https and that authentication is required. Yes, this means they have to use two passwords. Tough.

  46. Read "Pro PHP Security" by garyebickford · · Score: 1

    I'm just now reading "Pro PHP Security" (Snyder & Southwell, Apress), and it's got a lot of good information - hands-on examples, best practices and technical background that is useful whether you support PHP or not. It covers both local and web-based attacks such as XSS, SQL injection, vuln exploits, etc.

    Among other things, it suggests you set up virtual servers for each domain user. You could use FreeBSD 'jails', linux virtualization tools, etc. - the book is agnostic on which ones you use, and doesn't cover a lot of detail in this area, at least so far. Virtualization of this type almost completely eliminates the ability of any client user accessing anything outside their virtual server space.

    It also suggests that you automate the creation of new domains and hosts, with a form-entry input of some kind, perhaps a well-secured web-based front end, that assures everything gets done properly. Such a parametric front end (of whichever type) helps in preventing the sysadmin from forgetting or purposely ignoring certain setup tasks. I have not kept up to date in this area, because it's not something I do any more, but I'm sure there are some packages that do most or all this work.

    You might even use webmin for some of this.

    I also have on my shelf the Cisco book "Data Center Fundamentals" available directly from Cisco. It's $60 but has a slew of information.

    I'm sure there are other books with more information, I just don't have them off the top of my head.

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  47. The answer's simple by Shadow-isoHunt · · Score: 1

    Segue in to a new paradigm and experience increased synergy - consolidate already!

    Kidding, naturally.

    --
    www.isoHunt.com
  48. Re:Have the hosts email problems to an email accou by UNIX_Meister · · Score: 1

    Try splunk. This should do exactly what you need - a way to "grep" through all the logs intelligently.

  49. If it's anything like where I work ... by Anonymous Coward · · Score: 0

    The Dev environment has better hardware than the Production environment. God forbid Dev and Test actually have the same specs so, you know, you can TEST ON IT!

    Naming of servers end in "dev" for Development, "tst" for Test, and "prd" for Prod, except for where they end in "d", "t", "p", "pg", "02"... Unless it's SQL Server, in which case it's ending in "Dev", "Tst", "Prod" ... mostly.

    All three of them have different names for Roles granting the same access to the same tables. And I have to fill out authorization forms before the databases are built, so good luck on schema names. And we're in a project where the technical spec was just rewritten yesterday, and process testing (that thing after dev) was supposed to finish 2 weeks from now. We had to start writing test cases two weeks ago, before I had access to the database, and I might as well throw a good chunk of the work away.

  50. A small note by Anonymous Coward · · Score: 0

    I modded, so posting as AC.

    A minor technique we use is a versioned install structure, with symlinks to the current version. Eg., /opt/application_root /application_1023 (1023 is our build number) /application_1034 /application_1045 /current ==> /application_1045 (symlink to one of the install trees)

    This allows easy roll back if an upgrade fails without having to reload from staging. Our update scripts build the new directory, stop the server processes, re-aim the symlink, and restart the server processes. All the execution scripts use the path /opt/application_root/current/...

  51. Hudson Build Promotion by bihoy · · Score: 1

    One solution that I have implemented at several commpanies is to use Hudson and the Hudson Promoted Builds plugin. Read this brief introduction to the concept.

  52. Symbolic links by CyberDong · · Score: 1

    I've found it's useful to put any env-specific properties in external properties files, and then make a copy for each env. On each environment, there's a one-time exercise of creating symbolic links to point to the appropriate files.
        e.g.
          ln -s db.properties.dev db.properties
          ln -s server.properties.dev server.properties ...

    Then just use the links in the app code.

  53. Use virtualization by Anonymous Coward · · Score: 0

    I work for a virtualization company that might be able to solve some of your problems. But I don't dare mention it because I don't want to be labeled a spammer. Do some searches, form your own opinion.

  54. From professional experience: by Hurricane78 · · Score: 2, Informative

    I have adapted my system from the 5 years I professionally did it.

    First of all, it's a 3-stage system.
    You have a couple of live servers, a identical staging server, and the user machines.
    Every system has a clone of the files. the servers have rsync copies of the stage server files.
    And the users all sync to the stage with GIT.
    Everyone has a local clone of the stage server software too, so he can test server-side code right on his machine.
    That's important in every company where people could do conflicting (and even big, global) patches.

    The stage server then has validity tests running. Compilations and unit test cases wherever possible. Including the database, the server side code, and rendering test pages in all relevant browsers, to diff the rendered versions (images) of the pages. (There's a app for that in Firefox, but otherwise it's desktop automation.)
    There's an red alert box in the test case overview when something fails. Which gets checked every evening, before pushing anything to the live servers at night.
    The only thing that turns out to be a bit hard, is to test the client-side logic (e.g. of web-apps) in a transparent manner (= keeping the software configurations and serveride code the same to be able to rely on it).

    Then there is a emergency push and and emergency direct live update mechanism, for cases when you quickly have to fix something that got overlooked. (Which usually should result in a new test case to be written, to catch all such problems.)

    A well-integrated project management system is very important. At the end of my first company, it was a self-written one with good integration. But in the beginning, something like Trac might suffice.

    Then very important is, to have a knowledge base for all things that need to be remembered. Like a meta-documentation. Workflows and procedures. Why the mysql server will not restart on a reboot of stage server clones. Little hooks and mantraps like that. I recommend a Wiki.

    And last but not least, never ever forget to have a Bugzilla. If you're good, you can integrate Bugzilla, the test validations and the task/project management into one system. Making the validity tests create bugs in Bugzilla, and bugs being the same as tasks (which makes test-driven development easier).

    Yet this all is completely worthless, if your colleagues don't use it! ;)
    Unfortunately, I learned, that when someone can/em> do something wrong, he will.
    So if you can't lock down possibilities to only those required, you have to be very very careful with who you hire. Especially with "web development", where you get sinology students who learned HTML while working as a taxi driver, stating that they are "professional web developers with 5 years of experience", while honestly believing that. And team leaders believing it too, because they are just as "competent". Because they themselves either started as something an simple as link collectors, or the boss of the company does not know shit about his business, and hired those types. They then usually get promoted to "Head of ...". It's the mother of all PHB stories. ^^

    The key is: Make them like to work the proper way. If nothing helps, money can always push them in the right direction. It's called "bonus".
    And making it their project too, by also embracing their decisions! :)

    --
    Any sufficiently advanced intelligence is indistinguishable from stupidity.
    1. Re:From professional experience: by Hurricane78 · · Score: 1

      Ok, it's 10 years or experience, if you count like those taxi-driver types. ^^

      And luckily, I noticed that I forgot to mention, what is already mentioned here: http://ask.slashdot.org/comments.pl?sid=1411459&cid=29811941
      To clone the test data in the other direction: from the live servers, to to the staging server, to the dev systems.

      I don't think backups should need to be mentioned. They are expected from every company. Period.
      The nice thing about using GIT, is that backups are very easy with it. Just clone the staging server repository every night.

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
    2. Re:From professional experience: by Hurricane78 · · Score: 1

      Lool. I guess the lem> was a Freudian slip. It's the exact part that I still have sleepless nights over. So please forgive me. :))

      --
      Any sufficiently advanced intelligence is indistinguishable from stupidity.
  55. I'm dealing with the same issues by Anonymous Coward · · Score: 0

    I am in a similar situation but perhaps a few more steps down the path. We have environments for internal and external clients to develop, test, approve and release code. These environments all run the same version of the base platform, and are all considered production systems. We have other environments to test platform level code. These are specifically to assist in the development and release process of individual projects.

    We wrote a framework application that is a single access point to publish and commit code, and move it from environment to environment. Each movement requires approval, and this can be customized for each customer. To place something on the first environment, very like a sandbox, we just copy it out there. In order to get further a commit must occur. Each commit creates a new version of the project. That version must then be marked before it can be loaded on a different environment. For the second environment, test, the project manager marks the version, indicating it is ready for testing. The tester loads the version, maintaining control over his testing environment. Each loading requires the version be previously marked. For release into production QA marks it as acceptable and the PM coordinates the release (load). When a new version is created it can move along the path and then eventually replace the original version.

    Our projects consist of jsps, java and configuration files, and sometimes other files. They are stored in CVS, each project on it's own branch. The project specific java is compiled on the fly in order to ensure compatibility with the existing codebase. A compilation failure results in a loading failure. We have a custom class loader written to handle the hotswapping of the resulting class files. Approximately 100 versions get loaded to various environments every single day, and we only restart the JVM maybe once every month.

    The only other significant aspect is that we CVS tag all currently loaded files so that we can reproduce any environment's contents at any time.

    1. Re:I'm dealing with the same issues by aarongadberry · · Score: 1

      Mod parent up

  56. Bamboo by Anonymous Coward · · Score: 0

    Check out Atlassian Bamboo. It's a build server that can plug in to your repository and automate builds and deployments.

  57. Drupal: Deployment module by Anonymous Coward · · Score: 0

    The deployment framework is a series of modules which are designed to allow developers to easily stage Drupal data from one site to another. This includes content (nodes, taxonomy, users, etc) as well as configuration (views, content types, system settings, etc.) Not only can it push new content, it can also push updates to existing content. Deploy automatically manages dependencies between nodes (IE nodereferences) as well as between other objects. It is designed to have a rich API which can be easily extended to be used in a variety of situations. Check out the screencast for a demo!

    http://drupal.org/project/deploy

  58. FTP is shit by binford2k · · Score: 1

    Don't ever enable FTP logins. FTP should only be used for anonymous access. EVER.

    1. Re:FTP is shit by Fulcrum+of+Evil · · Score: 1

      better, use sftp - whether to allow authorized_keys style auth is up to you.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  59. Badly. by Elwood+P+Dowd · · Score: 1

    (See subject.)

    --

    There are no trails. There are no trees out here.
  60. Re:Have the hosts email problems to an email accou by BitZtream · · Score: 1

    syslogd on every modern unix is capable of routing to a specific log file for a specific app. If the basic syslogd isn't enough, your loghost can run syslog-ng or any of the other more powerful syslog daemons. You only have to replace the one on the server, the other clients should just be forwarding EVERYTHING to it.

    Of course at this sort of level, you'd probably save yourself a metric assload of trouble if you implemented a proper network monitoring/management server.

    Myself, having only 15 or so hosts to deal with, most of which aren't chattery just use ssh + a colorizer script I wrote for my purposes. I typically leave it running on a spare monitor all the time.

    --
    Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
  61. Try a build tool by Anonymous Coward · · Score: 0

    I think you're looking for a build tool. At work we use Maven to do some of what you're doing but I think Ant would be a better choice for you. Don't worry about the fact that they are written for Java.

    They allow you to move environment specific settings into a configuration file. You tell it the different addresses, passwords and usernames to use in your development, test and production environments. You then ask for a build for the test environment and all those settings are inserted where they need to go. It comes with a lot of pre-defined tasks for checking out sources, initializing databases and publishing the files on an FTP. You can pick and choose which actions are run for which environment. Finally, if you run into a specific problem that won't be solved by one of the many, many, pre-defined tasks, you can write you're own task or launch a script.

  62. You need version control and simplicity by summery · · Score: 1

    #1 is version control. Without that you are lost. SVN, git, CVS, whatever as long as it's working for you.

    #2 is simplicity. Without it, your systems will simplify themselves in a sub-optimal manner (i.e. dev server becomes production server).

    Here's what I do:
    - Developers work and test on their local machines and commit using version control to a central repository
    - Dev site is a sub-folder of the production site - easy way to make sure every single damn variable is the same
    - When I want to upload to dev environment:
    rm -r dev (to remove all files in current dev site)
    svn export file://(path) (to get a complete copy of latest code)
    - When I want to upload to production environment:
    source upload.sh, where upload.sh copies the existing site into a backup directory for quick access in case of disaster, then copies the dev site up into production, then re-copies a couple special files that differ between dev and production back (.htaccess, analytics.php)

    Good luck!

  63. If you find... by Anonymous Coward · · Score: 0

    >... it is cumbersome to manage all sites by hacking away at the command prompt
    you should probably get another job. Maybe Sysadmin in a Windows-only shop.

  64. Trying to hard.. by theNAM666 · · Score: 1

    With no personal offense to the OP, (and noting that this is Drupal), I think the OP is trying a little to hard or suffers from inexperience. My first Drupal server hosts 100+ sites and Dev/Test/Production was rarely an issue-- which is to say, what is the OP doing that requires that level of segmentation? It's simply not that difficult on the scale mentioned.

    For large sites, of course, Drupal dev/test/production is another matter-- and there is a Drupal group that handles such questions and considerations. Reading it would be useful to the OP; for most people here, it is likely so Drupal specific as to give no lessons not already familiar.

    For small-to-medium sites, keeping separate dev/test/production copies on separate subdomains, flipping between them as necessary, and maintaining a backup schedule of everything is practical. Module management is a different story, but my choice is to multisite (and rsync)-- custom modules go in each sites's custom modules directory. Beyond this, again, we descend into Drupal-specific discussion that would probably be best on drupal.org-- where it has already been occurring for years.

    The general question-- well, away from Drupal-- is sort of platform dependent, isn't it? On Drupal (up to D6), there is an annoying possibility of data structure collision if you have different versions running, for instance-- no easy way to merge databases unless you plan for it and, say, index the db entries (odd/even). Other systems are better at merging different copies. One should probably write a system that plans in advance.

    But for 50 sites, I ... just don't have a "good question here," as most of the issues should be manageable...

    after you spend two days reading UNIX man pages. So there's my answer. Read-The-Fine-Man pages.

    1. Re:Trying to hard.. by /dev/trash · · Score: 1

      HAHAHAHA the Drupal forums! yeah. Shall I post my years old questions that were never ever answered? Or the ones with the ever helpful: "Upgrade to Version 6...it's shiny!"

  65. the php code is easy to manage by Anonymous Coward · · Score: 0

    svn or whatever works fine for that. It is the motherfucking data that is the problem, at least with drupal.

  66. Re:Have the hosts email problems to an email accou by Anonymous Coward · · Score: 0

    Splunk http://www.splunk.com might do it...

  67. Testing, Dev and Production can be handled by by Anonymous Coward · · Score: 0

    Virtualization, Virtualization, Virtualization.

    Which spacific technology you use is irrelevent, but any resonable one should have a way to clone VMs.

    Clone production, Make modifications, test, push (the entire vm) back out. You should also be running your webserver and any DB on seperate VMs. This allows you to use clone-management to deploy site-changes without running the risk of affecting the DB. Changes to the DB are more complex, but so far I have found that to be inevitable and should always be cloned, and backed up beforehand (ask MS/Danger/T-Mobile).

  68. Our Method by endus · · Score: 1

    Put everything in test, not configured properly for production, until such time as enough people start using test that it becomes production on its own. This usually happens slowly and organically, and usually in the middle of the night. Once you have at least 2-3 different groups screaming at you over the lack of availability of your test system you can be reasonably confident that it is now production.

  69. Clearly Draw the lines... by Anonymous Coward · · Score: 0

    My only advise is:
    Dont let the app developers allow the marketoids to run production deliverables from development systems...

  70. KISS by SanityInAnarchy · · Score: 1

    I'm amazed -- no one yet seems to have figured out one very obvious possibility:

    You don't need development machines. Let them develop on their workstations. They're developers, they'll figure it out.

    Use Git. Or, if you must use SVN, use developer-specific branches -- and after using this for awhile, it should be very obvious why you should use Git. The point is that each developer should be checking into version control often, without having to worry about causing problems for other users. Want someone to take a look at your code? Let them merge your code (or just check out your branch) and run it on their local machine.

    Then, one staging and one production. Or more, if you need to be testing multiple versions company-wide. VM images to spawn each (so staging can be cloned from production, or vice versa), and Capistrano to deploy.

    Granted, this wasn't used with a particularly large team, but we didn't have anything which even hinted at scalability issues down the road.

    Now, if your team is so large that you need many test and many production servers, I apologize, but it does look like something of a WTF when you have web developers who can't figure out how to set up a webserver on their machine. I mean, every Mac comes with Ruby On Rails out of the box!

    --
    Don't thank God, thank a doctor!
    1. Re:KISS by /dev/trash · · Score: 1

      That's it! Git and while we're at it, regular expressions will solve everything!

    2. Re:KISS by mindstrm · · Score: 1

      "You don't need development machines. Let them develop on their workstations. They're developers, they'll figure it out."

      Quite often, they aren't - they are web design guys who should not be confused with programmers of any sort.

    3. Re:KISS by SanityInAnarchy · · Score: 1

      Git is like XML and violence. If it's not working, use more.

      As an aside, I didn't read very carefully, and it looks as though this guy at least needs vhosts, if not a bunch of test and production machines. But I still don't see why there need to be a ton of development machines.

      --
      Don't thank God, thank a doctor!
    4. Re:KISS by SanityInAnarchy · · Score: 1

      In that case, one solution would be to point them all at the same development machine, and simply make the app skinnable.

      --
      Don't thank God, thank a doctor!
  71. version control system + build/deploy engine by nfsilkey · · Score: 1

    We do this for many many Drupal sites on many horizontal web nodes via bzr + ant. By 'sites' I mean no multi-site; each 'site' gets its own Drupal instance. By 'Drupal instance', I mean the 'Drupal instance' is an ant-powered deploy from a branch in bzr comprised of vendor branches (core + modules) merged in plus customizations by our shop. Each environment gets a branch, and we merge code upstream (dev -> tst -> prd).

    The only thing 'shared' across the infrastructure is the web services and frameworks on the webapp nodes. Ant is great at auto-magic MySQL db provisioning, Drush calls to pound the schema, APC cache flushes, Memcached bops, etc. Also I would throw myself off a bridge if I had to manage all the complex merges across our branches and dealing with updating the vendor branches.

    Others here also made the comment wrt code up, content down. Live it, love it; SERIOUSLY! Refresh often, and give your devs anonymized slices of the db for them to keep on a laptop they will undoubtedly leave in a cab. Were currently bending ant to perform the downstream refreshes + sanitizes. Looks very promising.

    Also if youre not able to bastardize ant to do what you want it to do, look at ant-contrib to further extend the tool.

    http://bazaar-vcs.org/en/
    http://ant.apache.org/
    http://ant-contrib.sourceforge.net/

    Slightly OT: The J2EE guys at $employer prefer a maven+ant+svn approach. YMMV.

    Have fun. These are very interesting toys to play with, tbh.

  72. The way we do it by Anonymous Coward · · Score: 0

    Here is our entire processes from test to prod deployment

    1) Unit tests
    2) regression tests (hacky, but use junit to invoke and interact with a bootstrapped version of our service)
    3) (provided everything goes well)
    4) Deploy to Alpha stage
    5) run remote regression tests. This is integration testing. Does it work with the db? All config is good? VIP settings ok?
    4) deploy to devo. This is essentially a mirror of the production website
    5) Run remote regression tests (as per #2, but this is against the real mccoy). This allows us to detect configuration problems as well as how the code interacts with other incoming requests.
    6) promote to pre-prod. This is a box (or set of) operating with prod data but not serving prod traffic. The only difference between this and live traffic is merely the fact that our VIP doesn't know about it
    7) run preprod regression tests
    8) Deploy to prod.
    9) Run prod regression tests
    10) Monitor for fatal errors

    All of our boxes have insane monitors on them. Disk usage, CPU usage, RAM usage, TCP socket usage, process count usage. Pretty much everything that defines the box as normal. Anything goes out of whack: Page the on-call.

    FYI I work for a VERY large ecommerce site. But sadly, very few teams are this rigorous

  73. How Do You Manage Dev/Test/Production Environments by Anonymous Coward · · Score: 0

    How Do You Manage Dev/Test/Production Environments?

    Very carefully.

  74. senor nebuloso by chef_raekwon · · Score: 1

    this is such a nebulous question. you want your dev/qa/pre-prod to emulate your production environment as much as possible. this subject in itself could fill a book on best practices, techniques, and the like. Easiest said by saying: keep all developed code separate from 3rd party application code. packages/versioning/repositories are a good start. make things relocatable, have one installer, and have it take multiple environmental variables. ie - make environment variables 'run time', don't make the same mistake everyone makes - and make them 'build-time'.

    Best of Luck.

    --
    We're like rats, in some experiment! -- George Costanza
  75. My thoughts by mindstrm · · Score: 1

    There is no magic solution - you are talking about managing multiple environments with different requirements and technologies in some meaningful, automated way.

    You're looking at home-brew here.

    What you want to aim for is

    0) Stop using multiple technologies if you can. If that's not an option, it just makes more work.

    1) Clearly define policies regarding development, testing, and release. These have nothing to do with tools. You build and select your tools based on these policies.

    2) Automated pushbutton deployment. You want your code releases of each new version of a site to be automated. You also want rolling back to the previous version to be automated. This applies for CI, QA, and whatever other stages you want, all the way to Production.
    3) Automated deployment should involve at a minimum tagging a given revision and pushing it to the correct environment.

    4) You can use commit hooks or some other method against TRUNK to run a CI server that continually does regression testing and other funky stuff... as well as just shows you a live version of what's in trunk "right now".

    5) When working towards a target release,developers need to include any necessary scripts to update (and rollback, if necessary) their respective databases.

    6) Config data... can be handled by having a separate /config folder for each environment, version controlled separately - and where access and change control are again strictly defined and limited, and well documented. this would automatically be inserted by your pushbutton deployment process.

  76. One more opinion by LordThyGod · · Score: 1

    First, I can't see the need for a GUI or management tool. God gave us bash to make us happy and productive and we should use it. Managing a mix of sites, is an ideal use of scripting. What we (small web dev company 100+ sites) do: bazaar (bzr) for repos. I much prefer it to svn. Cleaner and smarter. Uses sftp by default. Create a repo: 'bzr init ; bzr add', and anyone with access to that system can co a copy. Each developer checks out the devel code to their local systems. We have our nameservers set to handle custom naming, so like example.dev maps to 127.0.0.1. All the db stuff goes to a db server and everyone (in house and contractors), have access to that. Get to use all your desktop tools, etc. The windows guys have local versions of Apache and php, so everybody's happy on that end. Next level is staging/testing. That server is a checkout of the repo. Clients have limited access. When the time comes, a copy of the site is made, site is grepped for no-no's and FIXME's, the new code is "cleaned", and then copied to production. This is all scripted. Permissions are reset, development stuff (docs, fla's, psd's, etc) are removed. We have a naming scheme, so certain directories are blown away on the live site. The scripts issues some reminders of stuff to make sure get done at the last minute and post launch. Loop, gotop(), and tweak script.

  77. Keep Test DB up-to-date by minstrelmike · · Score: 1

    One of the things we do that solves a lot of issues is that every night we export our production data to a file, zip it, stash it a few places,

    and then we copy it to our Test site, drop the db and reload all the data.

    Tells us fer sure the export was good and it makes sure we work on live data.
    Another thing it guarantees is that you will write the correct scripts to make any db changes on production because you have to make those changes every day on test until they go live.

    One of my co-workers suggested it a few years a go and I wouldn't go any other way.Making a backup is only half the solution. Guaranteeing the restore is the entire solution.

  78. Puppet and packages by Etherized · · Score: 1

    There are many ways to do the things you describe. I personally make extensive use of Puppet.

    This is a great solution for your configuration files, but note (directly) your code. This is where your distribution's packaging system comes in.

    Build packages of your code for your OS package manager (be it RPM, portage, apt, whatever... it's usually not that difficult). Give the packages version numbers based on svn revision, if you need that granularity. Create an automated mechanism to build your package and insert it into a local repository.

    Tell puppet to ensure that your 'dev' environment is always using the latest package. Tell puppet to ensure that your production and test environments are running whichever specific version they're supposed to be running.

    A downside of puppet is that it's a 'pull' based system, by default every 30 minutes. For most situations, this is adequate - but not all. You might also investigate Func as, at the very least, a convenient way to tell a group of notes to phone back home to puppet on demand.

  79. You have been the owner of fashion Ed Hardy Bag, by Anonymous Coward · · Score: 0

      we are a prefession online store, you can see more photos and price in our website which is show in the photos
    if you are interested in our produ
        We offer kinds of Newest Style Handbag,Brand Handbag,Fashion Handbags,
    Ladies' Leather Handbag,Replica Handbag--AmmonOnline
    We ship to worldwide by EMS,TNT,DHL,UPS.
    We supply you with smooth and fast services, and do dorp shipping.
    Welcome to visit our factory.
    Please visit our Website:www.tntshoes.com or products Album,

    Contact us now, We can send you more details.

          OUR WEBSITE:
                                                                  YAHOO:shoppertrade@yahoo.com.cn

                                                                    MSN:shoppertrade@hotmail.com

                                                                              HTTP://www.tntshoes.comCOOGI D&G diesel ED HARDY lrg etc $33-50 free shipping. Jersey NBA Jersey MLB NLBM nike puma adidas $12-30 free shiping.

      OUR WEBSITE:

                                                      YAHOO:shoppertrade@yahoo.com.cn

                                                            MSN:shoppertrade@hotmail.com

                                                                  HTTP://www.tntshoes.com

  80. A few tips by benjto · · Score: 1
    A few tips about the code. Feel free to replace SVN with your SCM of choice.
    1. Deployments should be a no-thinking zone. That means if the process requires any variation or creativity, it is bad. Lots of thinking is required to achieve this state.
    2. Everything lives in SVN, including your deploy scripts. Keep as few as possible and setup directories for each projects with config files.
    3. Developers work with SVN, period.
    4. Tag and build once for dev. Package it and store it somewhere (tar.gz, war, etc). Treat that as your "binary" and store the tag in it. Name the file using the tag. Make the tag visible from the application itself. http://myhost/myapp/version works well. If using a date, use a format that sorts naturally (20091001, not 10-01-2009).
    5. Never build that version again. From here on out, move the archive, do not rebuild.
    6. As requested by your testing / dev teams, do the same for each environment. By the time you get to production you have done it at least 3 times. No surprises. You always know the version and can track it fully.

    Don't take shortcuts. It just bites you in the end. Of course, this puts some burden on the dev teams. No environmental config in the project. There are many ways to accomplish this. In Java, we put properties files into the server's classpath. Figure out a similar mechanism for your platform.

  81. Puppet by Anonymous Coward · · Score: 0

    I cant believe no-one has mentioned puppet to this guy. Works like a dream...

  82. Aegir is ready for production use by SqyD · · Score: 1

    Allthough Aegir is in active development each release is stable enough for production use and migrations between releases are supported. Allthough right now it only supports Drupal the basic infrastructure is in place to support other LAMP applications in the future.

    My company runs a virtual lab setup that is build on top of vmlogix labmanager. It handles automated rollouts of test machines but you're still on your own to handle the applications logic.

  83. Drupal and staging by pastie · · Score: 1

    I've felt the pain of attempting to stage Drupal set-ups, and it's horrid.

    Whilst people say "Just migrate the database from dev->staging->live" it's not that easy when it comes to the live server, because that will have changes mixed in with what you want to make changes to (e.g., user-generated content on the live site creates nodes, which share a node-numbering namespace with your dev-created new content). This is additionally complicated by Drupal putting all the config in the database, so you'll need to make changes to that when you push it live each time (since the dev server will have dev modules enabled that you won't want on the live site, say).

    Separating the database changes you've made from the ones made on the live site (to allow you to merge them) leads to a whole set of options...

    Drupal has lots and lots of different methods of working around this problem (just search for "staging" and "deployment" on drupal.org), but none of them really seems to work that painlessly -- they either require you to write all your changes as SQL scripts or to not use particular features (e.g., CCK).

    Do all CMSes have this problem, or is it just because of the lack of separation which Drupal provides between live data, your own created data (from dev) and config?

  84. Nolio may be the answer. by Anonymous Coward · · Score: 0

    You should taking a look at Nolio at noliosoft.com. It's a pretty full featured automation platform that should be able to handle everything you might need.

  85. Re:Trying too hard.. by theNAM666 · · Score: 1

    I will remind you that the forums are staffed by unpaid volunteers who take *their* time to answer *your* questions, "as they can."

    If you ask a question that has already been asked and answered elsewhere, and you do not take *YOUR* time to find the answer because you'd rather "crowdsource="FREELOAD on *THEIR* time, you get what you pay for.

    That said, Drupal is FOSS and the Forums, as constituted, are not perfect. There is much discussion of this and if you really care, you can learn something and volunteer for the appropriate team and help make it better. Or you can buy a subscription to Acquia.

    And yes, you should upgrade to D6, not because it is "shiny," but because it contains numerous improvements and simplifications that are a result of the community process.

  86. Re:Have the hosts email problems to an email accou by Antique+Geekmeister · · Score: 1

    Examine syslog-ng, which can make a more sophisticated parsing of specific types of logs to specific targets, and set their permissions, with more resolution than syslog typically permits. It's feasible to have the same logs sent to multiple targets, and to make those logs accessible for various web clients.

  87. Being small is no excuse to being careless. by jotaeleemeese · · Score: 1

    The principles are pretty similar, so somebody working in a small company can look at the above process, understand it, and then apply the most important points to his own environment.

    --
    IANAL but write like a drunk one.
  88. WZZ by Anonymous Coward · · Score: 0
  89. Re:Trying too hard.. by /dev/trash · · Score: 1

    I'll forward this all to my boss. I'm sure my review will go better now that he knows the truth.