forked from cloudfoundry/docs-cf-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quota-plans.html.md.erb
300 lines (231 loc) · 13.3 KB
/
quota-plans.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
---
title: Creating and Modifying Quota Plans
owner: CAPI
---
<strong><%= modified_date %></strong>
<% if vars.product_name == "CF" %>
<div class="quick-links">
<ul>
<li><a href="#attributes">Org Quota Plan Attributes</a></li>
<li><a href="#default">Default Quota Plan for an Org</a></li>
<li><a href="#new">Create a New Quota Plan for an Org</a>
<ul>
<li><a href="#manifest">Modify the CF Deployment Manifest</a></li>
<li><a href="#create-quota">Use cf create-quota</a></li>
</ul>
</li>
<li><a href="#modify">Modify an Existing Quota Plan for an Org</a>
<ul>
<li><a href="#modify-manifest">Modify the Manifest</a></li>
<li><a href="#update-quota">Use cf update-quota</a></li>
</ul>
</li>
<li><a href="#space">Create and Modify Quota Plans for a Space</a>
<ul>
<li><a href="#new-space">Create a New Quota Plan for a Space</a></li>
<li><a href="#modify-space">Modify a Quota Plan for a Space</a></li>
</ul>
</li>
<li><a href="#cfhelp">Run cf help</a></li>
</ul>
</div>
<% else %>
<div class="quick-links">
<ul>
<li><a href="#attributes">Org Quota Plan Attributes</a></li>
<li><a href="#default">Default Quota Plan for an Org</a></li>
<li><a href="#modify">Modify an Existing Quota Plan for an Org</a>
<ul>
<li><a href="#update-quota">Use cf update-quota</a></li>
</ul>
</li>
<li><a href="#space">Create and Modify Quota Plans for a Space</a>
<ul>
<li><a href="#new-space">Create a New Quota Plan for a Space</a></li>
<li><a href="#modify-space">Modify a Quota Plan for a Space</a></li>
</ul>
</li>
<li><a href="#cfhelp">Run cf help</a></li>
</ul>
</div>
<% end %>
Quota plans are named sets of memory, service, and instance usage quotas. For example, one quota plan might allow up to 10 services, 10 routes, and 2 GB of RAM, while another might offer 100 services, 100 routes, and 10 GB of RAM. Quota plans have user-friendly names, but are referenced in Cloud Foundry (CF) internal systems by unique GUIDs.
Quota plans are not directly associated with user accounts. Instead, every org has a list of available quota plans, and the account admin assigns a specific quota plan from the list to the org. Everyone in the org shares the quotas described by the plan. There is no limit to the number of defined quota plans an account can have, but only one plan can be assigned at a time.
You must set a quota plan for an [org](../concepts/roles.html#orgs), but you can choose whether to set a [space](../concepts/roles.html#spaces) quota.
## <a name='attributes'></a>Org Quota Plan Attributes ##
<table border="1" class="nic" >
<tr>
<th><strong>Name</strong></th>
<th><strong>Description</strong></th>
<th><strong>Valid Values</strong></th>
<th><strong>Example Value</strong></th>
</tr>
<tr>
<td>name</td><td>The name you use to identify the plan</td><td>A sequence of letters, digits, and underscore characters. Quota plan names within an account must be unique.</td><td>silver_quota</td>
</tr>
<tr>
<td>memory_limit</td><td>Maximum memory usage allowed</td><td>An integer and a unit of measurement like M, MB, G, or GB</td><td>2048M</td>
</tr>
<tr>
<td>app_instance_limit</td><td>Maximum app instances allowed. <br><br>Stopped apps do not count toward this instance limit. Crashed apps count toward the limit because their desired state is <code>starting</code>.</td><td>An integer
</td><td>25</td>
</tr>
<tr>
<td>non_basic_services_allowed</td><td>Determines whether users can provision instances of non-free service plans. Does not control plan visibility. When false, non-free service plans may be visible in the marketplace but instances can not be provisioned.</td><td><code>true</code> or <code>false</code></td><td>true</td>
</tr>
<tr>
<td>total_routes</td><td>Maximum routes allowed</td><td>An integer</td><td>500</td>
</tr>
<tr>
<td>total_reserved_route_ports</td><td>Maximum routes with reserved ports</td><td>An integer not greater than total_routes</td><td>60</td>
</tr>
<tr>
<td>total_services</td><td>Maximum services allowed</td><td>An integer</td><td>25</td>
</tr>
<tr>
<td>trial_db_allowed</td><td>Legacy Field. Value can be ignored.</td><td><code>true</code> or <code>false</code></td><td>true</td>
</tr>
</table>
## <a name='default'></a>Default Quota Plan for an Org##
Cloud Foundry installs with a quota plan named `default` with the following values:
* Memory Limit: `10240 MB`
* Total Routes: `1000`
* Total Services: `100`
* Non-basic Services Allowed: `True`
* Trial DB Allowed: `True`
<% if vars.product_name == "CF" %>
## <a name='new'></a>Create a New Quota Plan for an Org ##
<p class="note"><strong>Note</strong>: The org manager sets and manages quotas. See the <a href="../concepts/roles.html">Orgs, Spaces, Roles, and Permissions topic </a> for more information.</p>
You must set an org quota. You can create a new quota plan for an org in one of two ways:
* Directly [modify the CF deployment manifest](#manifest) before deploying
* Use [`cf create-quota`](#create-quota) after deploying
### <a name='manifest'></a> Modify the CF Deployment Manifest ###
The CF Deployment manifest specifies the default quota plans applied to orgs.
Follow the steps below to modify the default quota plans by locating and
editing the manifest.
1. Open the deployment YAML manifest file in a text editor.
1. Search for `quota_definitions`.
1. Add a new quota definition with values that you specify. Use the default quota definition as a formatting template. The following example shows the `quota_definitions` portion of the `cf.yml` manifest after adding the `silver_quota` plan:
<pre class='terminal'>
quota\_definitions:
default:
memory\_limit: 1024M
non\_basic\_services\_allowed: true
total\_routes: 1000
total\_services: 100
trial\_db\_allowed: true
silver\_quota:
memory\_limit: 2048M
non\_basic\_services\_allowed: true
total\_routes: 500
total\_services: 25
trial\_db\_allowed: true
</pre>
1. Save and close the deployment manifest.
1. Run `bosh -e MY-ENV -d MY-DEPLOYMENT deploy MANIFEST.yml` to apply the change, replacing `MY-ENV` with your BOSH Director alias, `MY-DEPLOYMENT` with your deployment name, and `MANIFEST` with the manifest YAML filename.
For example:
<pre class="terminal">
$ bosh -e dev -d cf deploy cf.yml
</pre>
<p class='note'><strong>Note</strong>: Any subsequent updates to the quota in the manifest are not applied to your environment after the initial deploy, even though BOSH updates the controller instance with new settings.</p>
<% else %>
## <a name='new'></a>Create a New Quota Plan for an Org ##
<p class="note"><strong>Note</strong>: The org manager sets and manages quotas. See the <a href="../concepts/roles.html">Orgs, Spaces, Roles, and Permissions topic </a> for more information.</p>
You must set an org quota. You can create a new quota plan for org with [`cf create-quota`](#create-quota).
<% end %>
### <a name='create-quota'></a>Use cf create-quota ###
In a terminal window, run the following command. Replace the placeholder attributes with the values for this quota plan:
`cf create-quota QUOTA [-m TOTAL-MEMORY] [-i INSTANCE-MEMORY] [-r ROUTES] [-s SERVICE-INSTANCES] [--allow-paid-service-plans]`
This command accepts the following flags:
* `-m`: Total amount of memory
* `-i`: Maximum amount of memory an application instance can have (`-1` represents an unlimited amount)
* `-r`: Total number of routes
* `-s`: Total number of service instances
* `-allow-paid-service-plans`: Can provision instances of paid service plans
Example:
<pre class='terminal'>
$ cf create-quota small -m 2048M -i 1024M -r 10 -s 10 --allow-paid-service-plans
</pre>
## <a name='modify'></a> Modify an Existing Quota Plan for an Org##
<% if vars.product_name == "CF" %>
You can modify an existing quota plan for an org in one of two ways:
* Directly [modify the CF deployment manifest](#modify-manifest) before deploying.
* Use [`cf update-quota`](#update-quota) after deploying.
### <a name='modify-manifest'></a> Modify the Manifest ###
1. Open the deployment YAML manifest file in a text editor.
1. Search for `quota_definitions`.
1. Modify the value of the attribute.
1. Save and close the deployment manifest.
<% end %>
### <a name='update-quota'></a> Use cf update-quota ###
1. Run `cf quotas` to find the names of all quota definitions available to your org. Record the name of the quota plan to be modified.
<pre class='terminal'>
$ cf quotas
Getting quotas as [email protected]...
OK
name total memory limit instance memory limit routes service instances paid service plans
free 0 0 1000 0 disallowed
paid 10G 0 1000 -1 allowed
small 2G 0 10 10 allowed
trial 2G 0 1000 10 disallowed
</pre>
1. Run the following command, replacing QUOTA with the name of your quota.
`cf update-quota QUOTA [-i INSTANCE-MEMORY] [-m MEMORY] [-n NEW-NAME] [-r ROUTES] [-s SERVICE-INSTANCES] [--allow-paid-service-plans | --disallow-paid-service-plans]`
<br><br>
This command accepts the following flags:
* `-i`: Maximum amount of memory an application instance can have (`-1` represents an unlimited amount)
* `-m`: Total amount of memory a space can have
* `-n`: New name
* `-r`: Total number of routes
* `-s`: Total number of service instances
* `--allow-paid-service-plans`: Can provision instances of paid service plans
* `--disallow-paid-service-plans`: Can not provision instances of paid service plans
Example:
<pre class='terminal'> $ cf update-quota small -i 2048M -m 4096M -n medium -r 20 -s 20 --allow-paid-service-plans</pre>
## <a name='space'></a>Create and Modify Quota Plans for a Space ##
For each org, Org Managers create and modify quota plans for spaces in the org. If an Org Manager allocates a space quota, CF verifies that resources do not exceed the allocated space limit. For example, when a Space Developer deploys an application, CF first checks the memory allocation at the space level, then at the org level.
Perform the following procedures to create and modify quota plans for individual spaces within an org.
### <a name='new-space'></a>Create a New Quota Plan for a Space ###
In a terminal window, run the following command to create a quota for a space. Replace the placeholder attributes with the values for this quota plan:
`cf create-space-quota QUOTA [-i INSTANCE-MEMORY] [-m MEMORY] [-r ROUTES] [-s SERVICE-INSTANCES] [--allow-paid-service-plans]`
Example:
<pre class='terminal'>
$ cf create-space-quota big -i 1024M -m 4096M -r 20 -s 20 --allow-paid-service-plans
</pre>
### <a name='modify-space'></a>Modify a Quota Plan for a Space ###
Run `cf space-quotas` to find the names of all space quota available to your org. Record the name of the quota plan to be modified.
<pre class='terminal'>
$ cf space-quotas
Getting quotas as admin<span>@</span>example.com...
OK
name total memory limit instance memory limit routes service instances paid service plans
big 2G unlimited 0 10 allowed
trial 2G 0 0 10 allowed
</pre>
To modify that quota, use the <code>update-space-quota</code> command. Replace the placeholder attributes with the values for this quota plan.
`cf update-space-quota SPACE-QUOTA-NAME [-i MAX-INSTANCE-MEMORY] [-m MEMORY] [-n NEW-NAME] [-r ROUTES] [-s SERVICES] [--allow-paid-service-plans | --disallow-paid-service-plans]`
Example:
<pre class='terminal'> $ cf update-space-quota big -i 20 -m 4096M -n bigger -r 20 -s 20 --allow-paid-service-plans</pre>
## <a name='cfhelp'></a>Run cf help ##
For more information regarding quotas, run `cf help` to view a list and brief description of all cf CLI commands. Scroll to view org and space quotas usage and information.
<pre class='terminal'>
$ cf help
...
ORG ADMIN:
quotas List available usage quotas
quota Show quota info
set-quota Assign a quota to an org
create-quota Define a new resource quota
delete-quota Delete a quota
update-quota Update an existing resource quota
share-private-domain Share a private domain with an org
unshare-private-domain Unshare a private domain with an org
SPACE ADMIN:
space-quotas List available space resource quotas
space-quota Show space quota info
create-space-quota Define a new space resource quota
update-space-quota update an existing space quota
delete-space-quota Delete a space quota definition and unassign the space quota from all spaces
set-space-quota Assign a space quota definition to a space
unset-space-quota Unassign a quota from a space
</pre>