Silver
Hosting Silver

Under Construction

This article describes the steps required to host a copy of the Silver web application in your own Azure App Service. It is assumed that you own an Azure subcription and you have permission to create App Services, Storage Accounts and Containers within the subscription.


Licensing Database

The Silver application depends on a database to hold licensing information which includes customers, jobs, users and permissions.

Red Centre Software currently supports using an Azure SQL Server database as the backing store for custom hosted licensing information. Other types of database backing storage may supported in the future, but only SQL Server is available at the time of article publishing.

Provision a low-performance Azure SQL server database to hold licensing information. Run the T-SQL script provided in the following GitHub link to create the database schema (table structure and indexes). The script will also insert some sample rows for customers, jobs, users and permissions.

ExampleDatabase-Create.sql


DNA Licensing Maintance Tool

Red Centre Software provides a Windows desktop program called DNA which can fully manage a licensing database. The program is a general purpose tool that can manage any licensing database that is compliant with the Red Centre standards. The be compliant, a database must be accompanied by a .NET library which acts as a provider for the database, that is, it has a public API which exposed database functionality in a compliant way.

Red Centre software provides an example fully-compliant database provider in the GitHub repository Carbon.Examples.Licensing.Provider. The repository displays a Wiki article with a technical overview for software developers of how licensing providers are created and used. The example provider uses the Azure SQL Database provisioned in the previous step as the backing storage for licensing information.

The DNA tool is bundled with the example provider, so it can be launched and used to manage the SQL database.

DNA-Manager.msi Windows MSI installer for the DNA tool.

Carbon Web Service

Silver is a client-side application that is loaded into the web browser and it runs hosted within the browser. These types of applications are also commonly called thin client applications. Silver makes calls to a web service to request Carbon functionality such as running reports and dashboards.

Red Centre Software provides a free example web service that Silver can call to use the cross-tabulation features of the Carbon libraries. The example web service is publicly available in the GitHub repository Carbon.Examples.WebService.

The web service must currently be deployed into a subscription by Red Centre Software. This is a temporary inconvenience only, as it is planned to distribute the web service runtime files into a public download location so anyone can retrieve the files and deploy them using FTP.

Configuration ▶ Path Mappings

Virtual path Physical path Type
/carbon site\carbon Application
/carbontest site\carbontest Application
/silver site\silver Application
/silvertest site\silvertest Application

Use Visual Studio to deploy the web service and Silver applications to the path mappings. TODO: Learn how to use a technique such as FTP deploy to place the binaries in a well-known download location so that customers can perform their own deploys without the need to use Visual Studio.

Configuration ▶ Application Settings

Key Value
CarbonApi__AdoConnect Server=tcp:{SERVERNAME}.database.windows.net,1433;Initial Catalog={DBNAME};Persist Security Info=False;User ID=greg;Password={PASSWORD};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
CarbonApi__ApplicationStorageConnect DefaultEndpointsProtocol=https;AccountName=carbonapi;AccountKey=XXXXXXXX;EndpointSuffix=core.windows.net
CarbonApi__ArtefactsContainerName artefacts
CarbonApi__DashboardsVDirName Dashboards
CarbonApi__LicensingProviderName ExampleLicensingProvider
CarbonApi__LicensingTimeout 20
CarbonApi__LogPartitionKey rcsapps
CarbonApi__LogTableName ServiceLog2
CarbonApi__ProductKey Anyone hosting the Carbon web service in their own subscription and using the example licensing provider will require a product key which must be supplied by Red Centre Software. The key is used by Carbon to verify that registered customers are using the libraries cross-tabulation features. To obtain a product key, send a request email to help@redcentresoftware.com .
CarbonApi__SessionCacheSlideSeconds 60
CarbonApi__SessionCleanupDays 2


Storage Accounts

Create storage account carbonapi.

To be continued...


Custom Themes

Silver supports applying a custom theme to globally alter images and background colours. Each theme consists of 3 blobs which are placed in the following URIs, where storename is the name of an Azure Storage account, and theme is the theme name:

The Storage Account container must be named silver and it must have Public Access Level set to Public read access for blobs only. That container property can be set in Azure Storage Explorer or the Azure web management portal.

When Silver is launched, it can be configured with the address of where to find the theme files by using the s=storename and t=theme query parameters. For example:

      https://www.contoso.com/silver?s=contoso&t=sales

In that example, silver is being hosted at the address https://www.contoso.com/silver and the theme files will be retrieved from:

If no theme query parameters are specified then the default values are s=systemrcs and t=default.

theme.css

This stye sheet file currently only supports two values, shown here with their default values:

body { background-color: aliceblue; }
.HeadDiv { background-color: #333333; }

The values are respectively the background colour for all pages and the background colour of the header panel. For acceptable appearance, the page background colour should be "light" and the header "dark" so that contrast allows text to be readable.

The page styling is in preview and limited at the moment, but more styling control will be added in future releases.

theme-logo.png

This image file will be displayed at the top left of the page header panel. The image should look acceptable when scaled to a maximum height of 3em. The image is best designed to be rectangular or slightly wider than it is high to fit in the available space.

theme-signin-logo.css

This image is displayed in the login page above the user and password credentials. The image should look acceptable when scaled to a size that is no larger than 20em wide and 10em high. In other words, the image is best designed to be wide and short so that it fits into the available space.

To be continued...