How to deploy to Apigee Edge with a single click?

4 1 713

Hi everyone,

In this article, I'm going to explain Deploy Now, a new utility that improves the ability to deploy API Proxies with a single click to Edge without the need of additional tools.

This utility is open for anyone who wants to share API Proxy source code in Github with others. Just follow the directions below, and you'll be all set.

apigee-deploy-now

The purpose of Deploy Now Button is to make easy deployment of API Proxy Samples to Apigee Edge. So, you no longer need to install tools on your laptop. Just click on the button below to get started.

Getting started

For developers looking for additional examples of API Proxies enabled with Deploy Now, checkout the following examples:

API Proxy Samples

As you can see, to enable your public Git repo, simply add the following HTML fragment to your Git README.md along with a make.sh file:

<a href="https://deploynow.apigee.com/login-form/?repo=https://github.com/dzuluaga/Mavendeploynow.git&apiFolder=/&makeScript=make.sh">
<img src="https://raw.githubusercontent.com/apigee/apigee-deploy-now/master/images/deploy_to_apigee.png" align="left" height="45" width="232" >
</a>

Parameters

The following parameters are required:

  • repo: Public git repo URL/SSH (Github, Gitlabs, Bitbucket, etc.). Private repos will be supported by providing SSH keys. e.g.https://github.com/dzuluaga/Mavendeploynow.git
  • apiFolder: Directory of the API proxy within the repo. This is useful to indicate the directory in which the make.sh and api proxy artifacts are located. e.g. /, /api-tutorials/api-proxy-1/
  • makeScript: Filename of the shell file to be executed located within the repo. This file executes deployment tools apigeetool, Grunt, Maven. etc. e.g. make.sh

For instance, anybody with an Apigee Edge account can deploy the API Proxy with the link below:

https://deploynow.apigee.com/login-form/?repo=https://github.com/dzuluaga/Mavendeploynow.git&apiFold...

the API

API Proxies can also be deployed through the API, so no need to leverage the HTML form.

API Proxy from Github Repo
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d 'repo=https%3A%2F%2Fgithub.com%2Fakoo1010%2Fapigee-tutorials.git' -d 'apiFolder=apiproxies%2Fapigee-nock-mock' -d 'makeScript=make.sh' \
-d 'org=testmyapi' -d 'env=test' -d 'userName='$ae_username'' -d 'pw='$ae_password'' 'https://deploynow.apigee.com/deploy' -v
API Proxy from a zip file
curl -v -X POST -F "zipFile=@Mavendeploynow-master.zip" -F "makeScript=makeScript.sh" -F "apiFolder=Mavendeploynow-master/src/gateway/forecastweatherapi/" -F "org=testmyapi" -F "env=test" \
-F userName=$ae_username -F pw=$ae_password 'https://deploynow.apigee.com/deploy_zip'

Wanna run Deploy Now in-house?

This repo contains all the Node.js and Express.js code necessary to run it on your own server. So, please help yourself, clone this repo and deploy it locally!

Access Login App

https://deploynow.apigee.com/login-form/

Access Login App

http://localhost:3000/login-form/

Credits

Thanks to @Alex Koo and @Maruti Chand who collaborated several weekends building this tool.

Git Repo

Source code of this article is available from Apigee Deploy Now Github Repo.

Comments
anilsr
Staff

Awesome @Diego Zuluaga , @Alex Koo , @Maruti Chand . Great tool, very useful one.

Version history
Last update:
‎01-12-2016 11:38 PM
Updated by: