Closed chenrujun closed 1 year ago
Investigate and list the todos and prepare the environments?
enrich the contents: this is the next step after the above one?
@jialigit Detailed contents is not decided yet, need more discussion with our PM.
Spring on Azure samples
: Samples that help customer use Azure products in application develop with Spring.Spring on Azure docs
: Documents that help customer use Azure products in application develop with Spring.Solve problems in current Spring on Azure samples
.
All samples are managed by GitHub repository. Repositories in scope are listed in Spring on Azure Repositories.xlsx.
Problem explanation: For example: I want to find sample about Using Azure Service Bus in Spring application
, but I don't know where to find related sample.
Solution proposal:
(P1) Improve MS docs: Browse code samples page, make sure all samples can be found in that page.
spring-on-azure
samples follow these rules:
spring-on-azure
related sample should contain these tags: java
, spring
, azure
.spring-project related tag
: spring-security
, spring-cloud-stream
, spring-data
, etc.Azure product related tag
: service-bus
, event-hub
, storage-queue
, etc.usage scenario related tag
: messaging
, secret
, storage
, etc.(P0) Provide a page which list all Spring on Azure
samples
Here are some potential places to hold this page:
MS docs (The new page about Spring on Azure
, this page is not implemented yet).
A GitHub README like Azure-Samples/java-on-azure-examples or chenrujun/spring-and-azure-product-samples.
In each sample repository, put a link to Spring on Azure samples
, then after customer used one sample, he will know how to get all other samples. For example:
This repository is a member of `Spring on Azure samples`,
you can refer to [`Spring on Azure samples`](...) to get all `Spring on Azure` samples.
(P1) Publish some guide on spring.io/guides
sprng-on-azure
samples.Problem explanation: For example: When search spring service bus sample
in google, I can't get Azure-Samples/azure-spring-boot-samples/servicebus. Here is the link to google search result
Solution proposal:
(P0) After investigation, I found that if the repo name contains Azure product name, then the repo is more possible to be list in the search result of search engine. We can make sample repository follow this template: spring-on-azure-samples-xxx
.
xxx
represent an Azure product. All Azure products can be found here: https://azure.microsoft.com/en-us/services/
xxx
should be lower case. And each word is separated by -
.
Some example repo names:
spring-on-azure-samples-azure-active-directory
spring-on-azure-samples-key-vault
spring-on-azure-samples-event-hubs
spring-on-azure-samples-service-bus
spring-on-azure-samples-azure-files
spring-on-azure-samples-azure-blob-storage
spring-on-azure-samples-queue-storage
spring-on-azure-samples-azure-spring-apps
// Now all sample repositories name should follow spring-on-azure-samples-xxx
. Some samples are forked from other notable examples, for example: brewdis, animal-rescue. For such kind of repositories, we follow these rules:
spring-on-azure-samples
Spring on Azure
samples.spring-on-azure-samples-xxx
, add link to this repository. For example: brewdis is used to introduce how to use Redis in Spring application, then in spring-on-azure-samples-azure-cache-for-reais
, we can add content like this:
For more example about using Azure Cache for Redis, please refer to [brewdis](...).
(P0) Make sure the description and topics are accurate for all GitHub repositories.
spring-on-azure
sample follow these rules:
spring-on-azure
related sample should contain these topics: java
, spring
, azure
.spring-project related topic
: spring-security
, spring-cloud-stream
, spring-data
, etc.Azure product related topic
: service-bus
, event-hub
, storage-queue
, etc.usage scenario related topic
: messaging
, secret
, storage
, etc.Problem explanation: When I run the steps in the README, I faced some error, I'm not sure it's the problem of this sample or it's the problem of my develop environment.
Solution proposal:
Problem explanation:
For example:
sample-repository-a
requires:
sample-repository-b
requires:
It's not easy to run sample-repository-b
even if I'm familiar with sample-repository-a
. Is it possible to run sample-repository-b
without learning terraform
?
Solution proposal:
Spring on Azure
sample, he will use other Spring on Azure
samples easily.
Azure Portal | Azure Tools extension for VS Code | Azure CLI | Azure PowerShell | Infrastructure as Code tools: Bicep, Terraform, Ansible | |
---|---|---|---|---|---|
Seldom change. Change can be detected | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Can create a bunch of resources without interaction | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Can be used in all IDE | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Esay to use in all kinds of Operating system | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
User can know what he created by interaction | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
Can be used without much learnning effort | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
Problem explanation:
For example:
# Deploy Microservices and Spring Cloud Gateway using Azure Spring Cloud and Redis Cache
## What will you experience
## What you will need
## Install the Azure CLI extension
## Clone and build the repo
### Create a new folder and clone the sample app repository to your Azure Cloud account
### Change directory and build the project
## Provision Azure Spring Cloud service instance using Azure CLI
### Prepare your environment for deployments
### Login to Azure
### Create Azure Spring Cloud service instance
### Load Spring Cloud Config Server
## Create Redis Cache
## Create microservice applications
## Deploy applications
### Rate limiting
## Next Steps
## Credits
## Contributing
microsoft/spring-todo-app README's TOC:
# Spring Todo App
## Requirements
## Create Azure Cosmos DB
### STEP A - LOGIN to Azure
### STEP B - Create Resource Group
### STEP C - Create COSMOS DB
## Running Spring TODO App locally
### STEP 1 - Checkout Spring TODO app
### STEP 2 - Configure the app
### STEP 3 - Run Spring TODO App locally
## Contributing
## Useful link
If Azure-Samples/spring-cloud-gateway's What you will need
is same to microsoft/spring-todo-app's Requirements
, then it's better to uniform the description. It will help reader easier to use these samples.
Solution proposal:
Provide a template of README, make all Spring on Azure
samples follow the same template. Here is the sample of template README:
# Manage secrets by Azure Key Vault Sample
## Purpose
This sample is aiming to demonstrate how to how ...
## Ask for help
If you have any questions or suggestions about this sample, please create an issue.
## Contributing
If you want to contribute to this sample, Pull request is warmly welcome.
Please read COMTRIBUTING.md before creating PR.
## Prerequisites of running this sample
You need to finish these steps before running this sample:
1. Install Java 8
2. Install Java IDE
3. Install Git and clone current GitHub repository
4. Get Azure subscription
5. Install Azure CLI and login Azure CLI
6. etc.
## Run this sample
### Create required Azure resources
### Modify application.yml
### Start sample application
### Validate application
Spring on Azure
sample repository.Spring on Azure sample template version: 1.0.0.
Problem explanation:
Solution proposal:
### Spring Boot version
Problem explanation: For example:
pet-clinic
related sample appears in these places:
todo-app
related sample appears in these places:
Solution proposal:
spring-on-azure-samples-azure-cosmos-db
. Archive original repository, add a link to new repository. Here is an example:
This repository is archived, to get sample about using Azure Cosmos DB in Spring application,
please refer to [spring-on-azure-samples-azure-cosmos-db](...).
Problem explanation: For example:
Solution proposal:
spring-azure-samples-cosmos-db
should only contains samples of Azure Cosmos, it should not contain samples about Azure Key Vault. But it can have content like this:
## Next step
- Store the access-key of cosmos-db in Azure Key Vault, please refer to [link]
- Access Cosmos DB by managed-identity in Azure Kubernetes Service, please refer to [link]
spring-on-azure-samples-key-vault
should only contains samples of Azure Key Vault, it should not contain samples about Azure Cosmos.Problem explanation: For example: In https://github.com/Azure-Samples/spring-jms-service-bus, use spring-cloud-azure-starter-servicebus-jms is a better option to in this sample.
Solution proposal:
Make sure every Spring on Azure
sample is maintained by related expert. The experts should be responsible to provide best solution.
Set experts of each Azure product and each spring project. For example:
Azure products experts. All azure products can be found here: https://azure.microsoft.com/en-us/services/ | Azure product | experts |
---|---|---|
Azure Key Vault | @ chenrujun | |
Azure Service Bus | @ yiliuTo | |
Azure Files | @ backwind1233 |
Spring projects experts. All spring projects can be found here: https://spring.io/projects/spring-data. Note: We keep both level-1 project (like spring-data) and level-2 project (like spring-data-jpa). | Spring project | experts |
---|---|---|
spring-security | @ chenrujun | |
spring-cloud-stream | @ yiliuTo | |
spring-data | @ backwind1233 |
Get the Azure product list and Spring project list for each Spring on Azure
sample.
spring-on-azure-samples-azure-cosmos-db
, it can only have one Azure product: Azure Cosmos DB. But it can have multiple Spring projects. Like: spring-data-jpa, spring-data-jdbc. Make sure all samples are maintained by related expert by setting expert as GtHub Code Owner. If there related file change in a PR, merge is forbidden without the expert's approve.
Auto fit sample change and expert change
spring-on-azure-samples-metadata.yml
:
spring-on-azure-experts-for-azure-product:
spring-on-azure-samples-metadata.yml
always updated.If you want to use a new Azure product or Spring project in this repository,
please update [spring-on-azure-samples-metadata.yml](...), and [CODEOWNER](...)
This content can be added into spring-on-azure-samples-template
.
azure-cosmos
, then in spring-on-azure-samples-metadata.yml
, related azure-product
should contain azure-cosmos-db
.spring-security-oauth2-client
, then in spring-on-azure-samples-metadata.yml
, related spring-project
should contain spring-security
.CODEOWNER
always updated according to spring-on-azure-samples-metadata.yml
. This can be done by setting up GitHub actions.Problem explanation: For example:
Solution proposal:
Problem explanation: Some sample repository is not updated for more than one yeat. For example: https://github.com/Azure-Samples/brewdis is not updated for 2 years.
Solution proposal:
Problem explanation: For example: samples from Spring Cloud Apps does not use Spring Cloud Azure libraries.
Solution proposal:
This mainly happened in end-to-end-samples
. It can be solved by spring-on-azure-experts
system designed in the solution of Problem 5: Not provide the best solution
.
Problem explanation:
Repos with name like brewdws
/ pet-clinic-jar
/ animal-rescue
/ todo-app
will not provide enough information. I don't know what the repository is used to without reading the README.
Solution proposal:
Make repository names follow the rule described in Problem 1.2: I can't find sample by searching in search engine
: spring-on-azure-samples-xxx
.
Problem explanation: Some samples introduce many features in one application. It will make the sample hard to learn. For example: aad-web-application contains these features:
Solution proposal:
For example, here is a folder structure of a sample repository:
There should be a learning path like this:
In the learn-path image, sample-A -> sample-B
means if customer want to run sample-B, he should run sample-A first.
Azure-Samples/spring-on-azure-samples-template
Azure-Samples/spring-on-azure-samples-management
, which list all samples in its README, and include logic codes to manage all spring-on-azure samples.spring-on-azure-samples-template
, and release 1.0.0 version.spring-on-azure-samples-cosmos-db
from spring-on-azure-samples-template
, add it to spring-on-azure-samples-management
,spring-on-azure-samples-template
, release a new version if necessary.spring-boot_3.0
for all managed repositories by a GitHub Action. Or Use GitAction to create the issue: let the repository maintainer do this task mainally.spring-on-azure-samples-template
released a new version, Use GitHub Action to create issues in each repositories: let the repository maintainer update the template version.Open questions
1.1. Where to list all samples, as described in Problem 1.1: I don't know where to find Spring on Azure related sample
.
Bias (Resolved) 2.1. Method to create azure resource. Added a table to comparing all methods of creating azure resources.
Measure success (Need more discussion with Sean) 3.1. ROI. Now I'm sure how to calculate the number of RIO. 3.2. OKR: 3.2.1. Subscription (Need to discuss with Sean). Now I I'm not sure how to confirm that how much 3.2.2. The count of visitor and cloner of each sample repository.
4. Delivery
.Delivery
4.1. All samples follow the same template.
4.2. All repositories have a maintainer, publish a document about maintainer's responsibility.
4.3. Build SLA system to make sure all samples can work well.
4.4. Build spring-on-azure-experts
system, make sure all spring-on-azure
samples are maintained by related expert. And all new samples can be detected.
Updates:
Azure for Spring developers hub page is now live.
Closing this issue. Because we decide to use GitHub issue to track Feature or Bug. Epic is not necessary anymore.
This is an Epic to track all Spring on Azure related tasks.
Context
Now for a developer who used Spring and Azure, he may have many problems about documents and samples.
Goal
Investigate the problem and find a solution to solve the problem.
Solution