colorado cloud foundry meeting
TRANSCRIPT
![Page 1: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/1.jpg)
TECHNOLOGY SOLUTIONS DELIVERED
TECHNOLOGY SOLUTIONS DELIVEREDTECHNOLOGY SOLUTIONS DELIVERED
Azure Service Brokerand Spring Music
January 23, 2017
![Page 2: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/2.jpg)
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
![Page 3: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/3.jpg)
TECHNOLOGY SOLUTIONS DELIVERED
Azure Service Broker
![Page 4: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/4.jpg)
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
![Page 5: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/5.jpg)
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
![Page 6: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/6.jpg)
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”
![Page 7: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/7.jpg)
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?
![Page 8: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/8.jpg)
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
![Page 9: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/9.jpg)
TECHNOLOGY SOLUTIONS DELIVERED
Demo
![Page 10: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/10.jpg)
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
![Page 11: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/11.jpg)
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
![Page 12: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/12.jpg)
TECHNOLOGY SOLUTIONS DELIVERED
Service Instance Differences
![Page 13: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/13.jpg)
TECHNOLOGY SOLUTIONS DELIVERED
How can I make Spring Music recognize this?
![Page 14: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/14.jpg)
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
![Page 15: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/15.jpg)
TECHNOLOGY SOLUTIONS DELIVERED
Questions?
![Page 16: Colorado Cloud Foundry Meeting](https://reader034.vdocuments.us/reader034/viewer/2022052116/58ef2e651a28abf4458b4665/html5/thumbnails/16.jpg)
TECHNOLOGY SOLUTIONS DELIVERED
To learn more…
• https://github.com/Azure/meta-azure-service-broker/tree/master/
• https://github.com/ECSTeam/spring-music
• https://www.microsoft.com/en-us/sql-server/developer-get-started/