• Close
    • Close

Running ConfigNOW Asynchronously

By March 12, 2013ConfigNOW

I thought I’d share this with you all as you may find this useful.

The question raised by a customer was how can they run multiple instances of ConfigNOW at the same time. The reason for this request is to allow them to run multiple instances of OSB deployer into different environments at the same time.

So I came up with this, which in theory should work but I haven’t had a chance to test against their actual deployments yet.

If deemed as worthwhile this could probably be wrapped up in script and added as a feature to “ConfigNOW”

In the root of the ConfigNow directory

Open up a new terminal session and create a couple of named pipes

$ mkfifo deployment-1 deployment-2

$ ls deployment*

prw-r--r-- 1 mmochan staff 0 8 Mar 13:27 deployment-1
prw-r--r-- 1 mmochan staff 0 8 Mar 13:29 deployment-2

Notice the P flag ( Named Pipe )

Fire up another 2 terminal sessions

In each of the sessions change into the ConfigNOW directory and run

Terminal 1

while true; do sh -c "$( cat deployment-1)" ; done

the -c flag basically executes the commands coming out of the cat command.

Terminal 2

while true; do sh -c "$( cat deployment-2)" ; done

Back in your original terminal session

echo "./ help" > deployer-1; echo "./ help" > deployer-2

Note: In the code example above substitute &ampgt; with >

Both ConfigNOW help commands will be run simultaneously and the output will display in both Terminal 1 and Terminal 2.


Leave a Reply