
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Enable APIs and set up networking.
/ 25
Create the Apigee evaluation organization.
/ 25
Set up access routing.
/ 25
Test the Apigee evaluation organization using internal access.
/ 25
In this lab, you learn how to create an Apigee X organization (org). You use the Apigee X provisioning wizard to create the Apigee X org. After installing and configuring the org, you install an API proxy and make API calls to verify that the org is operational.
An Apigee evaluation org created in your own Google Cloud project is typically available for 60 days. The org you provision for this lab is deleted when the lab ends, and you lose access to the org.
It is recommended that you read through the lab before you click Start Lab. After starting the lab, you will have 90 minutes to complete the lab. When the allowed time for the lab has expired, the lab ends and the Apigee evaluation org is deleted.
In this lab, you learn how to perform the following tasks:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.
Click Activate Cloud Shell at the top of the Google Cloud console.
Click through the following windows:
When you are connected, you are already authenticated, and the project is set to your Project_ID,
gcloud
is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
Output:
Output:
gcloud
, in Google Cloud, refer to the gcloud CLI overview guide.
In this task, you use the provisioning wizard to provision an Apigee X evaluation org.
An Apigee X org is attached to a customer-managed Google Cloud project.
Before creating an Apigee X evaluation org, certain prerequisites must be met:
The lab project adheres to these prerequisites.
Open a new incognito tab and open the provisioning wizard at apigee.google.com/setup.
From the lab information on the left, copy your Google Cloud project name into the clipboard.
Paste the project name into the Project text box.
A message is displayed indicating that an Apigee subscription is not enabled for this project.
Click Start Evaluation.
Apigee X organizations require that the Apigee, Service Networking, and Compute Engine APIs must be enabled in the Google Cloud project. The wizard enables the required APIs.
Next to Enable APIs, click Edit.
The list of APIs to be enabled is shown:
Click Enable APIs.
After a short wait, the APIs will be completed and a check mark will appear next to Enable APIs.
The provisioning wizard creates Virtual Private Cloud (VPC) network peering between the customer's Google Cloud project and the Google-managed project containing the Apigee runtime. The wizard also creates a private service connection for communication with the Apigee runtime.
Next to Networking, click Edit.
The Set up networking pane asks you to specify an authorized network. The default network is already available and can be used for an evaluation org, but it is typically not recommended to use the default network.
Click See VPC networks in your project.
The VPC Networks page in the console is opened in another tab.
Click +Create VPC Network.
Name the network apigeex-vpc
.
In the New subnet pane, set the following values:
Property | Value |
---|---|
Name | apigeex-vpc |
Region | select |
IPv4 range | 10.0.0.0/20 |
Private Google Access | On |
The IP address range is specified in CIDR format. The decimal number specifies the size of the range, from /32 (a single IP address) to /8 (the largest private IP range, from 10.0.0.0 to 10.255.255.255).
Your subnet must use a range large enough to hold a /22 range. The /20 range being used here is 4 times larger than the /22 range which will be used by Apigee.
In the New subnet pane, click Done.
Click Create.
A new VPC network with a single subnet is created in your project. A circle spins next to the apigeex-vpc network until it has completed.
Wait for the apigeex-vpc network to be created, and then return to the wizard Setup tab.
Click Refresh authorized networks (), and then select the apigeex-vpc authorized network.
Select Automatically allocate IP range.
A peering IP range named google-managed-services-apigeex-vpc with prefix length /22 will be created.
A check mark appears next to Networking when the network configuration setup has completed.
The google-managed-services-apigeex-vpc IP range has been created with a /22 internal IP range.
Click Check my progress to verify the objective.
The provisioning wizard creates an Apigee evaluation org.
Return to the wizard Setup tab.
Next to Apigee evaluation organization, click Edit.
The Create an Apigee evaluation organization pane lets you select the Google Cloud regions that are used for the Apigee runtime and Analytics hosting.
Select
You select a region for the runtime location. Apigee chooses a zone in the region in which to provision the evaluation org.
Select
Click Provision.
You will return to the provisioning wizard later to configure Access Routing.
In this task, you wait for the Apigee evaluation org provisioning to complete.
The Apigee organization provisioning takes quite a while to complete. The org provisioning progress can be monitored by using the Apigee API.
Return to the console tab.
On the top-right toolbar, click the Activate Cloud Shell button.
If prompted, click Continue.
It takes a few moments to provision and connect to the Cloud Shell. When you are connected, you are already authenticated, and the project is set to your PROJECT_ID.
In the Cloud Shell, verify the variable with your Apigee org name:
The variable GOOGLE_CLOUD_PROJECT should contain the name of your project, which is the same as your Apigee organization name.
If the GOOGLE_CLOUD_PROJECT variable is not set, set the variable manually using a command that looks like this, replacing with your project name:
Paste the following command into Cloud Shell:
This series of commands uses the Apigee API to determine when the runtime instance has been created, and then waits for the eval environment to be attached to the instance.
Wait for the provisioning to complete.
When the text ***ORG IS READY TO USE***
is printed, the org can be tested.
An Apigee X organization requires two Google Cloud projects: one managed by the customer, and one managed by Google for the Apigee X runtime. Each project uses its own Virtual Private Cloud (VPC) network. By default, VPC networks in two separate projects cannot communicate with each other.
To enable communication between these VPCs, Apigee uses VPC network peering. Network peering allows internal IP address connectivity between the two networks.
The Apigee runtime runs your API proxies, and is provisioned in the Google-managed project. Incoming requests to the runtime are sent to an internal TCP load balancer which is accessible by using a private IP address in the peered network.
To route traffic from clients on the internet to the Apigee runtime, you can use a global external HTTPS load balancer (XLB). However, an XLB cannot communicate directly with an internal IP address in another project, even if the networks are peered. To solve this problem, a managed instance group (MIG) of virtual machines (VMs) serves as a network bridge.
The VMs in the MIG can communicate bidirectionally across the peered networks. A request coming from the internet would flow through the XLB to a bridge VM in the MIG. The VM can call the private IP of the Apigee runtime's internal load balancer.
The runtime can also directly call internal IP addresses in the peered network in the customer project, or call external IPs through the Google-managed project's Cloud NAT (network address translation) gateway.
The following illustration shows the lifecycle of an API proxy call for a paid Apigee X org.
The Apigee UI is used to manage your org. You may explore your org in the UI by navigating to apigee.google.com.
Click Check my progress to verify the objective.
In this task, you use the provisioning wizard to create the infrastructure that allows API calls to be made from outside of the VPC network.
Return to the wizard Setup tab.
Next to Access routing, click Edit.
Select Enable internet access.
Select Use wildcard DNS service.
A wildcard DNS service will automatically return a DNS entry based upon an IP address embedded in the hostname. For example, the hostname eval-34.100.120.55.nip.io
would resolve to the IP address 34.100.120.55.
To use the default wildcard DNS provider, nip.io, leave the domain unchanged.
For Subnetwork, select apigeex-vpc.
Click Set Access.
Wait until the access routing configuration has completed.
Click Check my progress to verify the objective.
External access for the evaluation org is being created. Creation of the apigee-ssl-cert used by the load balancer may take several minutes, so you'll start by testing internal access.
In this task, you test that a proxy in the Apigee evaluation org can be called from an internal IP address.
To call an API proxy on a runtime instance using an internal IP address, you will create a VM on the same network that has the ability to make a call to the instance.
After provisioning, an Apigee evaluation org only allows internal IP addresses to communicate with the Apigee runtime. A Compute Engine VM within your cluster can send requests to the internal load balancer for the Apigee runtime.
Using Cloud Shell, set the following variables:
The runtime IP address is retrieved using the Apigee API that retrieves the details for a runtime instance. The tool jq is used to parse the JSON response and retrieve a specific field.
Create a virtual machine:
This gcloud
command creates a new virtual machine using the following parameters:
For more information about the parameters, you can use the following command:
Add a firewall rule to allow secure shell (ssh) access to VMs in the network:
This command specifies that incoming requests to SSH to the machine are allowed from any source. SSH sessions still require the user to be authenticated.
In Cloud Shell, open an SSH connection to the new VM:
For each question asked, click Enter or Return to specify the default input.
Your logged in identity is the owner of the project, so SSH to this machine is allowed.
Your Cloud Shell session is now running inside the VM.
In the VM's shell, set required shell variables:
The environment group hostname is used to route calls to API proxies deployed to an environment in the eval environment group.
Call the deployed hello-world API proxy using an internal IP address:
The --resolve setting forces commands sent to the environment group hostname to resolve to the instance's load balancer IP address, since there is no DNS entry for the environment group hostname. The -k option skips verification of the TLS certificate presented by the instance's load balancer.
This curl
command uses a virtual machine connected to the peered network to call the internal IP address of the runtime's load balancer. The curl
command returns the output from the hello-world proxy: Hello, Guest!
Click Check my progress to verify the objective.
In this task, you test that a proxy in the Apigee evaluation org can be called from an external IP address.
The Access Routing step of the provisioning process creates the infrastructure necessary to call your API proxies from external IP addresses. The provisioning wizard creates an external load balancer that calls the runtime through a managed instance group.
In the console, navigate to Network services > Load balancing.
A load balancer named apigee-proxy-url-map was created.
Click apigee-proxy-url-map.
The load balancer configuration sections includes the Frontend, Host and path rules, and the Backend.
The Frontend specifies details about incoming traffic. This load balancer should be accepting HTTPS traffic on port 443 of an external IP address. The certificate is named apigee-ssl-cert.
The Host and path rules specify which hostnames and URL paths can be used to call a specific backend. In this case, requests containing any hostname and path will be forwarded to the apigee-proxy-backend backend service.
The Backend specifies the service to be called by the load balancer. The apigee-proxy-
To access the certificate details, in the Frontend configuration, click apigee-ssl-cert.
The certificate used by the load balancer, when active, has a certificate chain that allows curl to call the load balancer without skipping certificate validation. The domain for the certificate is [IP_ADDRESS].nip.io, where the IP address is the frontend external IP address.
Google Cloud needs to provision the certificate, and it may take a significant period of time to complete the provisioning.
The configuration for an active certificate looks like this:
If the certificate's status is PROVISIONING, Google Cloud may have created the certificate but is still working with the Certificate Authority to sign it.
Provisioning typically takes under 10 minutes, but may take up to an hour. Refer to the Managed status troubleshooting guide for details.
In Cloud Shell, open a new tab by clicking Open a new tab (+).
The Cloud Shell cannot call private IP addresses in the Google Cloud project.
Call the deployed hello-world API proxy using an external IP address:
The sslCertificates.get method of the Compute Engine API is used to retrieve the nip.io hostname that is associated with the certificate.
If the certificate is fully provisioned, the curl command again returns the output from the hello-world proxy: Hello, Guest!
If the curl command returns a handshake failure, the SSL certificate is not yet configured for the load balancer.
Return to the certificate details page and check the status of the certificate. If the certificate's status is still not ACTIVE, wait for the certificate to become active and then retry the curl command.
In this lab, you created a Virtual Private Cloud (VPC) network and an Apigee X evaluation org. You then created a virtual machine (VM) and used it to call the runtime directly, calling an API proxy running on the Apigee X org. Finally, you enabled internet access and called the proxy through a global load balancer.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual last updated July 09, 2024 Lab last tested July 09, 2024
Copyright 2025 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
Este contenido no está disponible en este momento
Te enviaremos una notificación por correo electrónico cuando esté disponible
¡Genial!
Nos comunicaremos contigo por correo electrónico si está disponible
One lab at a time
Confirm to end all existing labs and start this one