Last active
August 29, 2015 14:20
-
-
Save krujos/53f50e48661047c3fc7c to your computer and use it in GitHub Desktop.
Provision a new org into cloud foundry. This assumes emails are formatted in first_last@example.com format
This file contains 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
[ | |
{ | |
"protocol": "all", | |
"destination": "10.0.1.0/24" | |
} | |
] |
This file contains 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
first_user@gmail.com | |
second_user@gmail.com |
This file contains 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
#!/bin/sh | |
for email in `cat org-admin-emails.txt` ; do | |
org=`echo $email | tr '_' "\n" | colrm 2 | tr -d "\n" && echo -org` | |
echo "INFO: Cleaning up $org: for $email" | |
cf delete-org $org -f | |
cf delete-user $email -f | |
done |
This file contains 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
#!/bin/sh | |
cf create-security-group development-security-group ./development-security-group.json | |
for email in `cat org-admin-emails.txt` ; do | |
org=`echo $email | tr '_' "\n" | colrm 2 | tr -d "\n" && echo -org` | |
echo "INFO: Setting up $org: for $email" | |
cf create-org $org | |
cf create-space development -o $org | |
cf create-space production -o $org | |
cf create-user $email password | |
cf set-org-role admin $org OrgManager | |
cf set-org-role $email $org OrgManager | |
cf set-space-role $email $org development SpaceManager | |
cf set-space-role $email $org development SpaceDeveloper | |
cf set-space-role $email $org production SpaceManager | |
cf set-space-role $email $org production SpaceDeveloper | |
cf bind-security-group development-security-group $org development | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment