https://github.com/cloud-gov/cg-scripts
Scripts to assist with the configuration and operation of Cloud Foundry.
https://github.com/cloud-gov/cg-scripts
Last synced: 6 months ago
JSON representation
Scripts to assist with the configuration and operation of Cloud Foundry.
- Host: GitHub
- URL: https://github.com/cloud-gov/cg-scripts
- Owner: cloud-gov
- License: other
- Created: 2015-03-18T19:31:44.000Z (over 11 years ago)
- Default Branch: main
- Last Pushed: 2025-11-20T16:16:42.000Z (8 months ago)
- Last Synced: 2025-11-20T18:12:31.321Z (8 months ago)
- Language: Python
- Size: 2.19 MB
- Stars: 19
- Watchers: 23
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Audit: audit/ac-2-user-audit.py
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# cloud-foundry-scripts
Scripts to assist with the configuration and operation of Cloud Foundry.
## Managing cloud.gov team
### Creating Concourse "navigator" team members
1. `uaac target `
1. `uaac token client get admin -s `
1. Run
```bash
./make-concourse-navigator.sh
```
### Removing Concourse "navigator" team members
1. `uaac target `
1. `uaac token client get admin -s `
1. Run
```bash
./make-concourse-navigator.sh -r
```
### Creating platform admins
These steps correspond to the [steps for creating admins](http://docs.cloudfoundry.org/adminguide/uaa-user-management.html#creating-admin-users).
1. Have the user log in to CF first.
1. Run:
```shell
./uaa/login.sh
```
1. Run
```bash
./make-cf-admin.sh
```
### Create Concourse admins
1. Run:
```shell
./uaa/login.sh
```
1. Run
```bash
./concourse/make-concourse-admin.sh
```
### Removing platform admins
1. Run:
```shell
./uaa/login.sh
```
1. Run
```bash
./make-cf-admin.sh -r
```
### Removing Concourse admins
1. Run:
```shell
./uaa/login.sh
```
1. Run
```bash
./concourse/make-concourse-admin.sh -r
```
## Creating deployer users
1. Ensure the user running this is a CF admin (see [Creating admins](#creating-admins))
1. Run
```bash
./cf-create-deployer-user.sh
```
## Creating CSV for recent users since a given date
1. `pip install pyyaml`
1. `gem install cf-uaac`
1. `uaac target uaa.fr.cloud.gov`
1. `uaac token sso get cf -s '' --scope scim.read`
- Once you log in with UAA, make sure you navigate to
to get your one-time passcode.
1. `python cf-get-recent-users.py YYYY-MM-DD`
## Creating CSV for counting sandboxes logs over the last three months
1. `apt update`
1. `apt install python3`
1. `pip install -U requests`
1. `pip install -U dateutil`
1. `export ES_HOST="${IP_ADDRESS_LOGSEARCH_MASTER_NODE}"`
1. `python3 count-sandbox-logs.py`
1. `ls -l summary.csv`