Skip to content

feat(platform): run two tasks on moresleep.javazone.no - #7

Open
Alexanderamiri wants to merge 1 commit into
platform/3-cifrom
platform/4-two-tasks
Open

Alexanderamiri wants to merge 1 commit into
platform/3-cifrom
platform/4-two-tasks

Conversation

@Alexanderamiri

@Alexanderamiri Alexanderamiri commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Part 4 of 6. For review; the platform team will not merge it.

Why

Starts the parallel run: two platform tasks on moresleep.javazone.no, using the same database as production. Production traffic still goes to the old stack.

What

compute.desired_count: 0 -> 2 (the old service's count), plus the regenerated terraform/main.tf.

How the platform piece works

Secrets. The secrets PR 3 (#6) created hold PLACEHOLDER. Set them from the SOPS file with the platform CLI, logged in with your own SSO user (permission set javabin-team-moresleep):

brew install javaBin/tap/javabin
aws sso login --profile javabin
sops -d conf/.enc.env                 # the current values (needs the SOPS KMS key)
javabin secret set db-name            # = DATASOURCENAME
javabin secret set db-user            # = DBUSER
javabin secret set db-password        # = DBPASSWORD
javabin secret set allaccess-user     # = ALLACCESS_USER
javabin secret set read-user          # = READ_USER
javabin secret list                   # nothing left at PLACEHOLDER

Also compare the SOPS values of SERVER_PORT, RUN_FROM_JAR, ALL_OPEN_MODE, LOAD_FROM_SLEEPINGPILL and DBHOST with app.yaml. DBHOST is now injected from the adopted instance and must point at the same database.

Scaling is just this number. Change it, open a PR, read the plan, merge. ECS keeps that many tasks running and replaces unhealthy ones. The ALB only routes to tasks whose / health check passes.

How verified

Only the generated diff (desired_count = 2).

After merging, check on moresleep.javazone.no:

  • GET /public/allSessions and /public/allSessions/javazone_2026 are byte-identical to sleepingpill.
  • An unauthenticated write returns 401, e.g. curl -X POST https://moresleep.javazone.no/data/conference -d '{}'. That proves ALL_OPEN_MODE is off. Some reads, like GET /data/conference, are anonymous by design.
  • A read with the ALLACCESS user works.
  • The logs (/ecs/moresleep/moresleep) are clean.
  • The DB connection count is about 46: 26 today plus 2 × 10 Hikari connections.

Merge when

After the secrets are set (javabin secret list shows nothing at PLACEHOLDER). If you merge earlier, the tasks start with placeholder credentials and fail health checks. That is harmless but noisy.

🤖 Generated with Claude Code

Raise desired_count from 0 to 2, the same as the old CDK service. Merge only
after the five secrets hold real values (javabin secret list shows none
left at PLACEHOLDER).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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