Skip to content

Latest commit

 

History

History

CloudFoundry

Cloud Foundry - ASP.NET Core Sample Application

This ASP.NET Core sample app illustrates how to use the Steeltoe Cloud Foundry configuration provider to parse the VCAP_* environment variables and add them as a configuration source.

Pre-requisites

  1. Installed Pivotal CloudFoundry
  2. .NET Core SDK

Publish App & Push

  1. cf target -o myorg -s development
  2. cd src/CloudFoundry
  3. dotnet restore
  4. Publish app to a directory selecting the framework and runtime you want to run on:
    • dotnet publish -f netcoreapp3.1 -r linux-x64
  5. Push the app using the appropriate manifest:
    • cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
    • cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish

What to expect

The cf push will create an app in the space by the name cloud. You can hit the app @ https://cloud.x.y.z/.

Use the menus at the top of the app to see various output:

  • CloudFoundry Settings - should show VCAP_APPLICATION and VCAP_SERVICES configuration data.

See the App Configuration area of the Steeltoe site for a more in-depth walkthrough of the samples and more detailed information