Package autoconfiguration

This page refers to the latest development code on GitHub. https://github.com/kpocza/thriot/

 

The main goal of package autoconfiguration is to prepare the configuration files of different APIs, services and storage setup applications based on a previously created configuration file.

These steps are generally executed after build on the build result. By following this methodology you can avoid the boring manual configuration file editing and instead of that you should fill in only a simple template. There are many predefined templates bundled to Thriot so you need to just setup your own connection strings and urls.

Applying configurations

As mentioned above there are several predefined templates. After customization they can be used for your environment. One of the example templates are created for Azure in production.

The buildconfigure.ps1 script should be executed in the src/Service/Build folder to build and configure the Azure specific environment.

.\buildconfigure.ps1 .\configs\prod\config.azure.txt

After successfully build and configuring you should just follow the installation steps for the specific environment described on the portal.thriot.io site.

It’s important to establish that next to the storage creator application that is placed into the install/storage/management folder of the installation package a settings.json file is created by buildconfigure.ps1. By specifying this file as parameter to the Thriot.CreateAzureStorage.exe or Thriot.CreateSqlStorage.exe the settings in this file will be added to the newly created Settings table instead of the default values hardcoded into the storage creator applications.

Template with Explanation

A full template with explanations can be found here.

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/config.template.txt

Local/Test Environment

For local and test environments one of the following configuration files can be used (or slightly customized).

Azure

Local IIS Express with Azure development storage and MS SQL Express based messaging:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.azureexpress.txt

Local IIS with Azure development storage and MS SQL Express based messaging:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.azure.txt

Local IIS with Azure development storage, Azure development queue and MS SQL Express based messaging:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.azurewqueue.txt

Microsoft SQL (Express) 2012+

Local IIS with Microsoft SQL Express based storages:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.sql.txt

Local IIS with Microsoft SQL Express based storages and queue:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.sqlwqueue.txt

PostgreSQL 9.4+

Local IIS with PostgreSQL 9.4+  based storages:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.pgsql.txt

Local IIS with PostgreSQL 9.4+  based storages and queue:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.pgsqlwqueue.txt

Local IIS with PostgreSQL 9.4+ based management + messaging with Cassandra 2.1 based telemetry:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/pgsqlcassandratelemetry.config

Linux with PostgreSQL 9.4+

Linux with Kestrel webserver with PostgreSQL 9.4+ based storages:

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/local/config.pgsqllinux.txt

Production Environment

For the production environment the following configuration files can be used after customizations.

Azure

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/prod/config.azure.txt

This configuration is for the Thriot.io site described on portal.thriot.io.

Microsoft SQL (Express) 2012+

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/prod/config.sql.txt

This configuration is for the sql-backed hosting environment described on portal.thriot.io.

PostgreSQL 9.4+

https://github.com/kpocza/thriot/blob/master/Service/Build/configs/prod/config.pgsql.txt

This configuration is for the postgresql-backed hosting environment described on portal.thriot.io.

Advertisements