Closed pauldotyu closed 9 months ago
[ ] Yes [x] No
What kind of change does this Pull Request introduce?
[ ] Bugfix [x] Feature [ ] Code style update (formatting, local variables) [x] Refactoring (no functional changes, no api changes) [ ] Documentation content changes [ ] Other... Please describe:
Note: this requires you to have Go installed locally. If you do not have Go installed, open this repo using GitHub Codespaces.
git clone https://github.com/Azure-Samples/aks-store-demo cd aks-store-demo git checkout sql_api
Create Azure CosmosDB instance
RGNAME=rg-cosmos<something_unique> LOCNAME=<your_preferred_location> COSMOSDBNAME=cosmos<something_unique> PARTITIONKEY=storeId az group create --name $RGNAME --location $LOCNAME az cosmosdb create --name $COSMOSDBNAME --resource-group $RGNAME --kind GlobalDocumentDB az cosmosdb sql database create --account-name $COSMOSDBNAME --name orderdb --resource-group $RGNAME az cosmosdb sql container create --account-name $COSMOSDBNAME --database-name orderdb --name orders --resource-group $RGNAME --partition-key-path /$PARTITIONKEY export ORDER_DB_API=cosmosdbsql export ORDER_DB_URI=https://$COSMOSDBNAME.documents.azure.com:443/ export ORDER_DB_NAME=orderdb export ORDER_DB_CONTAINER_NAME=orders export ORDER_DB_PASSWORD=$(az cosmosdb keys list --name $COSMOSDBNAME --resource-group $RGNAME --query primaryMasterKey -o tsv) export ORDER_DB_PARTITION_KEY=$PARTITIONKEY export ORDER_DB_PARTITION_VALUE="pets"
Setup environment variables for local RabbitMQ
export ORDER_QUEUE_URI=amqp://localhost export ORDER_QUEUE_USERNAME=username export ORDER_QUEUE_PASSWORD=password export ORDER_QUEUE_NAME=orders
Start the supporting containers
cd src/makeline-service docker compose up -d --build
Start the makeline-service app
go get . go run .
In VSCode, open the src/makeline-service/test-makeline-service.http file and test the HTTP methods to fetch, get, and update order documents.
src/makeline-service/test-makeline-service.http
Verify that the following are valid
Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Create Azure CosmosDB instance
Setup environment variables for local RabbitMQ
Start the supporting containers
Start the makeline-service app
In VSCode, open the
src/makeline-service/test-makeline-service.http
file and test the HTTP methods to fetch, get, and update order documents.What to Check
Verify that the following are valid
Other Information