.NET Configuration providers for Spring Cloud Config Server & CloudFoundry
Перейти к файлу
Jason Konicki 608dd85644 Add moved notice to the readme 2019-05-15 09:52:32 -04:00
config Add Sourcelink, x-plat compilation [#158000056, #163396106] 2019-03-14 17:50:07 -05:00
src URL Cleanup (#56) 2019-03-27 14:48:25 -05:00
test update stylecop to require https in apache notice, fix test 2019-03-27 14:56:31 -05:00
.appveyor.yml Add RandomValue config provider [#42] 2019-02-12 08:09:07 -07:00
.gitattributes Initial CI checkin 2016-04-17 08:12:33 -06:00
.gitignore include the stylecop.json file 2017-11-27 15:37:57 -06:00
.travis.yml build 2.2.0, don't build tags, update sdk used in Travis 2018-10-12 11:49:51 -05:00
CONTRIBUTING.md Create CONTRIBUTING.md 2017-09-15 15:01:43 -04:00
Configuration.sln Add RandomValue config provider [#42] 2019-02-12 08:09:07 -07:00
License.txt URL Cleanup (#50) 2019-03-26 17:27:55 -05:00
README.md Add moved notice to the readme 2019-05-15 09:52:32 -04:00
nuget.config Update build scripts 2017-06-21 07:57:00 -06:00
open_source_licenses.txt URL Cleanup (#56) 2019-03-27 14:48:25 -05:00
stylecop.json update stylecop to require https in apache notice, fix test 2019-03-27 14:56:31 -05:00
targetframework.props Add Sourcelink, x-plat compilation [#158000056, #163396106] 2019-03-14 17:50:07 -05:00
versions.props Initial refactor checkin 2017-10-09 14:10:05 -06:00

README.md

.NET Configuration Providers

NOTICE: This repository has been relocated as a sub-directory under the Steeltoe repository. All issues and future development will be done under that repository.

With the introduction of ASP.NET Core, Microsoft is providing a new application configuration model for accessing configuration settings for an application.

This new model supports access to key/value configuration data from a variety of different configuration providers or sources. Out of the box, ASP.NET Core comes with support for JSON, XML and INI files, as well as environment variables and command line parameters. Additionally, Microsoft has also enabled developers to write their own custom configuration providers should those provided by Microsoft not meet your needs.

This repository contains two custom configuration providers. The Steeltoe.Extensions.Configuration.ConfigServer enables using the Spring Cloud Config Server as a provider of configuration data and the Steeltoe.Extensions.Configuration.CloudFoundry provider enables CloudFoundry environment variables to be parsed and accessed as configuration data.

Windows Master (Stable): AppVeyor Master

Windows Dev (Less Stable): AppVeyor Dev

Linux/OS X Master (Stable): Travis Master

Linux/OS X Dev (Less Stable): Travis Dev

.NET Runtime & Framework Support

Like the ASP.NET Core configuration providers, these providers are intended to support both .NET Full framework and .NET Core (CoreCLR/CoreFX) run-times. The providers are built and unit tested on Windows, Linux and OSX.

While the primary usage of the providers is intended to be with ASP.NET Core applications, they should also work fine with UWP, Console and ASP.NET 4.x apps. An ASP.NET 4.x sample app is available illustrating how this can be done.

Currently all of the code and samples have been tested on .NET Core 2.0, .NET 4.6.1, and on ASP.NET Core 2.0.0.

Usage

See the Steeltoe documentation for information on how to use these components in your applications.

Nuget Feeds

All new configuration provider development is done on the dev branch. More stable versions of the providers can be found on the master branch. The latest prebuilt packages from each branch can be found on one of two MyGet feeds. Released version can be found on nuget.org.

Building Pre-requisites

To build and run the unit tests:

  1. .NET Core SDK 2.0.3 or greater
  2. .NET Core Runtime 2.0.3

Building Packages & Running Tests - Windows

To build the packages on windows:

  1. git clone ...
  2. cd clone directory
  3. cd src/<project> (e.g. cd src/Steeltoe.Extensions.Configuration.CloudFoundryBase)
  4. dotnet restore
  5. dotnet pack --configuration Release or Debug

The resulting artifacts can be found in the bin folder under the corresponding project. (e.g. src/Steeltoe.Extensions.Configuration.CloudFoundryBase/bin

To run the unit tests:

  1. git clone ...
  2. cd clone directory
  3. cd test/<test project> (e.g. cd test/Steeltoe.Extensions.Configuration.CloudFoundryBase.Test)
  4. dotnet restore
  5. dotnet xunit -verbose

Building Packages & Running Tests - Linux/OSX

To build the packages on Linux/OSX:

  1. git clone ...
  2. cd clone directory
  3. cd src/<project> (e.g.. cd src/Steeltoe.Extensions.Configuration.CloudFoundryBase)
  4. dotnet restore
  5. dotnet pack --configuration Release or Debug

The resulting artifacts can be found in the bin folder under the corresponding project. (e.g. src/Steeltoe.Extensions.Configuration.CloudFoundryBase/bin

To run the unit tests:

  1. git clone ...
  2. cd clone directory
  3. cd test/<test project> (e.g. cd test/Steeltoe.Extensions.Configuration.CloudFoundryBase.Test)
  4. dotnet restore
  5. dotnet xunit -verbose -framework netcoreapp2.0

Sample Applications

See the Samples repository for examples of how to use these packages.

Known limitations

Unstructured data files

Unlike the Java version of the configuration server client, the Steeltoe client currently only supports property and yaml files; not plain text.

Client decryption

Steeltoe client only supports clear text communication with the configuration server. Client decryption is on our road map, but not currently supported. For now, you cannot send encrypted data to the client.

Server initiated reload

Currently reloads must be initiated by the client, Steeltoe has not implemented handlers to listen for server change events.