diff --git a/Configuration/src/ConfigurationProviders/manifest-windows.yml b/Configuration/src/ConfigurationProviders/manifest-windows.yml index 7c79f87d..4a05656d 100644 --- a/Configuration/src/ConfigurationProviders/manifest-windows.yml +++ b/Configuration/src/ConfigurationProviders/manifest-windows.yml @@ -5,7 +5,7 @@ applications: - binary_buildpack memory: 256M random-route: true - stack: windows2022 + stack: windows command: cmd /c .\Steeltoe.Samples.ConfigurationProviders --urls=http://0.0.0.0:%PORT% env: # ASPNETCORE_ENVIRONMENT value is lower-cased here to match the files in the config repository at: diff --git a/Connectors/src/MongoDb/manifest-windows.yml b/Connectors/src/MongoDb/manifest-windows.yml index 1b9a1e8c..c0782c78 100644 --- a/Connectors/src/MongoDb/manifest-windows.yml +++ b/Connectors/src/MongoDb/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: mongodb-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.MongoDb --urls=http://0.0.0.0:%PORT% diff --git a/Connectors/src/MySql/manifest-windows.yml b/Connectors/src/MySql/manifest-windows.yml index 462d33f3..3c407b0d 100644 --- a/Connectors/src/MySql/manifest-windows.yml +++ b/Connectors/src/MySql/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: mysql-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.MySql --urls=http://0.0.0.0:%PORT% diff --git a/Connectors/src/MySqlEFCore/manifest-windows.yml b/Connectors/src/MySqlEFCore/manifest-windows.yml index bf937f43..794bb769 100644 --- a/Connectors/src/MySqlEFCore/manifest-windows.yml +++ b/Connectors/src/MySqlEFCore/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: mysql-efcore-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.MySqlEFCore --urls=http://0.0.0.0:%PORT% diff --git a/Connectors/src/PostgreSql/manifest-windows.yml b/Connectors/src/PostgreSql/manifest-windows.yml index c52dddc4..58f9ec92 100644 --- a/Connectors/src/PostgreSql/manifest-windows.yml +++ b/Connectors/src/PostgreSql/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: postgresql-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.PostgreSql --urls=http://0.0.0.0:%PORT% diff --git a/Connectors/src/PostgreSqlEFCore/manifest-windows.yml b/Connectors/src/PostgreSqlEFCore/manifest-windows.yml index 756dafab..dea0c576 100644 --- a/Connectors/src/PostgreSqlEFCore/manifest-windows.yml +++ b/Connectors/src/PostgreSqlEFCore/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: postgresql-efcore-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.PostgreSqlEFCore --urls=http://0.0.0.0:%PORT% diff --git a/Connectors/src/RabbitMQ/manifest-windows.yml b/Connectors/src/RabbitMQ/manifest-windows.yml index 0168961c..65598860 100644 --- a/Connectors/src/RabbitMQ/manifest-windows.yml +++ b/Connectors/src/RabbitMQ/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: rabbitmq-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.RabbitMQ --urls=http://0.0.0.0:%PORT% diff --git a/Connectors/src/Redis/manifest-windows.yml b/Connectors/src/Redis/manifest-windows.yml index b67ecab9..aa444b5a 100644 --- a/Connectors/src/Redis/manifest-windows.yml +++ b/Connectors/src/Redis/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: redis-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.Redis --urls=http://0.0.0.0:%PORT% diff --git a/Connectors/src/SqlServerEFCore/manifest-windows.yml b/Connectors/src/SqlServerEFCore/manifest-windows.yml index 1346de80..4d9b93c5 100644 --- a/Connectors/src/SqlServerEFCore/manifest-windows.yml +++ b/Connectors/src/SqlServerEFCore/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: sqlserver-efcore-connector-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.SqlServerEFCore --urls=http://0.0.0.0:%PORT% diff --git a/Discovery/src/FortuneTeller/FortuneTellerApi/manifest-windows.yml b/Discovery/src/FortuneTeller/FortuneTellerApi/manifest-windows.yml index 6eff093e..719d70dd 100644 --- a/Discovery/src/FortuneTeller/FortuneTellerApi/manifest-windows.yml +++ b/Discovery/src/FortuneTeller/FortuneTellerApi/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: fortune-service-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.FortuneTellerApi --urls=http://0.0.0.0:%PORT% diff --git a/Discovery/src/FortuneTeller/FortuneTellerWeb/manifest-windows.yml b/Discovery/src/FortuneTeller/FortuneTellerWeb/manifest-windows.yml index 38a9483e..a45f8d1f 100644 --- a/Discovery/src/FortuneTeller/FortuneTellerWeb/manifest-windows.yml +++ b/Discovery/src/FortuneTeller/FortuneTellerWeb/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: fortune-web-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.FortuneTellerWeb --urls=http://0.0.0.0:%PORT% diff --git a/FileShares/src/FileSharesWeb/manifest-windows.yml b/FileShares/src/FileSharesWeb/manifest-windows.yml index 686e4285..a93397b0 100644 --- a/FileShares/src/FileSharesWeb/manifest-windows.yml +++ b/FileShares/src/FileSharesWeb/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: fileshares-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.FileSharesWeb --urls=http://0.0.0.0:%PORT% diff --git a/Management/src/ActuatorApi/README.md b/Management/src/ActuatorApi/README.md index c594157b..55e7a078 100644 --- a/Management/src/ActuatorApi/README.md +++ b/Management/src/ActuatorApi/README.md @@ -1,4 +1,4 @@ -# Steeltoe Management Sample - Actuators, Administrative Tasks, Metrics and Tracing +# Steeltoe Management Sample - Actuators, Administrative Tasks, Metrics and Tracing ActuatorWeb and ActuatorApi form an ASP.NET Core-powered sample application that demonstrates how to use several Steeltoe libraries on their own and with additional tools. @@ -84,8 +84,18 @@ In order to demonstrate [Steeltoe Management Tasks](https://docs.steeltoe.io/api cf create-service csb-aws-mysql your-plan sampleActuatorMySqlService --wait ``` -1. Run the `cf push` command to deploy from source (you can monitor logs with `cf logs actuator-api-management-sample`) - - When deploying to Windows, binaries must be built locally before push. Use the following commands instead: +1. Deploy the app + + You can monitor logs with: `cf logs actuator-api-management-sample`. + + - To deploy local sources, run the following commands: + + ```shell + dotnet build -t:WriteGitPropertiesFallbackFile + cf push + ``` + + - To deploy locally-built binaries (required if deploying to Windows), run the following commands: ```shell dotnet publish -r win-x64 --self-contained diff --git a/Management/src/ActuatorApi/Steeltoe.Samples.ActuatorApi.csproj b/Management/src/ActuatorApi/Steeltoe.Samples.ActuatorApi.csproj index f5f66f5c..ee6308d0 100644 --- a/Management/src/ActuatorApi/Steeltoe.Samples.ActuatorApi.csproj +++ b/Management/src/ActuatorApi/Steeltoe.Samples.ActuatorApi.csproj @@ -4,11 +4,6 @@ net10.0 enable enable - - - false - - false @@ -26,40 +21,10 @@ + - - - - runtime; build; native; contentfiles; analyzers - - - - - - - - - - - - - - - - - - - - - - Always - - diff --git a/Management/src/ActuatorApi/manifest-windows.yml b/Management/src/ActuatorApi/manifest-windows.yml index 02eb78c2..2c85b43e 100644 --- a/Management/src/ActuatorApi/manifest-windows.yml +++ b/Management/src/ActuatorApi/manifest-windows.yml @@ -4,7 +4,7 @@ applications: buildpacks: - binary_buildpack memory: 256M - stack: windows2022 + stack: windows command: cmd /c .\Steeltoe.Samples.ActuatorApi --urls http://0.0.0.0:%PORT% env: DOTNET_CLI_TELEMETRY_OPTOUT: "true" diff --git a/Management/src/ActuatorWeb/README.md b/Management/src/ActuatorWeb/README.md index 6b77df37..c62e7e55 100644 --- a/Management/src/ActuatorWeb/README.md +++ b/Management/src/ActuatorWeb/README.md @@ -153,21 +153,26 @@ When running with Podman, update these files to use `host.containers.internal`: ## Running on Tanzu Platform for Cloud Foundry -1. Run the `cf push` command to deploy from source (you can monitor logs with `cf logs actuator-web-management-sample`) - * When deploying to Windows (or to see `git.properties` in the Info actuator response), binaries must be built locally before push. Use the following commands instead: +1. Deploy the app - ```shell - dotnet publish -r win-x64 --self-contained - cf push -f manifest-windows.yml -p bin/Release/net10.0/win-x64/publish - ``` + You can monitor logs with: `cf logs actuator-web-management-sample`. -> [!NOTE] -> These applications use the GitInfo NuGet package to write a `git.properties` if the .git folder is found. -> When the staging process runs on Cloud Foundry, that information is not available. -> If you want to see git properties returned when the application is running on Cloud Foundry, publish the application before pushing. + - To deploy local sources, run the following commands: + + ```shell + dotnet build -t:WriteGitPropertiesFallbackFile + cf push + ``` + + - To deploy locally-built binaries (required if deploying to Windows), run the following commands: + + ```shell + dotnet publish -r win-x64 --self-contained + cf push -f manifest-windows.yml -p bin/Release/net10.0/win-x64/publish + ``` -2. Copy the value of `routes` in the output and open in your browser -3. Refer to [ActuatorApi README](../ActuatorApi/README.md#running-on-tanzu-platform-for-cloud-foundry) for additional instructions. +1. Copy the value of `routes` in the output and open in your browser +1. Refer to [ActuatorApi README](../ActuatorApi/README.md#running-on-tanzu-platform-for-cloud-foundry) for additional instructions. ### What to expect diff --git a/Management/src/ActuatorWeb/Steeltoe.Samples.ActuatorWeb.csproj b/Management/src/ActuatorWeb/Steeltoe.Samples.ActuatorWeb.csproj index 9b86931a..e8728287 100644 --- a/Management/src/ActuatorWeb/Steeltoe.Samples.ActuatorWeb.csproj +++ b/Management/src/ActuatorWeb/Steeltoe.Samples.ActuatorWeb.csproj @@ -4,11 +4,6 @@ net10.0 enable enable - - - false - - false @@ -19,39 +14,9 @@ + - - - - runtime; build; native; contentfiles; analyzers - - - - - - - - - - - - - - - - - - - - - - Always - - diff --git a/Management/src/ActuatorWeb/manifest-windows.yml b/Management/src/ActuatorWeb/manifest-windows.yml index 108e2fb8..5f82edd6 100644 --- a/Management/src/ActuatorWeb/manifest-windows.yml +++ b/Management/src/ActuatorWeb/manifest-windows.yml @@ -4,7 +4,7 @@ applications: buildpacks: - binary_buildpack memory: 256M - stack: windows2022 + stack: windows command: cmd /c .\Steeltoe.Samples.ActuatorWeb --urls http://0.0.0.0:%PORT% env: DOTNET_CLI_TELEMETRY_OPTOUT: "true" diff --git a/Security/src/AuthApi/manifest-windows.yml b/Security/src/AuthApi/manifest-windows.yml index 2b8a579b..281a338e 100644 --- a/Security/src/AuthApi/manifest-windows.yml +++ b/Security/src/AuthApi/manifest-windows.yml @@ -5,7 +5,7 @@ applications: - binary_buildpack command: cmd /c .\Steeltoe.Samples.AuthApi --urls=http://0.0.0.0:%PORT% memory: 256M - stack: windows2022 + stack: windows env: DOTNET_CLI_TELEMETRY_OPTOUT: "true" DOTNET_NOLOGO: "true" diff --git a/Security/src/AuthConsole/manifest-windows.yml b/Security/src/AuthConsole/manifest-windows.yml index fc4a79d3..7d6a7f5c 100644 --- a/Security/src/AuthConsole/manifest-windows.yml +++ b/Security/src/AuthConsole/manifest-windows.yml @@ -7,7 +7,7 @@ applications: health-check-type: process memory: 256M no-route: true - stack: windows2022 + stack: windows env: DOTNET_CLI_TELEMETRY_OPTOUT: "true" DOTNET_NOLOGO: "true" diff --git a/Security/src/AuthWeb/manifest-windows.yml b/Security/src/AuthWeb/manifest-windows.yml index 378fbe4f..1140e544 100644 --- a/Security/src/AuthWeb/manifest-windows.yml +++ b/Security/src/AuthWeb/manifest-windows.yml @@ -5,7 +5,7 @@ applications: - binary_buildpack command: cmd /c .\Steeltoe.Samples.AuthWeb --urls=http://0.0.0.0:%PORT% memory: 256M - stack: windows2022 + stack: windows env: DOTNET_CLI_TELEMETRY_OPTOUT: "true" DOTNET_NOLOGO: "true" diff --git a/Security/src/RedisDataProtection/manifest-windows.yml b/Security/src/RedisDataProtection/manifest-windows.yml index 55ac4a94..6844b373 100644 --- a/Security/src/RedisDataProtection/manifest-windows.yml +++ b/Security/src/RedisDataProtection/manifest-windows.yml @@ -3,7 +3,7 @@ applications: - name: redis-data-protection-sample random-route: true memory: 256M - stack: windows2022 + stack: windows buildpacks: - binary_buildpack command: cmd /c .\Steeltoe.Samples.RedisDataProtection --urls=http://0.0.0.0:%PORT%