You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Multi-platform package distribution with cross-architecture binary support (#21)
* feat: add multi-platform build support with Docker and improved distribution
- Add Linux x64/ARM64 builds via Docker containers
- Add Windows build system using AWS CodeBuild
- Create distribute command for secure package sharing via S3 presigned URLs
- Create builds command for monitoring CodeBuild status
- Improve package command with platform-specific builds
- Add Intel Mac build attempts (challenging due to architecture differences)
- Update documentation for all new platform support
- Fix monitoring token authentication bypass for OTEL telemetry
This commit represents a working state with Nuitka before switching to PyInstaller
for better cross-architecture support on macOS.
* fix: resolve package distribution and Linux compatibility issues
- Always create Claude Code settings.json for Bedrock configuration (not just monitoring)
- Fix Windows paths in settings.json using forward slashes for compatibility
- Fix package command to continue when Windows builds run in CodeBuild
- Fix nested directory issue in Windows PowerShell extraction instructions
- Fix Linux GLIBC compatibility by using Ubuntu 20.04 base (GLIBC 2.31)
- Fix six.moves import errors with six==1.16.0 and proper hidden imports
- Add Docker-based Linux testing infrastructure
- Improve distribution command with progress tracking and better error handling
- Update documentation for clarity and accuracy
* chore: remove Nuitka migration documentation
These intermediary development documents are not needed in the final solution.
The project uses PyInstaller for all cross-platform binary builds.
-**Cross-Platform**: Works on Windows, macOS, and Linux
23
25
24
26
## Table of Contents
25
27
@@ -58,18 +60,31 @@ poetry run ccwb init
58
60
# Deploy infrastructure
59
61
poetry run ccwb deploy
60
62
61
-
# Create distribution package for users
62
-
poetry run ccwb package
63
+
# Create distribution package for users (all platforms)
64
+
poetry run ccwb package --target-platform=all
65
+
66
+
# Create and distribute package via secure URL (Optional)
67
+
poetry run ccwb distribute
63
68
```
64
69
65
70
2. Test package locally to verify end-user installation and access to Amazon Bedrock.
66
71
67
-
```
72
+
```bash
68
73
# Test package locally
69
74
poetry run ccwb test
70
75
```
71
76
72
-
3.[Distribute](#end-user-experience) package to end-users.
77
+
3. Distribute package to end-users (optional).
78
+
79
+
```bash
80
+
# Generate secure distribution URL (expires in 48 hours)
81
+
poetry run ccwb distribute
82
+
83
+
# Or specify custom expiration
84
+
poetry run ccwb distribute --expires-hours=72
85
+
```
86
+
87
+
4. Share the generated URL with developers - no AWS credentials required for download.
73
88
74
89
### Cleanup
75
90
@@ -117,7 +132,7 @@ _You are responsible for the cost of the AWS services used while running this gu
117
132
118
133
### Sample Cost Table
119
134
120
-
The following table provides a sample cost breakdown for deploying this guidance with 5,000 monthly active users in the US East (N. Virginia) Region for one month (monitoring is separate).
135
+
The following table provides a sample cost breakdown for deploying this guidance with 5,000 monthly active users in the US East (N. Virginia) Region for one month (monitoring, analytics, and Windows builds would be separate).
@@ -142,7 +157,9 @@ Based on AWS Pricing Calculator: [View Detailed Estimate](https://calculator.aws
142
157
- CloudFormation stacks
143
158
- Cognito Identity Pools
144
159
- IAM roles and policies
145
-
- (Optional) ECS tasks and CloudWatch dashboards
160
+
- (Optional) Amazon Elastic Container Service (Amazon ECS) tasks and Amazon CloudWatch dashboards
161
+
- (Optional) Amazon Athena, AWS Glue, AWS Lambda, and Amazon Data Firehose resources
162
+
- (Optional) AWS CodeBuild
146
163
- Amazon Bedrock activated in target regions
147
164
148
165
**OIDC Provider Requirements:**
@@ -167,7 +184,9 @@ The guidance can be deployed in any AWS region that supports:
167
184
168
185
- Amazon Cognito Identity Pools
169
186
- Amazon Bedrock
170
-
- (Optional) Amazon ECS Fargate for monitoring
187
+
- (Optional) Amazon Elastic Container Service (Amazon ECS) tasks and Amazon CloudWatch dashboards
188
+
- (Optional) Amazon Athena, AWS Glue, AWS Lambda, and Amazon Data Firehose resources
189
+
- (Optional) AWS CodeBuild
171
190
172
191
### Cross-Region Inference
173
192
@@ -179,6 +198,35 @@ Claude Code uses Amazon Bedrock's cross-region inference for optimal performance
179
198
180
199
This automatically routes requests across multiple AWS regions to ensure the best response times and highest availability. Modern Claude models (3.7+) require cross-region inference for access.
181
200
201
+
### Platform Support
202
+
203
+
The authentication tools support all major platforms:
| Linux | x86_64 | Docker (PyInstaller) | install.sh |
212
+
| Linux | ARM64 | Docker (PyInstaller) | install.sh |
213
+
214
+
**Build Requirements:**
215
+
216
+
-**Windows**: AWS CodeBuild with Nuitka (automated)
217
+
-**macOS**: PyInstaller with architecture-specific builds
218
+
- ARM64: Native build on Apple Silicon Macs
219
+
- Intel: Optional - requires x86_64 Python environment on ARM Macs
220
+
- Universal: Requires both architectures' Python libraries
221
+
-**Linux**: Docker with PyInstaller (for building on non-Linux hosts)
222
+
223
+
### Optional: Intel Mac Builds
224
+
225
+
Intel Mac builds require an x86_64 Python environment on Apple Silicon Macs.
226
+
See [CLI Reference](assets/docs/CLI_REFERENCE.md#intel-mac-build-setup-optional) for setup instructions.
227
+
228
+
If not configured, the package command will skip Intel builds and continue with other platforms.
229
+
182
230
## Implementation
183
231
184
232
### Step 1: Initialize Configuration
@@ -233,19 +281,37 @@ This creates the following AWS resources:
233
281
Build the package for end users:
234
282
235
283
```bash
236
-
poetry run ccwb package
284
+
# Build all platforms (starts Windows build in background)
285
+
poetry run ccwb package --target-platform all
286
+
287
+
# Check Windows build status (optional)
288
+
poetry run ccwb builds
289
+
290
+
# When ready, create distribution URL (optional)
291
+
poetry run ccwb distribute
237
292
```
238
293
239
-
This creates a `dist/` folder containing:
294
+
**Package Workflow:**
295
+
296
+
1.**Local builds**: macOS/Linux executables are built locally using PyInstaller
297
+
2.**Windows builds**: Trigger AWS CodeBuild for Windows executables (20+ minutes) - requires enabling CodeBuild during `init`
298
+
3.**Check status**: Monitor build progress with `poetry run ccwb builds`
299
+
4.**Create distribution**: Use `distribute` to upload and generate presigned URLs
300
+
301
+
> **Note**: Windows builds are optional and require CodeBuild to be enabled during the `init` process. If not enabled, the package command will skip Windows builds and continue with other platforms.
302
+
303
+
The `dist/` folder will contain:
240
304
241
-
-`credential-process-macos` - Authentication executable for macOS
242
-
-`credential-process-linux` - Authentication executable for Linux
305
+
-`credential-process-macos-arm64` - Authentication executable for macOS ARM64
306
+
-`credential-process-macos-intel` - Authentication executable for macOS Intel (if built)
307
+
-`credential-process-windows.exe` - Authentication executable for Windows
308
+
-`credential-process-linux` - Authentication executable for Linux (if built on Linux)
Shows recent Windows binary builds and their status.
260
+
261
+
```bash
262
+
poetry run ccwb builds [options]
263
+
```
264
+
265
+
**Options:**
266
+
267
+
-`--limit <n>` - Number of builds to show (default: "10")
268
+
-`--project <name>` - CodeBuild project name (default: auto-detect)
269
+
-`--status <id>` - Check status of a specific build by ID
270
+
271
+
**What it does:**
272
+
273
+
- Lists recent CodeBuild builds for Windows binaries
274
+
- Shows build status, duration, and completion time
275
+
- Provides console links to view full build logs
276
+
- Monitors in-progress builds
277
+
278
+
**Note:** This command requires CodeBuild to be enabled during the `init` process. If CodeBuild was not enabled, you'll need to re-run `init` and enable Windows build support.
0 commit comments