Add .NET 5 targets, more common tasks, less specific linux publishing (#178)

* Add .NET 5 targets, more common tasks, less specific linux publishing
This commit is contained in:
Tim Hess 2020-12-10 09:20:15 -05:00 коммит произвёл GitHub
Родитель 3dd29b6d4b
Коммит 9ebbaadac0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
79 изменённых файлов: 485 добавлений и 233 удалений

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -34,7 +34,7 @@ At this point the Fortune Teller Service is up and waiting for the Fortune Telle
1. Installed Pivotal CloudFoundry
1. Installed Spring Cloud Services
1. Install .Net Core SDK 2.1.300+
1. Install .Net Core SDK
### Setup Service Registry on CloudFoundry
@ -45,9 +45,9 @@ Using the service instance name of `myDiscoveryService`, complete the [common ta
1. Login and target your desired space/org: `cf target -o myorg -s myspace`
1. `cd samples/CircuitBreaker/src/Fortune-Teller/Fortune-Teller-Service`
1. Publish the app, selecting the framework and runtime you want to run on:
- `dotnet publish -f netcoreapp3.1 -r ubuntu.18.04-x64`
- `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest:
- `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.18.04-x64/publish`
- `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 - CloudFoundry

Просмотреть файл

@ -20,10 +20,7 @@ namespace FortuneTellerService
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddEntityFrameworkInMemoryDatabase().AddDbContext<FortuneContext>(
options => options.UseInMemoryDatabase("Fortunes"), ServiceLifetime.Singleton);
services.AddDbContext<FortuneContext>(options => options.UseInMemoryDatabase("Fortunes"), ServiceLifetime.Singleton);
services.AddSingleton<IFortuneRepository, FortuneRepository>();
// Add framework services.

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -14,7 +14,7 @@ This sample assumes that there is a running Spring Cloud Eureka Server on your m
1. Refer to common steps for [running a local Eureka server](/CommonTasks.md#Spring-Cloud-Eureka-Server)
1. Refer to common steps for [running a local Hystrix dashboard](/CommonTasks.md#Hystrix-Dashboard)
1. Install .Net Core SDK 2.1.300+
1. Install .NET Core SDK
### Building & Running - Local
@ -54,7 +54,7 @@ Once you have the two applications communicating, you use of the Hystrix dashboa
1. Installed Pivotal CloudFoundry
1. Installed Spring Cloud Services
1. Install .NET Core SDK 2.1+
1. Install .NET Core SDK
### Setup Service Registry on CloudFoundry
@ -70,8 +70,8 @@ Using the service instance name of `myHystrixService`, complete the [common task
1. cd samples/CircuitBreaker/src/Fortune-Teller/Fortune-Teller-UI
1. Make sure environment variable `BUILD` is not set to `LOCAL` (i.e. SET BUILD=, unset BUILD)
1. `dotnet restore`
1. Publish app to a directory selecting the framework and runtime you want to run on. (e.g. `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`)
1. Push the app using the appropriate manifest. (e.g. `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish` or `cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish`)
1. Publish app to a directory selecting the framework and runtime you want to run on. (e.g. `dotnet publish -f netcoreapp3.1 -r linux-x64`)
1. Push the app using the appropriate manifest. (e.g. `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish` or `cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish`)
### What to expect - CloudFoundry

Просмотреть файл

@ -64,6 +64,74 @@ Use the [cf cli](https://github.com/cloudfoundry/cli) to create a Service Regist
1. cf create-service p-service-registry standard myDiscoveryServiceInstanceName
1. Wait for service to be ready. (use `cf services` to check the status)
## RabbitMQ
### Run RabbitMQ Server with Docker
This command starts a RabbitMQ server with the management plugin enabled with no credentials and default ports:
```script
docker run --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
```
## Consul
### Run Consul Server with Docker
```script
docker run --name=steeltoe-consul -p 8500:8500 consul
```
## Spring Boot Admin
### Run Spring Boot Admin Server with Docker
There are multiple Spring Boot Admin images to choose from, this is only one option:
```script
docker run --name --rm -it --name steeltoe-springbootadmin -p 8080:8080 steeltoeoss/spring-boot-admin
```
## Redis
### Run Redis server with Docker
```script
docker run --name redis -p 6379:6379 redis
```
## MySQL
### Run MySQL Server with Docker
```script
docker run --name steeltoe-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=steeltoe -e MYSQL_DATABASE=steeltoe -e MYSQL_USER=steeltoe -e MYSQL_PASSWORD=steeltoe mysql
```
## SQL Server
### Run SQL Server with Docker
```script
docker run --name steeltoe-sqlserver-e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=St33ltoeR0cks!' -p 1433:1433 mcr.microsoft.com/mssql/server
```
## PostgreSQL
### Run PostgreSQL Server with Docker
```script
docker run --name steeltoe-postgres -d -p 5432:5432 -e POSTGRES_DB=steeltoe -e POSTGRES_USER=steeltoe -e POSTGRES_PASSWORD=steeltoe postgres:alpine
```
## Zipkin
### Run Zipkin Server with Docker
```script
docker run --name zipkin -p 9411:9411 openzipkin/zipkin
```
## Hystrix Dashboard
### Run Hystrix Dashboard with Docker

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -12,11 +12,29 @@ Feature: CloudFoundry Configuration
When you get https://cloud.x.y.z/Home/CloudFoundry
Then you should see "vcap:application:application_name = cloud"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: CloudFoundry Configuration (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: CloudFoundry Configuration (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app cloud is started
When you get https://cloud.x.y.z/Home/CloudFoundry
Then you should see "vcap:application:application_name = cloud"
@netcoreapp3.1
@linux-x64
Scenario: CloudFoundry Configuration (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app cloud is started
When you get https://cloud.x.y.z/Home/CloudFoundry
Then you should see "vcap:application:application_name = cloud"
@net5.0
@linux-x64
Scenario: CloudFoundry Configuration (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app cloud is started
When you get https://cloud.x.y.z/Home/CloudFoundry
Then you should see "vcap:application:application_name = cloud"

Просмотреть файл

@ -7,7 +7,7 @@ This ASP.NET Core sample app illustrates how to use the [Steeltoe Cloud Foundry
## Pre-requisites
1. Installed Pivotal CloudFoundry
1. .NET Core SDK 2.1.300
1. .NET Core SDK
## Publish App & Push
@ -15,9 +15,9 @@ This ASP.NET Core sample app illustrates how to use the [Steeltoe Cloud Foundry
1. `cd src/CloudFoundry`
1. `dotnet restore`
1. Publish app to a directory selecting the framework and runtime you want to run on:
- `dotnet publish -f netcoreapp3.1 -r ubuntu.18.04-x64`
- `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest:
- `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.18.04-x64/publish`
- `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

Просмотреть файл

@ -12,7 +12,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Placeholder", "Placeholder\
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RandomValue", "RandomValue\RandomValue.csproj", "{6BC02BAE-39B1-4C1F-A6A7-1EB39B6A7003}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kubernetes", "Kubernetes\Kubernetes.csproj", "{C763D75D-19FA-494E-895B-65527592A25D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kubernetes", "Kubernetes\Kubernetes.csproj", "{C763D75D-19FA-494E-895B-65527592A25D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D291523F-9962-4000-9C11-9FC9BD202AC5}"
ProjectSection(SolutionItems) = preProject
..\..\config\versions.props = ..\..\config\versions.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

Просмотреть файл

@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;</TargetFrameworks>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<StartupObject>Kubernetes.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="3.0.0-rc1" />
<PackageReference Include="Steeltoe.Extensions.Configuration.KubernetesCore" Version="3.0.0-rc1" />
<PackageReference Include="Steeltoe.Management.KubernetesCore" Version="3.0.0-rc1" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="3.0.1" />
<PackageReference Include="Steeltoe.Extensions.Configuration.KubernetesCore" Version="3.0.1" />
<PackageReference Include="Steeltoe.Management.KubernetesCore" Version="3.0.1" />
</ItemGroup>
</Project>

Просмотреть файл

@ -2,7 +2,7 @@
<Import Project="..\..\..\config\versions.props" />
<Import Project="..\..\..\config\targetframework.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -15,3 +15,16 @@ Feature: Simple Configuration
When you get http://localhost:5000/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"
And you should see "spring:cloud:config:env = MyNetCoreEnv"
@net5.0
Scenario: Simple Configuration (net5.0)
When you run: git clone https://github.com/spring-cloud/spring-cloud-config
And you run: git -C spring-cloud-config checkout v2.1.4.RELEASE
And you run in the background: mvn -f spring-cloud-config/spring-cloud-config-server/pom.xml spring-boot:run
And you wait until process listening on port 8888
And you set env var ASPNETCORE_ENVIRONMENT to "MyNetCoreEnv"
And you run in the background: dotnet run -f net5.0
And you wait until process listening on port 5000
When you get http://localhost:5000/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"
And you should see "spring:cloud:config:env = MyNetCoreEnv"

Просмотреть файл

@ -8,7 +8,7 @@ ASP.NET Core sample app illustrating how to use [Config Server for Pivotal Cloud
1. Installed Pivotal CloudFoundry
1. Installed Spring Cloud Services
1. .NET Core SDK 2.1.300+
1. .NET Core SDK
## Setup Config Server
@ -20,9 +20,9 @@ Refer to [common tasks](/CommonTasks.md#Spring-Cloud-Config-Server) for detailed
1. `cd src/SimpleCloudFoundry`
1. `dotnet restore`
1. Publish app to a directory selecting the framework and runtime you want to run on:
- `dotnet publish -f netcoreapp3.1 -r ubuntu.18.04-x64`
- `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest:
- `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.18.04-x64/publish`
- `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

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -12,11 +12,29 @@ Feature: Simple CloudFoundry Configuration
When you get https://foo.x.y.z/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: Simple CloudFoundry Configuration (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: Simple CloudFoundry Configuration (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app foo is started
When you get https://foo.x.y.z/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"
@netcoreapp3.1
@linux-x64
Scenario: Simple CloudFoundry Configuration (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app foo is started
When you get https://foo.x.y.z/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"
@net5.0
@linux-x64
Scenario: Simple CloudFoundry Configuration (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app foo is started
When you get https://foo.x.y.z/Home/ConfigServerSettings
Then you should see "spring:cloud:config:name = foo"

Просмотреть файл

@ -22,7 +22,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GemFire", "GemFire\GemFire.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6297031D-2427-4A59-8D6E-73355360E72A}"
ProjectSection(SolutionItems) = preProject
..\..\..\config\versions.props = ..\..\..\config\versions.props
..\..\config\versions.props = ..\..\config\versions.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CosmosDb", "CosmosDb\CosmosDb.csproj", "{29BF56DA-1534-43F3-97FF-563F03C6A72E}"

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="MySql.Data" Version="8.0.11" />
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.CloudFoundry" Version="$(SteeltoeVersion)" />

Просмотреть файл

@ -3,21 +3,31 @@ Feature: MySql Connector
In order to show you how to use Steeltoe for connecting to MySql
You can run some MySql connection samples
@netcoreapp3.1
@net5.0
@win10-x64
Scenario: MySql Connector (netcoreapp3.1/win10-x64)
When you run: dotnet publish -f netcoreapp3.1 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish
Scenario: MySql Connector (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app mysql-connector is started
When you get https://mysql-connector.x.y.z/Home/MySqlData
Then you should see "Key 1 = Row1 Text"
And you should see "Key 2 = Row2 Text"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: MySql Connector (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@linux-x64
Scenario: MySql Connector (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app mysql-connector is started
When you get https://mysql-connector.x.y.z/Home/MySqlData
Then you should see "Key 1 = Row1 Text"
And you should see "Key 2 = Row2 Text"
@net5.0
@linux-x64
Scenario: MySql Connector (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app mysql-connector is started
When you get https://mysql-connector.x.y.z/Home/MySqlData
Then you should see "Key 1 = Row1 Text"

Просмотреть файл

@ -34,9 +34,9 @@ You must first create an instance of the MySql service in a org/space.
1. `cd samples/Connectors/src/MySql`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest will create an app named `mysql-connector` and attempt to bind the app to MySql service `myMySqlService`.

Просмотреть файл

@ -1,13 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="$(AspNetCoreVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.0.0" />
<PackageReference Include="Steeltoe.Connector.EFCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.CloudFoundry" Version="$(SteeltoeVersion)" />

Просмотреть файл

@ -13,11 +13,31 @@ Feature: MySqlEFCore Connector
Then you should see "1: Test Data 1 - EF Core TestContext A"
And you should see "2: Test Data 2 - EF Core TestContext B"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: MySqlEFCore Connector (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: MySqlEFCore Connector (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app mysqlefcore-connector is started
When you get https://mysqlefcore-connector.x.y.z/Home/MySqlData
Then you should see "1: Test Data 1 - EF Core TestContext A"
And you should see "2: Test Data 2 - EF Core TestContext B"
@netcoreapp3.1
@linux-x64
Scenario: MySqlEFCore Connector (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app mysqlefcore-connector is started
When you get https://mysqlefcore-connector.x.y.z/Home/MySqlData
Then you should see "1: Test Data 1 - EF Core TestContext A"
And you should see "2: Test Data 2 - EF Core TestContext B"
@net5.0
@linux-x64
Scenario: MySqlEFCore Connector (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app mysqlefcore-connector is started
When you get https://mysqlefcore-connector.x.y.z/Home/MySqlData
Then you should see "1: Test Data 1 - EF Core TestContext A"

Просмотреть файл

@ -24,9 +24,9 @@ You must first create an instance of the MySql service in a org/space.
1. `cd samples/Connectors/src/MySqlEFCore`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest will create an app named `mysqlefcore-connector` and attempt to bind the app to MySql service `myMySqlService`.

Просмотреть файл

@ -11,28 +11,26 @@
"MySql": {
"Client": {
"SslMode": "none",
"ConnectionString": "Server=localhost;Database=steeltoe;Uid=steeltoe;Pwd=steeltoe;sslmode=none;"
"ConnectionString": "Server=localhost;Database=steeltoe2;Uid=steeltoe;Pwd=steeltoe;sslmode=none;"
// setting the connection string this way works fine with a single database
}
}/*,
"multipleMySqlDatabases": false,
// to add multiple databases of the same type, mimic the structure of how they will be configured on PCF
"vcap": {
"services": {
"local-mysql": [
{
"name": "myMySqlService",
"credentials": {
"uri": "mysql://newuser0:password@localhost:3306/testdata"
}
},
{
"name": "myOtherMySqlService",
"credentials": {
"uri": "mysql://newuser1:password@localhost:3306/moretestdata"
}
// to add multiple databases of the same type, use this structure
"services": {
"local-mysql": [
{
"name": "myMySqlService",
"credentials": {
"uri": "mysql://newuser0:password@localhost:3306/testdata"
}
]
}
}*/
},
{
"name": "myOtherMySqlService",
"credentials": {
"uri": "mysql://newuser1:password@localhost:3306/moretestdata"
}
}
]
}*/
}

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -24,9 +24,9 @@ If you want to use the [Pivotal Single Signon](https://docs.pivotal.io/p-identit
1. `cd samples/Connectors/src/OAuth`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest(s) will create an app named `oauth-connector` and attempt to bind the app to User Provided service `myOAuthService`.

Просмотреть файл

@ -1,19 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.CloudFoundry" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.EFCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.CloudFoundryCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(AspNetCoreVersion)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -13,11 +13,31 @@ Feature: PostgreEFCore Connector
Then you should see "1: Test Data 1 - EF Core TestContext"
And you should see "2: Test Data 2 - EF Core TestContext"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: PostgreEFCore Connector (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: PostgreEFCore Connector (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app postgresefcore-connector is started
When you get https://postgresefcore-connector.x.y.z/Home/PostgresData
Then you should see "1: Test Data 1 - EF Core TestContext"
And you should see "2: Test Data 2 - EF Core TestContext"
@netcoreapp3.1
@linux-x64
Scenario: PostgreEFCore Connector (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app postgresefcore-connector is started
When you get https://postgresefcore-connector.x.y.z/Home/PostgresData
Then you should see "1: Test Data 1 - EF Core TestContext"
And you should see "2: Test Data 2 - EF Core TestContext"
@net5.0
@linux-x64
Scenario: PostgreEFCore Connector (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app postgresefcore-connector is started
When you get https://postgresefcore-connector.x.y.z/Home/PostgresData
Then you should see "1: Test Data 1 - EF Core TestContext"

Просмотреть файл

@ -36,9 +36,9 @@ Create an instance of the PostgreSQL database service in a org/space:
1. `cd samples/Connectors/src/PostgreEFCore`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest(s) will create an app named `postgresefcore-connector` and attempt to bind the app to PostgreSql service `myPostgres`.

Просмотреть файл

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Npgsql" Version="4.0.2" />
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.CloudFoundry" Version="$(SteeltoeVersion)" />

Просмотреть файл

@ -13,11 +13,31 @@ Feature: PostgreSql Connector
Then you should see "Key 1 = Row1 Text"
And you should see "Key 2 = Row2 Text"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: PostgreSql Connector (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: PostgreSql Connector (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app postgres-connector is started
When you get https://postgres-connector.x.y.z/Home/PostgresData
Then you should see "Key 1 = Row1 Text"
And you should see "Key 2 = Row2 Text"
@netcoreapp3.1
@linux-x64
Scenario: PostgreSql Connector (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app postgres-connector is started
When you get https://postgres-connector.x.y.z/Home/PostgresData
Then you should see "Key 1 = Row1 Text"
And you should see "Key 2 = Row2 Text"
@net5.0
@linux-x64
Scenario: PostgreSql Connector (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app postgres-connector is started
When you get https://postgres-connector.x.y.z/Home/PostgresData
Then you should see "Key 1 = Row1 Text"

Просмотреть файл

@ -36,9 +36,9 @@ cf create-service postgresql-10-odb standalone myPostgres -c '{\"db_name\":\"pos
1. `cd samples/Connectors/src/PostgreSql`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest(s) will create an app named `postgres-connector` and attempt to bind the app to PostgreSQL service `myPostgres`.

Просмотреть файл

@ -24,9 +24,9 @@ You must first create an instance of the RabbitMQ service in a org/space.
1. `cd samples/Connectors/src/RabbitMQ`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest will create an app named `rabbitmq-connector` and attempt to bind the app to RabbitMQ service `myRabbitMQService`.

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -13,11 +13,31 @@ Feature: RabbitMQ Connector
And you get https://rabbitmq-connector.x.y.z/RabbitMQ/Receive
Then you should see "Message=HEY THERE"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: Rabbit Connector (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: Rabbit Connector (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app rabbitmq-connector is started
When you post "Message=HEY THERE" to https://rabbitmq-connector.x.y.z/RabbitMQ/Send
And you get https://rabbitmq-connector.x.y.z/RabbitMQ/Receive
Then you should see "Message=HEY THERE"
@netcoreapp3.1
@linux-x64
Scenario: Rabbit Connector (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app rabbitmq-connector is started
When you post "Message=HEY THERE" to https://rabbitmq-connector.x.y.z/RabbitMQ/Send
And you get https://rabbitmq-connector.x.y.z/RabbitMQ/Receive
Then you should see "Message=HEY THERE"
@net5.0
@linux-x64
Scenario: Rabbit Connector (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app rabbitmq-connector is started
When you post "Message=HEY THERE" to https://rabbitmq-connector.x.y.z/RabbitMQ/Send
And you get https://rabbitmq-connector.x.y.z/RabbitMQ/Receive

Просмотреть файл

@ -26,9 +26,9 @@ You must first create an instance of the Redis service in a org/space.
1. `cd samples/Connectors/src/Redis`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest will create an app named `redis-connector` and attempt to bind the app to Redis service `myRedisService`.

Просмотреть файл

@ -1,12 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.CloudFoundry" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="$(SteeltoeVersion)" />

Просмотреть файл

@ -14,12 +14,34 @@ Feature: Redis Connector
Then you should see "Key1=Key1Value"
And you should see "Key2=Key2Value"
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: Redis Connector (netcoreapp3.1/ubuntu.16.04-x64)
@net5.0
@win10-x64
Scenario: Redis Connector (net5.0/win10-x64)
When you run: dotnet restore --configfile ../../../nuget.config
And you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
And you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app redis-connector is started
When you get https://redis-connector.x.y.z/Home/CacheData
Then you should see "Key1=Key1Value"
And you should see "Key2=Key2Value"
@netcoreapp3.1
@linux-x64
Scenario: Redis Connector (netcoreapp3.1/linux-x64)
When you run: dotnet restore --configfile ../../../nuget.config
And you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app redis-connector is started
When you get https://redis-connector.x.y.z/Home/CacheData
Then you should see "Key1=Key1Value"
And you should see "Key2=Key2Value"
@net5.0
@linux-x64
Scenario: Redis Connector (net5.0/linux-x64)
When you run: dotnet restore --configfile ../../../nuget.config
And you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app redis-connector is started
When you get https://redis-connector.x.y.z/Home/CacheData
Then you should see "Key1=Key1Value"

Просмотреть файл

@ -27,9 +27,9 @@ You must first create an instance of the SQL Server service in a org/space using
1. `cd samples/Connectors/src/SqlServerEFCore`
1. `dotnet restore --configfile nuget.config`
1. Publish app to a local directory, specifying the framework and runtime (select ONE of these commands):
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest (select ONE of these commands):
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
> Note: The provided manifest will create an app named `sqlserverefcore-connector` and attempt to bind the app to SQL Server service `mySqlServerService`.

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
@ -14,9 +14,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.3" />
<PackageReference Include="Steeltoe.ConnectorBase" Version="3.0.0-m2" />
<PackageReference Include="Steeltoe.Discovery.EurekaBase" Version="3.0.0-m2" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryBase" Version="3.0.0-m2" />
<PackageReference Include="Steeltoe.Connector.ConnectorBase" Version="3.0.0" />
<PackageReference Include="Steeltoe.Discovery.Eureka" Version="3.0.0" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryBase" Version="3.0.0" />
</ItemGroup>
</Project>

Просмотреть файл

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
@ -14,9 +14,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="3.1.3" />
<PackageReference Include="Steeltoe.ConnectorBase" Version="3.0.0-m2" />
<PackageReference Include="Steeltoe.Discovery.EurekaBase" Version="3.0.0-m2" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryBase" Version="3.0.0-m2" />
<PackageReference Include="Steeltoe.Connector.ConnectorBase" Version="3.0.1" />
<PackageReference Include="Steeltoe.Discovery.Eureka" Version="3.0.1" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryBase" Version="3.0.1" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -4,7 +4,6 @@ using Steeltoe.Common.Hosting;
using Steeltoe.Discovery.Client;
using Steeltoe.Extensions.Configuration.CloudFoundry;
using Steeltoe.Extensions.Configuration.Placeholder;
using Steeltoe.Management.Endpoint;
namespace FortuneTellerService
{
@ -23,7 +22,6 @@ namespace FortuneTellerService
})
.AddCloudFoundryConfiguration()
.AddDiscoveryClient()
.AddHealthActuator()
.AddPlaceholderResolver()
.UseCloudHosting(5000)
.Build();

Просмотреть файл

@ -58,8 +58,8 @@ You must first create an instance of the Service Registry service in a org/space
1. cf target -o myorg -s development
1. cd samples/Discovery/src/Fortune-Teller-Service
1. dotnet restore --configfile nuget.config
1. Publish app to a directory selecting the framework and runtime you want to run on. (e.g. `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`)
1. Push the app using the appropriate manifest. (e.g. `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish` or `cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish`)
1. Publish app to a directory selecting the framework and runtime you want to run on. (e.g. `dotnet publish -f netcoreapp3.1 -r linux-x64`)
1. Push the app using the appropriate manifest. (e.g. `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish` or `cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish`)
> Note: If you are using self-signed certificates it is possible that you might run into SSL certificate validation issues when pushing this app. The simplest way to fix this:

Просмотреть файл

@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Steeltoe.Discovery.Client;
using Steeltoe.Management.Endpoint;
using Steeltoe.Management.Endpoint.Health;
namespace FortuneTellerService
@ -22,8 +22,7 @@ namespace FortuneTellerService
public void ConfigureServices(IServiceCollection services)
{
services.AddHealthActuator(Configuration);
services.AddEntityFrameworkInMemoryDatabase().AddDbContext<FortuneContext>(
options => options.UseInMemoryDatabase("Fortunes"), ServiceLifetime.Singleton);
services.AddDbContext<FortuneContext>(options => options.UseInMemoryDatabase("Fortunes"), ServiceLifetime.Singleton);
services.AddSingleton<IFortuneRepository, FortuneRepository>();
@ -37,9 +36,13 @@ namespace FortuneTellerService
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints => endpoints.MapDefaultControllerRoute());
app.UseEndpoints(endpoints => {
endpoints.MapDefaultControllerRoute();
endpoints.Map<HealthEndpoint>();
});
SampleData.InitializeFortunesAsync(app.ApplicationServices).Wait();
HealthStartupFilter.InitializeAvailability(app.ApplicationServices);
}
}

Просмотреть файл

@ -9,7 +9,7 @@
},
"Eureka": {
"Client": {
"serviceUrl": "http://localhost:8761/eureka/",
"ServiceUrl": "http://localhost:8761/eureka/",
"ShouldFetchRegistry": false,
"ValidateCertificates": false
},

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -21,7 +21,6 @@ namespace Fortune_Teller_UI
host.UseStartup<Startup>();
})
.AddCloudFoundryConfiguration()
.AddHealthActuator()
.AddDiscoveryClient()
.UseCloudHosting(5555)
.Build();

Просмотреть файл

@ -40,9 +40,9 @@ Using the service instance name of `myDiscoveryService`, complete the [common ta
1. Login and target your desired space/org: `cf target -o myorg -s myspace`
1. `cd samples/Discovery/src/Fortune-Teller/Fortune-Teller-Service`
1. Publish the app, selecting the framework and runtime you want to run on:
- `dotnet publish -f netcoreapp3.1 -r ubuntu.18.04-x64`
- `dotnet publish -f netcoreapp3.1 -r linux-x64`
1. Push the app using the appropriate manifest:
- `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.18.04-x64/publish`
- `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 - CloudFoundry

Просмотреть файл

@ -7,6 +7,7 @@ using Microsoft.Extensions.Hosting;
using Steeltoe.Common.Http.Discovery;
using System;
using Steeltoe.Management.Endpoint.Health;
using Steeltoe.Management.Endpoint;
namespace Fortune_Teller_UI
{
@ -48,7 +49,12 @@ namespace Fortune_Teller_UI
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints => endpoints.MapDefaultControllerRoute());
app.UseEndpoints(endpoints => {
endpoints.MapDefaultControllerRoute();
endpoints.Map<HealthEndpoint>();
});
HealthStartupFilter.InitializeAvailability(app.ApplicationServices);
}
}
}

Просмотреть файл

@ -1,17 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<!-- GitInfo provides $(Git*) properties used below -->
<PackageReference Include="GitInfo" Version="2.0.15">
<PackageReference Include="GitInfo" Version="2.1.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.CloudFoundry" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.EFCore" Version="$(SteeltoeVersion)" />
@ -22,6 +20,11 @@
<PackageReference Include="Steeltoe.Management.EndpointCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Management.TaskCore" Version="$(SteeltoeVersion)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" />
</ItemGroup> <ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.2" />
</ItemGroup>
<ItemGroup>
<None Include="git.properties" CopyToOutputDirectory="PreserveNewest" />
<None Include="appsettings.json" CopyToOutputDirectory="Always" />

Просмотреть файл

@ -11,10 +11,26 @@ Feature: Cloud Foundry Samples
And you wait until CloudFoundry app actuator is started
Then you should be able to access CloudFoundry app actuator management endpoints
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: CloudFoundry Management (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: CloudFoundry Management (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app actuator is started
Then you should be able to access CloudFoundry app actuator management endpoints
@netcoreapp3.1
@linux-x64
Scenario: CloudFoundry Management (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app actuator is started
Then you should be able to access CloudFoundry app actuator management endpoints
@net5.0
@linux-x64
Scenario: CloudFoundry Management (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app actuator is started
Then you should be able to access CloudFoundry app actuator management endpoints

Просмотреть файл

@ -15,7 +15,7 @@ namespace CloudFoundry
var host = WebHost.CreateDefaultBuilder()
.AddCloudFoundryConfiguration() // config
.UseCloudHosting() // listen on port defined in env var 'PORT'
.ConfigureLogging((context, builder) => builder.AddDynamicSerilog())
.AddDynamicSerilog()
.AddCloudFoundryActuators() // add actuators - should come AFTER Serilog config or else DynamicConsoleLogger will be injected
.UseStartup<Startup>()
.Build();

Просмотреть файл

@ -31,8 +31,8 @@ You must first create an instance of the MySql service in a org/space.
1. cf target -o myorg -s development
2. cd samples/Management/src/CloudFoundry
3. dotnet restore --configfile nuget.config
4. Publish app to a directory selecting the framework and runtime you want to run on. (e.g. `dotnet publish -f netcoreapp2.2 -r ubuntu.16.04-x64`)
5. Push the app using the appropriate manifest. (e.g. `cf push -f manifest.yml -p bin/Debug/netcoreapp2.2/ubuntu.16.04-x64/publish` or `cf push -f manifest-windows.yml -p bin/Debug/netcoreapp2.2/win10-x64/publish`)
4. Publish app to a directory selecting the framework and runtime you want to run on. (e.g. `dotnet publish -f netcoreapp2.2 -r linux-x64`)
5. Push the app using the appropriate manifest. (e.g. `cf push -f manifest.yml -p bin/Debug/netcoreapp2.2/linux-x64/publish` or `cf push -f manifest-windows.yml -p bin/Debug/netcoreapp2.2/win10-x64/publish`)
> Note: The provided manifest will create an app named `actuator` and attempt to bind to the the app to MySql service `myMySqlService`.

Просмотреть файл

@ -32,8 +32,6 @@ namespace CloudFoundry
services.AddDbContext<MyContext>(options => options.UseMySql(Configuration));
// Add MySql health contributor to be exposed by the endpoint
services.AddMySqlHealthContributor(Configuration);
// Add managment endpoint services
services.AddCloudFoundryActuators(Configuration);
// register a migrate context task with PCF
services.AddTask<MigrateDbContextTask<MyContext>>();
@ -44,9 +42,6 @@ namespace CloudFoundry
// Add your own IHealthContributor, registered with the interface
services.AddSingleton<IHealthContributor, CustomHealthContributor>();
services.AddMetricsActuator(Configuration);
//services.AddPrometheusActuator(Configuration); available in m2
// Add management components which collect and forwards metrics to
// the Cloud Foundry Metrics Forwarder service
// services.AddMetricsForwarderExporter(Configuration);
@ -68,18 +63,12 @@ namespace CloudFoundry
app.UseStaticFiles();
// Add management endpoints into pipeline
// Add metrics collection to the app
//app.UseMetricsActuator();
//app.UsePrometheusActuator(); available in m2
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
endpoints.Map<MetricsEndpoint>();
});
// Start up the metrics forwarder service added above

Просмотреть файл

@ -11,7 +11,7 @@
},
"MySql": {
"Client": {
"ConnectionString": "Server=localhost;Database=steeltoe;Uid=root;Pwd=;sslmode=none;"
"ConnectionString": "Server=localhost;Database=steeltoe;Uid=steeltoe;Pwd=steeltoe;sslmode=none;"
}
}
}

Просмотреть файл

@ -1,20 +0,0 @@
@cloudfoundry_scaffold
Feature: Cloud Foundry Samples
In order to show you how to use Steeltoe Management Endpoint
You can run some Steeltoe Management Endpoint samples
@netcoreapp3.1
@win10-x64
Scenario: CloudFoundry Management (netcoreapp3.1/win10-x64)
When you run: dotnet publish -f netcoreapp3.1 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish
And you wait until CloudFoundry app actuator is started
Then you should be able to access CloudFoundry app actuator management endpoints
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: CloudFoundry Management (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
And you wait until CloudFoundry app actuator is started
Then you should be able to access CloudFoundry app actuator management endpoints

Просмотреть файл

@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>net5.0;netcoreapp3.1;</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.1" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Security.Authentication.CloudFoundryCore" Version="$(SteeltoeVersion)" />

Просмотреть файл

@ -1,14 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Security.Authentication.CloudFoundryCore" Version="$(SteeltoeVersion)" />

Просмотреть файл

@ -16,10 +16,10 @@ This sample illustrates how you can secure your web api endpoints using JWT Bear
1. cd samples/Security/src/CloudFoundryJwtAuthentication
1. dotnet restore --configfile nuget.config
1. Publish app to a directory selecting the framework and runtime you want to run on.
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
* `dotnet publish -f netcoreapp3.1 -r win10-x64`
1. Push the app using the appropriate manifest.
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `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`)
The provided manifest(s) will create an app named `jwtauth` and attempt to bind it to `myOAuthService`.

Просмотреть файл

@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1;</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Extensions.Configuration.CloudFoundryCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Security.Authentication.CloudFoundryCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Security.DataProtection.RedisCore" Version="$(SteeltoeVersion)" />
</ItemGroup>
</Project>

Просмотреть файл

@ -18,11 +18,41 @@ Feature: CloudFoundry Single SignOn
Then you should be at https://single-signon.x.y.z/Home/About
And you should see "Your About page."
@netcoreapp3.1
@ubuntu.16.04-x64
Scenario: CloudFoundry Single SignOn (netcoreapp3.1/ubuntu.16.04-x64)
When you run: dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish
@net5.0
@win10-x64
Scenario: CloudFoundry Single SignOn (net5.0/win10-x64)
When you run: dotnet publish -f net5.0 -r win10-x64
And you run in the background: cf push -f manifest-windows.yml -p bin/Debug/net5.0/win10-x64/publish
And you wait until CloudFoundry app single-signon is started
When you get https://single-signon.x.y.z/Home/About
Then you should be at https://uaa.x.y.z/login
When you login with "baduser"/"badpass"
Then you should be at https://uaa.x.y.z/login
And you should see "Unable to verify email or password. Please try again."
When you login with "testuser"/"Password1!"
Then you should be at https://single-signon.x.y.z/Home/About
And you should see "Your About page."
@netcoreapp3.1
@linux-x64
Scenario: CloudFoundry Single SignOn (netcoreapp3.1/linux-x64)
When you run: dotnet publish -f netcoreapp3.1 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish
And you wait until CloudFoundry app single-signon is started
When you get https://single-signon.x.y.z/Home/About
Then you should be at https://uaa.x.y.z/login
When you login with "baduser"/"badpass"
Then you should be at https://uaa.x.y.z/login
And you should see "Unable to verify email or password. Please try again."
When you login with "testuser"/"Password1!"
Then you should be at https://single-signon.x.y.z/Home/About
And you should see "Your About page."
@net5.0
@linux-x64
Scenario: CloudFoundry Single SignOn (net5.0/linux-x64)
When you run: dotnet publish -f net5.0 -r linux-x64
And you run in the background: cf push -f manifest.yml -p bin/Debug/net5.0/linux-x64/publish
And you wait until CloudFoundry app single-signon is started
When you get https://single-signon.x.y.z/Home/About
Then you should be at https://uaa.x.y.z/login

Просмотреть файл

@ -30,10 +30,10 @@ Next, locate the sso-setup script you'd like to execute (.cmd/.sh) from the scri
1. cd samples/Security/src/CloudFoundrySingleSignon
1. dotnet restore --configfile nuget.config
1. Publish app to a directory, specifying the desired framework and runtime:
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
* `dotnet publish -f netcoreapp3.1 -r win10-x64`
1. Push the app using the appropriate manifest:
* `cf push -f manifest-sso.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest-sso.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
* `cf push -f manifest-windows-sso.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish`
> Note: The provided manifest(s) will create an app named `single-signon` and attempt to bind it to the SSO service `mySSOService`.

Просмотреть файл

@ -60,10 +60,10 @@ cf cups myOAuthService -p "{\"client_id\": \"myTestApp\",\"client_secret\": \"my
1. cd samples/Security/src/CloudFoundrySingleSignon
1. dotnet restore --configfile nuget.config
1. Publish app to a directory selecting the framework and runtime you want to run on.
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
* `dotnet publish -f netcoreapp3.1 -r win10-x64`
1. Push the app using the appropriate manifest.
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `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`
> Note: The provided manifest(s) will create an app named `single-signon` and attempt to bind it to the user-provided service `myOAuthService`.

Просмотреть файл

@ -1,22 +1,20 @@
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
// using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Steeltoe.Common.Options;
using Steeltoe.Common.Security;
// using Steeltoe.CloudFoundry.Connector.Redis;
using Steeltoe.Connector.Redis;
using Steeltoe.Security.Authentication.CloudFoundry;
using Steeltoe.Security.DataProtection;
using System;
using System.Net.Http;
using System.Security.Cryptography.X509Certificates;
// using Steeltoe.Security.DataProtection;
namespace CloudFoundrySingleSignon
{

Просмотреть файл

@ -20,7 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{4E1E
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E89A1BB6-1F81-4C2A-9F4A-936EE33ACD8B}"
ProjectSection(SolutionItems) = preProject
..\..\..\config\versions.props = ..\..\..\config\versions.props
..\..\config\versions.props = ..\..\config\versions.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudFoundryCertificateAuthentication", "CloudFoundryCertificateAuthentication\CloudFoundryCertificateAuthentication.csproj", "{D5F0FF6D-56B1-48AE-BDC6-15DE3AB00F79}"

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>
</PropertyGroup>
<ItemGroup>

Просмотреть файл

@ -23,10 +23,10 @@ We will need to use the UAA command line tool to establish some security credent
1. cd samples/Security/src/CredHubDemo
1. dotnet restore
1. Publish app to a directory selecting the framework and runtime you want to run on.
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
* `dotnet publish -f netcoreapp3.1 -r win10-x64`
1. Push the app using the appropriate manifest.
* `cf push -f manifest-nix.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `cf push -f manifest-nix.yml -p bin/Debug/netcoreapp3.1/linux-x64/publish`
* `cf push -f manifest-win-core.yml -p bin/Debug/netcoreapp3.1/win10-x64/publish`
> Note: The provided manifest will create an app named `CredHubDemo-nix`, `CredHubDemo-win` or `CredHubDemo-wincore`.

Просмотреть файл

@ -22,10 +22,10 @@ You must first create an instance of the Redis service in a org/space.
1. cd samples/Security/src/RedisDataProtectionKeyStore
1. dotnet restore --configfile nuget.config
1. Publish app to a directory, specifying the desired framework and runtime:
* `dotnet publish -f netcoreapp3.1 -r ubuntu.16.04-x64`
* `dotnet publish -f netcoreapp3.1 -r linux-x64`
* `dotnet publish -f netcoreapp3.1 -r win10-x64`
1. Push the app using the appropriate manifest:
* `cf push -f manifest.yml -p bin/Debug/netcoreapp3.1/ubuntu.16.04-x64/publish`
* `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`
> Note: The provided manifest will create an app named `keystore` and attempt to bind to the Redis service `myRedisService`.

Просмотреть файл

@ -1,11 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\config\versions.props" />
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Steeltoe.Common.Hosting" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.ConnectorCore" Version="$(SteeltoeVersion)" />
<PackageReference Include="Steeltoe.Connector.CloudFoundry" Version="$(SteeltoeVersion)" />

Просмотреть файл

@ -3,9 +3,9 @@
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Debug",
"Microsoft": "Debug"
"Default": "Information",
"Microsoft.AspNetCore.DataProtection": "Debug",
"Steeltoe": "Trace"
}
}
}

Просмотреть файл

@ -6,7 +6,7 @@ jobs:
- job: ${{parameters.feature}}_${{parameters.sample}}_Linux
displayName: '${{parameters.feature}}: ${{parameters.sample}} (Linux)'
pool:
vmImage: Ubuntu-16.04
vmImage: Ubuntu-latest
workspace:
clean: all
steps:
@ -42,7 +42,7 @@ jobs:
- job: ${{parameters.feature}}_${{parameters.sample}}_Windows
displayName: '${{parameters.feature}}: ${{parameters.sample}} (Windows)'
pool:
vmImage: Windows-2019
vmImage: Windows-latest
workspace:
clean: all
steps:

Просмотреть файл

@ -1,5 +1,6 @@
parameters:
dotnet3Version: 3.1.x
dotnet5Version: 5.0.x
steps:
- task: UseDotNet@2
displayName: 'Setup DotNet3'
@ -7,10 +8,10 @@ steps:
packageType: sdk
version: ${{parameters.dotnet3Version}}
- task: UseDotNet@2
displayName: 'Setup DotNet2'
displayName: 'Setup DotNet5'
inputs:
packageType: sdk
version: ${{parameters.dotnet2Version}}
version: ${{parameters.dotnet5Version}}
- task: UsePythonVersion@0
displayName: 'Setup Python'
inputs:

Просмотреть файл

@ -1,14 +1,18 @@
<Project>
<PropertyGroup>
<SteeltoeVersion>3.0.1</SteeltoeVersion>
<SteeltoeVersion>3.0.2-4585</SteeltoeVersion>
</PropertyGroup>
<PropertyGroup>
<GitInfoVersion>2.0.20</GitInfoVersion>
<JsonNetVersion>11.0.3</JsonNetVersion>
<RabbitMQVersion>5.1.0</RabbitMQVersion>
</PropertyGroup>
<PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<AspNetCoreVersion>3.1.0</AspNetCoreVersion>
<EFCoreVersion>3.1.0</EFCoreVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net5.0'">
<AspNetCoreVersion>5.0.0</AspNetCoreVersion>
<EFCoreVersion>5.0.0</EFCoreVersion>
</PropertyGroup>
</Project>