This guide will help you to understand the basic DBaaS architecture.
Basically DBaaS has 2 kind of users (if you run the reset_data
command):
- Regular user: Can manage projects, databases and credentials.
- DBA user: Regular user roles + physical and logical structure.
You can create one or more roles you want assign appropriate permissions. We are using 2 kinds of roles: regular and DBA user.
It's sort of a proxy for roles. The team has only one role, but one or more users. Subsequently those users inherit the team role.
Users in the system. The user must have a team for usage.
View the main actions that the users have done on DBaaS.
Manage the databases and their credentials.
It's possible to organize your databases logically by project.
It's a group of host(s) will be used for the same purpose, like a cluster/replica set. More details about each field:
- databaseinfra name: whatever you want to call.
- databaseinfra user/password: it's your admin user in mongodb or root in mysql.
- engine/plan/environment: self description fields. :)
- capacity: how many databases the currently databaseinfra can hold.
- max database size: it's an account about capacity and how big the database can be.
- Instances: all siblings servers.
In other words, the drivers DBaaS supports.
It is a composite key: engine type + db version. eg: mongodb + 2.4.5.
Projects usually have at least two environments: development and production. This information will be used to associate the databaseinfra and plans.
The host where the database instance will run (eg: mongodb or mysql daemon). Of course you can run more than one instance in each host.
Currently is merely informative, DBaaS doesn't support quota for databases yet. You have to provide at least one plan (eg: small, medium) per engine type and choose which environment this plan can be used. A plan is a n-to-n relationship with environment.
You can input/change some system parameters dynamically, it's a key/value parameter. The value will be cached in the cache middleware defined in the settings.py file until it is updated. Bellow the parameters already supported by DBaaS:
-
email_addr_from
: (mandatory)The entity who sends the e-mail to
new_user_notify_email
. -
new_user_notify_email
: (mandatory)Destination address for DBaaS notifications, like a new user, etc.
-
quarantine_retention_days
: (default: 7)How long the database in quarantine will be hold until purge it. The parameter is informative, not implemented yet.
-
mongo_connect_timeout
: (default: 5)how long (in seconds) a connection can take to be opened before timing out.
-
mysql_connect_timeout
: (default: 5)how long (in seconds) a connection can take to be opened before timing out.
-
threshold_infra_notification
: (__default: 0)minimum DatabaseInfra utilization percentage allowed in the system. If the utilization of a specific database infra exceeds the threshold, an email will be sent. 0 is disabled.
-
threshold_database_notification
: (__default: 0)minimum Database utilization percentage allowed in the system. If the utilization of a specific database exceeds the threshold, an email will be sent to the team (if an email is set) and to the dbaas system administrators. 0 is disabled.
-
database_clone_dir
: (mandatory)temporary path used during database clone feature.