Google Compute Engine
Deploy Gatling Enterprise injectors on Google Compute Engine
Like the AWS pool, a GCE pool is a reference to the GCP account you want to use to spawn injectors to run the simulation.
To configure the type of instances you want to spawn, you need to fill the form below:
- Team: Set if the pool is global or owned by a team
- Credentials: If you’re running Gatling Enterprise on GCE or using
GOOGLE_APPLICATION_CREDENTIALSto configure access, use
Application Default. Otherwise, use
When creating a virtual machine in GCE, it gives you two ways to configure accesses in the Identity and API access section of the Create an instance form. Using a service account is one of them.
If you use the default compute engine service account, Gatling Enterprise might returns errors. Left untouch, this service account doesn’t have enough permissions to spawn virtual machines.
Make sure your use a service account that has enough permissions before using the Application Default feature.
In order to create a service account with sufficient permissions, you need to do the following:
- Create a service account
- Create a custom role with the wanted permissions or use
roles/compute.admin(Compute Admin) if you don’t need fine-grained permissions
- Create a principal in the IAM section of GCP with the previous service account and the custom role
The required permissions in the Custom Role are, at least:
compute.addresses.list compute.addresses.use compute.disks.create compute.instanceTemplates.list compute.instances.create compute.instances.delete compute.instances.get compute.instances.setMetadata compute.instances.setTags compute.machineTypes.list compute.regions.list compute.subnetworks.list compute.subnetworks.use compute.subnetworks.useExternalIp
If you want to use instance templates, you will need to add the
roles/iam.serviceAccountUser role (Service Account User) to the principal. This will allow Gatling Enterprise to assign a service account to the instance group. You will also need to add the following permissions to the previous custom role:
compute.instanceGroupManagers.create compute.instanceGroupManagers.delete compute.instanceGroups.create compute.instanceGroups.delete compute.instanceGroups.get compute.instanceTemplates.get compute.instanceTemplates.useReadOnly
Finally, it is also possible to setup Access Scopes directly on the instance running Gatling Enterprise, but it is a legacy feature of GCP and is not recommended to use.
- Zone: the zone where you want to spawn your injectors
- Private Key: the previously added private key used by your Template
- Connect to private IP: Gatling Enterprise will connect to the injectors’ private IP instead of the public one. If unchecked, the private IP remains a fallback if a public IP is missing. This option should be used only when the Gatling Enterprise host and the injector are both in the same GCE network.
- Deployment: You can choose to spawn GCE instances from an image or an instance template
Specific configuration if you chose Image:
- Image: the image you want to use for your instances. You can use our certified Images or the url of your custom Image (the Image should at least have JDK8 installed and a configured key pair without password)
- Machine type: this machine type will be used by the injectors. We recommend using n1-highcpu-4 or n1-highcpu-8 machines.
- Subnetwork: the subnetwork the instances will use
- Preemptible: check this if you want to use preemptible instances (cheaper, but can be reclaimed by GCE)
- Network tags: networks tags you may want to apply to the instances
- Use Static IPs: check this if you want your injectors to use predefined static IPs
Specific configuration if you chose Instance Template:
- Template: the template used for your instances, the template should at least have JDK8 installed, a configured key pair without password and the port 22 & 9999 should be open
- Username: the username used by your ssh command to connect to the instances