MIB 3 Installation
Introduction
The first step to install MibServer3 is to prepare the database that will be used by the server. This can be easily done through the MibMigrator tool currently available inside the MibDlls folder.
Then one just need to extract the MibServer3 package into IIS “www” folder, convert its folder to an app through IIS manager and add various config files and options. The following sessions will explain this procedure in depth.
Prerequisites
- IIS installed with MVC .NET support
- Knowledge about MibConfigs
- MibPackages and MibDlls downloaded
- Database available to bootstrap
- Running instance of MibAuthorizationServer
- Running instance of MibServerApi
Migration: Generating Database
Every migration can be run through a neat utility provided by MIB, the MibMigrator which is available in the MibDlls package. All possible migrations are also provided in the same package to ease its use.
Three different configuration files are required:
- MibLogConfig
- MibDatabaseConfig
- MibConfigurableObjectConfig
Where the third one can just be a dummy configuration file as no mapping is required. Configuration files samples can be seen in the appendix.
It is necessary to bootstrap every database used by MIB projects by running at least the MibClient2 migration before the main migration. Here is a sample CLI command with parameters to do just that (change paths for your environment):
> C:\MibDlls\MibMigrator\Migrator\mibmigrator.exe -assembly="C:\MibDlls\MibMigrator\MibClient2Migrations\MibClient2.MibDatabaseMigrations.dll" -configPath="C:\TestData\auth_migration\config"
After this migration, MibServer3 migration must be run with the same configuration files, and a sample command can be seen here:
> C:\MibDlls\MibMigrator\Migrator\mibmigrator.exe -assembly="C:\MibDlls\MibMigrator\MibServerMigrations\MibServer3.MibDatabaseMigrations.dll" -configPath="C:\TestData\mib3_migration\config"
More information can be seen in the document Mib Migration Guide.
Installing and enabling MibServer3
After Migration:
- If not downloaded, download MibPackages as we need the package file MibServer3i.zip
- Extract it to “C:\inetpub\wwwroot%NAME%”, where %NAME can be any chosen name, such as MibServer3. In the remainder of this documentation %NAME% will be assumed as MibServer3.
- Open “IIS Manager”, search for the folder in which the package was extracted, right click it and the chose “Convert to app”.
Before effectively being able to use the server, it must be configured by creating a “config” folder inside “C:\inetpub\wwwroot\MibServer3”, in which the configuration files will reside. Sample files can be seen in the appendix.
Minimally required configuration files (depends on your requirements):
- MibLogConfig
- MibAuthorizationClientConfig
- MibApiClientConfig.mibconfig
- MibDatabaseConfig
- MibServer3BaseConfig.mibconfig
- MibTranslationConfig.mibconfig
- MibCacheConfig.mibconfig
- MibObjectCacheConfig.mibconfig
It is also important to correctly configure MibAuthorizationServer to correctly accept the MibServer3 that we are enabling. For each MibServe3 that uses the authorization server one should add a new row to MibAuthorization’s API_CLIENTS table:
INSERT INTO API_CLIENTS (NAME, OWNER, ACTIVE, ALLOWS_REFRESH_TOKEN, ALLOWED_ORIGINS, OAUTH_CLIENT_ID, OAUTH_CLIENT_SECRET, OAUTH_CLIENT_TYPE, CONFIGURABLE_PERMISSIONS_URL) VALUES ('New Mib3 Client', 1, 1, 1, 1, 'newMib3Client','mY53Cr37aCc3s5K3y', 1, 'http://mib/server3/url/configurablepermissions')
Appendix: Sample configuration files
Most important fields are marked in bold.
MibAuthorizationClientConfig.mibconfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<serverUrl>http://mibauthorizationserver/url/</serverUrl>
<clientId>newMib3Client</clientId>
<clientSecret>mY53Cr37aCc3s5K3y</clientSecret>
</default>
</mibConfig>
MibApiClientConfig.mibconfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<url>http://mib/api/server/url/</url>
</default>
</mibConfig>
MibDatabaseConfig.mibconfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<type>serverType</type>
<server>serverAddress</server>
<database>databaseName</database>
<username>databaseUsername</username>
<password>databasePassword</password>
</default>
</mibConfig>
MibServer3BaseConfig.mibconfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<rootUrl>http://mib/server3/url/</rootUrl>
<defaultLanguage>en-us</defaultLanguage>
<startPage>customStartPage</startPage>
<renderOnlyMibComponents>false</renderOnlyMibComponents>
</default>
</mibConfig>
MibTranslationConfig.mibconfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<en-us> <!-- Available in SampleConfig -->
<dictionary>Dictionary\en-us.mibconfig</dictionary>
</en-us>
<pt-br>
<dictionary>Dictionary\pt-br.mibconfig</dictionary>
</pt-br>
</mibConfig>
MibCacheConfig.mibconfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<iis>true</iis> <!-- enable iis cache -->
<memcached>true</memcached> <!-- enable memcached cache -->
<memcachedServers>192.168.1.84:11211</memcachedServers> <!-- only if memcached is enabled -->
<disk>true</disk><!-- enable disk cache -->
<diskPath>C:\diskcache</diskPath> <!-- only if disk is enabled -->
<diskDisableTime>60</diskDisableTime> <!-- only if disk is enabled -->
</default>
</mibConfig>
MibObjectCacheConfig.mibconfig
<?xml version="1.0" encoding="utf-8"?>
<mibConfig>
<default>
<metaInformation>86400</metaInformation>
<authorizationClient>60</authorizationClient>
<media_types>86400</media_types>
<databaseDescriptor>86400</databaseDescriptor>
<MIB3UX_ADVANCED_SEARCH_HISTORY>86400</MIB3UX_ADVANCED_SEARCH_HISTORY>
<MIB3UX_COMPONENTS>86400</MIB3UX_COMPONENTS>
<MIB3UX_MENU>86400</MIB3UX_MENU>
<MIB3UX_NOTIFICATION>86400</MIB3UX_NOTIFICATION>
<MIB3UX_PAGE_COMPONENT_CONFIGURATIONS>86400</MIB3UX_PAGE_COMPONENT_CONFIGURATIONS>
<MIB3UX_PAGE_CONFIGURATIONS>86400</MIB3UX_PAGE_CONFIGURATIONS>
<MIB3UX_PAGES>86400</MIB3UX_PAGES>
<MIB3UX_STORED_PAGE_STATES>0</MIB3UX_STORED_PAGE_STATES>
<MIB3UX_TEMPLATE_COMPONENTS>86400</MIB3UX_TEMPLATE_COMPONENTS>
<MIB3UX_TEMPLATES>86400</MIB3UX_TEMPLATES>
<MIB3UX_TSV_REQUESTS>86400</MIB3UX_TSV_REQUESTS>
</default>
<find>
<authorizationClient>60</authorizationClient>
<databaseDescriptor>86400</databaseDescriptor>
<MIB3UX_ADVANCED_SEARCH_HISTORY>86400</MIB3UX_ADVANCED_SEARCH_HISTORY>
<MIB3UX_COMPONENTS>86400</MIB3UX_COMPONENTS>
<MIB3UX_MENU>86400</MIB3UX_MENU>
<MIB3UX_NOTIFICATION>86400</MIB3UX_NOTIFICATION>
<MIB3UX_PAGE_COMPONENT_CONFIGURATIONS>86400</MIB3UX_PAGE_COMPONENT_CONFIGURATIONS>
<MIB3UX_PAGE_CONFIGURATIONS>86400</MIB3UX_PAGE_CONFIGURATIONS>
<MIB3UX_PAGES>86400</MIB3UX_PAGES>
<MIB3UX_STORED_PAGE_STATES>0</MIB3UX_STORED_PAGE_STATES>
<MIB3UX_TEMPLATE_COMPONENTS>86400</MIB3UX_TEMPLATE_COMPONENTS>
<MIB3UX_TEMPLATES>86400</MIB3UX_TEMPLATES>
<MIB3UX_TSV_REQUESTS>86400</MIB3UX_TSV_REQUESTS>
</find>
<findAll>
<authorizationClient>60</authorizationClient>
<databaseDescriptor>86400</databaseDescriptor>
<MIB3UX_ADVANCED_SEARCH_HISTORY>86400</MIB3UX_ADVANCED_SEARCH_HISTORY>
<MIB3UX_COMPONENTS>86400</MIB3UX_COMPONENTS>
<MIB3UX_MENU>86400</MIB3UX_MENU>
<MIB3UX_NOTIFICATION>86400</MIB3UX_NOTIFICATION>
<MIB3UX_PAGE_COMPONENT_CONFIGURATIONS>86400</MIB3UX_PAGE_COMPONENT_CONFIGURATIONS>
<MIB3UX_PAGE_CONFIGURATIONS>86400</MIB3UX_PAGE_CONFIGURATIONS>
<MIB3UX_PAGES>86400</MIB3UX_PAGES>
<MIB3UX_STORED_PAGE_STATES>0</MIB3UX_STORED_PAGE_STATES>
<MIB3UX_TEMPLATE_COMPONENTS>86400</MIB3UX_TEMPLATE_COMPONENTS>
<MIB3UX_TEMPLATES>86400</MIB3UX_TEMPLATES>
<MIB3UX_TSV_REQUESTS>86400</MIB3UX_TSV_REQUESTS>
</findAll>
<preloadList>
<all>everything</all>
</preloadList>
</mibConfig>
MibLogConfig.mibconfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<mibTrace>true</mibTrace>
<fileLogTag>MibLog</fileLogTag>
<fileLogPath>logFilePath</fileLogPath>
<eventViewerLog>Application</eventViewerLog>
<eventViewerSource>applicationName</eventViewerSource>
<databaseAlias>default</databaseAlias>
<databaseTable>MibLogs</databaseTable>
<databaseField>Message</databaseField>
</default>
<verbose>
<mibTrace>true</mibTrace>
<trace>true</trace>
<file>true</file>
<database>false</database>
<eventViewer>false</eventViewer>
<custom>false</custom>
</verbose>
<log>
<mibTrace>true</mibTrace>
<trace>true</trace>
<file>true</file>
<database>false</database>
<eventViewer>false</eventViewer>
<custom>false</custom>
</log>
<errorLog>
<mibTrace>true</mibTrace>
<trace>true</trace>
<file>true</file>
<database>false</database>
<eventViewer>false</eventViewer>
<custom>false</custom>
</errorLog>
<exception>
<mibTrace>true</mibTrace>
<trace>true</trace>
<file>true</file>
<database>false</database>
<eventViewer>false</eventViewer>
<custom>false</custom>
</exception>
</mibConfig>
MibCmsFrontEndServerBaseConfig
<?xml version="1.0" encoding="utf-8" ?>
<mibConfig>
<default>
<rootUrl></rootUrl>
<useMocks></useMocks>
<debugModeEnabled></debugModeEnabled>
<renderOnlyMibComponents></renderOnlyMibComponents>
<defaultLanguage></defaultLanguage>
<defaultSkin></defaultSkin>
<startPage></startPage>
<DmmAssetImporterUrl></DmmAssetImporterUrl>
<DmmAssetImporterUsername></DmmAssetImporterUsername>
<DmmAssetImporterPassword></DmmAssetImporterPassword>
<DmmWsUrl></DmmWsUrl>
<DmmWsUsername></DmmWsUsername>
<DmmWsPassword></DmmWsPassword>
<AdvancedSearchHistoryMaxSize></AdvancedSearchHistoryMaxSize>
<UseOpenIdConnect></UseOpenIdConnect>
<RequireHttpsOpenIdConnect></RequireHttpsOpenIdConnect>
<DeleteBatchSize></DeleteBatchSize>
<UserConcurrencyServiceUrl></UserConcurrencyServiceUrl>
<UserConcurrencyPollingTime></UserConcurrencyPollingTime>
<UserConcurrencyCachingDuration></UserConcurrencyCachingDuration>
<ShowFullDebugPage></ShowFullDebugPage>
<CorsHeaders></CorsHeaders>
<CorsMethods></CorsMethods>
<CorsOrigins></CorsOrigins>
<MaxRequestBodySize></MaxRequestBodySize>
<UseEditHistoryMicroService></UseEditHistoryMicroService>
<EnableAssemblyLoadingModeViaCustomFolder></EnableAssemblyLoadingModeViaCustomFolder>
<EnableAssetLoadingViaCustomFolder></EnableAssetLoadingViaCustomFolder>
<CustomAssetContentPath></CustomAssetContentPath>
<CustomAssetRequestPath></CustomAssetRequestPath>
<ForceCacheControlOnStaticFiles></ForceCacheControlOnStaticFiles>
<WhichFilesWillBeIgnoredByCacheControl></WhichFilesWillBeIgnoredByCacheControl>
<CacheControlMaxAge></CacheControlMaxAge>
<LoadAllFieldsInMediaTypeIncludeCalls></LoadAllFieldsInMediaTypeIncludeCalls>
<UseFileManagementServiceForTsvDownload></UseFileManagementServiceForTsvDownload>
</default>
</mibConfig>
Configuration UseFileManagementServiceForTsvDownload available only from version MIB 6.0
MibFileManagementMicroServiceClientConfig
only from version MIB 6.0
For more details check click here