68 lines
1.8 KiB
Markdown
68 lines
1.8 KiB
Markdown
|
|
# Redis Taskserver
|
||
|
|
|
||
|
|
Redis in-memory data structure store, used as a database, cache, and message broker.
|
||
|
|
|
||
|
|
## Configuration
|
||
|
|
|
||
|
|
This taskserver provides the Redis service with the following configurable options:
|
||
|
|
|
||
|
|
### Basic Configuration
|
||
|
|
- **version**: Redis version to install
|
||
|
|
- **port**: Port number (default: 6379)
|
||
|
|
- **bind_address**: IP address to bind to (default: 127.0.0.1)
|
||
|
|
|
||
|
|
### Memory Management
|
||
|
|
- **maxmemory**: Maximum memory usage (default: 256mb)
|
||
|
|
- **maxmemory_policy**: Eviction policy (default: allkeys-lru)
|
||
|
|
|
||
|
|
### Persistence
|
||
|
|
- **persistence**: Enable/disable persistence (default: true)
|
||
|
|
- **save_interval**: Save frequency configuration
|
||
|
|
|
||
|
|
### Security
|
||
|
|
- **requirepass**: Optional password authentication
|
||
|
|
|
||
|
|
### Replication
|
||
|
|
- **master_host**: Master server for replication
|
||
|
|
- **master_port**: Master server port
|
||
|
|
|
||
|
|
### Clustering
|
||
|
|
- **cluster_enabled**: Enable Redis cluster mode
|
||
|
|
- **cluster_config_file**: Cluster configuration file path
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
### In workspace KCL file (`task-servs/redis.k`):
|
||
|
|
|
||
|
|
```kcl
|
||
|
|
import taskservs.redis.kcl.redis as redis_schema
|
||
|
|
|
||
|
|
_taskserv = redis_schema.Redis {
|
||
|
|
version = "7.2.3"
|
||
|
|
port = 6379
|
||
|
|
maxmemory = "512mb"
|
||
|
|
maxmemory_policy = "allkeys-lru"
|
||
|
|
persistence = true
|
||
|
|
requirepass = "your-secure-password"
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Installation
|
||
|
|
|
||
|
|
The taskserver includes:
|
||
|
|
- **install-redis.sh**: Installation script for various Linux distributions
|
||
|
|
- **env-redis.j2**: Environment template for configuration
|
||
|
|
|
||
|
|
## Files
|
||
|
|
|
||
|
|
- `kcl/redis.k`: KCL schema definition
|
||
|
|
- `kcl/kcl.mod`: KCL module configuration
|
||
|
|
- `default/install-redis.sh`: Installation script
|
||
|
|
- `default/env-redis.j2`: Environment template
|
||
|
|
- `README.md`: This documentation
|
||
|
|
|
||
|
|
## Dependencies
|
||
|
|
|
||
|
|
- Provisioning core system
|
||
|
|
- Linux distribution with package manager (apt, yum, or dnf)
|
||
|
|
- Systemd for service management
|