Install Worker

Learn how to install the Skyramp Worker in your environment

The Skyramp Worker acts as the essential foundation for both Mocker, enabling service mocking capabilities, and Tester, facilitating the execution of in-cluster tests.


If you don’t have Helm installed, refer to Helm’s documentation to get started. Then, follow these two steps to run the Skyramp Worker in Kubernetes using Helm:

1. Install Worker Using Helm

  1. Add Skyramp Helm Repo: To access Skyramp’s charts, add the Helm repository:
    helm repo add skyramp
  2. Update Repositories: To ensure you have the latest chart versions, run the following:
    helm repo update
  3. Install Worker Chart: To deploy the Skyramp Worker application to your Kubernetes cluster, use the following command:
    KUBECONFIG=/path/to/kubeconfig helm install -n <namespace> <release-name> skyramp/worker
    • Replace /path/to/kubeconfig with the path to your Kubernetes configuration file (kubeconfig).
    • Replace <namespace> with the Kubernetes namespace where you want to deploy the Skyramp Worker chart. A namespace is a logical grouping of resources within your cluster. You can choose an existing namespace or create a new one.
    • Replace <release-name> with a name for this Helm release. A release is a unique instance of a Helm chart installation. You can choose any meaningful name for this release.

2. Register the Kubernetes Cluster with the Client

To interact with the Worker, you need to register your cluster with the Skyramp Terminal Client:

skyramp cluster register <path to kubeconfig file>

Installing Worker with Python Modules (Optional)

If you need to include additional Python modules in your Skyramp Worker for running dynamic requests and responses, you can follow these steps to build a custom Worker image with the required modules and then deploy it using Kubernetes.

Building the Worker Image with Python Modules

  1. Create a Dockerfile in your project directory or modify the existing one if you have it.

    FROM --platform=linux/amd64
    COPY requirements.txt /
    RUN pip3 install -r /requirements.txt

    This Dockerfile uses the base Skyramp Worker image and copies your requirements.txt file into it, then installs the Python modules specified in requirements.txt. Make sure to replace requirements.txt with the actual name of your requirements file.

  2. Build the custom Worker image using the docker build command. Replace <image-name> with a suitable name for your custom image and <image-tag> with the desired tag:

    docker build -t <image-name>:<image-tag> .

Using the Custom Worker Image

Now that you have built the custom Worker image with your Python modules, you need to push it to a container registry that is accessible to your cluster nodes. Then, you can deploy the Skyramp Worker with the custom image using the following helm install command, overriding the image configuration directly:

KUBECONFIG=/path/to/kubeconfig helm install -n <namespace> <release-name> skyramp/worker --set image.repository=<your-registry>/<image-name>,image.tag=<image-tag>

Continue to How to Mock Services » to learn how to generate and apply service mocks, or to How to Test Services » to learn how to write and start functional and load tests.