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

Version 1 Next »

📙 You will learn

How to scale ThreadFix services.

Prerequisites

Audience: IT Professional
Difficulty: Intermediate
Time needed: Approximately 10 minutes
Tools required: If any

There are two ways to scale services in ThreadFix, using Helm values or by directly modifying the Kubernetes deployment. Changes made using Helm values will persist until changed again. Changes made directly on the Kubernetes deployment will persist until the next upgrade.

Not all services in ThreadFix can be safely scaled. Please contact ThreadFix support staff for further
information on what services can be scaled and what values may be appropriate for the user case.

Enter the following commands on a command line to perform the described action.

Using Kubernetes

  1. Get a list of Kubernetes deployments associated with the ThreadFix application:

    kubectl get deploy -l kubernetes.io/part-of=threadfix

  2. Scale the desired services (replace <numReplicas> with the number of pods to scale to and <deployment> with the name of the resource to scale):

    kubectl scale --replicas=<numReplicas> deployment/<deployment>

Using Helm

  1. Get the Helm release name for the ThreadFix instance:

    TF_RELEASE=$(helm ls | grep threadfix | awk '{print $1}')

  2. Get the current installed version of ThreadFix:

    TF_VERSION=$(helm ls --filter "$TF_RELEASE" | grep -o 'threadfix-[Az0-9\.\-]*' | sed 's|threadfix-||g')

  3. Export the currently installed Helm values:

    helm get values $TF_RELEASE > myValues.yaml

  4. Edit the resources 'replicaCount' field in myValues.yaml with the desired number or pods:

    • For example, to scale appsec-data to 2 pods, add the following to the myValues.yaml/code

      appsecdata:
        replicaCount: 2

    • Use the following to get a list of editable fields:

      helm inspect values denimgroup/threadfix

  5. Run a helm upgrade with the modified values field:

    helm upgrade $TF_RELEASE denimgroup/threadfix --version $TF_VERSION -f myValues.yaml

https://threadfix.it/ | www.denimgroup.com
© Copyright 2021 Denim Group, LTD. All Rights Reserved.

Table of contents

  • No labels