Plato.Tenants adds multi-tenancy support & management capabilities to your installation of Plato.
Multi-tenancy support allows you to create several completely unique Plato sites from a single Plato installation. This is helpful if you have several products and wish to create a unique Plato support site for each product.
Each tenant or site can of course have its own unique theme, URL, data & enabled set of features. A single installation of Plato can now support multiple independent, isolated tenants.
Within the code tenant isolation is achieved by providing each tenant which its own independent dependency injection scope so all registered services are isolated and unique to that tenant. Data for each tenant is either stored in a separate SQL Server database or within the same SQL Server database using a unique table prefix.
As you would expect the Plato host instance can manage all created tenants as shown below...
You can of course also create new tenants via the Plato dashboard as shown below….
Or of course edit existing tenants...
It's worth noting that tenants you create cannot act as hosts for other tenants. For example if you create a new Plato tenant and then enable the Plato.Tenants features within this tenant you will not see any tenant management options appear within the Plato dashboard. Only the host or default instance of Plato can currently create & manage tenants.
To enable multi-tenancy support within your Plato installation you must first be using Plato 2.0 or above. If this is the case simply navigate to your Features area and search for "tenants", within the results enable the Plato Tenants feature.
After enabling the Plato Tenants module you'll notice a new "Tenants" link appears within the Plato dashboard navigation. Here you can manage tenants, add new tenants or configure default settings that will be used in the creation of new tenants.
After enabling Plato.Tenants, click the Tenants link on the left and then click Add. Provide a name for your tenant & an optional owner.
You will need to provide a SQL Server database connection string and unique table prefix to use for all the tenant data.
For each tenant you can provide a host name of host prefix. One or both must be provided. In most cases you would simply provide a unique host prefix to give your tenant an address.
For example let's say your host Plato installation is located at
https://yoursite.com/support and you created a tenant with a host prefix of
site1 this tenant would be accessible via the URL
Here you provide a username and password for the default administrator account for the tenant. This allows you to login to the tenant once created to further configure the tenant.
Plato needs to send emails. When creating a new tenant you can specify the outbound SMTP Server to use for the new tenant. This saves you having to configure the email settings after the tenant has been created.
After creating a tenant you can enable the Plato.Theming feature via the tenants dashboard to create a unique theme or visual look & feel for the tenant.