Skip to content

[FEATURE] Update docker compose templates to set resource limits for user containers #1351

@8ohamed

Description

@8ohamed

Describe the feature

As an admin user I want to set resource limits for users So That one user does not block other users.

Describe the problems your feature request solves

The current installation setup adds users without any resource limits. Thus pne user can use all available CPU, memory and storage space. This type of usage creates problems for other users.

Describe the solution you'd like

Each new user account has the following resource limits set.

[users.resourcelimits]
cpus = 4 # virtual CPUs
memory = 4g # RAM space
pids = 4000 # number of processes

The python poetry project code in cli ditectory must be updated so that:

  1. The docker compose yaml templates are updated
  2. The above resource limits specified in ini format get added to dtaas.toml file.
  3. Python code uses these templates and new dtaas.toml configuration when creating new users.

Describe alternatives you've considered

A possibility is to set top-level resource limits in all the docker compose files in docker directory but that is too restrictive.

Additional context

None

Success Criterion

Checklist:

  • New users have resource limits set
  • Test coverage is improved
  • No qlty issues

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions