Skip to content

Quick Demo: Apigee CG SaaS Docker

Scott Ganyo edited this page Nov 24, 2020 · 3 revisions

Prerequisites

  • Apigee App granted access to API Product with httpbin.org remote service target
  • docker on PATH and running

Set environment

VERSION=1.3.0
OS=macos # or 'linux'
ORG=myorg
ENV=test
USER=myusername
PASS=mypassword
API_KEY=myapikey
ARSC=$(pwd)

Download and provision

wget "https://github.com/apigee/apigee-remote-service-cli/releases/download/v${VERSION}/apigee-remote-service-cli_${VERSION}_macOS_64-bit.tar.gz"

tar xfz apigee-remote-service-cli_${VERSION}_${OS}_64-bit.tar.gz

${ARSC}/apigee-remote-service-cli provision --legacy --organization ${ORG} --environment ${ENV} --username ${USER} --password ${PASS} --force-proxy-install > ${ARSC}/config.yaml

Create sample and run on docker

${ARSC}/apigee-remote-service-cli samples create --config ${ARSC}/config.yaml --template native --out ${ARSC}/samples --adapter-host envoy-adapter

docker network create apigee

docker run --rm -d -p 5000:5000 -p 5001:5001 --net apigee --name envoy-adapter -v ${ARSC}/config.yaml:/config.yaml:Z google/apigee-envoy-adapter:v${VERSION} -l debug

docker run --rm -d -p 8080:8080 --net apigee --name httpbin-proxy -v ${ARSC}/samples/envoy-config.yaml:/config.yaml:Z getenvoy/envoy:stable -c config.yaml

curl -i localhost:8080/headers -Hhost:httpbin.org -Hx-api-key:${API_KEY}