apigee-remote-service-cli

command module
v0.0.2-dev Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

Go Report Card codecov.io

Apigee Remote Service CLI

Apigee's CLI for remote gateway service. This includes the "remote-service" proxy istalled into Apigee Runtime.

Usage

Prerequisite: Apigee

You must have an Apigee account. Try it free if you don't!

Download a release

Releases can be found here.

Download the appropriate release package for your operating system and extract it. You'll see a top-level list similar to:

LICENSE
README.md
apigee-remote-service-cli

apigee-remote-service-cli (or apigee-remote-service-cli.exe on Windows) is the Command Line Interface (CLI) for this project. Add it to your PATH for quick access (or remember to specify the path for the commands below).

Provision Apigee

The first thing you'll need to do is provision your Apigee environment to work with the apigee-remote-service. The provision command will install a proxy into Apigee if necessary, set up a certificate on Apigee, and generate some credentials the remote service will use to securely connect back to Apigee.

Tip You can automatically format the emitted config as a Kubernetes ConfigMap intead of raw YAML by using the --namespace option.

Upgrading
By default, running provision will not attempt to install a new proxy into your environment if one already exists. If you are upgrading from a prior release, add the --forceProxyInstall option to the commands below to ensure that the latest proxy is installed into your environment.

Apigee SaaS
apigee-remote-service-cli provision --legacy --user $USER --password $PASSWORD --organization $ORG --environment $ENV

Tip The CLI will automatically pick up a username and password from a .netrc file in your home directory if you have an entry for api.enterprise.apigee.com.

Apigee Hybrid

Apigee Hybrid

You must be authenticated with gcloud for your hybrid project and get a valid token:

TOKEN=$(gcloud auth print-access-token);echo $TOKEN

Run provision to get your configuration and store it in a file:

apigee-remote-service-cli provision --organization $ORG --environment $ENV --developer-email $EMAIL --runtime $RUNTIME --token $TOKEN > config.yaml

Install a certificate in your Kuberentes environment:

apigee-remote-service-cli token create-secret --config config.yaml --truncate 1 --token $TOKEN > secret.yaml
kubenetes apply -f secret.yaml

Verify your proxy and certificate. The following should succeed with a valid JSON:

curl --http1.1 -i $RUNTIME/remote-service/certs
Apigee OPDK

If you are running Apigee Private Cloud (OPDK), you'll need to specify your private server's --management and --runtime options in the command. The URIs must be reachable from your Istio mesh.

apigee-remote-service-cli provision --opdk --user $USER --password $PASSWORD --organization $ORG --environment $ENV

Tip
The CLI will automatically pick up a username and password from a .netrc file in your home directory if you have an entry for your management host machine.

Using Apigee Remote Service

Now check out apigee-remote-proxy-envoy to put Apigee Remote Service to use with Envoy as an API proxy.

Also, check out the additional capabilities of the CLI including binding Apigee products to target APIs and manipulating JWT tokens.

    $ apigee-remote-service-cli -h
    This command lets you interact with Apigee Remote Service

    Usage:
    apigee-remote-service-cli [command]

    Available Commands:
    bindings    Manage Apigee Product to Remote Service bindings
    help        Help about any command
    provision   Provision your Apigee environment for remote services
    token       JWT Token Utilities
    version     Prints build version - specify org and env to include proxy version

    Flags:
    -h, --help   help for apigee-remote-service-cli

    Use "apigee-remote-service-cli [command] --help" for more information about a command.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package apigee provides a client for administering Apigee Edge.
Package apigee provides a client for administering Apigee Edge.
cmd
Code generated for package proxies by go-bindata DO NOT EDIT.
Code generated for package proxies by go-bindata DO NOT EDIT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL