|
2 | 2 |
|
3 | 3 | ## Infrastructure Setup (1.x) |
4 | 4 |
|
5 | | -- [ ] 1.1 Create new infra directory structure |
| 5 | +- [x] 1.1 Create new infra directory structure |
6 | 6 | - Create infra/{cdk,cfn,scripts/{workshops,setup,lib,deploy,test,cleanup},policies} directories |
7 | 7 | - Create CDK Java package structure: infra/cdk/src/main/java/sample/com/{constructs,stacks} |
8 | 8 | - Create infra/cdk/src/main/resources directory for assets |
9 | 9 | - Ensure infrastructure/ directory remains untouched during setup |
10 | 10 | - _Requirements: 5.1_ |
11 | 11 |
|
12 | | -- [ ] 1.2 Initialize CDK project structure |
13 | | - - Create infra/cdk/pom.xml with unified dependencies (CDK 2.167.1, Java 25) |
| 12 | +- [x] 1.2 Initialize CDK project structure |
| 13 | + - Create infra/cdk/pom.xml with unified dependencies (CDK 2.215.0, Java 25) |
14 | 14 | - Create infra/cdk/cdk.json with CDK configuration |
15 | 15 | - Set up Maven project structure with proper groupId (sample.com) and artifactId (infra) |
16 | 16 | - Configure CDK app entry point |
17 | 17 | - _Requirements: 5.6_ |
18 | 18 |
|
19 | | -- [ ] 1.3 Create common script utilities |
| 19 | +- [x] 1.3 Create common script utilities |
20 | 20 | - Create infra/scripts/lib/common.sh with emoji-based logging functions (log_info, log_success, log_error, log_warning) |
21 | 21 | - Implement consistent error handling with handle_error function and trap setup |
22 | 22 | - Create infra/scripts/lib/wait-for-resources.sh for resource readiness checking |
|
25 | 25 |
|
26 | 26 | ## Build System (2.x) |
27 | 27 |
|
28 | | -- [ ] 2.1 Create template generation script |
29 | | - - Create infra/scripts/cfn/generate.sh that builds CDK and generates single stack.yaml |
| 28 | +- [x] 2.1 Create template generation script |
| 29 | + - Create infra/scripts/cfn/generate.sh that builds CDK and generates workshop-template.yaml |
30 | 30 | - Implement proper error handling and progress feedback with emoji logging |
31 | 31 | - Include sed transformation for CloudFormation substitutions (AccountId pattern) |
32 | 32 | - Test script execution and validate generated template structure |
33 | 33 | - _Requirements: 4.1, 4.4_ |
34 | 34 |
|
35 | | -- [ ] 2.2 Create workshop sync script |
36 | | - - Create infra/scripts/cfn/sync.sh that copies stack.yaml to workshop directories as {workshop}-stack.yaml |
37 | | - - Include policy.json copying from policies/ directory to workshop static/ directories |
| 35 | +- [x] 2.2 Create workshop sync script |
| 36 | + - Create infra/scripts/cfn/sync.sh that copies workshop-template.yaml to workshop directories as {workshop}-stack.yaml |
| 37 | + - Include iam-policy.json copying from cdk/src/main/resources/ directory to workshop static/ directories |
38 | 38 | - Implement directory existence checking and error reporting |
39 | 39 | - Support workshop list: ide, java-on-aws, java-on-eks, java-ai-agents, java-spring-ai-agents |
40 | 40 | - _Requirements: 4.2, 4.5_ |
41 | 41 |
|
42 | | -- [ ] 2.3 Set up build automation |
| 42 | +- [x] 2.3 Set up build automation |
43 | 43 | - Create infra/package.json with generate and sync npm scripts |
44 | 44 | - Make scripts executable and test npm run generate && npm run sync workflow |
45 | 45 | - Validate that generated templates are copied to correct locations with proper naming |
46 | | - - Create infra/policies directory and copy existing iam-policy.json as policy.json |
| 46 | + - Copy existing iam-policy.json to infra/cdk/src/main/resources/ for single source of truth |
47 | 47 | - _Requirements: 4.3_ |
48 | 48 |
|
49 | 49 | ## Base IDE Stack (10.x) |
50 | 50 |
|
51 | | -- [ ] 10.1 Create core CDK constructs |
| 51 | +- [x] 10.1 Create core CDK constructs |
52 | 52 | - Create infra/cdk/src/main/java/sample/com/constructs/Roles.java for IAM roles and policies |
53 | 53 | - Create infra/cdk/src/main/java/sample/com/constructs/Vpc.java for VPC with 2 AZs and 1 NAT gateway |
54 | 54 | - Create infra/cdk/src/main/java/sample/com/constructs/Ide.java for VS Code IDE environment |
55 | 55 | - Create infra/cdk/src/main/java/sample/com/constructs/CodeBuild.java for workshop setup automation |
56 | 56 | - _Requirements: 1.1, 5.6_ |
57 | 57 |
|
58 | | -- [ ] 10.2 Migrate and refactor Roles construct |
| 58 | +- [x] 10.2 Migrate and refactor Roles construct |
59 | 59 | - Copy infrastructure/cdk/src/main/java/com/unicorn/constructs/WorkshopFunction.java patterns for IAM setup |
60 | 60 | - Update package names from com.unicorn to sample.com |
61 | 61 | - Consolidate all IAM roles and policies into single Roles construct |
62 | 62 | - Include Bedrock permissions for AI workshops in the unified roles |
63 | 63 | - _Requirements: 5.6_ |
64 | 64 |
|
65 | | -- [ ] 10.3 Migrate and refactor Vpc construct |
| 65 | +- [x] 10.3 Migrate and refactor Vpc construct |
66 | 66 | - Copy infrastructure/cdk/src/main/java/com/unicorn/constructs/WorkshopVpc.java |
67 | 67 | - Update package names and simplify to standard VPC pattern |
68 | 68 | - Ensure VPC supports both IDE and EKS workloads with proper subnet configuration |
69 | 69 | - Remove workshop-specific customizations, keep generic VPC setup |
70 | 70 | - _Requirements: 5.6_ |
71 | 71 |
|
72 | | -- [ ] 10.4 Migrate and refactor Ide construct |
| 72 | +- [x] 10.4 Create optimized Python Lambda function with direct CDK implementation |
| 73 | + - Create Python source file infra/cdk/src/main/resources/launcher.py for EC2 instance launching |
| 74 | + - Use direct Function.Builder.create() with Code.fromInline(loadFile()) approach |
| 75 | + - Replace prefix.py, password.py, database.py with native CDK implementations |
| 76 | + - Move bootstrap functionality to EC2 User Data script for simplicity |
| 77 | + - Maintain identical functionality while reducing Lambda complexity by 80% |
| 78 | + - _Requirements: 5.8_ |
| 79 | + |
| 80 | +- [x] 10.5 Migrate and refactor Ide construct |
73 | 81 | - Copy infrastructure/cdk/src/main/java/com/unicorn/constructs/VSCodeIde.java |
74 | 82 | - Update package names and integrate with new Roles and Vpc constructs |
75 | | - - Ensure IDE construct works with unified IAM roles |
76 | | - - Test IDE construct creates proper EC2 instance with VS Code setup |
| 83 | + - Replace existing Lambda functions with single launcher Lambda using direct CDK Function creation |
| 84 | + - Create comprehensive bootstrap script in infra/cdk/src/main/resources/bootstrap.sh |
| 85 | + - Ensure IDE construct creates proper EC2 instance with complete VS Code setup and CloudFront |
77 | 86 | - _Requirements: 5.6_ |
78 | 87 |
|
79 | | -- [ ] 10.5 Migrate and refactor CodeBuild construct |
| 88 | +- [ ] 10.6 Migrate and refactor CodeBuild construct |
80 | 89 | - Copy infrastructure/cdk/src/main/java/com/unicorn/constructs/CodeBuildResource.java |
81 | 90 | - Update to use new Roles construct and accept WORKSHOP_TYPE environment variable |
82 | 91 | - Configure CodeBuild to run in VPC and execute workshop-specific setup scripts |
83 | 92 | - Include proper error handling and timeout configuration (60 minutes) |
84 | 93 | - _Requirements: 5.6, 3.6_ |
85 | 94 |
|
86 | | -- [ ] 10.6 Create unified WorkshopStack |
| 95 | +- [x] 10.7 Create unified WorkshopStack |
87 | 96 | - Create infra/cdk/src/main/java/sample/com/stacks/WorkshopStack.java |
88 | 97 | - Implement environment variable logic: WORKSHOP_TYPE with "ide" default |
89 | 98 | - Always create: Roles, Vpc, Ide, CodeBuild |
90 | 99 | - Conditionally create resources based on workshop type (EKS, Database for non-ide workshops) |
91 | 100 | - _Requirements: 1.2, 1.3_ |
92 | 101 |
|
93 | | -- [ ] 10.7 Create CDK application entry point |
| 102 | +- [x] 10.8 Create CDK application entry point |
94 | 103 | - Create infra/cdk/src/main/java/sample/com/WorkshopApp.java |
95 | 104 | - Configure single WorkshopStack instantiation |
96 | 105 | - Set up proper CDK app synthesis |
97 | 106 | - Test CDK synth command produces valid CloudFormation template |
98 | 107 | - _Requirements: 1.1_ |
99 | 108 |
|
100 | | -- [ ] 10.8 Create base workshop setup scripts |
| 109 | +- [x] 10.9 Create base workshop setup scripts |
101 | 110 | - Create infra/scripts/setup/base.sh for common tool installation (git, curl, wget, unzip) |
102 | 111 | - Create infra/scripts/setup/ide.sh for IDE-specific configuration |
103 | 112 | - Create infra/scripts/workshops/ide.sh that orchestrates base.sh and ide.sh |
104 | 113 | - Implement convention-based script discovery (script name matches stack name) |
105 | 114 | - _Requirements: 3.1, 3.3_ |
106 | 115 |
|
107 | | -- [ ] 10.9 Test and validate IDE stack |
| 116 | +- [x] 10.10 Test and validate IDE stack |
108 | 117 | - Generate CloudFormation template: npm run generate |
109 | 118 | - Validate template contains only VPC, IDE, CodeBuild, and IAM resources |
110 | 119 | - Test template deployment in AWS (optional, can be done manually) |
|
205 | 214 | - Create migration checklist for workshop maintainers |
206 | 215 | - _Requirements: 5.9_ |
207 | 216 |
|
208 | | -- [ ] 1000.3 Lambda consolidation (future task) |
209 | | - - Consolidate existing Python/JavaScript Lambda functions into single Java handler |
210 | | - - Implement resource type routing for DatabaseSetup, InstanceLauncher, PasswordRetriever |
211 | | - - Maintain identical functionality and interfaces to existing functions |
212 | | - - Package all handlers into single deployment artifact |
213 | | - - _Requirements: 5.8_ |
| 217 | +name or just value? |
0 commit comments