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/ActuatorApi/testing/linux.feature b/Management/src/ActuatorApi/testing/linux.feature
index 09792849..afcc5812 100644
--- a/Management/src/ActuatorApi/testing/linux.feature
+++ b/Management/src/ActuatorApi/testing/linux.feature
@@ -6,7 +6,8 @@ Feature: Management
@net10.0
@linux
Scenario: ActuatorApi (net10.0/linux)
- When you push: manifest.yml with args: --random-route
+ When you run: dotnet build -t:WriteGitPropertiesFallbackFile
+ And you push: manifest.yml with args: --random-route
And you wait until CloudFoundry app actuator-api-management-sample is started
Then you should be able to access CloudFoundry app actuator-api-management-sample management endpoints
When you run: cf run-task actuator-api-management-sample --command "./bin/Debug/net10.0/linux-x64/Steeltoe.Samples.ActuatorApi runtask=MigrateDatabase --name MigrateDatabase"
@@ -15,3 +16,5 @@ Feature: Management
And you wait until CloudFoundry task ForecastWeather for actuator-api-management-sample is successful
When you get https://actuator-api-management-sample/weatherforecast
Then the response should contain "temperatureF"
+ When you call https://actuator-api-management-sample/cloudfoundryapplication/info with the CloudFoundry OAuth token
+ Then the response should contain "commit"
diff --git a/Management/src/ActuatorApi/testing/windows.feature b/Management/src/ActuatorApi/testing/windows.feature
index 070cc03f..e741da89 100644
--- a/Management/src/ActuatorApi/testing/windows.feature
+++ b/Management/src/ActuatorApi/testing/windows.feature
@@ -16,3 +16,5 @@ Feature: Management
And you wait until CloudFoundry task ForecastWeather for actuator-api-management-sample is successful
When you get https://actuator-api-management-sample/weatherforecast
Then the response should contain "temperatureF"
+ When you call https://actuator-api-management-sample/cloudfoundryapplication/info with the CloudFoundry OAuth token
+ Then the response should contain "commit"
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%
diff --git a/steps/browser_steps.py b/steps/browser_steps.py
index 2191a9f5..c1ec897e 100644
--- a/steps/browser_steps.py
+++ b/steps/browser_steps.py
@@ -32,6 +32,30 @@ def step_impl(context, url):
time.sleep(context.options.cmd.loop_wait)
+@when(u'you call {url} with the CloudFoundry OAuth token')
+def step_impl(context, url):
+ """
+ :type context: behave.runner.Context
+ :type url: str
+ """
+ url = dns.resolve_url(context, url)
+ token = get_oauth_token(context)
+ context.log.info('getting url {} using the CloudFoundry OAuth token'.format(url))
+ attempt = 0
+ while True:
+ attempt += 1
+ resp = requests.get(url, headers={'Authorization': token})
+ if resp.status_code < 500:
+ context.log.info('GET {} [{}]'.format(url, resp.status_code))
+ resp.status_code.should.equal(200)
+ context.response_text = resp.text
+ break
+ context.log.info('failed to get {} [{}]'.format(url, resp.status_code))
+ if attempt > 5:
+ raise Exception('Unable to get page {} [{}]'.format(url, resp.status_code))
+ time.sleep(context.options.cmd.loop_wait)
+
+
@when(u'you post "{data}" to {url}')
def step_impl(context, data, url):
"""