@@ -13,7 +13,7 @@ echo "Provide subscription ID: "
13
13
read subscriptionId
14
14
15
15
HOME=` pwd`
16
- echo " Provide an unique suffix string (recommended to autogenerate string to guarantee uniqueness ): "
16
+ echo " Provide any unique suffix string (max length 15 characters, recommended to autogenerate a string ): "
17
17
read uniqueSuffixString
18
18
19
19
echo " Provide Big Huge Thesaurus API Key: "
@@ -28,7 +28,7 @@ echo "Creating Event Grid Topic..."
28
28
az group create -n ContentReactor-Events -l westus2
29
29
EVENT_GRID_TOPIC_NAME=contentreactor$uniqueSuffixString
30
30
az group deployment create -g ContentReactor-Events --template-file $HOME /events/deploy/template.json --mode Complete --parameters uniqueResourceNameSuffix=$uniqueSuffixString
31
-
31
+ sleep 2
32
32
# Categories Microservice Deploy
33
33
34
34
echo " Starting deploy of Categories Microservice..."
@@ -49,6 +49,7 @@ az webapp deployment source config-zip --resource-group ContentReactor-Categorie
49
49
50
50
echo " Deploying Event Grid Subscription for Categories"
51
51
az group deployment create -g ContentReactor-Events --template-file $HOME /categories/deploy/eventGridSubscriptions.json --parameters eventGridTopicName=$EVENT_GRID_TOPIC_NAME microserviceResourceGroupName=ContentReactor-Categories microserviceFunctionsWorkerApiAppName=$CATEGORIES_WORKER_API_NAME
52
+ sleep 5
52
53
53
54
# Images Microservice Deploy
54
55
@@ -58,7 +59,7 @@ az group deployment create -g ContentReactor-Images --template-file $HOME/images
58
59
59
60
IMAGES_API_NAME=crimgapi$uniqueSuffixString
60
61
IMAGES_WORKER_API_NAME=crimgwapi$uniqueSuffixString
61
-
62
+ sleep 1
62
63
echo " Creating Images Blob Storage..."
63
64
IMAGES_BLOB_STORAGE_ACCOUNT_NAME=crimgblob$uniqueSuffixString
64
65
az storage container create --account-name $IMAGES_BLOB_STORAGE_ACCOUNT_NAME --name fullimages
@@ -70,11 +71,13 @@ az storage cors add --account-name $IMAGES_BLOB_STORAGE_ACCOUNT_NAME --services
70
71
71
72
echo " Deploying Images Functions..."
72
73
az webapp deployment source config-zip --resource-group ContentReactor-Images --name $IMAGES_API_NAME --src $HOME /images/src/ContentReactor.Images/ContentReactor.Images.Api/bin/Release/netstandard2.0/ContentReactor.Images.Api.zip
74
+ sleep 2
73
75
az webapp deployment source config-zip --resource-group ContentReactor-Images --name $IMAGES_WORKER_API_NAME --src $HOME /images/src/ContentReactor.Images/ContentReactor.Images.WorkerApi/bin/Release/netstandard2.0/ContentReactor.Images.WorkerApi.zip
74
76
75
77
echo " Deploying Event Grid Subscription for Images"
76
78
az account set --subscription $subscriptionId
77
79
az group deployment create -g ContentReactor-Events --template-file $HOME /images/deploy/eventGridSubscriptions.json --parameters eventGridTopicName=$EVENT_GRID_TOPIC_NAME microserviceResourceGroupName=ContentReactor-Images microserviceFunctionsWorkerApiAppName=$IMAGES_WORKER_API_NAME
80
+ sleep 5
78
81
79
82
# Audio Microservice Deploy
80
83
@@ -95,10 +98,12 @@ az storage cors add --account-name $AUDIO_BLOB_STORAGE_ACCOUNT_NAME --services b
95
98
96
99
echo " Deploying Audio Functions..."
97
100
az webapp deployment source config-zip --resource-group ContentReactor-Audio --name $AUDIO_API_NAME --src $HOME /audio/src/ContentReactor.Audio/ContentReactor.Audio.Api/bin/Release/netstandard2.0/ContentReactor.Audio.Api.zip
101
+ sleep 3
98
102
az webapp deployment source config-zip --resource-group ContentReactor-Audio --name $AUDIO_WORKER_API_NAME --src $HOME /audio/src/ContentReactor.Audio/ContentReactor.Audio.WorkerApi/bin/Release/netstandard2.0/ContentReactor.Audio.WorkerApi.zip
99
103
100
104
echo " Deploying Event Grid Subscription for Audio"
101
105
az group deployment create -g ContentReactor-Events --template-file $HOME /audio/deploy/eventGridSubscriptions.json --parameters eventGridTopicName=$EVENT_GRID_TOPIC_NAME microserviceResourceGroupName=ContentReactor-Audio microserviceFunctionsWorkerApiAppName=$AUDIO_WORKER_API_NAME
106
+ sleep 5
102
107
103
108
# Text Microservice Deploy
104
109
@@ -122,14 +127,24 @@ az group deployment create -g ContentReactor-Proxy --template-file $HOME/proxy/d
122
127
PROXY_API_NAME=crapiproxy$uniqueSuffixString
123
128
az webapp deployment source config-zip --resource-group ContentReactor-Proxy --name $PROXY_API_NAME --src $HOME /proxy/proxies/proxies.zip
124
129
125
- # Deploy Web
130
+ # Deploy Web
126
131
echo " Starting deploy of Web..."
127
132
az group create -n ContentReactor-Web -l westus2
128
133
129
134
az group deployment create --name ContentReactorWeb-Deployment --resource-group ContentReactor-Web --template-file $HOME /web/deploy/template.json --parameters uniqueResourceNameSuffix=$uniqueSuffixString functionAppProxyName=crapiproxy$uniqueSuffixString
130
135
WEB_APP_NAME=crweb$uniqueSuffixString
131
-
132
136
webInstrumentationKey=$( az resource show --namespace microsoft.insights --resource-type components --name $WEB_APP_NAME -ai -g ContentReactor-Web --query properties.InstrumentationKey)
133
137
sed -i -e ' s/\"%INSTRUMENTATION_KEY%\"/' " $webInstrumentationKey " ' /g' $HOME /web/src/signalr-web/SignalRMiddleware/EventApp/src/environments/environment.ts
138
+
139
+ cd $HOME /web/src/signalr-web/SignalRMiddleware/EventApp
140
+ npm install
141
+ npm run ubuntu-dev-build
142
+
143
+ cd $HOME /web/src/signalr-web/SignalRMiddleware/SignalRMiddleware
144
+ dotnet publish -c Release
145
+
146
+ cd $HOME /web/src/signalr-web/SignalRMiddleware/SignalRMiddleware/bin/Release/netcoreapp2.1/publish/
147
+ zip -r SignalRMiddleware.zip .
148
+
134
149
az webapp deployment source config-zip --resource-group ContentReactor-Web --name $WEB_APP_NAME --src $HOME /web/src/signalr-web/SignalRMiddleware/SignalRMiddleware/bin/Release/netcoreapp2.1/publish/SignalRMiddleware.zip
135
150
az group deployment create -g ContentReactor-Events --template-file $HOME /web/deploy/eventGridSubscriptions.json --parameters eventGridTopicName=$EVENT_GRID_TOPIC_NAME appServiceName=$WEB_APP_NAME
0 commit comments