Wire Utility Tool¶
Introduction¶
Purpose¶
The Wire Utility Tool is a specialized debugging container designed to provide comprehensive monitoring, troubleshooting, and operational capabilities for Wire's backend infrastructure. It serves as a standardized toolkit for SRE teams, developers, and DevOps engineers working with Wire services in an offline environment.
Key Features¶
- Multi-service support: PostgreSQL, Cassandra, Elasticsearch, RabbitMQ, MinIO, Redis
- Real-time monitoring: Built-in health checks and status monitoring
- Interactive debugging: Full shell access with debugging tools
- Kubernetes-native: Designed for deployment in Kubernetes clusters via Helm
- Security-focused: Non-root execution, minimal attack surface
- Extensible: Easy to add new tools and services
Use Cases¶
- Incident Response: Rapid troubleshooting during outages
- Development: Local testing and development environment setup
- Operations: Routine monitoring and maintenance tasks
- Migration: Data validation during service migrations
- Performance Analysis: System and service performance monitoring
Deployment¶
The Wire Utility Tool is deployed as a Kubernetes StatefulSet via the official Wire Helm chart. See the Wire Helm Charts repository for complete deployment instructions and configuration options.
Architecture Overview¶
Container Structure¶
Service Integration¶
The tool integrates with Wire's core services through environment-based configuration:
- PostgreSQL: Primary relational database
- Cassandra: Distributed NoSQL database for chat data
- Elasticsearch: Search and analytics engine
- RabbitMQ: Message queue for async communication
- MinIO: S3-compatible object storage
- Redis: Caching and session storage
Security Model¶
- Non-root execution: Runs as UID 65532 (
nonroot
user) - Minimal privileges: No sudo access, restricted system access
- Network isolation: Access controlled via Kubernetes RBAC
- Ephemeral nature: No persistent data storage
- Tool restrictions: Only approved debugging tools included
Deployment Guide¶
Wire utility tool is bundled together with the wire-server-deployment package.
Prerequisites¶
- Kubernetes cluster: kubectl access to k8s cluster
- Helm: Helm chart deployment (see Wire Helm Charts)
- RBAC permissions: Pod exec and describe permissions
- Network access: Connectivity to Wire services
Helm Deployment¶
The Wire Utility Tool is deployed via the official Wire Helm chart. Refer to the Wire Helm Charts repository for complete deployment instructions, StatefulSet configuration, security contexts, and resource management.
The Helm chart handles: - StatefulSet configuration with proper labels and annotations - Security contexts and non-root execution - Resource limits and requests - Network policies and RBAC - Health checks and probes - Volume mounts for temporary storage
Installation¶
The Wire Utility Tool integrates with your existing Wire server deployment by reusing configuration from your main values.yaml
and secrets.yaml
files.
All the values required for the wire-utility to build connections with the Wire data sources are passed via your existing Wire server configuration files: ./values/wire-server/values.yaml
and ./values/wire-server/secrets.yaml
.
Install the wire-utility chart using Helm:
The chart automatically inherits service endpoints and credentials from your main Wire deployment configuration.
Troubleshooting Helm Template Errors: If you encounter Helm template errors during installation due to missing keys (even when passing the wire-server values and secrets files), this typically indicates you're running an older version of wire-server. To resolve this:
- Update the
./charts/wire-utility/values.yaml
file with the missing keys and appropriate default values - This ensures the utility tool deployment doesn't interfere with your existing Wire server setup
- Refer to the latest wire-utility chart values for the required configuration keys
How to Save the Image for Air-Gapped Environment¶
For air-gapped environments where internet access is not available, you need to manually download and distribute the Wire Utility Tool image to your Kubernetes nodes if you are not installing the tool from the offline bundle.
-
Download the chart: First, ensure the
wire-utility
chart is available in yourwire-server-deploy
charts directory. -
Pull the image: Download the Wire Utility Tool image using Docker:
- Save the image: Export the image to a tar file (replace forward slashes and colons with underscores for filesystem compatibility):
-
Distribute to nodes: Copy the
.tar
file to all Kubernetes nodes in your cluster. -
Import on each node: Run this command on each Kubernetes node to import the image into containerd:
- Verify import: Confirm the image is available in containerd:
Once the image is available on all nodes, you can proceed with the standard Helm deployment.
Accessing the Tool¶
Kubernetes Pod Access¶
Once deployed via the Wire Helm chart, access the utility pod for debugging:
Service Status Overview¶
The tool provides comprehensive service connectivity monitoring:
Core Debugging Tools¶
The Wire Utility Tool provides comprehensive command-line interfaces and utilities for interacting with all supported services. Each service has dedicated tools and commands for monitoring, debugging, and administration.
Status Monitoring¶
MinIO Object Storage¶
Cassandra Database¶
RabbitMQ Message Queue¶
Note: RabbitMQ commands require the management plugin to be enabled. If the management plugin is disabled on your RabbitMQ nodes, rabbitmqadmin
commands will fail with:
Resolution: Enable the RabbitMQ management plugin on your RabbitMQ nodes:
This enables the management API (accessible on port 15672) which is required for: - All rabbitmqadmin
administrative commands - Periodic health checks performed by the utility tool - Web-based RabbitMQ management interface
The management plugin automatically enables the required dependencies (rabbitmq_management_agent
and rabbitmq_web_dispatch
).
PostgreSQL Database¶
Elasticsearch Search Engine¶
System and Network Tools¶
Beyond service-specific debugging tools, the Wire Utility Tool includes general-purpose system and network utilities for comprehensive troubleshooting and monitoring.
Network Diagnostics¶
Development and Testing Tools¶
Workflow Examples¶
Complete Service Health Check¶
Database Performance Investigation¶
Message Queue Monitoring¶
Log Output¶
When enabled, the pod generates periodic health check logs:
Viewing Logs¶
Log Analysis¶
Internal API Access¶
Since the pod is deployed within the Kubernetes cluster, you can directly access internal APIs of wire components such as brig
, galley
.
Service Endpoints¶
Database-Specific APIs¶
Configuration Reference¶
All of the necessary configurations are generated from the values/wire-server/values.yml and values/wire-server/secrets.yml of your wire-server-deploy bundle which gets passed when the wire-utility helm chart is installed.
Operational Settings¶
Variable | Required | Default | Description |
---|---|---|---|
ENABLE_PROBE_THREAD | Yes | true | Enable periodic health checks |
HOSTNAME | Auto | Pod name | Container hostname for logging |