Coder Social home page Coder Social logo

sample-apigee-proxy's Introduction

Deploy Apigee proxy using Apigee Maven plugin and Cloud Build

This sample demonstrates how to use the Apigee Maven deploy plugin to deploy a proxy to Apigee using Cloud Build

Screencast

Alt text

Prerequisites

  1. Provision Apigee X
  2. Access to deploy proxies to Apigee, trigger Cloud Build
  3. Configure external access for API traffic to your Apigee X instance
  4. Make sure the following tools are available in your terminal's $PATH (Cloud Shell has these pre-configured)

(QuickStart) Setup using CloudShell

Use the following GCP CloudShell tutorial, and follow the instructions.

Open in Cloud Shell

Setup instructions

  1. Clone the apigee-samples repo, and switch the deploy-apigee-proxy directory
git clone https://github.com/mohit1050/sample-apigee-proxy.git
cd sample-apigee-proxy
  1. Edit the env.sh and configure the ENV vars
  • PROJECT the project where your Apigee organization is located
  • APIGEE_HOST the externally reachable hostname of the Apigee environment group that contains APIGEE_ENV
  • APIGEE_ENV the Apigee environment where the demo resources should be created

Now source the env.sh file

source ./env.sh
  1. Enable the Cloud Build API and assign Apigee Org admin role to the Cloud Build service account
gcloud services enable cloudbuild.googleapis.com

gcloud projects add-iam-policy-binding "$PROJECT" \
  --member="serviceAccount:$CLOUD_BUILD_SA" \
  --role="roles/apigee.admin"
  1. Trigger the build
gcloud builds submit --config cloudbuild.yaml . \
    --substitutions="_APIGEE_TEST_ENV=$APIGEE_ENV"

Test the APIs

You can test the API call to make sure the deployment was successful

curl -v -X GET https://$APIGEE_HOST/eurekaserver

Cleanup

If you want to clean up the artifacts from this example in your Apigee Organization, first source your env.sh script, and then run

./clean-up-deploy-apigee-proxy.sh

sample-apigee-proxy's People

Contributors

mohitmahajannttdata avatar

Watchers

Mohit Mahajan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.