---
title: "Trusted Runtime Deployment Guide"
language: "en"
url: "https://docs.testany.io/en/docs/deployment-guide/"
markdown_url: "https://docs.testany.io/en/docs/deployment-guide.md"
translation: "https://docs.testany.io/zh/docs/deployment-guide.md"
last_updated: "2026-04-20T15:53:41+08:00"
---

# Trusted Runtime Deployment Guide

> **Warning**
>
> **📌 Who Should Read This Guide?**
>
> This guide is for enterprise customers who need to deploy **Trusted Runtime in their own managed cloud infrastructure**.
>
> **✅ You NEED this guide if:**
> - Your test targets are behind a corporate firewall or VPN
> - You have compliance requirements (data residency, on-premises)
> - You need custom test environments in your own cloud
>
> **❌ You DO NOT need this guide if you're using Testany managed runtime.**
>
> → Skip to: [Quick Start Guide](https://docs.testany.io/en/docs/managing-test-case.md) | [Create Your First Test](https://docs.testany.io/en/docs/test-case-writing-guidelines-and-examples-python-u.md)
>
> Not sure? [Contact us](https://testany.io/en/contact?type=support&source=docs)


---

## Overview

This document describes how to deploy the Testany Trusted Runtime on cloud infrastructure.

### Download Deployment Package

Before starting deployment, please download the deployment package:

**[Download AWS Deployment Package](/downloads/testany-tr-aws.zip)**

The deployment script automatically completes the following tasks:

1. Deploy cloud infrastructure (VPC, Kubernetes cluster, database, cache, object storage)
2. Configure kubectl to connect to the cluster
3. Render and deploy Helm Charts
4. Register with the Testany SaaS platform
5. Configure Ingress and TLS certificates

**Estimated deployment time**: 30-45 minutes (excluding DNS configuration wait time)

---

## Prerequisites

### Tool Dependencies

Before starting deployment, ensure the following tools are installed and available:

#### Core Tools (Required)

| Tool | Minimum Version | Description | Verification Command |
| --- | --- | --- | --- |
| AWS CLI | 2.x | AWS resource management | `aws --version` |
| Terraform | 1.5+ | Infrastructure as Code | `terraform --version` |
| kubectl | 1.28+ | Kubernetes cluster management | `kubectl version --client` |
| Helm | 3.x | Kubernetes package manager | `helm version` |
| jq | 1.6+ | JSON data processing | `jq --version` |
| gomplate | 3.x | Template rendering tool (macOS) | `gomplate --version` |
| gotemplate | - | Template rendering tool (Linux) | `gotemplate --version` |

#### Deployment Script Dependencies (Required)

| Tool | Minimum Version | Description | Verification Command |
| --- | --- | --- | --- |
| grpcurl | 1.8+ | gRPC CLI client for Bootstrap registration | `grpcurl --version` |
| openssl | 1.1+ | Certificate and key generation | `openssl version` |
| kapp | 0.50+ | Carvel tool for Kubernetes resource deployment | `kapp --version` |

### Cloud Platform Permissions - AWS

Ensure AWS credentials are configured with the following permissions:

- **VPC**: Create/manage VPC, subnets, route tables, NAT Gateway, Internet Gateway
- **EKS**: Create/manage EKS clusters, node groups
- **RDS**: Create/manage RDS instances
- **ElastiCache**: Create/manage ElastiCache clusters
- **S3**: Create/manage S3 buckets
- **IAM**: Create IAM roles and policies required for EKS
- **EC2**: Create security groups, manage EC2 resources

<!-- TODO Cloud Platform Permissions - Azure -->

### Testany Provided Credentials

Before deployment, contact the Testany support team to obtain the following information:

| Credential | Description | Example |
| --- | --- | --- |
| ECR Registry URL | Container image registry address | `123456789012.dkr.ecr.us-west-2.amazonaws.com/testany` |
| Access Key ID | Secrets Manager access key | `AKIAXXXXXXXXXXXXXXXXXX` |
| Secret Access Key | Secrets Manager secret key | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |
| Secrets Region | Secrets Manager region | `cn-north-1` (China) / `us-west-2` (Global) |
| Secrets Name | Secret name | `testany/customers/YOUR_ACCOUNT_ID/appsecrets` |
| SaaS Endpoint | SaaS platform address | `YOUR_SAAS_ENDPOINT` |

---

## Configuration

### Configure Terraform Variables

```bash
# Enter the Terraform directory
cd aws/terraform

# Copy the example configuration file
cp terraform.tfvars.example terraform.tfvars

# Edit the configuration file
vi terraform.tfvars
```

### Required Configuration Items

```hcl
# AWS Region
aws_region = "us-west-2"

# Project name (used for all resource naming)
project_name = "testany"

# === Testany Provided Credentials (Required) ===
ecr_registry              = "123456789012.dkr.ecr.us-west-2.amazonaws.com/testany"
testany_secrets_region    = "us-west-2"
testany_secrets_name      = "testany/customers/YOUR_CUSTOMER_ID/appsecrets"
testany_saas_endpoint     = "tr.testany.com"
```


> **Warning**
>
> Sensitive credentials (Access Key ID and Secret Access Key) should be set via environment variables, not written to the configuration file.


---

## Installation

### AWS

#### Step 1: Set AWS Profile (if needed)

```bash
export AWS_PROFILE=your-profile-name
```

#### Step 2: Set Testany Credential Environment Variables

```bash
export TF_VAR_testany_access_key_id="AKIAXXXXXXXXXXXXXXXXXX"
export TF_VAR_testany_secret_access_key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
```

#### Step 3: Execute Installation Script

```bash
cd scripts
bash install.sh
```

![Installation script execution](https://docs.testany.io/docs/images/zh/deployment-install-script.png)

The script automatically executes the following steps:

1. **[Automatic]** Check prerequisites
2. **[Automatic]** Deploy AWS infrastructure (approximately 15-20 minutes)
3. **[Automatic]** Configure kubectl
4. **[Automatic]** Render Helm templates
5. **[Automatic]** Deploy base components
6. **[User Action Required]** Bootstrap registration
7. **[Automatic]** Deploy application services
8. **[Automatic]** Configure Ingress
9. **[Waiting for User]** Create TLS certificates

#### Bootstrap Registration Process

When the script reaches the Bootstrap registration step, it will pause waiting for user confirmation.

![Bootstrap waiting for confirmation](https://docs.testany.io/docs/images/zh/deployment-bootstrap-prompt.png)


> **Info**
>
> The registration code is valid for 5 minutes. Please ensure the Testany global administrator is ready before continuing.


1. **Get Registration Code**: After pressing Enter, the command line will display the registration code:

![Registration code display](https://docs.testany.io/docs/images/zh/deployment-registration-code.png)

2. **Log in to SaaS Management Platform**: Log in to the Testany SaaS management interface using the global administrator account

3. **Enter Registration Code**: Find the Runtime registration entry in the SaaS management interface and enter the registration code displayed in the command line

![Enter registration code](https://docs.testany.io/docs/images/zh/deployment-registration-fillcode.png)

4. **Set Runtime Name**: Set an easily identifiable name for this new Runtime instance

5. **Complete Registration**: After the administrator confirms on the SaaS platform, the command line script will automatically continue


> **Tip**
>
> If the registration code expires, you can run `bash install.sh bootstrap` again to get a new registration code.


#### DNS Configuration

The script will pause at the certificate creation step, prompting you to configure DNS.

![DNS configuration prompt](https://docs.testany.io/docs/images/zh/deployment-dns-prompt.png)

1. Get the Ingress Load Balancer address:
   ```bash
   kubectl get ingress -n testany-app
   ```

2. Contact the Testany support team, provide the Load Balancer address, and complete DNS configuration

3. Verify DNS resolution:
   ```bash
   nslookup your-domain.testany.com
   ```

4. After DNS configuration is complete, press Enter to continue the script and create TLS certificates

![Certificate creation complete](https://docs.testany.io/docs/images/zh/deployment-cert-complete.png)

<!-- TODO ### Azure Deployment Guide -->

---

## Installation Verification

After completing the installation, verify the deployment through the following steps.

### AWS Secrets Data Preparation

1. Get the Secrets Manager service endpoint address:

   | Region | Endpoint |
   |--------|----------|
   | AWS Global | Refer to [AWS Documentation](https://docs.aws.amazon.com/general/latest/gr/asm.html) |
   | AWS China (Ningxia) | `secretsmanager.cn-northwest-1.amazonaws.com.cn` |
   | AWS China (Beijing) | `secretsmanager.cn-north-1.amazonaws.com.cn` |

2. Create a Secret. In the Secrets Manager console, click "Store a new secret":

   ![Create Secret](https://docs.testany.io/docs/images/zh/deployment-secretsmanager-1.png)

3. Select "Other type of secret", enter `123` in Plaintext (can be any content), and click "Next":

   ![Fill in Secret value](https://docs.testany.io/docs/images/zh/deployment-secretsmanager-2.png)

4. Enter `testany-env-secret-test-YOUR_ACCOUNT_ID` in Secret name, and click "Next":

   ![Fill in Secret Name](https://docs.testany.io/docs/images/zh/deployment-secretsmanager-3.png)

5. Keep the default configuration and click "Next":

   ![Configure rotation](https://docs.testany.io/docs/images/zh/deployment-secretsmanager-4.png)

6. Confirm the information and click "Store":

   ![Store Secret](https://docs.testany.io/docs/images/zh/deployment-secretsmanager-5.png)

<!-- ### Azure Secrets Data Preparation

1. Access Azure Key Vault and get the Key Vault access address:

![Key Vault address](https://docs.testany.io/docs/images/zh/deployment-keyvault-1.png)

2. Create a secret. In the Azure Key Vault management page, expand "Objects", click "Secrets", and click "Generate/Import" in the right panel:

![Create Secret](https://docs.testany.io/docs/images/zh/deployment-keyvault-2.png)

3. Enter `testany-env-secret-test` in Name, enter `123` in Secret value (can be any content), and click "Create":

![Fill in Secret information](https://docs.testany.io/docs/images/zh/deployment-keyvault-3.png)

4. Ensure that in the Key Vault's Access control (IAM), the **Key Vault Secrets User** permission is granted to the Kubernetes agentpool:

![IAM permission configuration](https://docs.testany.io/docs/images/zh/deployment-keyvault-4.png) -->

### Method 1: UI Operations

Suitable for users who need to understand the configuration process in detail.

#### 1. Create Credential Safe and Credential


> **Info**
>
> This step requires Workspace Admin permissions. Please contact your team's Workspace Admin for assistance.


1. Access the Workspace Settings page, click "Workspace Settings" in the bottom left corner, click the "Credential" tab in the right panel, select the newly registered Runtime, and click the "Add credential safe" button:

![Add Credential Safe](https://docs.testany.io/docs/images/zh/deployment-credential-1.png)

2. Fill in Credential Safe information:
   - **Instance name**: Set a name
   - **Instance URL**: Secrets management access address (based on your cloud deployment, enter Key Vault access address or AWS Secrets Manager access address)

![Fill in Credential Safe information](https://docs.testany.io/docs/images/zh/deployment-credential-2.png)

3. After creation, expand the Credential Safe:

![Expand Credential Safe](https://docs.testany.io/docs/images/zh/deployment-credential-3.png)

4. Click "+" to add a Credential (if you don't see "+" after expanding, refresh the page):

![Add Credential](https://docs.testany.io/docs/images/zh/deployment-credential-4.png)

5. Fill in Credential information:
   - **Credential name**: Set a name
   - **Type**: Select the corresponding type
   - **Key**: The secret name in Secrets management (e.g., `testany-env-secret-test`)

![Fill in Credential information](https://docs.testany.io/docs/images/zh/deployment-credential-5.png)

6. After saving, record the following information (needed when configuring Cases later):
   - Credential Safe Key (e.g., `WKS-CS-0001`)
   - Credential Key (e.g., `testany-env-secret-test`)

![Credential saved](https://docs.testany.io/docs/images/zh/deployment-credential-6.png)

#### 2. Create Cases

**Case 1: Test Environment Variable Passing**

1. Log in to Testany, select "Test Case Library", and click "Register Test Case":

![Register Test Case](https://docs.testany.io/docs/images/zh/deployment-case1-1.png)

2. Enter Case information:
   - Name: `testany-deploy-check-case1`
   - Runtime: Select the newly registered Runtime

   Click "Register & Next":

![Fill in Case information](https://docs.testany.io/docs/images/zh/deployment-case1-2.png)

3. On the redirected page, click the "JSON" tab:

![Switch to JSON view](https://docs.testany.io/docs/images/zh/deployment-case1-3.png)

4. Paste the environment variable configuration into the editor and click "Save Changes":

```json
[
  {"name": "URL", "value": "www.baidu.com", "type": "env"},
  {"name": "RELAY_NEW_URL", "value": "www.bing.com", "type": "env"},
  {"name": "AAA", "value": "-", "type": "output"},
  {"name": "NEW_URL", "value": "-", "type": "output"}
]
```

![Save environment variables](https://docs.testany.io/docs/images/zh/deployment-case1-4.png)

5. Prepare code file, compress `testany-env-check-case1-postman.json` to a zip file:

![Prepare code file](https://docs.testany.io/docs/images/zh/deployment-case1-5.png)

6. Click the "Upload" icon to upload code:

![Click upload](https://docs.testany.io/docs/images/zh/deployment-case1-6.png)

7. Select the zip file to complete upload:

![Select file](https://docs.testany.io/docs/images/zh/deployment-case1-7.png)

8. Wait for upload to complete:

![Upload complete](https://docs.testany.io/docs/images/zh/deployment-case1-8.png)

9. Select Executor as `postman`:

![Select Executor](https://docs.testany.io/docs/images/zh/deployment-case1-9.png)

10. Set Trigger path to `testany-env-check-case1-postman.json`:

![Set Trigger path](https://docs.testany.io/docs/images/zh/deployment-case1-10.png)

**Case 2: Test Secrets Retrieval**

1. Register a new Case, click "Register Test Case":

![Register Case 2](https://docs.testany.io/docs/images/zh/deployment-case2-1.png)

2. Enter Case information:
   - Name: `testany-deploy-check-case2`
   - Runtime: Select the newly registered Runtime

![Fill in Case 2 information](https://docs.testany.io/docs/images/zh/deployment-case2-2.png)

3. On the redirected page, click the "JSON" tab:

![Switch to JSON view](https://docs.testany.io/docs/images/zh/deployment-case2-3.png)

4. Paste the environment variable configuration into the editor:

```json
[
  {"name": "AAA", "value": "-", "type": "env"},
  {"name": "URL", "value": "-", "type": "env"},
  {"name": "SAFE_KEY", "value": "WKS-CS-0001", "type": "env"},
  {"name": "KEY", "value": "testany-env-secret-test", "type": "env"}
]
```

![Save environment variables](https://docs.testany.io/docs/images/zh/deployment-case2-4.png)

5. Switch to Form view and modify the "SAFE_KEY" value to the actual Credential Safe Key:

![Edit SAFE_KEY](https://docs.testany.io/docs/images/zh/deployment-case2-5.png)

![Save SAFE_KEY](https://docs.testany.io/docs/images/zh/deployment-case2-6.png)

6. Prepare code file, compress `testany-env-check-case2-postman.json` to a zip file:

![Prepare code file](https://docs.testany.io/docs/images/zh/deployment-case2-7.png)

7. Click the "Upload" icon to upload code:

![Upload code](https://docs.testany.io/docs/images/zh/deployment-case2-8.png)

8. Select the zip file to complete upload:

![Select file](https://docs.testany.io/docs/images/zh/deployment-case2-9.png)

9. Wait for upload to complete:

![Upload complete](https://docs.testany.io/docs/images/zh/deployment-case2-10.png)

10. Select Executor as `postman`:

![Select Executor](https://docs.testany.io/docs/images/zh/deployment-case2-11.png)

11. Set Trigger path to `testany-env-check-case2-postman.json`:

![Set Trigger path](https://docs.testany.io/docs/images/zh/deployment-case2-12.png)

12. Configure the credential reference: add a `Secret` row under the case **Environment variables**, then select the created `Credential Safe` and `Credential`:

![Bind Credential](https://docs.testany.io/docs/images/zh/deployment-case2-13.png)

13. Case 2 creation complete, check details to confirm configuration:

![Case 2 details](https://docs.testany.io/docs/images/zh/deployment-case2-14.png)

#### 3. Create Pipeline

1. Switch to the Workspace page, click "+ Assemble pipeline", and enter Pipeline information:
   - Name: `deploy-test-pipeline`
   - Description: `Test newly deployed Runtime`

![Create Pipeline](https://docs.testany.io/docs/images/zh/deployment-pipeline-1.png)

2. Click the expand button:

![Expand Pipeline](https://docs.testany.io/docs/images/zh/deployment-pipeline-2.png)

3. Select "YAML View" and configure Pipeline rules:

```yaml
kind: rule/v1.3
spec:
  rules:
    - run: 'CASE1_KEY'
    - run: 'CASE2_KEY'
      whenPassed: 'CASE1_KEY'
      relay:
        - key: AAA
          refKey: CASE1_KEY/AAA
          nonSecret: true
        - key: URL
          refKey: CASE1_KEY/NEW_URL
          nonSecret: true
```


> **Note**
>
> Replace `CASE1_KEY` and `CASE2_KEY` with the actual Case Keys (8-character strings).



> **Note**
>
> For this newly created pipeline, `rule/v1.3` is the recommended version. `rule/v1.2` is retained only for backward compatibility.


![Configure Pipeline YAML](https://docs.testany.io/docs/images/zh/deployment-pipeline-3.png)

4. Refresh the Pipeline page and click the "Trigger" button to execute the Pipeline:

![Trigger Pipeline](https://docs.testany.io/docs/images/zh/deployment-pipeline-4.png)

#### 4. View Execution Results

1. View Pipeline execution status:

![Execution status](https://docs.testany.io/docs/images/zh/deployment-verify-1.png)

![Execution complete](https://docs.testany.io/docs/images/zh/deployment-verify-2.png)

2. Click the "View log" button for Case 2 to view execution logs:

![View logs](https://docs.testany.io/docs/images/zh/deployment-verify-3.png)

3. Verify Case 1 information is passed to Case 2:
   - AAA value should display `200` (HTTP status code)

![Verify AAA value](https://docs.testany.io/docs/images/zh/deployment-verify-4.png)

   - URL value should be `http://www.bing.com`

![Verify URL value](https://docs.testany.io/docs/images/zh/deployment-verify-5.png)

4. Verify Secrets are retrieved correctly:
   - Returned secret length should be `3` (length of value `123`)

![Verify Secret length](https://docs.testany.io/docs/images/zh/deployment-verify-6.png)

### Method 2: Script Operations

Suitable for users who want to quickly verify deployment.


> **Info**
>
> This script requires Testany Workspace Admin permissions.


#### 1. Locate Script Directory

The verification script is included in the deployment package, located in the `deploy-checker` directory:

```
deploy-checker
├── linux
│   ├── env.txt
│   └── register.sh
├── windows
│   ├── env.txt
│   └── register.ps1
├── requirements.txt
├── testany-env-check-case1-postman.json.zip
├── testany-env-check-case2-postman.json.zip
└── tr_deploy_check.py
```

#### 2. Configure Environment Variables

**Linux/macOS**:
```bash
export BASE_URL=YOUR_SAAS_URL
export RUNTIME_UUID=YOUR_RUNTIME_UUID
export WORKSPACE_KEY=AAA
export ACCESS_TOKEN=XXXXXXXXXXX
export KEY_VAULT_URL=https://xxx.vault.azure.cn
```

**Windows (PowerShell)**:
```powershell
$env:BASE_URL="YOUR_SAAS_URL"
$env:RUNTIME_UUID="YOUR_RUNTIME_UUID"
$env:WORKSPACE_KEY="AAA"
$env:ACCESS_TOKEN="XXXXXXXXXXX"
$env:KEY_VAULT_URL="https://xxx.vault.azure.cn"
```

#### 3. Execute Script

**Linux/macOS**:
```bash
cd linux
bash register.sh
```

**Windows**:
```powershell
cd windows
.\register.ps1
```

After execution, the console will output:
```
********************************************************************************
All Related information:
Credential Safe Key: XXX-CS-XXXX
Credential Key: testany-env-secret-test
Case 1 Key: XXXXXXXX
Case 2 Key: XXXXXXXX
Pipeline Key: XXX-XXXXX
********************************************************************************
```

#### 4. Trigger Pipeline Verification

1. Find the newly created Pipeline in the Testany interface (naming convention: `runtime-<runtime-name>-deploy-check`) and click the "Trigger" button:

![Trigger Pipeline](https://docs.testany.io/docs/images/zh/deployment-script-verify-1.png)

2. View execution status:

![Execution status](https://docs.testany.io/docs/images/zh/deployment-script-verify-2.png)

3. Wait for execution to complete:

![Execution complete](https://docs.testany.io/docs/images/zh/deployment-script-verify-3.png)

4. Click the "View log" button for Case 2 to view execution logs:

![View logs](https://docs.testany.io/docs/images/zh/deployment-script-verify-4.png)

5. Verify AAA value is `200`:

![Verify AAA](https://docs.testany.io/docs/images/zh/deployment-script-verify-5.png)

6. Verify URL value is `http://www.bing.com`:

![Verify URL](https://docs.testany.io/docs/images/zh/deployment-script-verify-6.png)

7. Verify Secret length is `3`:

![Verify Secret](https://docs.testany.io/docs/images/zh/deployment-script-verify-7.png)

---

## Contact Support

If you encounter issues that cannot be resolved, please contact the Testany support team:

- **Email**: customer-support@testany.io
- **Documentation**: https://docs.testany.io

## Glossary terms on this page

- [Trusted Runtime](https://docs.testany.io/en/docs/glossary.md#trusted-runtime)
- [Command](https://docs.testany.io/en/docs/glossary.md#command)
- [Environment](https://docs.testany.io/en/docs/glossary.md#environment)
- [User](https://docs.testany.io/en/docs/glossary.md#user)
- [Runtime](https://docs.testany.io/en/docs/glossary.md#runtime)
- [Credential Safe](https://docs.testany.io/en/docs/glossary.md#credential-safe)
- [Workspace Admin](https://docs.testany.io/en/docs/glossary.md#workspace-admin)
- [Workspace](https://docs.testany.io/en/docs/glossary.md#workspace)
- [Test Case Library](https://docs.testany.io/en/docs/glossary.md#test-case-library)
- [Test Case](https://docs.testany.io/en/docs/glossary.md#test-case)
- [Executor](https://docs.testany.io/en/docs/glossary.md#executor)
- [Execution](https://docs.testany.io/en/docs/glossary.md#execution)
