Revision f3456fc8

b/docs/admin-guide.rst
316 316
and sets the cookie, before redirecting the user to the ``next`` parameter
317 317
value.
318 318

  
319
Setting quota limits
320
~~~~~~~~~~~~~~~~~~~~
321

  
322
Set default quota
323
`````````````````
324
To inspect current default base quota limits, run::
325

  
326
   # snf-manage resource-list
327

  
328
You can modify the default base quota limit for all future users with::
329

  
330
   # snf-manage resource-modify <resource_name> --base-default <value>
331

  
332
Set base quota for individual users
333
```````````````````````````````````
334

  
335
For individual users that need different quota than the default
336
you can set it for each resource like this::
337

  
338
    # use this to display quota / uuid
339
    # snf-manage user-show 'uuid or email' --quota
340

  
341
    # snf-manage user-modify <user-uuid> --base-quota 'cyclades.vm' 10
342

  
343
You can set base quota for all existing users, with possible exceptions, using::
319
Projects and quota
320
~~~~~~~~~~~~~~~~~~
344 321

  
345
    # snf-manage user-modify --all --base-quota cyclades.vm 10 --exclude uuid1,uuid2
322
Synnefo supports granting resources and controling their quota through the
323
mechanism of *projects*. A project is considered as a pool of finite
324
resources. Every actual resources allocated by a user (e.g. a Cyclades VM or
325
a Pithos container) is also assigned to a project where the user is a
326
member to. For each resource a project specifies the maximum amount that can
327
be assigned to it and the maximum amount that a single member can assign to it.
346 328

  
347
All quota for which values different from the default have been set,
348
can be listed with::
329
Default quota
330
`````````````
349 331

  
350
    # snf-manage quota-list --with-custom=True
332
Upon user creation, a special purpose user-specific project is automatically
333
created in order to hold the base quota provided by the system. These *base*
334
projects are identified with the same UUID as the user.
351 335

  
336
To inspect the quota that future users will receive by default through their
337
base projects, check column ``base_default`` in::
352 338

  
353
Enable the Projects feature
354
~~~~~~~~~~~~~~~~~~~~~~~~~~~
339
   # snf-manage resource-list
355 340

  
356
If you want to enable the projects feature so that users may apply
357
on their own for resources by creating and joining projects,
358
in ``20-snf-astakos-app-settings.conf`` set::
341
You can modify the default base quota limit for all future users with::
359 342

  
360
    # this will make the 'projects' page visible in the dashboard
361
    ASTAKOS_PROJECTS_VISIBLE = True
343
   # snf-manage resource-modify <resource_name> --base-default <value>
362 344

  
363
You can change the maximum allowed number of pending project applications
364
per user with::
345
Grant extra quota through projects
346
``````````````````````````````````
365 347

  
366
    # snf-manage resource-modify astakos.pending_app --base-default <number>
348
A user can apply for a new project through the web interface or the API.
349
Once it is approved by the administrators, the applicant can join the
350
project and let other users in too.
367 351

  
368
You can also set a user-specific limit with::
352
A project member can make use of the quota granted by the project by
353
specifying this particular project when creating a new quotable entity.
369 354

  
370
    # snf-manage user-modify <user-uuid> --base-quota 'astakos.pending_app' 5
355
Note that quota are not accumulative: in order to allocate a 100GB disk,
356
one must be in a project that grants at least 100GB; it is not possible to
357
add up quota from different projects. Note also that if allocating an entity
358
requires multiple resources (e.g. cpu and ram for a Cyclades VM) these must
359
be all assigned to a single project.
371 360

  
372
When users apply for projects they are not automatically granted
373
the resources. They must first be approved by the administrator.
361
Control projects
362
````````````````
374 363

  
375 364
To list pending project applications in astakos::
376 365

  
......
385 374

  
386 375
    # snf-manage project-control --deny <app id>
387 376

  
388
Users designated as *project admins* can approve, deny, or modify
377
Before taking an action, on can inspect project status, settings and quota
378
limits with::
379

  
380
   # snf-manage project-show <project-uuid>
381

  
382
For an initialized project, option ``--quota`` also reports the resource
383
usage.
384

  
385
Users designated as *project admins* can approve or deny
389 386
an application through the web interface. In
390 387
``20-snf-astakos-app-settings.conf`` set::
391 388

  
392 389
    # UUIDs of users that can approve or deny project applications from the web.
393 390
    ASTAKOS_PROJECT_ADMINS = [<uuid>, ...]
394 391

  
392
Set quota limits
393
````````````````
394

  
395
One can change the quota limits of an initialized project with::
396

  
397
   # snf-manage project-modify <project-uuid> --limit <resource_name> <member_limit> <project_limit>
398

  
399
One can set base quota for all accepted users (that is, set limits for base
400
project), with possible exceptions, with::
401

  
402
   # snf-manage project-modify --all-base-projects --exclude <uuid1>,<uuid2> --limit ...
403

  
404
Quota for a given resource are reported for all projects that the user is
405
member in with::
406

  
407
   # snf-manage user-show <user-uuid> --quota
408

  
409
With option ``--projects``, owned projects and memberships are also reported.
395 410

  
396 411
Astakos advanced operations
397 412
---------------------------

Also available in: Unified diff