Skip to end of banner
Go to start of banner

Deploying a Groundplex in Kubernetes

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 95 Next »

In this article

Overview

SnapLogic supports Kubernetes orchestration on your Groundplex instances. You can deploy Snaplex nodes in your Kubernetes environment by setting up a Helm Chart that defines the node configuration for discoverability in the Kubernetes environment. This article explains how you can deploy and configure SnapLogic Snaplex nodes in a Kubernetes environment and contains an attached Helm Chart that you can use.

The autoscaling solution described in the article Deploying a Groundplex in Kubernetes with Elastic Scaling is no longer available. You can configure your Groundplex to use autoscaling through Kubernetes-based metrics. Consult your CSM to learn more.

Workflow

Prerequisites

Downloading the Configuration File from SnapLogic Manager

  1. Open an existing Snaplex in the Org:

    1. Navigate to the target Snaplex in Manager.

    2. Click on the Snaplex name to display the Update Snaplex dialog.
      Alternatively, if none exists, Create a Snaplex

  2. On the Downloads tab, click to copy the Configuration link. Paste this link into your Helm Chart.

  3. Click Cancel to exit the dialog.

  4. Since the configuration link has an expiration, to ensure that the Kubernetes pods continue to run:

    1. Delete all query string parameters from the Configuration Link URL.
      In the following example URL, delete everything from the question mark to the end:
      https://elastic.snaplogic.com/api/1/rest/plex/config/PlatformQA/shared/Ground_Triggered?expires=1613086219&user_id=testuser22@snaplogic.com&_sl_authproxy_key=1BN...

    2. Set the parameter snaplogic_secret in the Helm chart YAML file to the name of the Kubernetes secret you create, as described in the Deploying the Helm Chart section.

Running the Snaplex with Org Credentials

