Repository navigation
docs(platform): add app.yaml and a platform guide - #5
Open
Alexanderamiri wants to merge 1 commit into
Open
Alexanderamiri wants to merge 1 commit into
Alexanderamiri wants to merge 1 commit into
Conversation
Alexanderamiri
force-pushed
the
platform/2-app-yaml
branch
from
October 24, 2026 13:36
4c1e444 to
4fac4c8
Compare
Alexanderamiri
force-pushed
the
platform/2-app-yaml
branch
from
October 24, 2026 13:38
4fac4c8 to
1e9720a
Compare
app.yaml describes moresleep for the javaBin platform: same size (256 CPU, 512 MB, port 5000), the existing dbmoresleep instance adopted rather than recreated, secrets from SSM and the plain settings from the SOPS file as environment. Phase 1 runs on moresleep.javazone.no with 0 tasks. terraform/ is the generator's output for this app.yaml, committed so the pipeline's expand step has nothing to push. docs/platform.md explains how the platform works for moresleep's maintainers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Alexanderamiri
force-pushed
the
platform/2-app-yaml
branch
from
October 24, 2026 13:50
1e9720a to
a91c449
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The platform builds infrastructure from one file,
app.yaml. This PR adds moresleep'sapp.yaml, written so the architecture stays the same: same database, same size, same configuration, same hostname in the end. It also addsdocs/platform.md, which explains how the platform runs moresleep.What
app.yaml, phase 1 (parallel run):compute: 256 CPU / 512 MB / port 5000 / health check/. This is the old CDK service's size.desired_count: 0, so no task starts before the secrets are real.routing.host: moresleep.javazone.no(new hostname),priority: 120.sleepingpill.javazone.nokeeps pointing at the old stack.resources.databases:adopt: dbmoresleepimports the existing RDS instance, withhost_env: DBHOSTandport_env: DBPORT.resources.secrets:db-name,db-user,db-password,allaccess-user,read-user. These map toDATASOURCENAME,DBUSER,DBPASSWORD,ALLACCESS_USERandREAD_USER.environment: the non-secret values from the SOPS file.ALL_OPEN_MODE: "false"is explicit because the code defaults it to"true"(everyone gets full access).LOAD_FROM_SLEEPINGPILL: "false",DO_FLYWAY_MIGRATION: "false".terraform/: the generator's output for thisapp.yaml. It is committed so the pipeline has nothing to regenerate. Never edit it by hand.docs/platform.md: the guide. Start there.README.md: a short "Deployment" section that links to the guide.How the platform piece works
javaBin/platform/terraform/modules.computebecomesecs-service,routingbecomesservice-routing(target group, listener rule, DNS record), each secret becomesservice-secret(SSM SecureString), and the app always gets anecr-repo, aservice-roleandservice-alarm. Resource names are<team>-<name>, heremoresleep-moresleep.adopt:is the important bit for moresleep. It does not create a database. It emits animport {}block, so Terraform takesdbmoresleepinto this app's state. Theservice-rds-adoptedmodule then manages only tags and deletion protection. Class, storage, network, security group and password stay exactly as they are. I checked this with a read-only plan against the real account:1 to import, 1 to change (tags, deletion_protection), 0 to destroy.apps/moresleep/moresleep/terraform.tfstate. Only the moresleep team's CI role (and platform admins) can change resources taggedteam=moresleep.How verified
app.yamlpasses the platform's schema validation. The generated Terraform isterraform fmtclean.terraform planof this exact generated code against the javaBin account (local state, never applied):1 to import, 22 to add, 1 to change, 0 to destroy. It stops at the missing per-team execution role, which appears once themoresleepteam is registered.Merge when
After these are merged:
adopt,host_env/port_envandadopt_dns.moresleepteam.On its own this PR deploys nothing, because there is no workflow until PR 3. Because PR 3 deploys whatever this PR describes, also check before merging:
dbmoresleepexists and isavailable(aws rds describe-db-snapshots --db-snapshot-identifier dbmoresleep-pre-platform-migration-<date>). The first apply imports the production instance and changes its tags and deletion protection; without this snapshot the only backups are the 7-day automated ones. A platform admin takes it; it has not been taken yet.🤖 Generated with Claude Code