Deploy from Windows to Unix - Forum - OpenEdge Architecture - Progress Community
 Forum

Deploy from Windows to Unix

  • OE 10.1C

    We are working on a project using the OE Architect with SVN as our versioning tool.

    The application has to be deployed on Unix.

    Before using SVN we used a Samba directory mapping as our workspace, and we used a terminal emulator to start a Progress session on Unix and compile our sources.

    With subversion we cannot share the same working directory anymore, because svn locks files when it's being used by multiple developers.

    Now we use a local working directory. The problem now is testing. After every change, the source has to be copied to Unix and compiled. Using the "Build project" feature doesn't help us, because the .r files wil be compiled using local Windows Progress version and won't run on Unix.

    Is there a way to "deploy" our sources to the Unix server and automatically have it compiled on Unix?

  • Won't solve your r-code problem, but maybe you can use the Samba share to share the developers home directories on UNIX to be the working directory?

    And compile manually on UNIX like you did before. Or maybe there is a "OEA hook" that you can tap into to trigger a compile process on UNIX.

    To make sure the sources will run on UNIX you have to compile on the target platform that's for sure.

  • That's something we thought of also. It would save us from manually copying the sources to Unix, but would still require a compile action.

    And compile manually on UNIX like you did before. Or

    maybe there is a "OEA hook" that you can tap into to

    trigger a compile process on UNIX.

    This "hook" is what we're searching for. I also develop with Java using Netbeans as developing tool and Glassfish as server on Unix. With Netbeans I'm able to deploy my changes to the Glassfish server and no manual action on Unix is required to get it to run.

    So a "hook" for OpenEdge Architect would be very nice.

    To make sure the sources will run on UNIX you have to

    compile on the target platform that's for sure.Won't solve your r-code problem, but maybe you can

    use the Samba share to share the developers

    home directories on UNIX to be the working

    directory?

  • Maybe you can modify the _idecompile.p procedure?

  • You could use Ant and script your way out of it quite easily. There is native support for Ant in eclipse.

    We use this with our deployment toolset to achieve automation of various deployment and build processes related to environments managed and deployed from Roundtable.

    Regards / Med Venlig Hilsen 

    Thomas Hansen
    Director
    ___________________________________
    appSolutions a|s

  • You could use Ant and script your way out of it quite

    easily. There is native support for Ant in eclipse.

    We use this with our deployment toolset to achieve

    automation of various deployment and build processes

    related to environments managed and deployed from

    Roundtable.

    Hello Thomas,

    Googling I see that there are possibilities for using ANT, but I fail to find anything about Ant in OpenEdge architect. That is, I can find the Ant plugin in the install directory, but I cannot find how to define/edit/run ant scripts from the OEA.

    Maybe you can help me further with that?

  • Ant support is built into Eclipse, but for some reason it is partially turned off in OpenEdge Architect.

    I cannot remember exactly which plug-ins I had to install to get Ant enabled. I will check my setup and see which ones you need to install. Java development is one of them I think.

    There is actually very nice support for Ant in Eclipse, and you can use Run configurations for Ant very similar to what you now have for OpenEdge in 10.2A.

    Regards / Med Venlig Hilsen 

    Thomas Hansen
    Director
    ___________________________________
    appSolutions a|s

  • As far as I can see, you get the Ant stuff enabled if you add the "Eclipse Java development tools" to your OEA setup.

    Once you have installed this, you should have Ant preferences under Window | Preferences.

    You can then also add extra File Associations to the Content Types preference under Window | Preferences to provide better support for your Ant files that may have different names than just "build.xml".

    I forgot to mention, that there is also a very nice extension to Ant which provides built in Progress support for Ant. So you can do compiles, build procedure libraries, create and update database etc. database.

    Have a look at : http://pct.sourceforge.net

    Using PCT and possible some other extensions to Ant, you can set up environments that can do pretty much everything in working with files, directories, packaging, compiling, moving to other environments, etc. etc.

    If you then add continuous build tools like Hudson, Cruise Control or AnthillPro to the equation, you can achieve a high level of automation.

    Regards / Med Venlig Hilsen 

    Thomas Hansen
    Director
    ___________________________________
    appSolutions a|s

  • Thanks a lot, I'll check things out.

  • IMHO as a quick alternative you could modify _idecompile.p and RUN the compile on an AppServer on UNIX. You could even use the "parseErrors" procedure to provide feedback in OEA.

  • You might also want to ask this question on the OpenEdge Architect forum.

    -- peter

  • Don't modify _idecompile.p. There are events in OEA that allow you to be notified of the compile.

    creaet a program named _idestartup.p and put it in your propath.

    add the following lines to _idestartup.p

    define variable h as handle no-undo.

    run eventhook.p persistent set h.

    subscribe procedure h to "OEIDE_EVENT" anywhere.

    Create another file named eventhook.p (or whatever) and put that in your propath.

    Add the following liens to eventhook.p

    procedure OEIDE_EVENT:

    DEFINE INPUT PARAMETER eventName AS CHARACTER NO-UNDO.

    DEFINE INPUT PARAMETER projectName AS CHARACTER NO-UNDO.

    DEFINE INPUT PARAMETER programName AS CHARACTER NO-UNDO.

    DEFINE INPUT PARAMETER eventData AS CHARACTER NO-UNDO.

    // do something with the event

    end.

    There are two compile events "before-compile" and "after-compile".

    Message was edited by:

    Matthew Baker

  • Great!

    For 10.1B users:

    Documentation for the OpenEdge Architect is available as online help. You can access this help from the OpenEdge Architect Help menu.

    As of 10.1C the OEA Help is also available as a PDF document.

  • A couple of questions:

    - .r code is OS independent. Assuming you're not trying to mix 32-bit OE on Windows with 64-bit OE on Unix, what's the problem you're facing?

    - is there a reason that you can't just use source code on the unix box, with it being automatically compiled at runtime?

    - does the svn server happen to reside on the unix box? If so, it would be very simple to create a post-create hook to check out the latest version of the code and compile it. (If the svn server is remote, the svn hook would be only a little bit more complex to implement)

  • I got it working using your tips.

    I wrote a script that copies the modified files to unix, then using a PCT tool I run a local program which in turn runs a compile program on my appserver to compile the changed programs.

    Using the PCT I also made a few ANT scripts to generate my java proxies and automatically make a jar and deploy it to my java environment.

    Everybody thanks a lot for your suggestions.

    As far as I can see, you get the Ant stuff enabled if

    you add the "Eclipse Java development tools" to your

    OEA setup.

    Once you have installed this, you should have Ant

    preferences under Window | Preferences.

    You can then also add extra File Associations to the

    Content Types preference under Window | Preferences

    to provide better support for your Ant files that may

    have different names than just "build.xml".

    I forgot to mention, that there is also a very nice

    extension to Ant which provides built in Progress

    support for Ant. So you can do compiles, build

    procedure libraries, create and update database etc.

    database.

    Have a look at : http://pct.sourceforge.net

    Using PCT and possible some other extensions to Ant,

    you can set up environments that can do pretty much

    everything in working with files, directories,

    packaging, compiling, moving to other environments,

    etc. etc.

    If you then add continuous build tools like Hudson,

    Cruise Control or AnthillPro to the equation, you can

    achieve a high level of automation.