{"id":34528839,"url":"https://github.com/linuxfoundation/lfx-v2-mockdata","last_synced_at":"2026-05-27T06:32:48.412Z","repository":{"id":321258721,"uuid":"1080806238","full_name":"linuxfoundation/lfx-v2-mockdata","owner":"linuxfoundation","description":"LFX v2 Mock Data Tooling","archived":false,"fork":false,"pushed_at":"2026-01-15T18:15:31.000Z","size":172,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-15T20:20:53.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linuxfoundation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-21T22:32:07.000Z","updated_at":"2026-01-15T18:15:35.000Z","dependencies_parsed_at":"2025-10-28T18:33:43.751Z","dependency_job_id":null,"html_url":"https://github.com/linuxfoundation/lfx-v2-mockdata","commit_stats":null,"previous_names":["linuxfoundation/lfx-v2-mockdata"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linuxfoundation/lfx-v2-mockdata","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Flfx-v2-mockdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Flfx-v2-mockdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Flfx-v2-mockdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Flfx-v2-mockdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxfoundation","download_url":"https://codeload.github.com/linuxfoundation/lfx-v2-mockdata/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxfoundation%2Flfx-v2-mockdata/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33554780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T05:25:58.680Z","updated_at":"2026-05-27T06:32:48.397Z","avatar_url":"https://github.com/linuxfoundation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LFX v2 platform mock data loader\n\n## Overview\n\nThis tool generates mock data for the LFX v2 platform by running playbooks that populate projects, committees, and other resources through API calls, NATS requests, and direct NATS KV operations.\n\n## Prerequisites\n\n- Python 3.12 (managed automatically by uv)\n- Local LFX v2 platform running [via Helm](https://github.com/linuxfoundation/lfx-v2-helm/tree/main/charts/lfx-platform#readme)\n- `uv` package manager installed\n- `jwt` CLI from [jwt-cli](https://github.com/mike-engel/jwt-cli) Rust crate available in your $PATH\n\nThese instructions and playbooks assume the script's execution environment has access to `*.*.svc.cluster.local` Kubernetes service URLs. These URLs in the playbooks can be overridden with environmental variables as needed.\n\n## Quick Start\n\n```bash\n# Set up environment variables\neval $(./scripts/setup-env.sh)\n\n# Load all standard mock data\nmake load\n```\n\nRun `make help` to see all available commands.\n\n## Setup\n\n### Automated Setup (Recommended)\n\nUse the setup script to configure all environment variables:\n\n```bash\neval $(./scripts/setup-env.sh)\n```\n\nThe script will automatically:\n\n- Set `NATS_URL` to the default Kubernetes service URL\n- Retrieve and set `OPENFGA_STORE_ID` from the OpenFGA API\n- Retrieve and set `JWT_RSA_SECRET` from the heimdall-signer-cert secret\n\nVerify your environment is configured:\n\n```bash\nmake check-env\n```\n\n### Manual Setup (Alternative)\n\nIf you prefer to set environment variables manually or need to customize values:\n\n```bash\n# NATS URL\nexport NATS_URL=\"lfx-platform-nats.lfx.svc.cluster.local:4222\"\n\n# OpenFGA Store ID (get from API)\ncurl -sSi \"http://lfx-platform-openfga.lfx.svc.cluster.local:8080/stores\"\nexport OPENFGA_STORE_ID=\"your-store-id-here\"\n\n# JWT RSA secret from Heimdall\nexport JWT_RSA_SECRET=\"$(kubectl get secret/heimdall-signer-cert -n lfx -o json | jq -r '.data[\"signer.pem\"]' | base64 --decode)\"\n```\n\n## Usage\n\n### Loading Mock Data\n\nUse the Makefile targets to load data:\n\n```bash\nmake load              # Load all standard playbooks\nmake load-projects     # Load only project playbooks\nmake load-committees   # Load only committee playbooks\nmake load-mailing-lists # Load mailing list playbooks\nmake load-meetings     # Load v1 meeting playbooks\n```\n\nOr run the tool directly for custom playbook combinations:\n\n```bash\nuv run lfx-v2-mockdata --help\nuv run lfx-v2-mockdata \\\n    --jwt-rsa-secret \"$JWT_RSA_SECRET\" \\\n    -t playbooks/projects/base_projects\n```\n\n**Important Notes:**\n\n- **Order matters!** Playbook directories run in the order specified on the command line.\n- Within each directory, playbooks execute in alphabetical order.\n- Dependencies between playbooks should be considered when organizing execution order. Multiple passes are made to allow `!ref` calls to be resolved, but the right order will improve performance and help avoid max-retry errors.\n- The `!jwt` macro will attempt to detect the JWKS key ID from the endpoint at `http://lfx-platform-heimdall.lfx.svc.cluster.local:4457/.well-known/jwks`. If this URL is not accessible from the execution environment, you must pass an explicit JWT key ID using the `--jwt-key-id` argument.\n\n### Wiping Existing Data\n\nTo start fresh, use the reset command:\n\n```bash\nmake reset\n```\n\nThis will:\n\n- Clear all NATS KV buckets (projects, committees, meetings, etc.)\n- Clear and recreate OpenSearch indices (using current mapping)\n- Restart the query service to clear cache\n- Delete the project service pod to clear cache\n\n**Safety Features:**\n\n- Requires typing `RESET` to confirm before proceeding\n- Validates all critical operations and exits on failure\n- Preserves authentication data in `authelia-users` and `authelia-email-otp` buckets\n- Automatically retrieves and uses current OpenSearch mapping before recreation\n\n**Manual Alternative:** If you prefer to wipe only NATS KV buckets manually:\n\n```bash\nfor bucket in projects project-settings committees committee-settings committee-members; do\n    nats kv rm -f $bucket\n    nats kv add $bucket\ndone\n```\n\n### Running After Data Wipe\n\nAfter using `make reset`, the ROOT project is automatically recreated by the project service pod restart. You can load mock data normally:\n\n```bash\nmake load\n```\n\n**Note:** If you wiped data manually (without the reset command), you'll need to delete the project service pod to trigger ROOT project recreation:\n\n```bash\nkubectl delete pod -n lfx $(kubectl get pods -n lfx --no-headers | grep project-service | awk '{print $1}')\n```\n\n## Playbook Structure\n\nThe playbooks are organized by service type, to allow only loading data for the services you have in your environment.\n\nPlease refer to the comments in the YAML files for more information on each playbook's role and purpose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxfoundation%2Flfx-v2-mockdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxfoundation%2Flfx-v2-mockdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxfoundation%2Flfx-v2-mockdata/lists"}