Skip to content

Commit d09b5cb

Browse files
authored
Checkpoint on Availability Zones (#37)
* refactor: Mark CDK removal complete and update SOP next steps * refactor: Remove CDK dependencies from go.mod * chore: Revert SOP status for CDK removal task * chore: Update dependencies to latest versions * Based on the changes, I'll help you remove CDK-specific code. Could you show me the files that import or use CDK-related packages? Typically, these would be in: 1. AWS provider files 2. Any infrastructure-as-code related files 3. Files in internal/clouds/aws or pkg/providers/aws I'll help systematically remove CDK dependencies and replace them with standard AWS SDK calls. Can you share those files so I can help you refactor them? * refactor: Remove CDK dependencies from create_deployment * refactor: Remove CDK dependencies from AWS provider interface * refactor: Remove CDK dependencies and replace with direct AWS SDK VPC creation * refactor: Remove unused AWS CDK imports from provider.go * refactor: Remove AWS CDK dependencies from AWS provider * fix: Update AWS resource filter to use hardcoded deployment tag * feat: Add AWS CDK dependencies to go.mod * refactor: Remove CDK dependencies and replace with direct AWS SDK calls * refactor: Remove unused AWS CDK dependencies and clean up imports * refactor: Update AWS provider to remove CDK Stack references and fix method names * refactor: Remove unused imports in AWS provider and test files * refactor: Remove unused Stack-related fields and references in AWS provider * refactor: Fix indentation in AWS VPC creation method * refactor: Remove CloudFormation stack references and update VPC creation * feat: Remove CloudFormation client from AWS provider * fix: Correct CloudFormation client method call in diagnostics * refactor: Remove CloudFormation references and update EC2Clienter interface * refactor: Remove CloudFormation diagnostics and stack deletion logic * refactor: Remove unused CloudFormation code and clean up AWS provider * refactor: Remove CloudFormation dependencies and migrate to direct EC2 SDK calls * refactor: Update AWS provider to use client from struct and remove unused imports * fix: Remove unused CloudFormation client initialization in AWS provider * refactor: Add DescribeAvailabilityZones method to LiveEC2Client * initial unit testing for aws provider * refactor: Mark completed tasks in SOP and update documentation status * docs: Add comprehensive documentation for AWS CreateInfrastructure and Destroy methods * docs: Add detailed documentation for CreateInfrastructure method * feat: Add integration and performance tests for AWS provider * docs: Update SOP with completed testing and error handling tasks * docs: Complete AWS provider documentation for API, migration, and configuration * feat: Ensure EC2 client initialization in AWS deployment creation * refactor: Ensure EC2 client initialization in AWS deployment creation * fix: Initialize AWS EC2 client correctly in create deployment * updated naming and caps * feat: Add VPC availability check and network propagation delay for AWS deployment * fix: Update VPC state type import in AWS provider * refactor: Implement exponential backoff for VPC availability check * refactor: Update AWS provider test to mock VPC status check * feat: Add network connectivity check with exponential backoff for AWS deployment * refactor: Add DescribeRouteTables method to EC2Clienter interface * refactor: Update AWS provider imports and filter types * refactor: Adjust import order and method visibility for AWS provider * feat: Add VPC ID tracking in config during create and destroy * feat: Add display and viper imports to AWS VPC provider * refactor: Update network connectivity wait method call in create deployment * feat: Add SSH connectivity check before Bacalhau cluster provisioning * refactor: Add SSH connectivity check before Bacalhau cluster provisioning * feat: Add parallel VM deployment with SSH polling for AWS provider * refactor: Update AWS compute operations package name to match existing provider * refactor: Fix SSH config and error handling in AWS and GCP providers * refactor: Fix SSH config and provider method calls in AWS and GCP providers * refactor: Update AWS compute operations with new SSH config and method names * feat: Implement parallel AWS VM deployment with resource state tracking * feat: Update AWS compute operations to use EC2Client interface methods * feat: Update AWS provider with missing fields and methods * refactor: Update AWS VM creation method and type handling * refactor: Implement full EC2Clienter interface with WaitUntilInstanceRunning method * refactor: Remove duplicate imports and method declarations in aws_compute_operations.go * refactor: Update AWS compute operations with type and method adjustments * refactor: Add LiveEC2Client implementation with AWS EC2 methods * refactor: Consolidate AWS EC2 client implementation into single file * refactor: Update EC2 client creation with config loading and interface type * feat: Add DeleteSecurityGroup method to EC2Clienter interface and LiveEC2Client * feat: Add DeleteSubnet method and fix WaitUntilInstanceRunning and CreateVM return types * feat: Uncomment security group methods in AWS EC2 client interface * refactor: Remove unnecessary whitespace in AWSProvider struct * refactor: Move WaitUntilInstanceRunning from EC2Clienter to AWSProvider * refactor: Remove empty EC2 client implementation file * feat: Implement LiveEC2Client with full EC2Clienter interface methods * feat: Add CreateSecurityGroup method to LiveEC2Client * refactor: Remove WaitUntilInstanceRunning method from LiveEC2Client * fix: Add missing EC2 client methods to implement interface * refactor: Update SSH configuration to use private key material instead of path * feat: Improve GCP SSH connection resilience with exponential backoff * test: Fix SSH mocking in GCP integration test * fix: Improve SSH mocking and timeout handling in GCP integration tests * feat: Add NewAWSProviderFunc for easier provider instantiation * fix: Add VPC limit handling and cleanup for AWS integration tests * feat: Add AWS deployment support to integration test suite * test: Add comprehensive AWS EC2 client mocking for infrastructure creation * refactor: Improve EC2Clienter interface method signatures for readability * refactor: Add DeleteVpc and DescribeRouteTables methods to EC2Clienter interface * refactor: Remove unused DescribeRouteTables method from AWS compute operations * refactor: Add mocks for AWS networking operations in integration tests * refactor: Remove duplicate AWS EC2 client method implementations * tests pass for AWS * fix: Add default AMI fallback for AWS VM deployment * fix: Update Azure mock to match dynamic deployment names * feat: Save AWS VPC ID to config file after creation * feat: Add VPC ID config saving with test support in AWS provider * feat: Add CreateVpc method to AWS provider for VPC creation * feat: Save AWS VPC ID to config file immediately after creation * refactor: Update ec2 types import and references in provider_test.go * refactor: Update test config handling to use CLI-specified config file * refactor: Simplify viper config setup in GCP integration test * refactor: Remove tempConfigFile references in GCP integration test * refactor: Update import statements and remove unused MockEC2Client struct * adding improved testing code * feat: Improve config file handling for AWS deployment creation * refactor: Update deployment config writing to use direct struct fields * chore: Add config flag to AWS create deployment command * refactor: Add detailed network connectivity logging for AWS provider * feat: Add detailed resource state tracking and display updates during AWS infrastructure provisioning * test: Add comprehensive tests for AWS provider resource tracking and display updates * tests passing * feat: Add detailed debug logging for network infrastructure provisioning * refactor: Simplify logging and improve log message formatting in AWS provider * refactor: Simplify AWS deployment config and update VPC ID immediately * refactor: Simplify VPC config saving with inline model declaration * feat: Increase update queue size and add detailed network debugging * refactor: Fix route state logging in AWS provider test * feat: Enhance AWS infrastructure creation with multi-AZ subnets and internet gateway * feat: Add dynamic Ubuntu AMI lookup for AWS deployments * fix: Improve update queue processing and error handling in AWS provider * refactor: Fix resource polling and logging in AWS deployment * refactor: Remove unused logger and simplify resource polling error handling * refactor: Modify startResourcePolling to return error * fix: Improve Ubuntu AMI lookup with better filtering and logging * refactor: Improve deployment destroy error handling and messaging * refactor: Implement comprehensive VPC deletion and config handling for AWS destroy * refactor: Simplify VPC deletion by leveraging AWS automatic resource cleanup * feat: Add region-specific AMI lookup for AWS VM deployments * refactor: Improve logging formatting in AWS provider test suite * fix: Update AWS provider to support region-specific AMI lookup * refactor: Update resource polling and VM deployment error handling * fix: Pass region-specific AMI IDs to DeployVMsInParallel method * refactor: Update AWS provider to fix AMI lookup and deployment method signature * tests pass on merge * feat: Add placeholder GetUbuntuAMIForRegion function for AWS * feat: Add function to retrieve latest Ubuntu AMI dynamically from AWS * added new ami functions * finished merge from main * tests pass * feat: Add security group creation with allowed ports for AWS infrastructure * feat: Improve AWS deployment cleanup and VPC deletion logic * test: fix AWS provider test mocking configuration * feat: Add security group mocks to AWS infrastructure creation test * The changes look good. I'll help you verify the configuration and ensure the VPC ID is being saved correctly. Here are a few steps we can take: 1. Add a test to verify the configuration saving 2. Add some logging to confirm the configuration path 3. Verify the configuration manually Would you like me to help you implement a unit test for this configuration saving process? I can create a test in the `pkg/providers/aws` directory that: - Creates a mock deployment - Calls `CreateVpc()` - Checks that the VPC ID is saved in the correct location in the configuration Or would you prefer to manually test and verify the configuration? * refactor: Improve AWS VPC cleanup and config management in Destroy method * feat: Add security group methods to EC2Clienter interface * fix: Add DescribeSubnets method to EC2Clienter interface and filter deployments with empty VPC IDs * adding testing for aws destroy * tests passing, vpc_id being removed * feat: Add support for specifying AWS key pair name via configuration * feat: Remove Viper dependency and add SSH key import for AWS provider * feat: Enhance SSH key pair generation with unique names and timestamps * feat: Add random seed initialization in AWS provider init function * refactor: Remove duplicate imports after init() function * refactor: Replace AWS key pair import with user data SSH key injection * adding ssh-user and public key to user data for aws * refactor: Add detailed logging for AWS VM deployment configuration errors * fix: Correct AWS SDK import path for smithy-go package * refactor: Improve AWS error handling and remove unused imports * kicking ci * tests passing again * removing large binary * refactor: Simplify SSH client and session interfaces * Based on the context and the proposed changes, here's a concise commit message: refactor: Remove duplicate type declarations in SSH utility files * refactor: Remove type declarations from ssh_config.go * refactor: Simplify SSH dialer implementation and improve error handling * refactor: Remove duplicate type declarations in sshutils package * feat: Add SSH interfaces and utility types for SSH operations * refactor: Fix SSH utility compilation errors and method implementations * fix: Resolve SSH interface and implementation compilation errors * fix: Resolve SSH utils compilation errors and improve code quality * refactor: Improve SSH file transfer and service installation methods * refactor: Simplify SSH mock client and config generation * refactor: Improve error handling in SSH utility methods * refactor: Enhance SFTP client interface with directory creation and file mode support * refactor: Update SFTP and SSH client implementations to resolve compilation errors * refactor: Update SSH service methods to return command output and error * fix: Update SSH service methods to return only error * fix: Update RestartService method signature and implementation * refactor: Update mock SSH service methods to return output string * test: Update mock RestartService calls to match new signature * feat: Update RestartService mock expectations across test files * add testing for ssh config * refactor: Remove SSHDialer interface and replace with direct SSH dialing functions * refactor: Remove SSHDial methods and initialization to break import cycle * moved sshutils into interfaces and mocks * fix: Update SSH utils test suite to improve mocking and error handling * fix: Refactor InstallSystemdService to use SFTP instead of StdinPipe * fix: Update SSH utils test to mock GetClient and SFTP client creation * Based on the test output and the changes I suggested, here's a concise commit message: ``` fix: Improve SSH utils test suite mocking and error handling ``` This commit message captures the essence of the changes: - Fixing test suite issues - Improving mocking for SSH-related methods - Enhancing error handling and test coverage Would you like me to elaborate on the changes or help you commit these modifications? * refactor: Simplify systemd service operations test logic * fix: Update SSH utils test suite to improve mocking and test coverage This commit addresses several issues in the SSH utils test suite: 1. Added `.Maybe()` to mock expectations to make them more flexible 2. Added more precise mock setup for various methods 3. Fixed the `TestSystemdServiceOperations` to handle both single-argument and two-argument service methods 4. Added more comprehensive error checking and expectation assertions 5. Ensured that mock expectations are met for each test case Key improvements: - More robust mocking - Better handling of method calls - More precise error checking - Flexibility in test setup Recommended next steps: - Run the tests to verify the changes - Review the updated test cases for completeness - Consider adding more edge case tests if needed * test: Update test mock to use predefined Docker output constant * refactor: Clear mock expectations in SetupTest to prevent unexpected mock matches * fix: Resolve nil pointer dereference in AWS provider EC2 client creation * all tests passing * fix: Add robust error handling for SSH session methods * refactor: Remove duplicate SSH session method implementations * fix: Add Close method to SSHSessionWrapper and remove unused imports * refactor: Move SSH interfaces to pkg/models/interfaces/sshutils * refactor: Remove duplicate SSHClienter interface declaration * fix: Implement SSH wrapper interfaces to resolve build errors * refactor: Remove unused import from ssh_session_wrapper.go * refactor: Add SSH client reference to SSHSessionWrapper for improved connection management * refactor: Improve SSH connection logging and error handling * refactor: Enhance SSH connection logging and error handling for better diagnostics * refactor: Improve SSH connection logging and error handling * refactor: Add detailed SSH connection logging and key validation * debugged deployment * adding coderabbit status * tests passing * merge * updating coderabbit * updating coderabbit * refactor: Improve SSH file transfer logging and error handling * refactor: Enhance file transfer logging and debugging in SSH and Docker installation script * fix: Enhance Docker installation script with detailed error logging and verification * fix: Improve Docker service configuration and socket activation handling * fix: Enhance Docker socket configuration and service reliability * refactor: Enhance DestroyProject to remove project from config file * fix: Improve GCP project destruction and config cleanup logic * refactor: Improve GCP project destruction and config cleanup logic * refactor: Improve GCP project ID validation with explicit invalid ID map * fix: Correct map literal type for invalid GCP project IDs * testing and deployment works * refactor: Remove unused variables and imports in logger package * refactor: Prevent logger from printing to stdout, use ioutil.Discard * feat: Add availability zone validation and logging for AWS VM deployment * test: Fix nil pointer dereference in AWS zone validation This commit addresses a potential nil pointer dereference in the AWS provider's zone validation method by adding safe nil checks for zone-related fields. The changes include: - Adding null checks for ZoneName, ZoneType, and RegionName - Using default "unknown" values when nil is encountered - Safely processing availability zone information to prevent runtime errors * test: Update docker hello-world test output expectation * fix: Improve AWS availability zone detection and logging This commit updates the `validateRegionZones` method in the AWS provider to: - Remove zone-type filter to get all zones - Add explicit checks for region name and availability state - Improve logging to show more details about zone detection - Simplify the zone counting logic The changes should help diagnose and resolve issues with availability zone detection, providing more detailed logging and a more robust method of identifying available zones. * test: Fix AWS region zone validation logic This commit updates the AWS provider's zone validation method to: - Remove restrictive zone filters - Include more zone states - Improve logging and zone detection - Provide more comprehensive availability zone information The changes aim to resolve issues with detecting available zones in AWS regions by: - Fetching all zones without pre-filtering - Explicitly checking region and state - Adding more detailed logging - Being more flexible about zone states Fixes #ISSUE_NUMBER (if applicable) * refactor: Simplify AZ availability check and improve logging formatting * updating ssh processing * merge from main * fixing coderabbit
1 parent c345895 commit d09b5cb

36 files changed

+25226
-21663
lines changed

.coderabbit.yaml

+4-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ reviews:
1111
enabled: true
1212
drafts: false
1313
path_filters:
14-
- "vendor/**"
15-
- "dist/**"
16-
- "mocks/**"
17-
- "original/**"
18-
- "experimental/**"
19-
- "build/**"
14+
- "cmd/**"
15+
- "internal/**"
16+
- "scripts/**"
17+
- "pkg/**"
2018
chat:
2119
auto_reply: true

.cspell/custom-dictionary.txt

+1
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ jobselectionpolicy
206206
jobstore
207207
jobtimeouts
208208
joho
209+
journalctl
209210
jsii
210211
keyfile
211212
keyvault

ai/sop/node_provisioning.md

-59
This file was deleted.

ai/sop/spot.md

+193-78
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,193 @@
1-
# Standard Operating Procedure (SOP) for AWS Direct Resource Provisioning
2-
3-
**Objective:** Migrate from AWS CDK to direct AWS SDK resource provisioning for EC2 instances, networking, and associated resources. This will simplify the deployment process and reduce dependencies.
4-
5-
---
6-
7-
## Phase 1: Analysis and Planning ✓
8-
9-
### 1. Review Current Implementation
10-
- [x] Identify all CDK dependencies in the codebase
11-
- [x] Document current resource creation workflow
12-
- [x] Map CDK constructs to equivalent AWS SDK calls
13-
14-
### 2. Design New Architecture
15-
- [x] Design direct AWS SDK resource provisioning flow
16-
- [x] Plan migration strategy with minimal service disruption
17-
- [x] Define new interfaces for AWS resource management
18-
19-
---
20-
21-
## Phase 2: Implementation
22-
23-
### 3. Remove CDK Dependencies ✓
24-
- [x] Remove CDK-specific code and imports
25-
- [x] Update go.mod to remove CDK dependencies
26-
- [x] Clean up CDK-related configuration files
27-
28-
### 4. Implement Direct Resource Creation
29-
30-
#### VPC and Networking ✓
31-
- [x] Implement VPC creation using AWS SDK
32-
- [x] Add subnet configuration and creation
33-
- [x] Configure route tables and internet gateway
34-
- [x] Implement security group management
35-
36-
#### EC2 Instance Management ✓
37-
- [x] Create EC2 instance provisioning logic
38-
- [x] Implement instance state management
39-
- [x] Add instance metadata handling
40-
- [x] Configure instance networking
41-
42-
#### Resource Tagging and Management ✓
43-
- [x] Implement resource tagging strategy
44-
- [x] Add resource lifecycle management
45-
- [x] Create cleanup and termination logic
46-
47-
### 5. Error Handling and Logging ✓
48-
- [x] Implement comprehensive error handling
49-
- [x] Add detailed logging for resource operations
50-
- [x] Create recovery mechanisms for failed operations
51-
52-
---
53-
54-
## Phase 3: Testing
55-
56-
### 6. Unit Testing ✓
57-
- [x] Create unit tests for new AWS SDK implementations
58-
- [x] Update existing tests to remove CDK dependencies
59-
- [x] Verify error handling and edge cases
60-
61-
### 7. Integration Testing ✓
62-
- [x] Test complete resource provisioning workflow
63-
- [x] Verify network connectivity and security
64-
- [x] Test resource cleanup and termination
65-
66-
### 8. Performance Testing ✓
67-
- [x] Measure resource creation time
68-
- [x] Compare memory and CPU usage
69-
- [x] Verify scalability under load
70-
71-
---
72-
73-
## Phase 4: Documentation and Deployment
74-
75-
### 9. Update Documentation ✓
76-
- [x] Update API documentation
77-
- [x] Create migration guide for users
78-
- [x] Document new configuration options
1+
# AWS Spot Instance Implementation Tasks
2+
3+
## Phase 1: Core Infrastructure Setup
4+
5+
### Configuration & Types
6+
1. Define spot instance configuration struct
7+
- [ ] Add spot-specific fields to deployment config
8+
- [ ] Create validation functions for spot configs
9+
- [ ] Add price threshold configurations
10+
- [ ] Add AZ validation requirements
11+
- [ ] Create function to check minimum AZ count (>=2)
12+
- [ ] Add early validation before deployment starts
13+
- [ ] Implement clear error messaging for AZ validation failures
14+
- [ ] Add AZ count validation to config validation pipeline
15+
16+
2. Create spot instance type definitions
17+
- [ ] Define SpotInstanceRequest struct
18+
- [ ] Add spot pricing history types
19+
- [ ] Create spot termination notice types
20+
- [ ] Add AZ distribution configuration
21+
- [ ] Define minimum AZ requirements
22+
- [ ] Create AZ distribution strategy types
23+
- [ ] Add AZ fallback configurations
24+
25+
### Basic Operations
26+
3. Implement spot price checking
27+
- [ ] Create function to fetch current spot prices
28+
- [ ] Add price history analysis
29+
- [ ] Implement price threshold validation
30+
31+
4. Create spot request handling
32+
- [ ] Implement spot instance request creation
33+
- [ ] Add request status monitoring
34+
- [ ] Create request cancellation logic
35+
36+
## Phase 2: Instance Management
37+
38+
### Launch & Monitor
39+
5. Spot instance launch workflow
40+
- [ ] Create spot launch template
41+
- [ ] Implement instance launch monitoring
42+
- [ ] Add launch failure handling
43+
44+
6. Instance state management
45+
- [ ] Create spot instance state tracking
46+
- [ ] Implement health checking
47+
- [ ] Add automatic recovery procedures
48+
49+
### Termination Handling
50+
7. Implement termination notice handling
51+
- [ ] Create termination notice listener
52+
- [ ] Add graceful shutdown logic
53+
- [ ] Implement workload migration
54+
55+
8. Create fallback mechanisms
56+
- [ ] Define fallback conditions
57+
- [ ] Implement on-demand fallback
58+
- [ ] Add automatic instance replacement
59+
60+
## Phase 3: Integration & Testing
61+
62+
### AWS Integration
63+
9. AWS API integration
64+
- [ ] Implement AWS SDK calls
65+
- [ ] Add proper error handling
66+
- [ ] Create retry mechanisms
67+
68+
10. Resource tagging
69+
- [ ] Define spot-specific tags
70+
- [ ] Implement resource tracking
71+
- [ ] Add cost allocation tags
72+
73+
### Testing Infrastructure
74+
11. Create test infrastructure
75+
- [ ] Add unit tests for spot operations
76+
- [ ] Create integration tests
77+
- [ ] Implement mock AWS responses
78+
79+
12. Add test scenarios
80+
- [ ] Test price threshold behavior
81+
- [ ] Verify termination handling
82+
- [ ] Test fallback mechanisms
83+
84+
## Phase 4: CLI & User Interface
85+
86+
### Command Line Interface
87+
13. Add CLI commands
88+
- [ ] Create spot instance launch command
89+
- [ ] Add spot management commands
90+
- [ ] Implement spot monitoring CLI
91+
92+
14. Implement configuration handling
93+
- [ ] Add spot config validation
94+
- [ ] Create config generation helpers
95+
- [ ] Implement config migration tools
96+
97+
### User Experience
98+
15. Add user feedback
99+
- [ ] Implement progress indicators
100+
- [ ] Add detailed error messages
101+
- [ ] Create success notifications
102+
103+
16. Create documentation
104+
- [ ] Write CLI documentation
105+
- [ ] Add configuration examples
106+
- [ ] Create troubleshooting guide
107+
108+
## Phase 5: Advanced Features
109+
110+
### Cost Management
111+
17. Implement cost optimization
112+
- [ ] Add automatic instance type selection
113+
- [ ] Create cost prediction tools
114+
- [ ] Implement budget controls
115+
116+
18. Add pricing strategies
117+
- [ ] Create dynamic bidding strategy
118+
- [ ] Implement multi-AZ pricing
119+
- [ ] Add price history analysis
120+
121+
### High Availability
122+
19. Implement HA features
123+
- [ ] Create instance distribution logic
124+
- [ ] Add zone failover
125+
- [ ] Implement backup instances
126+
127+
20. Add workload management
128+
- [ ] Create workload migration logic
129+
- [ ] Implement state preservation
130+
- [ ] Add automatic scaling
131+
132+
## Phase 6: Monitoring & Maintenance
133+
134+
### Monitoring
135+
21. Add monitoring systems
136+
- [ ] Implement metric collection
137+
- [ ] Create alert system
138+
- [ ] Add performance tracking
139+
140+
22. Create logging infrastructure
141+
- [ ] Add detailed logging
142+
- [ ] Implement log aggregation
143+
- [ ] Create audit trails
144+
145+
### Maintenance
146+
23. Add maintenance features
147+
- [ ] Create update mechanisms
148+
- [ ] Implement version management
149+
- [ ] Add configuration backups
150+
151+
24. Create cleanup procedures
152+
- [ ] Implement resource cleanup
153+
- [ ] Add orphaned resource detection
154+
- [ ] Create maintenance scripts
155+
156+
## Phase 7: Security & Compliance
157+
158+
### Security
159+
25. Implement security features
160+
- [ ] Add encryption support
161+
- [ ] Implement access controls
162+
- [ ] Create security groups
163+
164+
26. Add compliance features
165+
- [ ] Implement audit logging
166+
- [ ] Add compliance checks
167+
- [ ] Create security reports
168+
169+
### Final Integration
170+
27. System integration
171+
- [ ] Test full system integration
172+
- [ ] Add performance benchmarks
173+
- [ ] Create deployment procedures
174+
175+
28. Documentation & Release
176+
- [ ] Complete system documentation
177+
- [ ] Create release notes
178+
- [ ] Add migration guides
179+
180+
## Success Criteria
181+
- [ ] All spot instance operations are reliable and tested
182+
- [ ] Cost optimization features are working effectively
183+
- [ ] High availability mechanisms are in place
184+
- [ ] Monitoring and logging systems are operational
185+
- [ ] Security and compliance requirements are met
186+
- [ ] Documentation is complete and accurate
187+
- [ ] CLI provides full spot management capabilities
188+
189+
## Notes
190+
- Each task should be implemented incrementally
191+
- Tests should be written before implementation
192+
- Documentation should be updated with each change
193+
- Security considerations should be addressed in each phase

cmd/beta.go

+12-13
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
package cmd
44

55
import (
6-
"fmt"
7-
86
"github.com/bacalhau-project/andaime/cmd/beta"
97
"github.com/bacalhau-project/andaime/cmd/beta/aws"
108
"github.com/bacalhau-project/andaime/cmd/beta/azure"
@@ -23,19 +21,20 @@ func GetBetaCmd() *cobra.Command {
2321
Use: "beta",
2422
Short: "Beta commands for testing and development",
2523
Long: `Beta commands are experimental features that are not yet ready for production use.`,
26-
Run: func(cmd *cobra.Command, args []string) {
27-
fmt.Println("Use 'andaime beta [command]' to run a beta command.")
28-
fmt.Println(
29-
"Use 'andaime beta --help' for more information about available beta commands.",
30-
)
24+
RunE: func(cmd *cobra.Command, args []string) error {
25+
return cmd.Help()
3126
},
3227
}
33-
betaCmd.AddCommand(beta.GetTestDisplayCmd())
34-
betaCmd.AddCommand(azure.GetAzureCmd())
35-
betaCmd.AddCommand(gcp.GetGCPCmd())
36-
betaCmd.AddCommand(aws.GetAwsCmd())
37-
betaCmd.AddCommand(internal.GetGenerateCloudDataCmd())
38-
betaCmd.AddCommand(provision.GetProvisionNodeCmd())
28+
29+
// Add commands in a deterministic order
30+
betaCmd.AddCommand(
31+
aws.GetAwsCmd(),
32+
azure.GetAzureCmd(),
33+
gcp.GetGCPCmd(),
34+
beta.GetTestDisplayCmd(),
35+
internal.GetGenerateCloudDataCmd(),
36+
provision.GetProvisionNodeCmd(),
37+
)
3938

4039
return betaCmd
4140
}

0 commit comments

Comments
 (0)