This is a sample Apigee Hybrid installation on Anthos Cluster on bare metal running on GCE Virtual Machines. Apigee hybrid is a platform for developing and managing API proxies that features a hybrid deployment model. The hybrid model includes a management plane hosted by Apigee in the Cloud and a runtime plane that you install and manage on one of the supported Kubernetes platforms. An Apigee organization is the top-level container in Apigee. It contains all your API proxies and related resources. This installation will create an evaluation Apigee Organization with the same name as the ID of the Google Cloud Project you use.
NOTE: We have provided a utility script that checks and configures some of the following project/organization level prerequisites. You may use it to validate some of the requirements that follow. Please ensure you have authenticated the
gcloudCLI to use the GCP project you intend to use before running this script.
-
A workstation with access to internet (i.e. Google Cloud APIs) with the following installed
- Git
- Google Cloud SDK
- Terraform (>= v0.15.5, < v1.2)
-
A Google Cloud Project (in which the resources for the setup will be provisioned)
-
Network: The project must have a network called
defaultwith all the default firewall policies configured on it. If, default network creation is enabled for the organization, the project will already have it. In case theSkip default network creationpolicy is enforced, you can create a new VPCnetworkcalled default in auto mode. See image for example. -
Quota: The project must have the required quota. his sample requires 4 VMs of
n1-standard-8machine type. Ensure that there is enough quota for CPU, Memory and IP Addresses for the GCP Region you intend to use.
-
-
A Service Account in the project that satisfies one of the following requirements and its key file downloaded to the workstation:
- The Service Account has
OwnerandApigee Organization Administratorpermissions - The Service Account has both
Editor,Project IAM AdminandApigee Organization Administratorpermissions
- The Service Account has
-
The following list of Organizational Policy Constraints enabled on the Google Cloud Organization your GCP Project is in:
Policy Name Constraint Name Effective Polciy Disable service account creation constraints/iam.disableServiceAccountCreation Not Enforced Disable service account key creation constraints/iam.disableServiceAccountKeyCreation Not enforced Restrict VM IP Forwarding constraints/compute.vmCanIpForward. Allowed All Define allowed external IPs for VM instances constraints/compute.vmExternalIpAccess Allowed All Shielded VMs constraints/compute.requireShieldedVm Not Enforced Require OS Login constraints/compute.requireOsLogin. Not Enforced Skip default network creation constraints/compute.skipDefaultNetworkCreation Not Enforced
The infrastructure for the Anthos on bare metal cluster is created using the anthos-bm-gcp-terraform sample. The sample here refers to the anthos-bm-gcp-terraform script as a terraform module and provisions the GCE based infrastructure first. Then, it executes additional steps that are specific to the Apigee installtion.
Once you complete this quickstart guide you will have the following infrastructure setup in Google Cloud using Compute Engine VMs with Anthos on bare metal running and Apigee installed. The diagram assumes that none of the default values for the variables were changed other than the ones mentioned in this guide.
- Terraform Module Information (includes variables definitions)
- Quickstart guide:
- The terraform script sets up the GCE VM environment. The output of the script prints out the commands to follow to install Anthos on bare metal in the provisioned GCE VM and to configure Apigee in the new Anthos on bare metal cluster.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| credentials_file | Path to the Google Cloud Service Account key file. This is the key that will be used to authenticate the provider with the Cloud APIs |
string |
n/a | yes |
| gcp_login_accounts | GCP account email addresses that must be allowed to login to the cluster using Google Cloud Identity. | list(string) |
[] |
no |
| mode | Indication of the execution mode. By default the terraform execution will end after setting up the GCE VMs where the Anthos bare metal clusters can be deployed. setup: create and initialize the GCE VMs required to install Anthos bare metal. install: everything up to 'setup' mode plus automatically run Anthos bare metal installation steps as well. manuallb: similar to 'install' mode but Anthos on bare metal is installed with ManualLB mode. |
string |
"setup" |
no |
| project_id | Unique identifer of the Google Cloud Project that is to be used | string |
n/a | yes |
| region | Google Cloud Region in which the Compute Engine VMs should be provisioned | string |
"us-central1" |
no |
| username | The name of the user to be created on each Compute Engine VM to execute the init script | string |
"tfadmin" |
no |
| zone | Zone within the selected Google Cloud Region that is to be used | string |
"us-central1-a" |
no |
| Name | Description |
|---|---|
| admin_vm_ssh | Run the following command to provision the anthos cluster. |
| controlplane_ip | You may access the control plane nodes of the Anthos on bare metal cluster by accessing this IP address. You need to copy the kubeconfig file for the cluster from the admin workstation to access using the kubectl CLI. |
| ingress_ip | You may access the application deployed in the Anthos on bare metal cluster by accessing this IP address |
| installation_check | Run the following command to check the Anthos bare metal installation status. |
