Skip to content

Commit 398a9c2

Browse files
authored
Merge pull request #19 from irajbalakrish/master
Bug Fixes + Improvements
2 parents 2b933ef + 00b37ad commit 398a9c2

File tree

16 files changed

+240
-62
lines changed

16 files changed

+240
-62
lines changed

audio/deploy/microservice.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"blobAccountName": "[concat(variables('resourceNamePrefix'), 'blob', parameters('uniqueResourceNameSuffix'))]",
3232

3333
"cognitiveServicesAccountName": "[concat(variables('resourceNamePrefix'), 'cs', parameters('uniqueResourceNameSuffix'))]",
34-
"cognitiveServicesApiUrl": "https://westeurope.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1&format=detailed",
34+
"cognitiveServicesApiUrl": "https://westeurope.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US&format=detailed",
3535

3636
"eventGridTopicResourceId": "[resourceId(parameters('eventsResourceGroupName'), 'Microsoft.EventGrid/topics', parameters('eventGridTopicName'))]"
3737
},
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
{
2+
"version": "2.0"
23
}

images/src/ContentReactor.Images/ContentReactor.Images.Services/ImageCaptionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public async Task<string> GetImageCaptionAsync(byte[] imageBytes)
2727
{
2828
HttpClient.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", CognitiveServicesVisionApiKey);
2929

30-
var uri = CognitiveServicesVisionApiEndpoint + "/analyze?visualFeatures=Description&language=en";
30+
var uri = CognitiveServicesVisionApiEndpoint + "vision/v1.0/analyze?visualFeatures=Description&language=en";
3131

3232
using (var content = new ByteArrayContent(imageBytes))
3333
{

setup.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ When using Azure Pipelines to deploy Content Reactor, a release configuration wi
146146

147147
4. **Create Cosmos DB Collection:** Use the _Azure CLI_ task, with the _Inline Script_ set to:
148148

149-
`az cosmosdb collection create --name crcatdb$(UniqueResourceNameSuffix) --db-name Categories --collection-name Categories --resource-group ContentReactor-Categories --partition-key-path "/userId" --throughput 1000 & exit 0`
149+
`az cosmosdb collection create --name crcatdb$(UniqueResourceNameSuffix) --db-name Categories --collection-name Categories --resource-group ContentReactor-Categories --partition-key-path "/userId" --throughput 400 & exit 0`
150150

151151
5. **Deploy API:** Use the _Azure App Service Deploy_ task, with the _App type_ set to `Function app`. Set the _App Service name_ to `crcatapi$(UniqueResourceNameSuffix)`. Set the _Package or folder_ to the relative location of the `.zip` file for the front-end API, e.g. `$(System.DefaultWorkingDirectory)/Categories-CI/functions/ContentReactor.Categories.Api.zip`.
152152

153153
6. **Deploy Worker API:** Use the _Azure App Service Deploy_ task, with the _App type_ set to `Function app`. Set the _App Service name_ to `crcatwapi$(UniqueResourceNameSuffix)`. Set the _Package or folder_ to the relative location of the `.zip` file for the worker API, e.g. `$(System.DefaultWorkingDirectory)/Categories-CI/functions/ContentReactor.Categories.WorkerApi.zip`.
154154

155-
7. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/Categories-CI/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `-eventGridTopicName {event-grid-topic-name} -microserviceResourceGroupName ContentReactor-Categories -microserviceFunctionsWorkerApiAppName {worker-api-function-app-name}`
155+
7. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`. Set the name of the Resource Group to the one hosting the _EventGrid_ Resource. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/Categories-CI/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `-eventGridTopicName {event-grid-topic-name} -microserviceResourceGroupName ContentReactor-Categories -microserviceFunctionsWorkerApiAppName {worker-api-function-app-name}`
156156

157157
### Text Microservice
158158

@@ -198,7 +198,7 @@ Note that for the text microservice there is no worker API, and no Event Grid su
198198

199199
8. **Deploy Worker API:** Use the _Azure App Service Deploy_ task, with the _App type_ set to `Function app`. Set the _App Service name_ to `crimgwapi$(UniqueResourceNameSuffix)`. Set the _Package or folder_ to the relative location of the `.zip` file for the worker API, e.g. `$(System.DefaultWorkingDirectory)/Images-CI/functions/ContentReactor.Images.WorkerApi.zip`.
200200

201-
9. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/Images-CI/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `-eventGridTopicName {event-grid-topic-name} -microserviceResourceGroupName ContentReactor-Images -microserviceFunctionsWorkerApiAppName {worker-api-function-app-name}`
201+
9. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`.Set the name of the Resource Group to the one hosting the _EventGrid_ Resource. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/Images-CI/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `-eventGridTopicName {event-grid-topic-name} -microserviceResourceGroupName ContentReactor-Images -microserviceFunctionsWorkerApiAppName {worker-api-function-app-name}`
202202

203203
### Audio Microservice
204204

@@ -222,7 +222,7 @@ Note that for the text microservice there is no worker API, and no Event Grid su
222222

223223
7. **Deploy Worker API:** Use the _Azure App Service Deploy_ task, with the _App type_ set to `Function app`. Set the _App Service name_ to `craudwapi$(UniqueResourceNameSuffix)`. Set the _Package or folder_ to the relative location of the `.zip` file for the worker API, e.g. `$(System.DefaultWorkingDirectory)/Audio-CI/functions/ContentReactor.Audio.WorkerApi.zip`.
224224

225-
8. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/Audio-CI/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `-eventGridTopicName {event-grid-topic-name} -microserviceResourceGroupName ContentReactor-Audio -microserviceFunctionsWorkerApiAppName {worker-api-function-app-name}`
225+
8. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`.Set the name of the Resource Group to the one hosting the _EventGrid_ Resource. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/Audio-CI/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `-eventGridTopicName {event-grid-topic-name} -microserviceResourceGroupName ContentReactor-Audio -microserviceFunctionsWorkerApiAppName {worker-api-function-app-name}`
226226

227227
### Deploying Microservices Manually
228228

@@ -356,7 +356,7 @@ The web app is deployed into its own resource group. It has its own ARM template
356356

357357
3. **Deploy API:** Use the _Azure App Service Deploy_ task, with the _App type_ set to `Web App`. Set the _App Service name_ to `crweb$(UniqueResourceNameSuffix)`. Set the _Package or folder_ to the relative location of the `.zip` file for the front-end API, e.g. `$(System.DefaultWorkingDirectory)/Web-CI/webapp/*.zip`.
358358

359-
4. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/web/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `eventGridTopicName={event-grid-topic-name} appServiceName={app-service-name}`
359+
4. **Deploy Event Subscriptions ARM Template:** Use the _Azure Resource Group Deployment_ task, with the _Action_ set to `Create or update resource group`.Set the name of the Resource Group to the one hosting the _EventGrid_ Resource. Set the _Template_ to the location of the `eventGridSubscriptions.json` file, e.g. `$(System.DefaultWorkingDirectory)/web/deploy/eventGridSubscriptions.json`. Set the _Overridable template parameters_ to the following: `eventGridTopicName={event-grid-topic-name} appServiceName={app-service-name}`
360360

361361
### Deploying Web Application Manually
362362

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"titleBar.activeBackground": "#b52e31",
4+
"titleBar.inactiveBackground": "#b52e3199",
5+
"titleBar.activeForeground": "#e7e7e7",
6+
"titleBar.inactiveForeground": "#e7e7e799",
7+
"statusBar.background": "#b52e31",
8+
"statusBarItem.hoverBackground": "#d04649",
9+
"statusBar.foreground": "#e7e7e7"
10+
}
11+
}

0 commit comments

Comments
 (0)