You can associate Org admin credentials with the SnapLogic secret created when enabling enhanced encryption. Doing so makes it easier to share the Snaplex service with the users in your Org. Both the credentials for the SnapLogic Org admin and the enhanced encryption secret are in JSON format as key/value pairs.

  1. Generate a key and encode it for each value.
    NOTE: We recommend that you use base64 to encode the values.

  2. To create the SnapLogic secret:

    1. Create the YAML file with the following two keys: username and password.

      Example YAML File

      apiVersion: v1
      kind: Secret
      metadata:
        name: mysecret
      type: Opaque
      data:
        username: <base64 username>
        password: <base64 password>


      TIP: Run the following command to encode your username/password into the text of the secret:
      $ echo -n "snaplogic_username_or_password" | base64

      IMPORTANT: If your password includes any of the following characters, you must escape the character with a backslash (\) in the string that you pass to the encoder:
      \ (backslash)
      $ (dollar sign)
      ' (apostrophe or single-quote)
      ` (backtick)
      " (double-quotes)
      & (ampersand)
      | (pipe symbol)
      ; (semicolon)
      ! (exclamation mark)
      For example, if your password is mypa$$word, pass the string mypa\$\$word to the Base64 encoder.

    2. Run the following command:

      $ kubectl apply -f snaplogic_secret.yaml

  3. (Optional) If Enhanced Encryption is enabled for your Org, create the Enhanced Encryption secret by running the following commands:
    $ kubectl create secret generic enhanced-encryption-secret --from-file=keystore_jks --from-file=keystore_pass
    $ kubectl apply -f enhanced_encryption_secret.yaml

  4. After the secret is created, delete the YAML file, which is no longer needed.

See the Kubernetes documentation regarding the management of the secret.

You can now deploy the Helm Chart.

Deploying the Helm Chart

  1. Configure the following parameters in the Helm Chart and name the file values.yaml:

    1. Regular nodes count. Specify the number of JCC Nodes to deploy.

    2. FeedMaster nodes count. Specify  the number of FeedMaster nodes  to deploy.

    3. Docker image of SnapLogic Snaplex image. Specify the repository where the image resides and the tag indicating the version of the image. While you can specify a version of your Snaplex, we recommend that you enter the latest version for the most recently released SnapLogic build.

    4. SnapLogic configuration link. Specify the link to the SnapLogic JCC configuration file (also known as .slpropz).

    5. SnapLogic Org admin credential. Specify the secret (an encoded username and password) to authenticate the deployment.

    6. Enhanced encryption secret. Specify the secret (an additional encoded username and password) to authenticate the deployment, available to the user only.

    7. CPU and memory limits for the nodes. Specify the upper limits for the CPU and memory resources. You can set these values for upper limits
      only; the lower limits are system-defined and cannot be modified.

      Example Helm Chart

      # Default values for snaplogic-snaplex.
      # This is a YAML-formatted file.
      # Declare variables to be passed into your templates.
      
      # Regular nodes count
      jccCount: 1
      
      # Feedmaster nodes count
      feedmasterCount: 1
      
      # Docker image of SnapLogic snaplex
      image:
        repository: snaplogic/snaplex
        tag: latest
      
      # SnapLogic configuration link
      snaplogic_config_link: https://elastic.snaplogic.com/api/1/rest/plex/config/testing_org/shared/my_project
      
      # SnapLogic Org admin credential
      #snaplogic_secret: snaplogic
      
      # Enhanced encryption secret
      #enhanced_encrypt_secret: Y395cIOwUGapMTr8QTk=
      
      # CPU and memory limits for the nodes
      requests:
        memory: 8Gi
        cpu: 2000m
      limits:
        memory: 8Gi
        cpu: 2000m

  2. In the Helm Chart console, run the following command: 

    $ helm install --name snaplogic <helm_chart_folder>
    Where <helm_chart_folder> is the Helm Chart zip file, which you can download from this document.

  3. Run the helm list command to determine the status of the deployment.
    The following sample output shows a successful deployment:

    If you deploy the Snaplex JCC nodes but resources in the Kubernetes environment are not available to fulfill the Helm Chart, then your deployment goes into a pending state until sufficient resources are available. 

    The following sample output shows the pending status of resources:

Once you deploy your Helm Chart, you can deploy a load balancer.

Configuring IPv6

To use this feature, ensure that your Org’s Snaplex is upgraded to main-16926 - 4.32 April 2023 in Manager.

To set up IPv6 on Kubernetes:

  1. In the values.yaml file of the Helm Chart, set the value enableIPv6: true.

  2. Set the global property for the jcc.k8s_subdomain_service in this format -- <Helm Release Name>-snaplogic-snaplex-ipv6.

Deploying a Load Balancer

Use base64 to encrypt the values.

To add load balancers to your JCC and FeedMaster nodes:

  1. In the Helm console, run the helm list command to list the services. 

  2. In SnapLogic Manager, navigate to the target Project folder, then click the target Snaplex; the Update Snaplex dialog appears. 

  3. On the Settings tab of the Update Snaplex dialog, enter the corresponding values in the following fields:

    • Load balancer. Enter the protocol and port number of the Snaplex JCC node. See PORT(s) associated with snaplogic-snaplex-regular.

    • Ultra load balancer. Enter the the protocol and port number of the FeedMaster node. See PORT(s) associated with snaplogic-snaplex-feed.

  4. Review the information, then click Update.

Once your Snaplex and FeedMaster nodes are deployed, you can start designing and running Pipelines and Tasks.

Best Practices

  • Avoid running processes on the same pod as the JCC node, so that the JCC can have the maximum amount of memory available on that pod.

  • Do not overwrite the global.properties file unless working with your CSM to customize your Groundplex.

  • Request resources upfront. Do this by setting the pod’s request and limit to the same value, as shown in the image below:

Downloads

Download and extract the following files, using the values.yaml file as the basis for your Helm Chart.

  File Modified
You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.
No files shared here yet.
  • Drag and drop to upload or browse for files

  • See Also

    • No labels