Closed saragluna closed 4 months ago
Steps to go through this change:
Update the Spring Cloud Gateway routing rules for catalog service, assist service.
Add a new product, you can enrich the short description and description
curl --location 'https://xiada-fitness-store-gateway-fa329.svc.azuremicroservices.io/products' \
--header 'Content-Type: application/json' \
--data '{
"imageUrl1": "url1",
"imageUrl2": "url2",
"imageUrl3": "url3",
"name": "xiada",
"shortDescription": "short desc",
"description": "desc",
"price": 299.99,
"tags": [
"a",
"b",
"c"
]
}'
Update the product, this is optional
curl --location 'https://xiada-fitness-store-gateway-fa329.svc.azuremicroservices.io/products/07e5785e-c844-41ca-b4cb-d1dfa0a1d383' \
--header 'Content-Type: application/json' \
--data '{
"imageUrl1": "https://www.shutterstock.com/shutterstock/photos/2272933579/display_1500/stock-vector-captain-america-logo-art-design-template-white-background-isolated-2272933579.jpg",
"imageUrl2": "https://www.shutterstock.com/shutterstock/photos/2272933579/display_1500/stock-vector-captain-america-logo-art-design-template-white-background-isolated-2272933579.jpg",
"imageUrl3": "https://www.shutterstock.com/shutterstock/photos/2272933579/display_1500/stock-vector-captain-america-logo-art-design-template-white-background-isolated-2272933579.jpg",
"shortDescription": "this is the short description for the product xiada, and it'\''s the best for hiking",
"description": "xiada likes hiking, and it can be used in different places"
}'
Deploy the assist-service, call the list product ids to index. You can see the newly added product is in the returned values.
curl --location 'https://xiada-fitness-store-gateway-fa329.svc.azuremicroservices.io/ai/admin/products-to-index'
Create and deploy the job, make sure setting the BP_MAVEN_ACTIVE_PROFILES
env
az spring job deploy --name assist-job \
--source-path apps/acme-assist \
--build-env BP_JVM_VERSION=17 \
--build-env BP_MAVEN_ACTIVE_PROFILES=job \
--env \
SPRING_AI_AZURE_OPENAI_ENDPOINT=${SPRING_AI_AZURE_OPENAI_ENDPOINT} \
SPRING_AI_AZURE_OPENAI_API_KEY=${SPRING_AI_AZURE_OPENAI_APIKEY}
Close in favor of #207
The command to deploy the job is like: