Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to SSH and use of SFTP #31

Closed
wants to merge 213 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
2765d4c
refactor: Mark CDK removal complete and update SOP next steps
aronchick Nov 8, 2024
03497e5
refactor: Remove CDK dependencies from go.mod
aronchick Nov 8, 2024
2311edc
chore: Revert SOP status for CDK removal task
aronchick Nov 8, 2024
9932944
chore: Update dependencies to latest versions
aronchick Nov 8, 2024
33ef9d0
Based on the changes, I'll help you remove CDK-specific code. Could y…
aronchick Nov 8, 2024
d92127b
refactor: Remove CDK dependencies from create_deployment
aronchick Nov 8, 2024
39eba29
refactor: Remove CDK dependencies from AWS provider interface
aronchick Nov 8, 2024
3f89bf3
refactor: Remove CDK dependencies and replace with direct AWS SDK VPC…
aronchick Nov 8, 2024
bbe4257
refactor: Remove unused AWS CDK imports from provider.go
aronchick Nov 8, 2024
7683866
refactor: Remove AWS CDK dependencies from AWS provider
aronchick Nov 8, 2024
b26e54c
fix: Update AWS resource filter to use hardcoded deployment tag
aronchick Nov 8, 2024
574ba8c
feat: Add AWS CDK dependencies to go.mod
aronchick Nov 8, 2024
cc06f28
refactor: Remove CDK dependencies and replace with direct AWS SDK calls
aronchick Nov 8, 2024
fc544c5
refactor: Remove unused AWS CDK dependencies and clean up imports
aronchick Nov 8, 2024
deda6f1
refactor: Update AWS provider to remove CDK Stack references and fix …
aronchick Nov 9, 2024
3936557
refactor: Remove unused imports in AWS provider and test files
aronchick Nov 9, 2024
c7bb489
refactor: Remove unused Stack-related fields and references in AWS pr…
aronchick Nov 9, 2024
ef4d8b6
refactor: Fix indentation in AWS VPC creation method
aronchick Nov 9, 2024
810fc20
refactor: Remove CloudFormation stack references and update VPC creation
aronchick Nov 9, 2024
2ea36e3
feat: Remove CloudFormation client from AWS provider
aronchick Nov 9, 2024
21db87d
fix: Correct CloudFormation client method call in diagnostics
aronchick Nov 9, 2024
e46db91
refactor: Remove CloudFormation references and update EC2Clienter int…
aronchick Nov 9, 2024
c57800e
refactor: Remove CloudFormation diagnostics and stack deletion logic
aronchick Nov 9, 2024
6bf9aac
refactor: Remove unused CloudFormation code and clean up AWS provider
aronchick Nov 9, 2024
017e23f
refactor: Remove CloudFormation dependencies and migrate to direct EC…
aronchick Nov 9, 2024
1f7cc7b
refactor: Update AWS provider to use client from struct and remove un…
aronchick Nov 9, 2024
228c4ca
fix: Remove unused CloudFormation client initialization in AWS provider
aronchick Nov 9, 2024
9582e1e
refactor: Add DescribeAvailabilityZones method to LiveEC2Client
aronchick Nov 9, 2024
85f3dd6
initial unit testing for aws provider
aronchick Nov 9, 2024
41cca81
refactor: Mark completed tasks in SOP and update documentation status
aronchick Nov 9, 2024
600facb
docs: Add comprehensive documentation for AWS CreateInfrastructure an…
aronchick Nov 9, 2024
4e77555
docs: Add detailed documentation for CreateInfrastructure method
aronchick Nov 9, 2024
fa0882f
feat: Add integration and performance tests for AWS provider
aronchick Nov 9, 2024
91e3422
docs: Update SOP with completed testing and error handling tasks
aronchick Nov 9, 2024
64202c9
docs: Complete AWS provider documentation for API, migration, and con…
aronchick Nov 9, 2024
9cd8c33
feat: Ensure EC2 client initialization in AWS deployment creation
aronchick Nov 9, 2024
a81720b
refactor: Ensure EC2 client initialization in AWS deployment creation
aronchick Nov 9, 2024
4ebcb2f
fix: Initialize AWS EC2 client correctly in create deployment
aronchick Nov 9, 2024
a6e95e7
updated naming and caps
aronchick Nov 10, 2024
8ac0443
feat: Add VPC availability check and network propagation delay for AW…
aronchick Nov 10, 2024
96e9762
fix: Update VPC state type import in AWS provider
aronchick Nov 10, 2024
2480ffb
refactor: Implement exponential backoff for VPC availability check
aronchick Nov 10, 2024
b0362b3
refactor: Update AWS provider test to mock VPC status check
aronchick Nov 10, 2024
7052ba7
feat: Add network connectivity check with exponential backoff for AWS…
aronchick Nov 10, 2024
ff5cdbb
refactor: Add DescribeRouteTables method to EC2Clienter interface
aronchick Nov 10, 2024
f9adf6d
refactor: Update AWS provider imports and filter types
aronchick Nov 10, 2024
f924f36
refactor: Adjust import order and method visibility for AWS provider
aronchick Nov 10, 2024
1d83ffb
feat: Add VPC ID tracking in config during create and destroy
aronchick Nov 10, 2024
36672f7
feat: Add display and viper imports to AWS VPC provider
aronchick Nov 10, 2024
1e37c3f
refactor: Update network connectivity wait method call in create depl…
aronchick Nov 10, 2024
55b433a
feat: Add SSH connectivity check before Bacalhau cluster provisioning
aronchick Nov 10, 2024
976dfe0
refactor: Add SSH connectivity check before Bacalhau cluster provisio…
aronchick Nov 10, 2024
bd5a154
feat: Add parallel VM deployment with SSH polling for AWS provider
aronchick Nov 10, 2024
a4e235a
refactor: Update AWS compute operations package name to match existin…
aronchick Nov 10, 2024
e947578
refactor: Fix SSH config and error handling in AWS and GCP providers
aronchick Nov 10, 2024
bd0e0f4
refactor: Fix SSH config and provider method calls in AWS and GCP pro…
aronchick Nov 10, 2024
e5f2221
refactor: Update AWS compute operations with new SSH config and metho…
aronchick Nov 10, 2024
262b0b3
feat: Implement parallel AWS VM deployment with resource state tracking
aronchick Nov 10, 2024
a38ec37
feat: Update AWS compute operations to use EC2Client interface methods
aronchick Nov 10, 2024
0ce39c2
feat: Update AWS provider with missing fields and methods
aronchick Nov 10, 2024
3b36d77
refactor: Update AWS VM creation method and type handling
aronchick Nov 10, 2024
7f11c36
refactor: Implement full EC2Clienter interface with WaitUntilInstance…
aronchick Nov 10, 2024
d9f5a78
refactor: Remove duplicate imports and method declarations in aws_com…
aronchick Nov 10, 2024
94a4e1d
refactor: Update AWS compute operations with type and method adjustments
aronchick Nov 10, 2024
3f1efd2
refactor: Add LiveEC2Client implementation with AWS EC2 methods
aronchick Nov 10, 2024
29ca5fb
refactor: Consolidate AWS EC2 client implementation into single file
aronchick Nov 10, 2024
843a712
refactor: Update EC2 client creation with config loading and interfac…
aronchick Nov 10, 2024
e88b8da
feat: Add DeleteSecurityGroup method to EC2Clienter interface and Liv…
aronchick Nov 10, 2024
2670b32
feat: Add DeleteSubnet method and fix WaitUntilInstanceRunning and Cr…
aronchick Nov 10, 2024
a134173
feat: Uncomment security group methods in AWS EC2 client interface
aronchick Nov 10, 2024
7659f13
refactor: Remove unnecessary whitespace in AWSProvider struct
aronchick Nov 10, 2024
1198696
refactor: Move WaitUntilInstanceRunning from EC2Clienter to AWSProvider
aronchick Nov 10, 2024
16f5ebe
refactor: Remove empty EC2 client implementation file
aronchick Nov 10, 2024
fca8121
feat: Implement LiveEC2Client with full EC2Clienter interface methods
aronchick Nov 10, 2024
72cc0bf
feat: Add CreateSecurityGroup method to LiveEC2Client
aronchick Nov 10, 2024
2e6e210
refactor: Remove WaitUntilInstanceRunning method from LiveEC2Client
aronchick Nov 10, 2024
7ffab0e
fix: Add missing EC2 client methods to implement interface
aronchick Nov 10, 2024
b3076e2
refactor: Update SSH configuration to use private key material instea…
aronchick Nov 10, 2024
c11d127
feat: Improve GCP SSH connection resilience with exponential backoff
aronchick Nov 10, 2024
451d79f
test: Fix SSH mocking in GCP integration test
aronchick Nov 10, 2024
88a5804
fix: Improve SSH mocking and timeout handling in GCP integration tests
aronchick Nov 10, 2024
bf48b5c
feat: Add NewAWSProviderFunc for easier provider instantiation
aronchick Nov 11, 2024
fd24524
fix: Add VPC limit handling and cleanup for AWS integration tests
aronchick Nov 11, 2024
1a66f02
feat: Add AWS deployment support to integration test suite
aronchick Nov 11, 2024
2251397
test: Add comprehensive AWS EC2 client mocking for infrastructure cre…
aronchick Nov 11, 2024
651d87b
refactor: Improve EC2Clienter interface method signatures for readabi…
aronchick Nov 11, 2024
3f392fb
refactor: Add DeleteVpc and DescribeRouteTables methods to EC2Cliente…
aronchick Nov 11, 2024
84ff5ed
refactor: Remove unused DescribeRouteTables method from AWS compute o…
aronchick Nov 11, 2024
94a3d3e
refactor: Add mocks for AWS networking operations in integration tests
aronchick Nov 11, 2024
de2e925
refactor: Remove duplicate AWS EC2 client method implementations
aronchick Nov 11, 2024
7ccd7c1
tests pass for AWS
aronchick Nov 11, 2024
c4d2167
fix: Add default AMI fallback for AWS VM deployment
aronchick Nov 11, 2024
e86f08a
fix: Update Azure mock to match dynamic deployment names
aronchick Nov 11, 2024
3530c6a
feat: Save AWS VPC ID to config file after creation
aronchick Nov 11, 2024
af6a97d
feat: Add VPC ID config saving with test support in AWS provider
aronchick Nov 11, 2024
8707377
feat: Add CreateVpc method to AWS provider for VPC creation
aronchick Nov 11, 2024
15b3ed6
feat: Save AWS VPC ID to config file immediately after creation
aronchick Nov 11, 2024
157b931
refactor: Update ec2 types import and references in provider_test.go
aronchick Nov 11, 2024
b8f8ae3
refactor: Update test config handling to use CLI-specified config file
aronchick Nov 11, 2024
8b0eabb
refactor: Simplify viper config setup in GCP integration test
aronchick Nov 11, 2024
e0e0a95
refactor: Remove tempConfigFile references in GCP integration test
aronchick Nov 11, 2024
cd6aa29
refactor: Update import statements and remove unused MockEC2Client st…
aronchick Nov 11, 2024
af9962b
adding improved testing code
aronchick Nov 11, 2024
9e99236
feat: Improve config file handling for AWS deployment creation
aronchick Nov 11, 2024
fd662bc
refactor: Update deployment config writing to use direct struct fields
aronchick Nov 11, 2024
8caaaa8
chore: Add config flag to AWS create deployment command
aronchick Nov 11, 2024
9782bb7
refactor: Add detailed network connectivity logging for AWS provider
aronchick Nov 11, 2024
62e6dcf
feat: Add detailed resource state tracking and display updates during…
aronchick Nov 11, 2024
57b7f3b
test: Add comprehensive tests for AWS provider resource tracking and …
aronchick Nov 11, 2024
b0d8357
tests passing
aronchick Nov 11, 2024
ed22aaa
feat: Add detailed debug logging for network infrastructure provisioning
aronchick Nov 11, 2024
65ed30c
refactor: Simplify logging and improve log message formatting in AWS …
aronchick Nov 11, 2024
76eb06e
refactor: Simplify AWS deployment config and update VPC ID immediately
aronchick Nov 11, 2024
56e6ea1
refactor: Simplify VPC config saving with inline model declaration
aronchick Nov 11, 2024
06e38dd
feat: Increase update queue size and add detailed network debugging
aronchick Nov 11, 2024
d6d8cea
refactor: Fix route state logging in AWS provider test
aronchick Nov 11, 2024
c7629d7
feat: Enhance AWS infrastructure creation with multi-AZ subnets and i…
aronchick Nov 11, 2024
ea5d0a3
feat: Add dynamic Ubuntu AMI lookup for AWS deployments
aronchick Nov 11, 2024
5cf0102
fix: Improve update queue processing and error handling in AWS provider
aronchick Nov 11, 2024
9f33b34
refactor: Fix resource polling and logging in AWS deployment
aronchick Nov 11, 2024
bfb23ff
refactor: Remove unused logger and simplify resource polling error ha…
aronchick Nov 11, 2024
2643f59
refactor: Modify startResourcePolling to return error
aronchick Nov 11, 2024
1afcff0
fix: Improve Ubuntu AMI lookup with better filtering and logging
aronchick Nov 11, 2024
242adbe
refactor: Improve deployment destroy error handling and messaging
aronchick Nov 11, 2024
b775fb1
refactor: Implement comprehensive VPC deletion and config handling fo…
aronchick Nov 11, 2024
d2a2b81
refactor: Simplify VPC deletion by leveraging AWS automatic resource …
aronchick Nov 11, 2024
60ba986
feat: Add region-specific AMI lookup for AWS VM deployments
aronchick Nov 11, 2024
6c28154
refactor: Improve logging formatting in AWS provider test suite
aronchick Nov 11, 2024
4d3f5f8
fix: Update AWS provider to support region-specific AMI lookup
aronchick Nov 11, 2024
602cb4f
refactor: Update resource polling and VM deployment error handling
aronchick Nov 11, 2024
7c8b1c2
fix: Pass region-specific AMI IDs to DeployVMsInParallel method
aronchick Nov 11, 2024
ef3901d
refactor: Update AWS provider to fix AMI lookup and deployment method…
aronchick Nov 11, 2024
96d1515
tests pass on merge
aronchick Nov 11, 2024
99c53ca
feat: Add placeholder GetUbuntuAMIForRegion function for AWS
aronchick Nov 12, 2024
ebd883e
feat: Add function to retrieve latest Ubuntu AMI dynamically from AWS
aronchick Nov 12, 2024
7474cb2
added new ami functions
aronchick Nov 12, 2024
fd8e3f8
merge from main
aronchick Nov 27, 2024
8ce3e97
finished merge from main
aronchick Nov 27, 2024
e5df82b
tests pass
aronchick Nov 27, 2024
24e9521
feat: Add security group creation with allowed ports for AWS infrastr…
aronchick Nov 27, 2024
455510e
feat: Improve AWS deployment cleanup and VPC deletion logic
aronchick Nov 27, 2024
d76ab57
test: fix AWS provider test mocking configuration
aronchick Nov 27, 2024
1af5499
feat: Add security group mocks to AWS infrastructure creation test
aronchick Nov 28, 2024
3ceae52
The changes look good. I'll help you verify the configuration and ens…
aronchick Nov 28, 2024
1f8f994
refactor: Improve AWS VPC cleanup and config management in Destroy me…
aronchick Nov 28, 2024
2b17e76
feat: Add security group methods to EC2Clienter interface
aronchick Nov 28, 2024
7716c40
fix: Add DescribeSubnets method to EC2Clienter interface and filter d…
aronchick Nov 28, 2024
21c6e91
adding testing for aws destroy
aronchick Nov 28, 2024
7d6be55
tests passing, vpc_id being removed
aronchick Nov 29, 2024
441288a
merge from main
aronchick Nov 29, 2024
3fdb6ec
feat: Add support for specifying AWS key pair name via configuration
aronchick Nov 29, 2024
8f19767
feat: Remove Viper dependency and add SSH key import for AWS provider
aronchick Nov 29, 2024
1389f8e
feat: Enhance SSH key pair generation with unique names and timestamps
aronchick Nov 29, 2024
46e74e7
feat: Add random seed initialization in AWS provider init function
aronchick Nov 29, 2024
39fbdb2
refactor: Remove duplicate imports after init() function
aronchick Nov 29, 2024
243b609
refactor: Replace AWS key pair import with user data SSH key injection
aronchick Nov 29, 2024
4c135f7
adding ssh-user and public key to user data for aws
aronchick Nov 29, 2024
ddb425c
refactor: Add detailed logging for AWS VM deployment configuration er…
aronchick Nov 29, 2024
0ad9210
fix: Correct AWS SDK import path for smithy-go package
aronchick Nov 29, 2024
48d27c5
refactor: Improve AWS error handling and remove unused imports
aronchick Nov 29, 2024
f70a336
kicking ci
aronchick Nov 30, 2024
4decfc9
tests passing again
aronchick Nov 30, 2024
1dcaef7
removing large binary
aronchick Nov 30, 2024
6ea00bb
refactor: Simplify SSH client and session interfaces
aronchick Nov 30, 2024
c32a1f7
Based on the context and the proposed changes, here's a concise commi…
aronchick Nov 30, 2024
1379fec
refactor: Remove type declarations from ssh_config.go
aronchick Nov 30, 2024
e34ea6c
refactor: Simplify SSH dialer implementation and improve error handling
aronchick Nov 30, 2024
e8bf36e
refactor: Remove duplicate type declarations in sshutils package
aronchick Nov 30, 2024
f4d3d64
feat: Add SSH interfaces and utility types for SSH operations
aronchick Nov 30, 2024
e42574c
refactor: Fix SSH utility compilation errors and method implementations
aronchick Nov 30, 2024
28fd28c
fix: Resolve SSH interface and implementation compilation errors
aronchick Nov 30, 2024
95fcfe9
fix: Resolve SSH utils compilation errors and improve code quality
aronchick Nov 30, 2024
1f969ef
refactor: Improve SSH file transfer and service installation methods
aronchick Nov 30, 2024
f04aa7c
refactor: Simplify SSH mock client and config generation
aronchick Nov 30, 2024
3ece852
refactor: Improve error handling in SSH utility methods
aronchick Nov 30, 2024
88d119f
refactor: Enhance SFTP client interface with directory creation and f…
aronchick Nov 30, 2024
52db7cd
refactor: Update SFTP and SSH client implementations to resolve compi…
aronchick Nov 30, 2024
d428eec
refactor: Update SSH service methods to return command output and error
aronchick Nov 30, 2024
7d76b8b
fix: Update SSH service methods to return only error
aronchick Nov 30, 2024
1180f74
fix: Update RestartService method signature and implementation
aronchick Nov 30, 2024
5a87e36
refactor: Update mock SSH service methods to return output string
aronchick Nov 30, 2024
0b8c74b
test: Update mock RestartService calls to match new signature
aronchick Nov 30, 2024
e06e757
feat: Update RestartService mock expectations across test files
aronchick Nov 30, 2024
c140957
add testing for ssh config
aronchick Dec 1, 2024
869bd43
refactor: Remove SSHDialer interface and replace with direct SSH dial…
aronchick Dec 1, 2024
af1db7e
refactor: Remove SSHDial methods and initialization to break import c…
aronchick Dec 1, 2024
5dcdd1c
moved sshutils into interfaces and mocks
aronchick Dec 1, 2024
a13b971
fix: Update SSH utils test suite to improve mocking and error handling
aronchick Dec 1, 2024
45c3ec7
fix: Refactor InstallSystemdService to use SFTP instead of StdinPipe
aronchick Dec 1, 2024
ca5c8d0
fix: Update SSH utils test to mock GetClient and SFTP client creation
aronchick Dec 1, 2024
43214e7
Based on the test output and the changes I suggested, here's a concis…
aronchick Dec 1, 2024
95539dd
refactor: Simplify systemd service operations test logic
aronchick Dec 1, 2024
30ffe4e
fix: Update SSH utils test suite to improve mocking and test coverage
aronchick Dec 1, 2024
749f6cf
test: Update test mock to use predefined Docker output constant
aronchick Dec 2, 2024
f0fa69e
refactor: Clear mock expectations in SetupTest to prevent unexpected …
aronchick Dec 2, 2024
4f8b360
fix: Resolve nil pointer dereference in AWS provider EC2 client creation
aronchick Dec 2, 2024
bd8b021
all tests passing
aronchick Dec 2, 2024
2cffc1f
fix: Add robust error handling for SSH session methods
aronchick Dec 2, 2024
497cd73
refactor: Remove duplicate SSH session method implementations
aronchick Dec 2, 2024
fcd2526
fix: Add Close method to SSHSessionWrapper and remove unused imports
aronchick Dec 2, 2024
2c362c7
refactor: Move SSH interfaces to pkg/models/interfaces/sshutils
aronchick Dec 2, 2024
0179b9c
refactor: Remove duplicate SSHClienter interface declaration
aronchick Dec 2, 2024
03f06f2
fix: Implement SSH wrapper interfaces to resolve build errors
aronchick Dec 2, 2024
eea1549
refactor: Remove unused import from ssh_session_wrapper.go
aronchick Dec 2, 2024
dd531c8
refactor: Add SSH client reference to SSHSessionWrapper for improved …
aronchick Dec 2, 2024
5ec0a64
refactor: Improve SSH connection logging and error handling
aronchick Dec 2, 2024
82a8417
refactor: Enhance SSH connection logging and error handling for bette…
aronchick Dec 2, 2024
29c5c17
refactor: Improve SSH connection logging and error handling
aronchick Dec 2, 2024
ab281a2
refactor: Add detailed SSH connection logging and key validation
aronchick Dec 2, 2024
74ec3ed
debugged deployment
aronchick Dec 3, 2024
a568ed8
adding coderabbit status
aronchick Dec 4, 2024
ec85df8
tests passing
aronchick Dec 9, 2024
e440730
merge
aronchick Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: true
reviews:
request_changes_workflow: false
high_level_summary: true
poem: true
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
drafts: false
path_filters:
- "**"
- "!cmd/**"
- "!internal/**"
- "!scripts/**"
- "!pkg/**"
chat:
auto_reply: true
7 changes: 7 additions & 0 deletions .cspell/custom-dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ awsprovider
awss
awsssm
AWSVM
AWSVPC
azcore
azidentity
azurepackage
Expand Down Expand Up @@ -268,6 +269,8 @@ panicnil
PBIP
pdone
pflag
pkill
polandcentral
Pollerer
practise
predeclared
Expand Down Expand Up @@ -304,6 +307,7 @@ resultdownloaders
Retryable
rgname
rivo
rtbassoc
runewidth
schollz
Sdump
Expand All @@ -316,6 +320,7 @@ serviceusage
serviceusagepb
sess
Sessioner
SetSGID
sigchanyzer
sirupsen
Skus
Expand All @@ -328,6 +333,7 @@ sshbehavior
sshclient
sshmock
sshuser
sshutil
sshutils
staticcheck
stdpm
Expand Down Expand Up @@ -383,6 +389,7 @@ virtualnetworks
visibilitytimeout
VMEX
VMIP
vmsizes
VMSS
vnet
vnets
Expand Down
5 changes: 5 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ packages:
all: true
recursive: true
dir: "./mocks/common"
github.com/bacalhau-project/andaime/pkg/models/interfaces/sshutils:
config:
all: true
recursive: true
dir: "./mocks/sshutils"
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Override or supplement configuration via environment variables:
export AWS_ACCESS_KEY_ID=your_aws_key
export AWS_SECRET_ACCESS_KEY=your_aws_secret
export GCP_PROJECT_ID=your_gcp_project
export ANDAIME_AWS_KEY_PAIR_NAME=andaime-local-key

