Deploy Multiple Apigee Proxies at one go - ApigeeDM - A node.js command line tool

Hello Everyone,

A community question posted here inspired me to write apigeedm plugin, It's a Nodejs based command line plugin. It's built on top of apigeetool Node.js plugin written by Apigee Team.

Apigeedm:

It allows you to deploy multiple proxies by executing a simple command at one go. You don't need to execute apigee deploy command multiple times for multiple proxies individually.

Installation :

Installing this plugin is super smooth. Just execute below command to install apigeedm plugin. Make sure Node.JS & NPM is installed in your machine.

sudo npm install -g apigeedm

Usage :

You will just specify folder location where your apigee proxies are present & apigee credentials, rest tool will take care to deploy multiple proxis in one go. You need to make sure below folder structure of source location that you specify.

Let's say your root directory is /Users/Anil/Desktop/multipleProxies where multiple proxies are present. Let's say we have proxies weather1 & weather2. Directory structure should be something like below.

Directory Structure should look like below,

1618-screen-shot-2015-12-06-at-65726-pm.png

1619-screen-shot-2015-12-06-at-65737-pm.png

Deploying Multiple Proxies :

Execute below command with source directory option to deploy multiple proxies present in same folder,

apigeedm -s /Users/Anil/Desktop/multipleProxies

Once you execute the command, you will be asked to submit your org credentials,

1621-screen-shot-2015-12-06-at-70238-pm.png

That's it, multiple proxies will be deployed to Apigee Edge at one go.

You can also provide org credentials directly while executing the command itself using options provided by command line. It will be helpful if you would like to use this tool in some other script.

apigeedm -s /Users/Anil/Desktop/multipleProxies -b https://api.enterprise.apigee.com -o ORGNAME -u USERNAME -p PASSWORD -e ENVNAME -v VIRTUALHOSTS

1622-screen-shot-2015-12-06-at-70709-pm.png

Hope it will be useful, Keep us posted

Comments
jonesfloyd
Staff

Anil! Wow, this is super cool! Just tried it out, and it worked brilliantly. Few initial comments:

  • command-line args didn't seem to work for me. I still got prompted for the parameters.
  • Would be great if sibling directories that aren't proxies (no /apiproxy child) simply got skipped rather than causing deployment to fail.
  • Would be great to have an option to replace an existing deployment rather than creating a new revision.

Awesome work, man! May let us replace our shell script that deploys through Maven, one proxy at a time.

jonesfloyd
Staff

Actually, I take that back about replacing Maven. We're also using it for variables replacement. But this tool is still helpful.

anilsr
Staff

@Floyd Jones , Thank you for the great feedback & using the tool. I will work on above suggestions & keep you posted

Not applicable

Hi @Anil Sagar :

I was curious what if the proxy weather1 fails to deploy due to some error?? Will the tool continue to deploy next proxy in the list??

Also can we give multiple values for VIRTUALHOSTS sth like

-v default,secured

both at same time?

Not applicable

how to install and use this apigeedm in windows cmd?

anilsr
Staff

@srujan kumar , Same like any other node module. Nothing specific. If you can install any other Node.JS module, you can install above. But, I haven't tested above module in windows.

Not applicable

Is there any other way other than apigeedm to deploy the multiple proxies at a time. the operating system i am using is windows.plz clarify on this..

Version history
Last update:
‎12-06-2015 05:39 AM
Updated by: