Skip to content

ccFeat/aws poc worker support clean rebased#348

Open
motatoes wants to merge 31 commits into
mainfrom
feat/aws-poc-worker-support-clean-rebased
Open

ccFeat/aws poc worker support clean rebased#348
motatoes wants to merge 31 commits into
mainfrom
feat/aws-poc-worker-support-clean-rebased

Conversation

@motatoes

@motatoes motatoes commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

motatoes and others added 16 commits June 1, 2026 17:41
Lands the worker-side changes needed to run an opencomputer cell on AWS.
Companion infra change is in opencomputer-infra@feat/aws-us-east-2-poc.

Secrets provider abstraction:
- internal/config/secrets.go (new): SecretsProvider interface, LoadSecrets()
  factory, cloud-agnostic secretMapping (was in keyvault.go).
- internal/config/secretsmanager.go (new): awsSecretsManagerProvider —
  lists secrets under OPENSANDBOX_AWS_SECRETS_PREFIX and dereferences each
  via secretMapping. Uses already-vendored aws-sdk-go-v2/service/secretsmanager.
- internal/config/keyvault.go: refactored as azureKeyVaultProvider
  implementing the interface. Same mode-prefix + env-precedence semantics
  preserved.
- internal/config/config.go: add AWSSecretsPrefix, Cloud, CPUOvercommitRatio
  fields. CPUOvercommitRatio multiplies MaxCapacity at Load time so the
  heartbeat advertises inflated capacity.
- 3 LoadSecretsFromKeyVault() call sites updated to LoadSecrets().

Spot preemption monitor:
- internal/preemption/ (new): Monitor interface, AWS IMDSv2 spot-action
  poller, Azure scheduled-events stub, no-op fallback. Watch(ctx) returns
  a Notice channel; cmd/worker/main.go reacts by stopping the heartbeat
  (CP detects worker gone within heartbeat-stale timeout).
- internal/worker/redis_heartbeat.go: Stop() made idempotent via sync.Once
  so both the preemption goroutine and `defer hb.Stop()` are safe.

Cloud-aware vector populator:
- deploy/vector/populate-vector-env.sh: detect_cloud() probes IMDS,
  case-branches secret fetch (Azure REST vs aws secretsmanager get-secret-value).
  Backwards-compatible — existing Azure deployments are unchanged.

AWS Packer template:
- deploy/packer/worker-ami-aws.pkr.hcl (new): amazon-ebs source, Ubuntu
  24.04 LTS, c5.4xlarge builder (non-metal — bake doesn't run guest VMs),
  reuses the cloud-agnostic setup-azure-host.sh, installs awscli v2,
  builds golden rootfs, tags AMI for the aws_ami data-source lookup in
  the infra leaf.

Docs:
- deploy/worker.env.example: document new env vars (OPENSANDBOX_AWS_SECRETS_PREFIX,
  OPENSANDBOX_CLOUD, OPENSANDBOX_CPU_OVERCOMMIT_RATIO) and the asymmetry
  between safe-to-overcommit CPU vs always-1:1 memory.
LoadDefaultConfig didn't auto-detect the region on the CP EC2 — the
first ListSecrets call returned 'failed to resolve service endpoint:
Missing Region'.

Read OPENSANDBOX_REGION → AWS_REGION explicitly and pass via
awsconfig.WithRegion(). Falls through to the default chain if neither
is set.
scp doesn't recursively upload directories without -r; Packer's file
provisioner doesn't always pass the flag. Switched to the same tar +
shell-extract pattern used for the rootfs context. Pre-build:
  tar czf /tmp/packer-vector-ctx.tar.gz deploy/vector/
@motatoes motatoes closed this Jun 4, 2026
@motatoes motatoes reopened this Jun 4, 2026
@2027-evals

2027-evals Bot commented Jun 6, 2026

Copy link
Copy Markdown

2027 — Eval complete for commit 9d7553d

URL Mapping
digger.dev github.com
opencomputer.dev github.com

2027 // complete the getting started guide at https://opencomputer.dB 77.4/100

  ███████████████░░░░░
Time Cost Errors Interruptions
3m 19s ▼ -2m 29s $1.05 ▼ -$1.94 0 ▼ -2 1

Friction points:

  • 🔴 opencomputer — .dev (and all subpaths like /getting-started) redirect with 301 to github.com instead of serving documentation, forcing agents and users to discover docs.opencomputer.dev through trial and error.
  • 🟡 No published OpenAPI/Swagger specification is available, limiting automated client generation and agent-side API introspection — .
  • 🟡 No official MCP server is offered, missing an increasingly common AI-agent integration pathway — .
Prompt

complete the getting started guide at https://opencomputer.dev

Commit 9d7553d · View report → · View trace →


Evaluating agent experience using 2027.dev · View dashboard

@motatoes motatoes deployed to aws-prod June 10, 2026 19:36 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant