Automating Backup of Apigee API Proxies to GitHub

Apigee empowers you to quickly uncover back-end services as APIs. You can do this by building an API proxy that offers a facade for the back-end service. The API proxy decouples the back-end service implementation from the API, which protects developers from forthcoming changes to your back-end services. As the back-end services get updated, developers, protected from these changes, can continue to call the API continuously.

Benefits of Automated Deployment

The major value delivered by automated deployment are:

  • Productivity improves as work done through manual processes is replaced with automation.
  • Reducing errors eliminates rework, wait times and the business impact of failures in production.
  • An automation system records and broadcasts to improve audibility and visibility.
  • Automatically downloads APIs and upload to GitHub or any other source repository

Why to back up your APIs?

You may have used the EDGE UI to build API Proxy, deploy proxies, manage developers, apps, keys, products etc. Since it would be difficult to manually download all the proxies. Therefore, many customers want to automate the task of downloading proxies and pushing them to GitHub so we can easily reuse it or we can have our backup.

Challenges

  • Difficulties in manual downloading APIs every time
  • Repetition of the same tasks on multiple environments.
  • Manual work and time required for Configurations and policies variation across all environments.
  • No standard repository
  • No backup

Objective

We will push Apigee API proxies to GitHub using Jenkins and shell script to automate this task.

Technical Overview

  • APIs on Apigee
  • APIs on Apigee
    • Create GitHub repository
  • Move API proxies via Jenkins to GitHub
    • In Jenkins create new job
  • Use Bash commands for writing the script:
  • cd /opt/Apigee

    sudo su -c ./Apigee.sh ( this script will pull all APIs from Apigee using below mentioned commands and then move to GitHub)

  • Using shell scripting to download APIs using Apigee commands
    • apigeetool listdeployments
    • apigeetool fetchproxy
  • Successfully copied APIs from Apigee to Github

Royal Cyber Deploying Automation

Together, these core benefits empower us to make companies deliver to market faster and improve business agility. Common release bottlenecks are eradicated, while the cost and risk associated with production releases are radically reduced. For more information to build API proxies and to make automated deployment you can write to us at [email protected] or visit www.royalcyber.com.

Leave a Reply