Browse Source

HUE-8530 [docs] Add design concepts for Organizations

Romain 6 năm trước cách đây
mục cha
commit
7db91758d1
1 tập tin đã thay đổi với 22 bổ sung0 xóa
  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.