Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
DNR question
parsan99
Hi All
Any input on the following OD issue will be very helpful to me. I am using OD 5.0.1
I have a scenario involving two boxes #1 Teamsite and #2 Application server. On the first hand I need to identify if a particular directory exists on the Application server and then deploy to the directory.. I initially planned on a dummy deployment which would run a DNR on the target to check for the directory existence. But I am not sure how I could get the results back to the source system.
I read about IN MEMORY logs but havent been able to find documentation on how to access it. Any help with this will be greatly appreciated.
My other option is to write the results of the target DNR to a file, deploy it back to the source and then proceed. But it looks too cumbersome for a small process like this.
Thanks in advance
Find more posts tagged with
Comments
Ant
Hi Parsan99,
I am assuming the following about your requirement:
- you wish to check a particular directory on your TARGET server. IF the directory does not exist then you wish to cancel the current deployment.
If that assumption holds then the following solution should work.
The OpenDeploy configuration script on your source server should have a tag similar to:
<dnrDeployment
location="source"
when="before"
state="always" >
<script
cmd="checkForDirectory.ipl"
where="/tmp"
async="no"
/>
</dnrDeployment>
Create a script on your TARGET server which checks for the directory (a perl script could do this). If the script does not find the directory then it should print to STDOUT a tag such as follows to cancel the deployment.
<response code="-2"/>\n
Printing this out should indicate to OpenDeploy that the result of the action was to signal the deployment to do a
hard abort in which the deployment stops immediately.
I have borrowed somewhat from the 5.5.1 manual with this, however the logging DTD seems the same in 5.0.1 so I believe it should work.
I hope this helps.
Cheers
Michael
parsan99
Hi Michael
This works perfect. Thank you so much
cheers
Parsan99