Repository navigation
Add the FilOzone github-mgmt admin guide and retire Upgrade - #84
Conversation
|
The following access changes will be introduced as a result of applying the plan: Access Changes |
|
Before merge, verify that all the following plans are correct. After merge, Apply will regenerate the plans from the merged commit and continue only if they match. Terraform plansFilOzoneNo changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed. |
BigLep
left a comment
There was a problem hiding this comment.
Thanks Beck. I reviewed this with agent help (Claude and Codex) and checked their findings against the workflows, the Terraform, and the live environment settings. The content is a good base; my asks are mostly about structure and a few gaps that could bite an operator.
I've left these as comments and suggestions rather than pushing the changes myself so the reasoning is out in the open to review and discuss. We'll make similar changes to filecoin-project/github-mgmt, so it's worth agreeing on the approach here first.
1. Split the docs by audience. People requesting access and people operating the infra need different docs.
README.md: say this is FilOzone's fork of ipdxco/github-as-code, maintained by the FilOz team, which takes upstream changes. Note that it's very similar to filecoin-project/github-mgmt, since FilOz manages both. Explain how to request access (editgithub/FilOzone.yml, open a PR, what happens on merge, who approves) and linkdocs/HOWTOS.mdfor details. Point operators to the new admin guide. Please also add a short FAQ with this entry:Why is this called github-mgmt instead of github-as-code? ipdxco/github-as-code grew out of filecoin-project/github-mgmt. github-mgmt was the original name, and it's the one that has stuck in the Filecoin community.
- Rename this file to
docs/INFRA_ADMIN.mdand keep it for operators. Linkdocs/SETUP.mdanddocs/ABOUT.mdfor background instead of repeating them.
The filecoin-project PR can follow the same shape.
2. Retire the Upgrade workflow. Please delete .github/workflows/upgrade.yml in this PR and document only the manual upgrade path (suggestion on the Upgrade section below). Upstream's Upgrade copies every tracked template file except a short exclusion list, so it would copy over our apply.yml, plan.yml, sync.yml, fix.yml, clean.yml and docs/SETUP.md. Merging its PR would remove our OIDC setup (upstream still uses RO_AWS_*/RW_AWS_* secrets), and Plan wouldn't catch it because Plan only takes github/ from the PR (plan.yml:72-81). It also runs upstream @master with our read-write App key.
3. Keep history out of the doc. The #83 example and the backend cutover paragraph describe past events; they belong in those PRs. Suggestions below remove them.
4. Gaps worth documenting (inline below): prevent_destroy on members and repos, access changes on archived repos, -refresh=false and drift, and Sync's weekly schedule plus force-push to master.
5. Secrets are repository-scoped today. The six RO_GITHUB_APP_*/RW_GITHUB_APP_* secrets are repository secrets, and the read, write and push environments have none. So the environments' master-only restriction doesn't limit who can use the read-write key; any workflow in the repo can read it. The suggestions below describe the current setup. Moving the App secrets into the environments (read-only in read and push, read-write in write and push) is worth a follow-up. The legacy RO_AWS_*/RW_AWS_* repository secrets are still there too and can be deleted now that OIDC is live.
6. Links and terms. Link each workflow, App and settings page on first mention, and say "Terraform workspace" and "Terraform bootstrap" so those terms aren't ambiguous.
| | State and lock paths | `org/FilOzone/terraform.tfstate` and `org/FilOzone/terraform.tfstate.tflock` | | ||
| | OIDC roles | `filoz-github-mgmt-filozone-ro` and `filoz-github-mgmt-filozone-rw` | | ||
|
|
||
| Keep the separate bootstrap state for changes to the versioned bucket or IAM roles. [Backend](../terraform/terraform_override.tf) · [Bootstrap](../terraform/bootstrap/aws.tf) |
There was a problem hiding this comment.
This line was hard to follow. Also: terraform/bootstrap/aws.tf has no backend block, so its state is a local file, and docs/SETUP.md:17 only says to keep it "in secure storage". Where is it? The doc should name the location and who can reach it, or nobody can change the bucket or roles safely later. I've left LOCATION and OWNER placeholders.
| Keep the separate bootstrap state for changes to the versioned bucket or IAM roles. [Backend](../terraform/terraform_override.tf) · [Bootstrap](../terraform/bootstrap/aws.tf) | |
| A separate Terraform root, the [Terraform bootstrap](../terraform/bootstrap/aws.tf), creates the S3 bucket and the OIDC IAM roles. A maintainer applies it separately with their own AWS session. It declares no backend, so its state is a local file: before changing the bucket or roles, get the existing bootstrap state from LOCATION (accessible to OWNER) and use it. [Backend config](../terraform/terraform_override.tf) |
There was a problem hiding this comment.
I’ve updated the guide to explain which access changes need an org owner. For full offboarding, should FilOzone follow the same process as filecoin-project?
Remove team memberships and direct repository grants through a PR, then verify that Apply succeeded.
Have an org owner remove the member from FilOzone in GitHub.
Run Sync to record the removal in Terraform state and YAML.
Could a FilOzone org owner confirm this sequence before we merge the guide?
Restore the reasoning for read, write and push (why read allows any branch, why push has no AWS role) and use the github-mgmt naming history from the review.
|
I updated the PR title and description to match what the PR now does (admin guide, README rewrite, Upgrade retired, SETUP and HOWTOS updates). I also pushed 1e8a748: it restores the reasoning for the three environments in |
- Define "GitHub settings" and "Terraform state" and use them instead of the ambiguous "organization". - Link workflow and environment names throughout. - Explain the settings Terraform ignores, why members and repositories can't be removed through github-mgmt, and why member removal still starts with a PR. - Make a full Sync the single state rebuild path and say "don't merge PRs" instead of "pause merges". - Store the bootstrap state in the bucket under bootstrap/terraform.tfstate instead of 1Password. - Link the filecoin-project admin guide.
|
@beck-8 I pushed 27054a8 with my review changes. One of them moves the bootstrap Terraform state from 1Password into S3: I updated the docs assuming you'll migrate your local state before this merges. Until then the key is empty, and anyone running the bootstrap would get a plan to create resources that already exist. With your local terraform -chdir=terraform/bootstrap init -migrate-state
terraform -chdir=terraform/bootstrap plan # expect: No changesThen please confirm here that the plan shows no changes, and delete the 1Password share and your local copy. |
- Sync reads the current state first, so a corrupt state needs its last good S3 version restored (or the object deleted) before rebuilding. - Give the full first-time bootstrap sequence (local apply, then -migrate-state). - Sync leaves ignored settings out of the YAML rather than recording them; name the four allow-merge toggles and branch protections. - Describe the workflow roles' actual state-object scope. - Restore the per-job qualifiers in the environments table's AWS column. - The write environment is limited to master; review is what controls master. - Update the App key UI label and point HOWTOS to the single Sync procedure.
BigLep
left a comment
There was a problem hiding this comment.
I made and pushed some changes. This is shippable to me, but feel free to review and make any last changes you suggest.
I assume you'll then copy over anything to filecoin-project.
Thanks for doing this!
|
I also pushed 1290feb with two small documentation updates. SETUP.md clarifies how to verify the migration from a clean checkout, and INFRA_ADMIN.md clarifies how to recover the organization state and the bootstrap state. |

Summary
docs/INFRA_ADMIN.md, the guide for FilOz maintainers who operate github-mgmt: the Terraform state backend and bootstrap state, theread/write/pushenvironments and why there are three, applying access changes and what the normal PR flow can't do (prevent_destroy, archived repositories, team settings), removing an org member, running Sync, recovering state, a failed Apply or a stuck lock, rotating GitHub App keys, and upgrading from upstream.README.mdfor people requesting access: what this repo is, how to request a change, who reviews, a pointer to the admin guide, and why it's called github-mgmt.Upgradeworkflow (.github/workflows/upgrade.yml). It ran ipdxco/github-as-code's@masterreusable workflow with the read-write App key, and merging its PR would overwrite FilOzone's OIDC workflows. Upgrades are now manual, reviewed PRs (see the admin guide);docs/HOWTOS.mdpoints there.docs/SETUP.mdfor the current setup: bootstrap state storage, App credentials as environment secrets, andwriteandpushlimited tomaster.Validation
git diff --check.