Skip Navigation LinksALVAO 10.2ALVAO Asset ManagementSystem Implementation in an OrganizationInstallationMultitenant mode Skip Navigation Links. Skip Navigation Links Skip Navigation Links.


Multitenant mode

In the multitenant mode, one ALVAO Server installation serves several customers (tenants).

Creating a database of tenants

On SQL Server, create a database of tenants by running a script (e.g. from SQL Server Management Studio):

create databaseAlvaoTenants
go
use
AlvaoTenants
go
create table
Tenant (
    id
int identity(1,1) constraintPK_Tenant_idprimary key clustered,
    Organization
nvarchar(255),
    Domain
nvarchar(255),
    ConnectionString
nvarchar(max)
)

Note:
It is performed only once.
Note: Set the necessary permissions for IIS processes on the SQL Server. The db_datareader user role must be enabled for the tenant database.

Multitenant mode settings

Asset Management WebService

  1. Edit the web.config file, e.g. by using Notebook.
  2. Go to the configuration/connectionStrings section.
  3. Add a new connection named AlvaoTenants that contains the connection string to the tenant database.
    Example:
    <add name="AlvaoTenants" connectionString="Data Source=server1;Initial Catalog=AlvaoTenants; Max Pool Size=2000; Integrated Security=True" providerName="System.Data.SqlClient"/>
Note:
When AM WS runs in the multitenant mode, it stores detection received files by default in the following folder:
c:\ProgramData\ALC\ALVAO Asset Management Collector\Detections\<tenant organization name>

Asset Management Collector

For multitenant mode, it is first necessary to create a ZIP package with files which will then be deployed for individual tenants.

  1. Install the MSI package AlvaoAssetCollector.msi using the "administrator" installation:
    msiexec /a AlvaoAssetCollector.msi
    Note: Run the command line "as administrator"
  2. Expand the CollectorServiceControlScripts.zip package content in the folder where you installed the package (where the EXE and DLL application libraries are located).
  3. All files then "zip" and create one ZIP archive, e.g.: AMCollector.zip
Note:
You will also need to re-create this package when upgrading to a new version (with the files of the version you are upgrading to).

Mailbox Reader

For multitenant mode, it is first necessary to create a ZIP package with files which will then be deployed for individual tenants.

  1. Install the MSI package AlvaoServiceDeskMailboxReader.msi by using the "administrator" installation:
    msiexec / a AlvaoServiceDeskMailboxReader.msi
    Note: Run the command line "as administrator"
  2. Expand the MailboxReaderServiceControlScripts.zip package content in the folder where you installed the package (where the EXE and DLL application libraries are located)
  3. All files then "zip" and create one ZIP archive, e.g.: SDMailboxReader.zip
Note:
You will also need to re-create this package when upgrading to a new version (with the files of the version you are upgrading to).

Service Desk WebService

  1. Edit the web.config file, e.g. by using Notebook.
  2. Go to the configuration/connectionStrings section.
  3. Add a new connection named AlvaoTenants that contains the connection string to the tenant database.
    Example:
    <add name="AlvaoTenants" connectionString="Data Source=server1;Initial Catalog=AlvaoTenants; Max Pool Size=2000; Integrated Security=True" providerName="System.Data.SqlClient"/>

Webapp

  1. Edit the web.config file, e.g. by using Notebook.
  2. Go to the configuration/connectionStrings section.
  3. Add a new connection named AlvaoTenants that contains the connection string to the tenant database.
    Example:
    <add name="AlvaoTenants" connectionString="Data Source=server1;Initial Catalog=AlvaoTenants; Max Pool Size=2000; Integrated Security=True" providerName="System.Data.SqlClient"/>

Adding new tenant

  1. For a new customer, register a new DNS (sub)domain (e.g. zakaznik1.alvao.com) that directs to the IP address of the server with the ALVAO web applications installed.
  2. On SQL Server, create a new database for the customer by using the ALVAO Admin in the appropriate language (as required by the customer). Activate the database.
    Note:
    • The database name is recorded as case sensitive text, so be sure to follow the case during copying.
    • When you create a new database, a strong verification code for AM Agents is automatically generated. The code can be changed in global detection settings.
    • You can also create a database using the command line:
      Admin.exe/CreateDb/ConnectionString <connection string to DB> /Database <database name> /Collation <collation DB> /LangId <langId>
    Note: Set the necessary permissions for IIS processes on the SQL Server. The settings for the tenant databases are the same as for the single tenant database. The recommended user roles are db_datareader, db_datawriter, db_ddladmin.
  3. Go to the AlvaoTenants database and use SQL Server Management Studio to modify the Tenant table and enter the appropriate values.
    Example:
    • Organization = Customer 1
    • Domain = customer1.alvao.com
    • ConnectionString = Data Source=server1;Initial Catalog=Customer1; Max Pool Size=2000; Integrated Security=True

