2. TECHNOLOGY SOLUTIONS DELIVERED
• Installed as a tile with PCF
• Standard Service Broker
application for Open Source CF
• Provides self-provisioning of Azure
Services
Azure Service Broker
4. TECHNOLOGY SOLUTIONS DELIVERED
Spring Music
• Simple demonstration of Spring
Cloud principles
• Automatically detects connection
type based on bound services
• Provides H2, MySQL, Mongo, and
Redis
5. TECHNOLOGY SOLUTIONS DELIVERED
Create an Azure SQLServer Service Instance
• Use the same cf cli commands
• Azure credentials are in the tile configuration
• Service details kept in a json file
• Service creation asynchronous
6. TECHNOLOGY SOLUTIONS DELIVERED
Bind the Service and Start the App!
• App didn’t start at all
• A lot of errors around “unable to connect to local SQL Server Instance”
7. TECHNOLOGY SOLUTIONS DELIVERED
So now what?
• Looks like Spring Cloud
was able to recognize
the SQL Server bound
service instance
• Didn’t know how to
create a SQL Server
Data Source
• How to get Spring to
create this?
8. TECHNOLOGY SOLUTIONS DELIVERED
The Magic of Spring
• Just get the MS
driver onto the
classpath
• Spring Cloud smart
enough to figure out
how to create the
ServiceInfo class
• Still had to do some
app-specific wiring
10. TECHNOLOGY SOLUTIONS DELIVERED
Create an Azure Redis Service
• Use the same cf cli commands
• Azure credentials are in the tile configuration
• Service details kept in a json file
• Service creation asynchronous
11. TECHNOLOGY SOLUTIONS DELIVERED
Bind the Service and Start the App!
• App started great!
• Ended up using H2 database
• Automatic recognition of Redis-based bound service did not happen
14. TECHNOLOGY SOLUTIONS DELIVERED
Custom Service Info Creator classes
• ServiceInfo class to describe the bound service
• ServiceInfoCreator class to get Spring to create that ServiceInfo bean
• File to Register the creator class with Spring
• App-specific wiring and config