apigeetool-node icon indicating copy to clipboard operation
apigeetool-node copied to clipboard

apigeetool when deploying a proxy doesn't support setting the virtualhosts as in deploying a nodeapp

Open carranzm opened this issue 10 years ago • 1 comments

We have our own instance of Apigee and when trying to deploy a node app we do the following:

apigeetool deploynodeapp -u [email protected] -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2 -v 'default,secure'

But this same option is not available when deploying a proxy:

apigeetool deployproxy  -u [email protected] -o sdoe  -e test -n example-proxy -d .

you can't do this:

apigeetool deployproxy  -u [email protected] -o sdoe  -e test -n example-proxy -d . -v 'default,secure'

Any ideas how to overcome this without defining it into the XML code? Thanks.

carranzm avatar Apr 01 '15 08:04 carranzm

Thanks for trying it out and posting!

The two commands are actually somewhat different.

"deploynodeapp" tries to make it possible to create and deploy a standard Node.js application to Apigee. So, under the covers, it creates a new project, generates the XML files for the "proxy" and "target," and then deploys it.

"deployproxy," however, assumes that you have already created an Apigee proxy, including the "proxy" and "target" XML files, and want to deploy them as-is.

The virtual hosts are specified in the "proxy" XML file. Since "deployproxy" doesn't generate that file, there's no option to specify what goes in there.

Doing what you're suggesting would be possible, but it'd require some XML manipulation of the file to replace the existing virtual hosts with what's on the command line.

An alternative would be to use some sort of macro processor (you can take your pick -- there are tons) and run it before "deployproxy" to do the actual replacement. That could be part of apigeetool, but it could also be part of some other tool...

So that's why it works the way that it does. If you're interested in changing it, however, we can see if anyone in the community has time and wants to give it a try!

On Wed, Apr 1, 2015 at 1:56 AM, carranzm [email protected] wrote:

We have our own instance of Apigee and when trying to deploy a node app we do the following:

apigeetool deploynodeapp -u [email protected] -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2 -v 'default,secure'

But this same option is not available when deploying a proxy:

apigeetool deployproxy -u [email protected] -o sdoe -e test -n example-proxy -d .

you can't do this:

apigeetool deployproxy -u [email protected] -o sdoe -e test -n example-proxy -d . -v 'default,secure'

Any ideas how to overcome this without defining it into the XML code? Thanks.

— Reply to this email directly or view it on GitHub https://github.com/apigee/apigeetool-node/issues/11.

greg brail | apigee https://apigee.com/ | twitter @gbrail http://twitter.com/gbrail

gbrail avatar Apr 01 '15 16:04 gbrail