Commit 7137c87
authored
feat: implement workflow system with enterprise init-cluster workflow (#261)
* feat: implement workflow system with init-cluster workflow
- Add workflow trait and registry system for multi-step operations
- Implement enterprise init-cluster workflow for cluster bootstrapping
- Add CLI commands for listing and running workflows
- Support async operations with progress indicators
- Include optional database creation after cluster init
This provides a foundation for automating complex multi-step operations
that require multiple API calls, waiting, and conditional logic.
Part of #260
* fix: address clippy warnings in workflow implementation
- Add #[allow(dead_code)] for fields/methods that will be used in future workflows
- Collapse nested if statement in wait_for_cluster_ready function
- All clippy checks now pass with --all-targets --all-features
* fix: update init-cluster workflow with correct bootstrap endpoint and simplified flow
- Use correct /v1/bootstrap/create_cluster endpoint with proper payload structure
- Fix JSON payload format with cluster, credentials, and flash_enabled fields
- Simplify cluster ready check to avoid authentication issues
- Change create_database flag to skip_database for better UX
- Add #[allow(dead_code)] for unused wait_for_cluster_ready function
Successfully tested against Redis Enterprise Docker container - workflow completes and creates cluster
* feat(docker): add docker-compose setup with init service placeholder
- Add Redis Enterprise container with proper configuration
- Include redis-enterprise-init service (commented for future Docker image)
- Create docker-init.sh script for host-based initialization
- Document architecture mismatch issue and workaround
* fix(workflows): remove unused function and fix CLI argument documentation
- Remove unused wait_for_cluster_ready function
- Fix command documentation (--name not --cluster-name)
- Workflow now works correctly with proper argument names
* feat(workflows): add structured output support and remove emojis
- Remove all emojis from workflow output for professional appearance
- Add JSON/YAML output support for programmatic use
- Human-readable output only shown for Table format
- Add AsyncOperationArgs to workflow commands for consistent --wait pattern
- Support JSON/YAML output for workflow list command
- Pass wait_timeout through workflow context for future use
- Test with fresh Docker containers shows all formats working correctly
* feat(enterprise): add Redis command execution via REST API
- Add execute_command method to Enterprise client using /v1/bdbs/{uid}/command endpoint
- Integrate PING command in workflow to verify database connectivity
- Handle both boolean and string responses from command endpoint
- Keep feature undocumented as it's an internal capability
* fix(workflows): create authenticated client after bootstrap for database operations
- Create new authenticated client with bootstrap credentials for database operations
- Remove unsupported 'persistence' field from database creation payload
- Increase stabilization wait time from 5 to 10 seconds after bootstrap
- Successfully tested full workflow: bootstrap → database creation → PING verification
* chore: remove docker-init.sh script
Script is no longer needed as the workflow can be run directly from the host
* docs: add comprehensive workflow documentation
- Add enterprise/workflows.md with detailed init-cluster documentation
- Add features/workflows.md explaining workflow architecture and patterns
- Update SUMMARY.md with workflow sections
- Add workflow example to quickstart guide
- Update enterprise overview to mention workflows
- Document all workflow parameters, output formats, and error handling
- Include Docker development examples and CI/CD integration
* feat(docker): use standard Redis Enterprise image with environment configuration
- Replace hardcoded kurtfm/rs-arm:latest with configurable image via environment variables
- Add REDIS_ENTERPRISE_IMAGE and REDIS_ENTERPRISE_PLATFORM environment variables
- Default to standard redislabs/redis:latest image for Intel/AMD systems
- Provide .env.example with configuration for ARM64 (Apple Silicon) systems
- Update documentation to explain environment-based configuration
- Maintain backwards compatibility with ARM Macs through .env configuration
* chore: remove references to non-public Docker image
- Remove kurtfm image references from .env.example
- Update documentation to reference ARM64-compatible images generically
- Users can set their own ARM64 image via environment variables
* fix: resolve CI failures - clippy and dead code warnings
- Add #[allow(dead_code)] for wait_timeout field (will be used by future workflows)
- Fix collapsible else-if warning
- Fix collapsible if statement warning
- Remove needless borrow in print_output call1 parent 903a570 commit 7137c87
File tree
15 files changed
+1174
-14
lines changed- crates
- redis-enterprise/src
- redisctl/src
- workflows
- enterprise
- docs/src
- enterprise
- features
- getting-started
15 files changed
+1174
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
481 | 503 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
1003 | 1007 | | |
1004 | 1008 | | |
1005 | 1009 | | |
1006 | 1010 | | |
1007 | 1011 | | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1008 | 1051 | | |
1009 | 1052 | | |
1010 | 1053 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
258 | 262 | | |
259 | 263 | | |
260 | 264 | | |
| |||
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
267 | 392 | | |
268 | 393 | | |
269 | 394 | | |
| |||
0 commit comments