{"id":39076100,"url":"https://github.com/cloud-gov/cg-scripts","last_synced_at":"2026-01-17T18:26:46.740Z","repository":{"id":28953732,"uuid":"32479807","full_name":"cloud-gov/cg-scripts","owner":"cloud-gov","description":"Scripts to assist with the configuration and operation of Cloud Foundry.","archived":false,"fork":false,"pushed_at":"2025-11-20T16:16:42.000Z","size":2297,"stargazers_count":19,"open_issues_count":7,"forks_count":14,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-11-20T18:12:31.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud-gov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":"audit/ac-2-user-audit.py","citation":null,"codeowners":"CODEOWNERS","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":"2015-03-18T19:31:44.000Z","updated_at":"2025-11-20T16:16:45.000Z","dependencies_parsed_at":"2023-10-20T21:32:31.326Z","dependency_job_id":"24642058-7d10-40ff-9a8c-29618f7f1995","html_url":"https://github.com/cloud-gov/cg-scripts","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/cloud-gov/cg-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-gov","download_url":"https://codeload.github.com/cloud-gov/cg-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fcg-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T17:57:59.192Z","status":"ssl_error","status_checked_at":"2026-01-17T17:57:52.527Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-17T18:26:46.648Z","updated_at":"2026-01-17T18:26:46.723Z","avatar_url":"https://github.com/cloud-gov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-foundry-scripts\n\nScripts to assist with the configuration and operation of Cloud Foundry.\n\n## Managing cloud.gov team\n\n### Creating Concourse \"navigator\" team members\n\n1. `uaac target \u003cOPS_UAA_FQDN\u003e`\n1. `uaac token client get admin -s \u003cOPS_UAA_ADMINCLIENT_PASSPHRASE\u003e`\n1. Run\n\n    ```bash\n    ./make-concourse-navigator.sh \u003cEMAIL_ADDRESS\u003e\n    ```\n\n### Removing Concourse \"navigator\" team members\n\n1. `uaac target \u003cOPS_UAA_FQDN\u003e`\n1. `uaac token client get admin -s \u003cOPS_UAA_ADMINCLIENT_PASSPHRASE\u003e`\n1. Run\n\n    ```bash\n    ./make-concourse-navigator.sh -r \u003cEMAIL_ADDRESS\u003e\n    ```\n\n### Creating platform admins\n\nThese steps correspond to the [steps for creating admins](http://docs.cloudfoundry.org/adminguide/uaa-user-management.html#creating-admin-users).\n\n1. Have the user log in to CF first.\n1. Run:\n\n    ```shell\n    ./uaa/login.sh\n    ```\n\n1. Run\n\n    ```bash\n    ./make-cf-admin.sh \u003cEMAIL_ADDRESS\u003e\n    ```\n\n### Create Concourse admins\n\n1. Run:\n\n    ```shell\n    ./uaa/login.sh\n    ```\n\n1. Run\n\n    ```bash\n    ./concourse/make-concourse-admin.sh \u003cEMAIL_ADDRESS\u003e\n    ```\n\n### Removing platform admins\n\n1. Run:\n\n    ```shell\n    ./uaa/login.sh\n    ```\n\n1. Run\n\n    ```bash\n    ./make-cf-admin.sh -r \u003cEMAIL_ADDRESS\u003e\n    ```\n\n### Removing Concourse admins\n\n1. Run:\n\n    ```shell\n    ./uaa/login.sh\n    ```\n\n1. Run\n\n    ```bash\n    ./concourse/make-concourse-admin.sh -r \u003cEMAIL_ADDRESS\u003e\n    ```\n\n## Creating deployer users\n\n1. Ensure the user running this is a CF admin (see [Creating admins](#creating-admins))\n1. Run\n\n    ```bash\n    ./cf-create-deployer-user.sh \u003cORG\u003e\n    ```\n\n## Creating CSV for recent users since a given date\n\n1. `pip install pyyaml`\n1. `gem install cf-uaac`\n1. `uaac target uaa.fr.cloud.gov`\n1. `uaac token sso get cf -s '' --scope scim.read`\n\n- Once you log in with UAA, make sure you navigate to\n    \u003chttps://login.fr.cloud.gov/passcode\u003e to get your one-time passcode.\n\n1. `python cf-get-recent-users.py YYYY-MM-DD`\n\n## Creating CSV for counting sandboxes logs over the last three months\n\n1. `apt update`\n1. `apt install python3`\n1. `pip install -U requests`\n1. `pip install -U dateutil`\n1. `export ES_HOST=\"${IP_ADDRESS_LOGSEARCH_MASTER_NODE}\"`\n1. `python3 count-sandbox-logs.py`\n1. `ls -l summary.csv`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fcg-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-gov%2Fcg-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fcg-scripts/lists"}