Steeltoe Turns 2.0, Adds Support for ASP.NET Core 2.0, CredHub, and a SQL Server Connector

February 16, 2018 Zach Brown

We started the Steeltoe project 2 years ago to help .NET developers build apps for Cloud Foundry using established microservices patterns. It’s been quite the ride since then. We recently announced that Steeltoe was accepted into the .NET Foundation. We’ve seen adoption grow to include many large enterprises. Now, more than 185,000 downloads later, we’re pleased to release Steeltoe 2.0.

The latest release of Steeltoe represents a major milestone in the project, reflecting feedback from the user community (and a few pull requests). Feedback like this:

When are you going to support ASP.NET Core 2.0?!!

Done. Steeltoe 2.0 is compatible with ASP.NET Core 2.0, and targets .NET Standard 2.0.

Another big request:

I want to use Steeltoe to build different kinds of applications. But dependency packaging is messy. Fix it!

Fair point. So, we’ve reorganized packages to better isolate dependencies. This will make it easier to build more types of apps with Steeltoe (like console apps, for example).

We also introduced a new naming scheme, to help you more easily identify which packages to use for a given application type.

Steeltoe 2.0? Why the New Version Number?

ASP.NET Core 2.0 introduced some breaking changes and to support it, we also had to break Steeltoe’s API compatibility with prior versions.

The upside: marking this release as 2.0 keeps Steeltoe’s versioning in line with ASP.NET Core 2.0 and .NET Standard 2.0. Now, when you choose your Steeltoe packages, it’s easy to pick the version compatible with your .NET runtime. Let’s dig in a bit deeper here.

We reorganized and renamed Steeltoe’s NuGet packages to support more application types. The new structure is much cleaner. (This should help position the project to grow in the future.) The new names help differentiate between those with support for the .NET Framework and those that leverage ASP.NET Core specific features. Here are the basics:

Base

Starting with 2.0, most Steeltoe libraries include a package containing the base functionality. These include the word “Base” at the end of the package name. If you’re building a console app, this is likely the only package you would need to include.

.NET Core

Then there are additional packages with names ending in “Core.” These provide extra methods for working with ASP.NET Core features (like middleware or the new dependency injection framework). “Core” packages have dependencies on the corresponding ASP.NET Core libraries, as well as the Base package.

.NET Framework and Autofac

Likewise, packages with names ending in “Autofac” make use of the Autofac DI mechanism in .NET Framework 4.x.

Upgrading an application built with an older version of Steeltoe? You can figure out which packages to use by reading the release notes, and reviewing the package mapping in this GitHub issue. And don’t forget to check out the new sample applications such as this console app with Eureka, or Hystrix with Autofac.

That’s a run-down of all the changes in the package structure. But we bundled up much more in Steeltoe 2.0. Read on for details!

What’s New in Steeltoe 2.0

Ok, time for a look at the other release highlights.

MSSQL Server Connector

In response to your requests, Steeltoe 2.0 debuts a data connector for Microsoft SQL Server. (This addition rounds out the RDBMS lineup along with MySQL and Postgres). The connector automatically wires up a SQL Server Database instance from your app running on Cloud Foundry. The connector supports service instances created by this open source MSSQL service broker as well as “User Provided Service” instances that point to an existing database.

New Management Endpoints: dump and heapdump

Steeltoe’s management library provides several endpoints you can add to your app. Use them to expose status, such as health information, recent HTTP requests and responses, as well as runtime-adjustable logging levels. This information comes in quite handy when troubleshooting an application that’s not behaving as desired.

Steeltoe 2.0 introduces two new endpoints to provide even more visibility into your running application.

/dump - generates a snapshot of information for each of the application’s threads including thread state, stack trace, and monitor locks either held by the thread or that the thread is waiting for.

/heapdump - generates a minidump from your application which is downloaded to your computer. You can then import this file into Visual Studio for analysis.

If you’re running Pivotal Cloud Foundry with Apps Manager, the new endpoints are accessible from the Application overview screen.

Choose the specific application instance you’d like to inspect under Instances. Then click on the dots button for the corresponding instance. From the popup menu, choose Heap Dump or View Threads.

From the Threads screen, you can download a dump of all threads, or an individual one.

One quick note: these new endpoints are available on applications running on Windows Server only.

CredHub

CredHub is an open source tool to manage credentials such as passwords, certificates, and ssh keys. It’s built to integrate smoothly with Cloud Foundry and Cloud Foundry Services via a CLI and API.

Steeltoe includes a full client implementation of the CredHub API. For developers building Service Brokers (or other Cloud Foundry platform extensions) using .NET or .NET Core, you can use the interpolate method to read from Cloud Foundry’s internal CredHub instance. This method translates CredHub references in a VCAP_SERVICES object into credentials that can be used by the application.

JWT for WCF and OWIN

Lastly, in Steeltoe 2.0 we’ve shared a couple security providers to make it easier for .NET Framework applications using WCF and OWIN to leverage JWT and OAuth2. These new providers are primarily useful when migrating existing or legacy applications to Cloud Foundry.

Onward and Upward

Visit Steeltoe.io and check out the docs. Review the source repo via Github. Get familiar with the new project structure. And as you use the project, we want to hear from you! We welcome your pull requests, GitHub issues, and general comments.

The Steeltoe team’s backlog is public and viewable here. Is there a certain feature you’re looking for? Want to weigh in on prioritization of the roadmap? Let us know at http://slack.steeltoe.io or tweet to us at @SteeltoeOSS.

About the Author

Zach Brown

Zach Brown does product strategy and marketing at Pivotal. He’s responsible for Steeltoe and the Pivotal Cloud Foundry .NET developer experience.

Follow on Twitter More Content by Zach Brown
Previous
30 Years of Tech Transitions
30 Years of Tech Transitions

Watch Pivotal CEO Rob Mee and Michael Dell, CEO of Dell Technologies talk to Michal Lev-Ram, Senior Writer ...

Next
 Introducing MySQL for PCF v2.2 - Leader-Follower Clusters Offer Enhanced Availability
Introducing MySQL for PCF v2.2 - Leader-Follower Clusters Offer Enhanced Availability

MySQL v2.2 leader-follower clusters replicate data for enhanced recoverability and offer easier management ...

Enter curious. Exit smarter.

Learn More