Deploy from Windows to Unix

Posted by wvdgraaf on 18-Feb-2009 01:45

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?

All Replies

Posted by Simon de Kraa on 18-Feb-2009 02:04

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.

Posted by wvdgraaf on 18-Feb-2009 02:20

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?

Posted by Simon de Kraa on 18-Feb-2009 02:44

Maybe you can modify the _idecompile.p procedure?

Posted by asthomas on 18-Feb-2009 03:11

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.

Posted by wvdgraaf on 18-Feb-2009 04:03

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?

Posted by asthomas on 18-Feb-2009 04:07

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.

Posted by asthomas on 18-Feb-2009 04:16

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.

Posted by wvdgraaf on 18-Feb-2009 04:18

Thanks a lot, I'll check things out.

Posted by Simon de Kraa on 18-Feb-2009 04:35

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.

Posted by Peter Judge on 18-Feb-2009 07:54

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

-- peter

Posted by Matt Baker on 18-Feb-2009 08:24

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

Posted by Simon de Kraa on 18-Feb-2009 14:00

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.

Posted by jtownsen on 24-Feb-2009 04:18

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)

Posted by wvdgraaf on 24-Feb-2009 04:27

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.

Posted by Admin on 24-Feb-2009 13:19

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.

My 2 cents if you went this way (and seconding a previous message from Thomas Hansen) : use a continuous integration system to generate your builds (instead of doing it from a dev box, or having to start it manually, or automatically from shell scripts). My favorite is Hudson, don't hesitate to have a look.

This thread is closed