# Cluster Configuration
export ANDAIME_PROJECT_NAME="my-bacalhau-cluster"
Expand All @@ -152,7 +153,8 @@ andaime create \
--orchestrator-nodes 1 \
--compute-nodes 3 \
--instance-type t3.medium \
--target-regions us-east-1,us-west-2
--target-regions us-east-1,us-west-2 \
--aws-key-pair-name andaime-local-key
```

### Configuration Precedence
Expand Down Expand Up @@ -223,3 +225,4 @@ andaime create \
- Check network connectivity and firewall rules
- Use `--verbose` flag for detailed logging
- Consult documentation for provider-specific requirements

117 changes: 38 additions & 79 deletions ai/sop/spot.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,100 +20,59 @@

## Phase 2: Implementation

### 3. Remove CDK Dependencies
- [ ] Remove CDK-specific code and imports
- [ ] Update go.mod to remove CDK dependencies
- [ ] Clean up CDK-related configuration files
### 3. Remove CDK Dependencies
- [x] Remove CDK-specific code and imports
- [x] Update go.mod to remove CDK dependencies
- [x] Clean up CDK-related configuration files

### 4. Implement Direct Resource Creation

#### VPC and Networking
- [ ] Implement VPC creation using AWS SDK
- [ ] Add subnet configuration and creation
- [ ] Configure route tables and internet gateway
- [ ] Implement security group management
#### VPC and Networking
- [x] Implement VPC creation using AWS SDK
- [x] Add subnet configuration and creation
- [x] Configure route tables and internet gateway
- [x] Implement security group management

#### EC2 Instance Management
- [ ] Create EC2 instance provisioning logic
- [ ] Implement instance state management
- [ ] Add instance metadata handling
- [ ] Configure instance networking
#### EC2 Instance Management
- [x] Create EC2 instance provisioning logic
- [x] Implement instance state management
- [x] Add instance metadata handling
- [x] Configure instance networking

#### Resource Tagging and Management
- [ ] Implement resource tagging strategy
- [ ] Add resource lifecycle management
- [ ] Create cleanup and termination logic
#### Resource Tagging and Management
- [x] Implement resource tagging strategy
- [x] Add resource lifecycle management
- [x] Create cleanup and termination logic

### 5. Error Handling and Logging
- [ ] Implement comprehensive error handling
- [ ] Add detailed logging for resource operations
- [ ] Create recovery mechanisms for failed operations
### 5. Error Handling and Logging
- [x] Implement comprehensive error handling
- [x] Add detailed logging for resource operations
- [x] Create recovery mechanisms for failed operations

---

## Phase 3: Testing

### 6. Unit Testing
- [ ] Create unit tests for new AWS SDK implementations
- [ ] Update existing tests to remove CDK dependencies
- [ ] Verify error handling and edge cases
### 6. Unit Testing
- [x] Create unit tests for new AWS SDK implementations
- [x] Update existing tests to remove CDK dependencies
- [x] Verify error handling and edge cases

### 7. Integration Testing
- [ ] Test complete resource provisioning workflow
- [ ] Verify network connectivity and security
- [ ] Test resource cleanup and termination
### 7. Integration Testing
- [x] Test complete resource provisioning workflow
- [x] Verify network connectivity and security
- [x] Test resource cleanup and termination

### 8. Performance Testing
- [ ] Measure resource creation time
- [ ] Compare memory and CPU usage
- [ ] Verify scalability under load
### 8. Performance Testing
- [x] Measure resource creation time
- [x] Compare memory and CPU usage
- [x] Verify scalability under load

---

## Phase 4: Documentation and Deployment

### 9. Update Documentation
- [ ] Update API documentation
- [ ] Create migration guide for users
- [ ] Document new configuration options

### 10. Deployment Strategy
- [ ] Create rollout plan
- [ ] Define rollback procedures
- [ ] Schedule maintenance window

---

## Migration Checklist

### Phase 1: Analysis ✓
- [x] Complete current implementation review
- [x] Finalize new architecture design
- [x] Document required AWS SDK calls

### Phase 2: Implementation
- [ ] Remove CDK packages
- [ ] Implement VPC creation
- [ ] Implement EC2 provisioning
- [ ] Add resource management
- [ ] Complete error handling

### Phase 3: Testing
- [ ] Complete unit tests
- [ ] Run integration tests
- [ ] Verify performance metrics

### Phase 4: Deployment
- [ ] Update documentation
- [ ] Deploy to staging
- [ ] Deploy to production

---

**Next Steps:**
1. Begin CDK removal process
2. Implement core VPC creation logic
3. Add EC2 instance provisioning
4. Update test suite

**Current Status:** Phase 1 Complete, Starting Phase 2
### 9. Update Documentation ✓
- [x] Update API documentation
- [x] Create migration guide for users
- [x] Document new configuration options
Loading
Loading