Kubernetes setup
Prerequisites
Download the latest version of the Snowflake Profiler from the Delphix download page.
Ensure that the host running the profiler has Helm, kubectl and Docker installed. Also ensure it is set up to communicate to the Kubernetes cluster using either MicroK8s or Amazon’s EKS.
Set up the Hyperscale Snowflake Connector and add the required
ConnectorInfodetails.For accessing Snowflake warehouse, we will require a service account user with key pair authentication for enhanced authentication security as an alternative to basic authentication.
To configure key-pair authentication for a snowflake service account, follow the steps provided in the Snowflake’s configuring key-pair authentication.
Use the following commands to generate base64 encoded value of encrypted private key and passphrase.
To generate base64 encoded value of encrypted private key:CODEecho -n `cat /home/delphix/keys/MKK_TEST_SFHSC_ADMIN_key.p8 | base64`To generate base64 encode value of passphrase:
CODEecho -n <passphrase> | base64 -w 0
Similarly, the profiler needs the Controller API Key to authenticate to the controller which also needs to be provided in base64 encoded format. To generate base64 encode value of Controller API key:
CODEecho –n “<controller_api_key>” | base64 –w 0
Procedure
Untar the profiler downloaded from Delphix download page. It should contain the Docker images for the profiler and the
snowflake-profiler-helm.tar.CODEtar -xf snowflake-profler.tar.gzLoad the
delphix-snowflake-profiler.tarDocker image.CODEcd snowflake-profiler docker load --input delphix-snowflake-profiler.tarPush the image to a registry which can be accessed by the Kubernetes cluster.
CODEdocker tag delphix-snowflake-profiler-service-app:1.0.0 image.registry.com/delphix-snowflake-profiler-service-app:1.0.0 docker push image.registry.com/delphix-snowflake-profiler-service-app:1.0.0 (‘docker login <registry>' may be required)Untar the helm repository and change the directory to snowflake-profiler-helm
CODEtar -xf snowflake-profiler-helm.tar.gz cd snowflake-profiler-helmEdit the values.yaml file
Configure the
controllerURLwith the controller URL, IP or hostname.CODEcontrollerURL: controller.delphix.comIf required, configure the registry credentials.
CODEimageCredentials: username: <registry-username> password: <registry-password> email: <registry-user-email>Configure the image details.
CODEimage: repository: image.registry.com/delphix-snowflake-profiler-service-app tag: 1.0.0 pullPolicy: AlwaysConfiguring the credentials required to connect to Snowflake instance, similar to how it is configured for the Hyperscale Snowflake connector. If the Kubernetes secret is already configured in the same namespace (
.Values.namespace), you can use the same.CODEsecret: storedSnowflakeSecretName: stored-secret-nameOr you can configure the required values for
snowflakePrivateKey,snowflakePassphraseandcontrollerApiKeyCODEsecret: snowflakePrivateKey: user_encrypted_private_key_base64_encoded snowflakePassphrase: passhrase_base64_encoded controllerApiKey: controller_api_key_base64_encodedOptionally, see additional configurations for further details.
Start the snowflake profiler service.
CODEhelm install snowflake-profiler-helm <path_to_snowflake_profiler_helm_chart> -f values.yamlCreate the Kubernetes Ingress to allow connection to the profiler.
Apply the Ingress configuration:
CODEkubectl apply –f ingress.yamlAccess the profiler Swagger UI at http://<host-ip>/profiler