Asset Management Collector

  1. Create a new folder with the tenant name in the folder: C:\Program Files (x86)\ALVAO\ Asset Management Collector\
    E.g.: Customer 1
    Note:
    The folder must be named in the same way as the tenant is named in the tenant database (in the Tenant.Organization column).
  2. Unzip the ZIP package AMCollector.zip (see Setting multitenant mode) to this folder.
  3. Edit the AMCollector.config file and set the connection string to the tenant database in the configuration/database/connectionStrings section.
  4. Run the CreateService.cmd script ("as an administrator") that creates the AM Collector service for the given tenant. The script runs the service directly.
    Note:
    The script creates a service under the ALVAO Asset Management Collector <folder name>) name, e.g.: ALVAO Asset Management Collector (Customer 1). The given tenant will then be easily identified in services.
    Note:
    For the service to work properly, we recommend that you create a service account to which you grant sufficient database administration rights (i.e. db_ddladmin, db_datawriter, db_datareader rights). Then run all Collector services under this account. Also, be sure to allow access to the folders for this account from where it will load files. This is a "C:\Windows\Temp” folder and a hidden "C:\ProgramData\ALC” folder.
  5. Go to Alvao WebApp of the given tenant and create server-specific settings under Asset Management – Servers.
    • Enter the name on the server network where ALVAO services are running.
    • In the Loading files section, enable automatic loading of CXM files from the folder:
      c:\ProgramData\ALC\ALVAO Asset Management Collector\Detections\<tenant organization name>

Mailbox Reader

  1. Create a new folder with the tenant name in the folder: C:\Program Files (x86)\ALVAO\MailboxReader\
    E.g.: Customer 1
    Note:
    The folder must be named in the same way as the tenant is named in the tenant database (in the Tenant.Organization column).
  2. Unzip the ZIP package SDMailboxReader.zip (see Setting multitenant mode) to this folder.
  3. Edit the MailboxReader.exe.config file and set the connection string to the tenant database in the configuration/connectionStrings section.
  4. Run the CreateService.cmd script ("as an administrator") that creates the Mailbox Reader service for the given tenant. The script runs the service directly.
    Note:
    The script creates a service under the ALVAO MailboxReader <folder name>) name, e.g.: ALVAO MailboxReader (Customer 1). The given tenant will then be easily identified in services.

Upgrading tenants

All tenants on a particular server must be upgraded simultaneously because they share common server applications. If you need to upgrade only some tenants, you must first move them to another server.

Database Upgrade

If it is necessary to upgrade the database (installation of SP1, or new "large" version), use Admin to upgrade all tenant databases to the new version.

Note:
You can also upgrade by using the Admin started from the command line:
Admin.exe /ConnectionString <connection string to DB> /UpgradeDb

Asset Management WebService

  1. Install the new version of AM WS.
Note:
AM WS is common for all tenants on the server.

Asset Management Collector

  1. Go to the Windows Service Manager and stop all AM Collector services for all tenants.
    Note: That means, all AM Collector services that have an organization name at the end of the service name.
  2. Unpack the ZIP package with the new AM Collector files into all folders one by one.
    Attention: Remove the AMCollector.config file from the ZIP package, otherwise the already set connection strings will be overwritten for all tenants!
  3. Restart all services.

Mailbox Reader

  1. Go to the Windows Service Manager and stop all ALVAO MailboxReader services for all tenants.
    Note: That means, all ALVAO MailboxReader services that have an organization name at the end of the service name.
  2. Unpack the ZIP package with the new Mailbox Reader files into all folders one by one.
    Attention: Remove the MailboxReader.exe.config file from the ZIP package, otherwise the already set connection strings will be overwritten for all tenants!
  3. Restart all services.

Service Desk WebService

  1. Install the new version of SD WS.
Note:
SD WS is common for all tenants on the server.

WebApp

  1. Install the new version of WA.
Note:
WA is common for all tenants on the server.

Tenant removal

  1. Go to the AlvaoTenants tenant database and edit the Tenant table, find the right tenant and delete the entire row.
  2. On the SQL server, delete the ALVAO database of that tenant.

Asset Management Collector

  1. Go to the C:\Program Files (x86)\ALVAO\ Asset Management Collector\ folder and find the subfolder of the particular tenant.
  2. Run the script in the RemoveService.cmd folder ("as an administrator").
  3. Remove the entire tenant folder.

Mailbox Reader

  1. Go to the C:\Program Files (x86)\ALVAO\ MailboxReader\ folder and find the subfolder of the particular tenant.
  2. Run the script in the RemoveService.cmd folder ("as an administrator").
  3. Remove the entire tenant folder.

Distribution of AM Agents

Install AM Agents with the following command line parameters on the computers in your organization:

  • WSURL=<AM WS address with a specific (sub)domain of the tenant>, e.g.: https://zakaznik1.alvao.com/AssetWebService/AssetWebService.asmx
  • AUTHCODE=<authorization code>
    Note:
    The Agent authorization code was generated automatically when the DB was created. You can find it in global detection settings.
Note:
Agents can be extended also by GPO with preset parameters – see Installation via GPOor by other tools.

 

Did not find what you were looking for? Ask our technical support team.