Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Suggestions on Deploying Perl Test Environment

by diabelek (Beadle)
on May 12, 2008 at 15:29 UTC ( #686092=perlquestion: print w/replies, xml ) Need Help??

diabelek has asked for the wisdom of the Perl Monks concerning the following question:

We're trying to deploy a Perl environment out to numerous test platforms that will be running Windows/Linux/Solaris and Dos. The 2 real OSes (And Windows) will use multiple architectures to complicate things.

Windows is currently the long pole since it doesn't come with a compiler and mingw/dmake/etc aren't working real well for us. PPM from activestate doesn't have all the modules that cpan does (IE not seeing HTTP::Daemon)

What suggestions does everyone have to this problem? IE how would you deploy perl and numerous cpan modules to windows x86/x86_64/ia64, Linux x86/x86_64/ia64/ppc, Solaris sparc/x86/x86_64 and Dos? Dos can be left out since its a special case.

We're also wanting an automated install so testers do not need to configure much of anything other than installing Perl.

  • Comment on Suggestions on Deploying Perl Test Environment

Replies are listed 'Best First'.
Re: Suggestions on Deploying Perl Test Environment
by tachyon-II (Chaplain) on May 12, 2008 at 19:04 UTC

    AFAIK all platforms have relatively simple ways of deploying "binary" distributions. As soon as you start talking gcc/cl/mingw/make/nmake/dmake and stop talking msi/rpm/yum/apt get/ you start talking about all sorts of forseeable and unforseeable issues and incompatibilities.

    It seems to me the simplest way to do what you want is to set up clean test environments for your target platforms, get all the modules you want, do the compiles once locally, package with the appropriate platform specific tool, and deploy as ready to rock binary distros. This gives you "one command/click" install with minimal hassle. Sure it will not work every single time but it has been proven to work most of the time. Work the bugs out when and if they occur, prioritised on a most needed basis.

Re: Suggestions on Deploying Perl Test Environment
by 5mi11er (Deacon) on May 12, 2008 at 15:52 UTC
    Well, I'd suggest looking into using many virtual machine environments to reduce hardware costs a bit. And yes, to test well, you'll need every environment available to test against.

    We're currently using TeamCity as our automated build tool, but there are many other build tools out there.


      Unfortunately we're hardware testing so we need direct access to the hardware as the parent/hypervisor sees it. We do some virtual machine testing as well so that is a good suggestion for when we tackle that area of automation.
        I don't know how feasible this is, but one idea I've toyed with is doing all the installation and configuration except for the last steps (whatever steps you are testing) on a VM machine, then making an installable image of that machine and installing it onto the real hardware for the final work. It should be bit-for-bit identical to an install done directly onto the hardware, as far as I can work out.

        Then do your final installation and testing.

        If anything goes wrong with the configuration, you presumably will have been smart enough to have done snapshots along the way of your VMs (at various steps during the preparation) and you can just roll back to any snapshot if you need to, then fix things and push it back onto the metal.

        Only problem with this is that I haven't actually done it, so I don't know for a fact that it works. It just seems like it should work.

Re: Suggestions on Deploying Perl Test Environment
by mr_mischief (Monsignor) on May 12, 2008 at 17:52 UTC
    I'm not sure when it will support IA64 or Vista, but Strawberry Perl should work on IA32/x86_64 using Windows 2k, XP, or 2003. It gives you the majority of CPAN modules at your disposal without using Cygwin. There are some modules that still need massaging or that don't work, but you won't know if the modules you use are supported without checking.
      Even if the pre-rolled Strawberry DOESN'T work, you should be able to use Perl::Dist to roll your own custom pre-build .exe
Re: Suggestions on Deploying Perl Test Environment
by hsmyers (Canon) on May 12, 2008 at 16:41 UTC
    ActiveState's ppm allows other repositories to draw on as well as their own. Try them. Your environment has problems with mingw? Sounds like a sign of something else wrong--- check into it. Perhaps your attitude about windows is blinding you to existing solutions? There is a free version of Microsoft C++ you might look at. Keep in mind that even if the compiler issue goes away, things are not necessarily even between 'nix and Windows. There are modules that just won't work on windows (I don't know about the other way around...) The bigger the app, the more the modules the larger you problem space is going to be.


    "Never try to teach a pig to wastes your time and it annoys the pig."

      I'm not fond of windows but I'm not a zealot. I've spent about a week now trying my best to get an automation install working in windows but every time I take a step, I slam into a brick wall.

      The current problem I'm facing appears to be a bug in ExtUtils/ From another thread ( I found that that module determines what the directory file separation character(s) should be. Testing it with dmake and mingw make in the path and also set in never changes $self->make in Since it thinks the make tool is nmake instead of dmake og mingw make, it resorts to '^\' for a separator that doesn't work with those two make tools. I'm uncompressing the Microsoft Shared Source Common Language Infrastructure 1.0 that should have the tools in it I need according to another thread I've seen. I'm curious if it has nmake with 64bit support as well as ia64 support. If not, I'm back to square one with Windows.

      As for modules that work in windows and not in linux or vice versa, that's already understood. We have a procedure in place for that. Basically we test out each module before deploying it and mark what OSes the module works in.

      So the question remains, how can we build across multiple platforms in windows? Everything I see for the MS C++ compiler is 32bit only which will work for the x86_64 platforms but not for ia64 (well... it isn't ideal). Do you have experience using the Visual Studio 9.0 (free version) on the different platforms. IE does it work?

        VC9 paid for, not free and then only for 32bit land. Lack of adventurous customers I'm afraid. Your problem with illustrates one of my pet peeves in perl-land. Something I refer to as 'nix bigotry. The in-ability of unix programmers to cut code for windows and get it right. Since they all know that they are the one true way, there seems to be little effort put in coding for the evil empire. I've seen this far more often in CPAN than I like. Not that my contributions amount to all that much, but I bend over backwards in getting things right for other operating systems only to see problems like yours all around. And thats for the few that even bother to make things work for the 'other' OS! Sorry about the rant, but I've been where you seem to be more than once and for no better reason than people can't be bothered to do things correctly. Have you tried the cygwin solution yet? I've gone that way once or twice but have never stuck with it long enough to take...


        "Never try to teach a pig to wastes your time and it annoys the pig."
          A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Suggestions on Deploying Perl Test Environment
by TGI (Parson) on May 12, 2008 at 21:28 UTC

    I've had reasonably good luck using MinGW and microsoft's nmake with PPM::Make. Occasionally, I have found a need for ExtUtils::FakeConfig to get something built, but that has been less of an issue with more recent versions of ActivePerl.

    TGI says moo

Re: Suggestions on Deploying Perl Test Environment
by Anonymous Monk on May 12, 2008 at 16:36 UTC

    Have you looked at Cygwin? You install it on Windows and can optionally install perl and gcc. This gives you a working CPAN environment on Windows.

    Did I miss anything important?

      We considered cygwin but it faces the same problems we have with perl.

      • A. Architecture support - we haven't looked into it enough to know if the features we need work fine on ia64 platforms. IE, does Win32::OLE work in cygwin on ia64?
      • B. How do you deploy cygwin in an automated fashion with no user intervention. We already almost have this working for perl (again windows is the long pole)
      • C. We still need to automagically download and install perl modules. Granted this will be much easier since we're in a unix like environment.
Re: Suggestions on Deploying Perl Test Environment
by leighsharpe (Monk) on May 13, 2008 at 01:34 UTC
    If PPM from Activestate doesn't have the modules you require, try using a different repository.
Re: Suggestions on Deploying Perl Test Environment
by arc_of_descent (Hermit) on May 13, 2008 at 18:14 UTC

    I suggest you also take a look at PAR.

    I've used PAR::Dist::FromCPAN (actually cpan2par) to create a PAR file from a CPAN module (along with dependencies!) which can then be installed on a completely bare bones system containing just a basic Perl installation with the use of PAR::Dist.

Re: Suggestions on Deploying Perl Test Environment
by Anonymous Monk on May 13, 2008 at 17:07 UTC
    Hi ,

    WRT your question regarding perl on Windoze/DOS - I'd recommend strawberry perl - it comes packaged with dmake && gcc etc.

    There are 2, not so much problems, as observations I would make ...

    • It doesn't have an easily modifiable installation directory as it installs to C:strawberry
    • The only hiccup in it's use was in the development of an XS interface to a proprietary DDL :-))
      > It doesn't have an easily modifiable installation directory as it installs to C:strawberry

      ... but it does if you generate your own dist based on it.
Re: Suggestions on Deploying Perl Test Environment
by Anonymous Monk on May 12, 2008 at 20:21 UTC
Re: Suggestions on Deploying Perl Test Environment
by diabelek (Beadle) on May 28, 2008 at 19:04 UTC

    Thanks for all the feedback and the interesting banter :)

    For now, we have decided to just patch the module so it works for us and then use a cpan script to install the modules we need. MinGW will be our compiler and make tool.

    The PAR and Perl::Dist are things were looking into since they might make deployment easier once we have more OSes that need support but they both seem to take a lot of work from what I've read.

    Once everything is put together, if anyone asks, I'll post our installer script for people to tear apart.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://686092]
Approved by pc88mxer
Front-paged by pc88mxer
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2023-03-25 22:37 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.