Explorar o código

HUE-8530 [docs] Add design concepts for Organizations

Romain %!s(int64=6) %!d(string=hai) anos
pai
achega
7db91758d1
Modificáronse 1 ficheiros con 22 adicións e 0 borrados
  1. 22 0
      docs/designs/organizations.md

+ 22 - 0
docs/designs/organizations.md

@@ -0,0 +1,22 @@
+# Organizations
+
+Goal: support of more than one tenant per server instance [HUE-8530](https://issues.cloudera.org/browse/HUE-8530)
+
+## Design
+
+Add an `organization` model in `useradmin/models2.py` and have `User`, `Group` classes link to it.
+Keep all the models in models2.py and do not change the current `useradmin/models.py` logic so that it is backward compatible.
+
+e.g. how to import the organization models:
+
+```
+if ENABLE_ORGANIZATIONS.get():
+  from useradmin.models import User, Group, default_organization
+else:
+  from django.contrib.auth.models import User, Group
+```
+
+Notes:
+* large organization would probably still need their own instances in a dedicated Kubernetes namespace
+* dependencies: connector configuration, task server, kubernetes
+* database migrations files can only be for v1 or v2 (due to Django internals). Migrations for v2 should replace v1 and so are omitted for now until the full completion of the functionality. This also means that a setup for organizations would need to be from scratch and not come from an upgrade of models v1.