|
| 1 | +# Implementation Plan |
| 2 | + |
| 3 | +- [ ] 1. Add IdeArch and IdeType support to CDK Ide construct |
| 4 | + - [ ] 1.1 Create IdeArch enum in Ide.java |
| 5 | + - Add enum with ARM64 and X86_64 values |
| 6 | + - Include helper methods for AWS and uname values |
| 7 | + - _Requirements: 1.1_ |
| 8 | + - [ ] 1.2 Create IdeType enum in Ide.java |
| 9 | + - Add enum with CODE_EDITOR and VSCODE values |
| 10 | + - Include scriptName helper method |
| 11 | + - _Requirements: 3.1_ |
| 12 | + - [ ] 1.3 Add ideArch and ideType properties to IdeProps |
| 13 | + - Add ideArch field with ARM64 default |
| 14 | + - Add ideType field with CODE_EDITOR default |
| 15 | + - Create static instance type lists for each architecture |
| 16 | + - Update getInstanceTypes() to return ideArch-specific list |
| 17 | + - Update getMachineImage() to return ideArch-specific AMI |
| 18 | + - Add builder methods for ideArch and ideType |
| 19 | + - Comment out old instance type list for reference |
| 20 | + - _Requirements: 1.2, 1.3, 1.5, 7.1, 7.2_ |
| 21 | + - [ ] 1.4 Update UserData to export ARCH and IDE_TYPE |
| 22 | + - Modify userdata.sh template to include ARCH and IDE_TYPE exports |
| 23 | + - Pass ideArch and ideType values from CDK to UserData |
| 24 | + - _Requirements: 1.4, 2.1_ |
| 25 | + - [ ] 1.5 Write property test for ideArch → instance types mapping |
| 26 | + - **Property 1: Architecture determines instance types** |
| 27 | + - **Validates: Requirements 1.2, 1.3, 7.1, 7.2** |
| 28 | + |
| 29 | +- [ ] 2. Add architecture detection to base.sh |
| 30 | + - [ ] 2.1 Add architecture detection and normalization |
| 31 | + - Read ARCH from environment or detect via uname |
| 32 | + - Create ARCH_K8S, ARCH_SAM, ARCH_GENERIC, ARCH_YQ variables |
| 33 | + - _Requirements: 2.1_ |
| 34 | + - [ ] 2.2 Update kubectl download URL |
| 35 | + - Use ARCH_K8S variable in download URL |
| 36 | + - _Requirements: 2.2_ |
| 37 | + - [ ] 2.3 Update SAM CLI download URL |
| 38 | + - Use ARCH_SAM variable in download URL |
| 39 | + - _Requirements: 2.3_ |
| 40 | + - [ ] 2.4 Update eks-node-viewer download URL |
| 41 | + - Use ARCH_GENERIC variable in download URL |
| 42 | + - _Requirements: 2.4_ |
| 43 | + - [ ] 2.5 Update SOCI snapshotter download URL |
| 44 | + - Use ARCH_K8S variable (amd64/arm64) in download URL |
| 45 | + - _Requirements: 2.5_ |
| 46 | + - [ ] 2.6 Update yq download URL |
| 47 | + - Use ARCH_YQ variable in download URL |
| 48 | + - _Requirements: 2.6_ |
| 49 | + - [ ] 2.7 Update Java path for ARM64 |
| 50 | + - Handle different Java paths for aarch64 vs x86_64 |
| 51 | + - _Requirements: 2.1_ |
| 52 | + |
| 53 | +- [ ] 3. Checkpoint - Verify architecture detection works |
| 54 | + - Ensure all tests pass, ask the user if questions arise. |
| 55 | + |
| 56 | +- [ ] 4. Create ide-settings.sh with common IDE configuration |
| 57 | + - [ ] 4.1 Create ide-settings.sh file |
| 58 | + - Define EXTENSIONS variable with full list |
| 59 | + - Define DEFAULT_WORKSPACE variable |
| 60 | + - _Requirements: 4.1-4.6_ |
| 61 | + - [ ] 4.2 Add install_ide_extensions function |
| 62 | + - Accept binary command and user as parameters |
| 63 | + - Loop through extensions with retry logic |
| 64 | + - _Requirements: 4.7, 8.1, 8.2, 8.3_ |
| 65 | + - [ ] 4.3 Add configure_default_workspace function |
| 66 | + - Accept coder.json path and user as parameters |
| 67 | + - Create workspace config if not exists |
| 68 | + - _Requirements: 4.1_ |
| 69 | + |
| 70 | +- [ ] 5. Create code-editor.sh for AWS Code Editor |
| 71 | + - [ ] 5.1 Add code-editor installation function |
| 72 | + - Download manifest from code-editor.amazonaws.com |
| 73 | + - Support ARM64 and x64 architectures |
| 74 | + - _Requirements: 3.1_ |
| 75 | + - [ ] 5.2 Add checksum verification |
| 76 | + - Verify SHA256 checksum against manifest |
| 77 | + - Fail with clear error on mismatch |
| 78 | + - _Requirements: 3.2_ |
| 79 | + - [ ] 5.3 Add installation to user's .local directory |
| 80 | + - Extract to ~/.local/lib/code-editor-VERSION/ |
| 81 | + - Create symlink in ~/.local/bin/ |
| 82 | + - _Requirements: 3.3_ |
| 83 | + - [ ] 5.4 Add systemd service configuration |
| 84 | + - Create code-editor@.service unit file |
| 85 | + - Configure for port 8889 |
| 86 | + - Accept server license terms |
| 87 | + - _Requirements: 3.4, 3.5_ |
| 88 | + - [ ] 5.5 Add token authentication setup |
| 89 | + - Create ~/.code-editor-server/data/token file |
| 90 | + - Write IDE_PASSWORD to token file |
| 91 | + - _Requirements: 6.1_ |
| 92 | + - [ ] 5.6 Add Caddy proxy configuration |
| 93 | + - Configure Caddy to proxy port 8889 |
| 94 | + - Same config as vscode.sh |
| 95 | + - _Requirements: 3.6_ |
| 96 | + - [ ] 5.7 Source ide-settings.sh and call shared functions |
| 97 | + - Call install_ide_extensions with code-editor-server |
| 98 | + - Call configure_default_workspace |
| 99 | + - _Requirements: 4.1-4.7_ |
| 100 | + |
| 101 | +- [ ] 6. Update vscode.sh to use shared settings |
| 102 | + - [ ] 6.1 Source ide-settings.sh |
| 103 | + - Remove inline EXTENSIONS variable |
| 104 | + - Source ide-settings.sh at top of file |
| 105 | + - _Requirements: 4.1-4.6_ |
| 106 | + - [ ] 6.2 Use install_ide_extensions function |
| 107 | + - Replace inline extension loop with function call |
| 108 | + - Pass "code-server" and "ec2-user" |
| 109 | + - _Requirements: 4.7_ |
| 110 | + - [ ] 6.3 Use configure_default_workspace function |
| 111 | + - Replace inline coder.json creation with function call |
| 112 | + - _Requirements: 4.1_ |
| 113 | + |
| 114 | +- [ ] 7. Update bootstrap.sh for IDE selection |
| 115 | + - [ ] 7.1 Read IDE_TYPE from environment |
| 116 | + - Use IDE_TYPE from UserData (set by CDK) |
| 117 | + - Default to "code-editor" if not set |
| 118 | + - _Requirements: 3.1_ |
| 119 | + - [ ] 7.2 Add dynamic code alias to workshop.sh |
| 120 | + - Set alias based on IDE_TYPE |
| 121 | + - code-editor: /home/ec2-user/.local/bin/code-editor-server |
| 122 | + - vscode: code-server |
| 123 | + - _Requirements: 3.4_ |
| 124 | + - [ ] 7.3 Update IDE setup call |
| 125 | + - Change from hardcoded vscode.sh to ${IDE_TYPE}.sh |
| 126 | + - _Requirements: 3.1_ |
| 127 | + |
| 128 | +- [ ] 8. Update shell.sh for both IDEs |
| 129 | + - [ ] 8.1 Update .zshrc code alias |
| 130 | + - Add dynamic alias that detects installed IDE |
| 131 | + - Check for code-editor-server first, then code-server |
| 132 | + - _Requirements: 3.4_ |
| 133 | + - [ ] 8.2 Update settings.json zsh configuration |
| 134 | + - Check both code-server and code-editor settings.json paths |
| 135 | + - Update whichever exists |
| 136 | + - _Requirements: 3.4_ |
| 137 | + |
| 138 | +- [ ] 9. Add Kiro CLI installation to base.sh |
| 139 | + - [ ] 9.1 Add install_kiro_cli function |
| 140 | + - Download and run Kiro CLI installer |
| 141 | + - Use retry_optional for resilience |
| 142 | + - _Requirements: 5.1_ |
| 143 | + - [ ] 9.2 Add version verification |
| 144 | + - Check kiro-cli --version after install |
| 145 | + - Log warning if verification fails |
| 146 | + - _Requirements: 5.2, 5.3_ |
| 147 | + - [ ] 9.3 Call install_kiro_cli in base.sh |
| 148 | + - Add to end of base.sh before shell setup |
| 149 | + - _Requirements: 5.1_ |
| 150 | + |
| 151 | +- [ ] 10. Checkpoint - Test full bootstrap |
| 152 | + - Ensure all tests pass, ask the user if questions arise. |
| 153 | + |
| 154 | +- [ ] 11. Update CDK URL output for conditional token-based access |
| 155 | + - [ ] 11.1 Modify Ide.java URL output based on IdeType |
| 156 | + - For CODE_EDITOR: Include ?folder= and ?tkn= parameters |
| 157 | + - Format: https://domain/?folder=/home/ec2-user/environment&tkn=PASSWORD |
| 158 | + - For VSCODE: Standard URL without token (password via login page) |
| 159 | + - Format: https://domain/ |
| 160 | + - _Requirements: 6.2, 6.3_ |
| 161 | + |
| 162 | +- [ ] 12. Final Checkpoint - Verify complete setup |
| 163 | + - Ensure all tests pass, ask the user if questions arise. |
0 commit comments