Dataproc with Granica Sidekick
Configure your Dataproc cluster to use Granica Sidekick
Pre-requisites
- Granica is deployed via the
setup.sh
from the start pilot guide. To SSH back into the Granica Admin Server simply run./setup.sh --login
- Granica has custom domain set up and the metadata service is ready.
- VPC Peering has been setup between the Dataproc VPC and Granica deployment VPC
Google ServiceAccount
- Determine the Google ServiceAccount used by Dataproc VM instances.
Unless specifically configured, this is the default Compute Engine service account.
- You can find the service account by running the following command:
gcloud dataproc clusters describe [CLUSTER_NAME] --region=[REGION]
- This can also be found by clicking on one of the VMs of the Dataproc cluster and
looking at the service account in the details section.
- You can find the service account by running the following command:
- Once determined, share the ServiceAccount name with Granica.
- This is needed for two purposes:
- To allow the granica-sidekick debian package to be installed from the Granica artifact repository
- To allow granica-sidekick to read the target buckets which reside in the Granica deployment project
VM Instance Image
In order to ensure compatibility and leverage the latest features and improvements for Granica Sidekick, we highly recommend building your Dataproc custom image with a minimum version of Debian 2.2. Currently, the Dataproc console suggests only images with versions 2.1 and below. However, you can create a custom image with the latest version of Debian by using the gcloud command-line tool. Here is an example of how to create a custom image with Debian 2.2:
Read detailed instructions here: https://cloud.google.com/dataproc/docs/guides/dataproc-images#generate_a_custom_image
Custom initialization script
The granica-sidekick package is installed and configured using a custom initialization script.
Here is a sample init script. Please modify the environment variables as per your deployment.
This script should be uploaded to a GCS bucket and its path should be provided during Dataproc cluster creation.
Verify the installation
Once the cluster is created/restarted, you can verify the installation by running the following command from a Jupyter notebook:
and to see logs from the granica-sidekick service on master node, run the following command:
Get metrics and logs from granica-sidekick
The init script installs the Google Cloud Ops Agent on the Dataproc VM instances
and configures it to scrape metrics from granica-sidekick. You can view the metrics
in the Google Cloud Console under the Monitoring section. All metrics from granica-sidekick
will be prefixed with n_
.
The logs from granica-sidekick are available in the Google Cloud Console -> Log Explorer.
Search for logs with resource.type=gce_instance
and source.name=granica-sidekick
.
Troubleshooting
- Init script logs can be found at
gs://<YOUR-STAGING-BUCKET>/google-cloud-dataproc-metainfo/<CLUSTER-UUID>/init-actions/<NODE-TYPE>/stdout
- Connectivity
- Ensure granica-sidekick is able to reach Granica metadata-service. You may need to install grpcurl on the master instance.
! grpcurl -d '{}' -insecure GRANICA_METADATA_URL:443 grpc.health.v1.Health/Check
- Ensure that VPC peering is setup between the Dataproc VPC and Granica deployment VPC
- Ensure granica-sidekick is able to reach Granica metadata-service. You may need to install grpcurl on the master instance.