Verify synchronization

Proxies deployed to the hybrid management plane are downloaded to the runtime plane by a process called the synchronizer (apigee-sync). After the proxies are downloaded, they are saved to pod storage where message processors 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:

  1. Get the names of the pods in your cluster:
    kubectl get pods -n namespace
  2. Use port-forwarding to gain access the apigee-mp pod:
    kubectl port-forward -n namespace podname 8843:8843
    For example:
    kubectl port-forward -n apigee apigee-mp-hybrid-test-7-prod-blue-57965b7789-6j4bp 8843:8843
  3. Then, in another terminal window, curl the classification/tree API:
    curl -k https://0:8843/v1/classification/tree
    Here is an example response, which lists information about the deployed proxies:
    [ {
      "condition" : "(always matches)",
      "virtualHost" : {
        "env" : "test",
        "name" : "default",
        "org" : "hybrid-test",
        "tree" : {
          "elements" : [ {
            "application" : "mocktargetapigee",
            "basePath" : "/mocktargetapigee",
            "name" : "default",
            "revision" : "1"
          }, {
            "application" : "testproxy",
            "basePath" : "/testproxy",
            "name" : "default",
            "revision" : "1"
          }, {
            "application" : "helloworld",
            "basePath" : "/v0/hello",
            "name" : "default",
            "revision" : "1"
          }, {
            "application" : "oauth",
            "basePath" : "/oauth/client_credential",
            "name" : "default",
            "revision" : "1"
          }, {
            "application" : "foobar",
            "basePath" : "/foobar",
            "name" : "default",
            "revision" : "4"
          } ],
          "name" : "IdentificationTree"
        }
      }
    } ]

View synchronized data on the apigee-mp pod

Data that is synchronized to the runtime plane is stored on mounted directories inside the apigee-sync and apigee-mp pods. This section explains how to view synchronized data on these apigee-mp pod filesytem.

  1. Get the names of the pods in your cluster:

    kubectl get pods -n namespace
  2. Get a shell for an apigee-mp pod:
    kubectl exec -it -n your_namespace mp_pod_name --container apigee-mp -- /bin/bash

    For example:

    kubectl exec -it -n MyNamespace \
      apigee-mp-hybrid-docs-test-blue-6fb96f5b9-2k8hp --container apigee-mp -- /bin/bash
  3. 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

  4. cd into the latest timestamp-prefixed directory (20190207.184443.394 in this example).
  5. 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.
  6. If you drill into the deployments directory, you'll find proxy deployment information.
  7. 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

Data that is synchronized to the runtime plane is stored on mounted directories inside the apigee-sync and apigee-mp pods. This section explains how to view synchronized data on these apigee-sync pod filesytem.

  1. Get the names of the pods in your cluster:

    kubectl get pods -n namespace
  2. 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 MyNamespace apigee-sync-6wkvq -- /bin/bash
  3. 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
  4. cd into the latest timestamp-prefixed directory (20190207.184443.394 in this example).
  5. 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.
  6. If you drill into the deployments directory, you'll find proxy deployment information.
  7. If you drill into the config directory, you'll find the actual proxy configurations (proxy bundles) and keystores for each environment.