Proxies deployed to the hybrid management plane are downloaded
to the runtime plane by a service called the
Synchronizer (apigee-sync
).
After the proxies are downloaded, they are saved to pod storage where
MPs retrieve and deploy them.
Of course, calling an API proxy is one way to verify that it is deployed. This sections describes other techniques you can use to verify that your proxies are synchronized and deployed.
List deployed proxies
Use the classification/tree
API to list proxies deployed to the MP:
- Get the names of the pods in your cluster:
kubectl get pods -n namespace
- Use port-forwarding
to gain access the
apigee-runtime
pod. The syntax for port forwarding is as follows:kubectl port-forward -n namespace podname 8843:8843
For example:
kubectl port-forward -n apigee \ apigee-runtime-my-organization-test-blue-57965b7789-6j4bp 8843:8843
- Then, in another terminal window, use a utility such as
curl
to send a request to theclassification/tree
API, as the following example shows:curl -k https://0:8843/v1/classification/tree
Here is an example response, which lists information about the deployed proxies in the "test" environment:
[ { "condition" : "(always matches)", "virtualHost" : { "env" : "test", "name" : "default", "org" : "my-organization", "tree" : { "elements" : [ { "application" : "myproxy", "basePath" : "/myproxy", "name" : "default", "revision" : "1" } ], "name" : "IdentificationTree" } } } ]
View synchronized data directly
Data that is synchronized to the runtime plane is stored on mounted directories inside
the apigee-sync
and apigee-runtime
pods. This section
explains how to view synchronized data on these pod filesytems.
View synchronized data on the apigee-runtime pod
- Get the names of the pods in your cluster:
kubectl get pods -n namespace
- Get a shell for an
apigee-runtime
pod:kubectl exec -it -n your_namespace runtime_pod_name \ --container apigee-runtime -- /bin/bash
For example:
kubectl exec -it -n my-namespace \ apigee-runtime-hybrid-docs-test-blue-6fb96f5b9-2k8hp \ --container apigee-runtime -- /bin/bash
- View the contents of the
/opt/apigee/repomnt
directory. If proxy data has been synchronized, you will see directory contents similar to the following:ls /opt/apigee/repomnt 20190207.184443.394 owners versions.properties
cd
into the latest timestamp-prefixed directory (20190207.184443.394
in this example).- In this directory, you'll find the file
env.json
. This file describes the API runtime environment that was downloaded from the management plane. It represents the "contract" of shared information that is required for the runtime to function, including proxies, environment information, keystores, and other entities. - If you drill into the
deployments
directory, you'll find proxy deployment information. - If you drill into the
config
directory, you'll find the actual proxy configurations (proxy bundles) and keystores for each environment.
View synchronized data on the apigee-sync pod
- Get the names of the pods in your cluster:
kubectl get pods -n namespace
- Get a shell for an
apigee-sync
pod:kubectl exec -it -n your_namespace \ sync_pod_name -- /bin/bash
For example:
kubectl exec -it -n my-namespace \ apigee-sync-6wkvq -- /bin/bash
- Once in the pod, go to the following directory, where you will
find the synchronized data:
/opt/apigee/repomnt/your_org/yourEnv
For example:
ls /opt/apigee/repomnt/hybrid/test 20190207.184443.394 owners versions.properties
cd
into the latest timestamp-prefixed directory (20190207.184443.394
in this example).- In this directory, you'll find the file
env.json
. This file describes the API runtime environment that was downloaded from the management plane. It represents the "contract" of shared information that is required for the runtime to function, including proxies, environment information, keystores, and other entities. - If you drill into the
deployments
directory, you'll find proxy deployment information. - If you drill into the
config
directory, you'll find the actual proxy configurations (proxy bundles) and keystores for each environment.