Skip to content
Michael J. Ryan edited this page May 20, 2015 · 3 revisions

The Azure Config Util uses a configuration table.

Access

For editing data, there is currently no utility for easy access, it's best for now to use Azure Storage Explorer (screenshot below, with sample configuration).

Data Image

Fields

  • Namespace - The namespace for your application/suite (default: default)
  • Environment - The runtime environment, or hostname (default: local)
    • Hostname - you can specify a setting specifically for a given hostname, these settings, when matching will take priority over the environment
    • local - for local development environment - will fallback to development
    • development - for development configuration options (alias: dev)
    • test - for test environment
    • qa - for quality assurance environment
    • stage - for staging environment
    • production - for production environment (alias: prod)
  • Section - the section the configuration belongs to, this should be a string, and will be lower-cased for the returned configuration object.
  • There are some configuration sections that will be used directly with integration methods.
    • storage - configuration settings representing a storage account, default will fallback to the storage account configured with the util.
      • account - name of the storage account (default to match Key
      • key - access key for the storage account
    • blob,queue,table
      • name - name of the item to use
      • storage - name of the storage account, or connection string (will lookup named value through storage section, default: default)
      • storageKey - key for the storage account
    • sql - connection options for mssql utility will return an enhanced mssql-ng connection object.
  • Key - string used to identify a key within a section.
  • JsonValue - stringified JSON representation of state.

PartitionKey and RowKey

The PartitionKey and RowKey should use the following convention to avoid conflict. Lowercased values for the Namespace, Environment, Section, and Key.

function getPartitionAndRowKey(ns,env,section,key) {
  ns = (ns || 'default').trim().toLowerCase();
  env = (env || 'local').trim().toLowerCase();
  section = (section || 'default').trim().toLowerCase();
  key = (key || 'default').trim().toLowerCase();
  return {
    'PartitionKey': `${ns}_${env}`,
    'RowKey': `${ns}_${env}_${section}_${key}`
  }
}

Clone this wiki locally