https://github.com/jeffgbutler/steeltoe3demo
https://github.com/jeffgbutler/steeltoe3demo
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jeffgbutler/steeltoe3demo
- Owner: jeffgbutler
- Created: 2021-05-05T14:10:21.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-05T17:35:28.000Z (about 4 years ago)
- Last Synced: 2025-01-29T15:50:37.280Z (5 months ago)
- Language: C#
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Steeltoe Demo
Demo application showing Steeltoe integration with Cloud Foundry. Shows the following aspects of Steeltoe:
- Managament Endpoints
- Dynamic Logging
- Service connectors for Redis and SQL Server
- Cloud Foundry OptionsWhen running in "Development" mode (local), the app will connect to SQL Server and will use a hit counter defined with an
in-memory cache. When running in "Production" mode (on Cloud Foundry in this case), the app will connect to both Redis and SQL Server.## Prerequisites
This app needs to connect to a SQL Server database. If you are running on Windows, and have `localdb` setup, you can use it by changing
the settings in appsettings.Development.json as follows:```json
"SqlServer": {
"Credentials": {
"ConnectionString": "Server=(localdb)\\MSSQLLocalDB;database=Steeltoe;Trusted_Connection=True;"
}
}
```In other enviroments, and on Cloud Foundry, the app needs to connect to SQL Server somewhere. It is easy to run SQL Server
in Docker following the instructions here: https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker## Cloud Foundry Setup
1. Create a redis service named "jgb-redis"
1. Create a SQL Server instance named "jgb-sqlserver". If you have a SQL Server on your network somewhere, you can define a user provided service
like this:```bash
cf cups jgb-sqlserver -p '{"pw": "","uid": "SA","uri": "jdbc:sqlserver://192.168.128.19:1433;databaseName=Steeltoe"}'
```