Create and deploy a new API proxy

Now that you've configured GCP and the hybrid UI, and installed and configured the runtime, you're ready to see how it all works together.

This section walks you through the following:

  1. Create a new API proxy in the Apigee UI using the API Proxy Wizard
  2. Deploy your new proxy to your cluster with the UI

1. Create a new API proxy using the hybrid UI

This section describes how to create a new API proxy in the UI by using the API Proxy Wizard.

To create a simple API proxy using the API Proxy Wizard:

  1. Open Apigee hybrid UI in a browser.
  2. Select Develop & API Proxies in the main view.
  3. From the Environment drop-down list, select the environment in which you want to create a new API proxy. This section assumes the name of the environment is "test". You created at least one environment in Step 5: Add an environment.

    The hybrid UI displays a list of API proxies for that environment. If you haven’t created any proxies yet, the list is empty.

  4. Click +Proxy in the upper right.

    The API Proxy Wizard starts:

  5. Select Reverse proxy (most common), and click Next.

    The Proxy details view is displayed.

  6. Configure your proxy with the following settings:
    • Proxy Name: Enter "myproxy". The remaining steps in this section assume that this is your proxy's ID.
    • Proxy Base Path: Automatically set to "/myproxy". The Proxy Base Path is part of the URL used to make requests to your API. Edge uses the URL to match and route incoming requests to the proper API proxy.
    • Existing API: Enter "https://mocktarget.apigee.net". This defines the target URL that Apigee Edge invokes on a request to the API proxy. The mocktarget service is hosted at Apigee and returns simple data. It requires no API key or access token.
    • (Optional) Description: Enter a description for your new API proxy, such as "Testing Apigee hybrid with a simple proxy".

    Your API proxy's details should look like the following:

  7. Click Next.
  8. On the Security screen, select Pass through (none) as the security option:

  9. Click Build.

    Hybrid generates the proxy (sometimes referred to as the proxy bundle):

  10. Click Exit.

    Hybrid displays the Proxies view, which displays a list of API proxies. The new proxy should be at the top of the list, with a gray status indicator, meaning that it has not yet been deployed.

2. Deploy your proxy to the cluster using the hybrid UI

After creating a new proxy, you must deploy it so that you can try it out. This section describes how to deploy your new proxy using the hybrid UI.

To deploy an API proxy in the hybrid UI:

  1. In the hybrid UI, select Develop > API Proxies.

    Be sure the "test" environment is selected.

    The UI displays your new proxy in the proxies list:

  2. Click on the "myproxy" proxy.

    The UI displays the API Proxies Overview tab for that proxy.

    Notice that under Deployments, the Revision column shows "Not deployed".

  3. In the Revision column, expand the drop-down selector to choose the revision to deploy.

    The drop down list displays only "1" and "Undeploy":

  4. Select "1"—the revision that you want to deploy—from the drop down list.

    The UI prompts you to confirm the deployment:

  5. Click Deploy.

    The UI begins the process of deploying revision 1 of your new proxy to the cluster.

    Note that deployment is not an instantaneous process. Hybrid's "eventually consistent" deployment model means that a new deployment will be rolled out to the cluster over a short period of time and not immediately.

While there are several ways to check the deployment status of a proxy in the UI, the next two steps explain how to call the API proxy you just deployed and how to check the deployment status with a call to the Apigee APIs.

3. Call the API proxy

When the UI indicates your proxy is deployed, you can try calling it:

  1. If you used the wildcard character '*' for the envs.hostAlias property as instructed in Configure the cluster, follow these steps before continuing:
    1. Get the external IP for the istio-ingressgateway service. For example:
      kubectl get services -n apigee

      In the output, you will see something like this, where 34.68.41.240 is the external ingress IP address:

      NAME                       TYPE           CLUSTER-IP      EXTERNAL-IP      PORT(S)
      istio-ingressgateway       LoadBalancer   10.43.255.19    34.68.41.240      80:31381/TCP,443:31391
    2. Copy the value of the EXTERNAL-IP to use in the next step. In this example, you would copy 34.68.41.240.
  2. Call the proxy using cURL or the REST client of your choice:
    curl -v -k https://34.68.41.240/myproxy

    If the call succeeds, you will see the following output:

    Hello, Guest!