Skip to content

Commit 5bb6759

Browse files
committed
k8s config updated
1 parent a34ed28 commit 5bb6759

17 files changed

Lines changed: 1046 additions & 380 deletions

docker-compose.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,37 +109,37 @@ services:
109109
image: rabbitmq:3-management-alpine
110110

111111
mobileshoppingapigw:
112-
image: eshop/ocelotapigw-ms
112+
image: eshop/ocelotapigw-ms:${TAG:-latest}
113113
build:
114114
context: .
115115
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
116116

117117
mobilemarketingapigw:
118-
image: eshop/ocelotapigw-mm
118+
image: eshop/ocelotapigw-mm:${TAG:-latest}
119119
build:
120120
context: .
121121
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile2
122122

123123
webshoppingapigw:
124-
image: eshop/ocelotapigw-ws
124+
image: eshop/ocelotapigw-ws:${TAG:-latest}
125125
build:
126126
context: .
127127
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile3
128128

129129
webmarketingapigw:
130-
image: eshop/ocelotapigw-wm
130+
image: eshop/ocelotapigw-wm:${TAG:-latest}
131131
build:
132132
context: .
133133
dockerfile: src/ApiGateways/ApiGw-Base/Dockerfile
134134

135135
mobileshoppingagg:
136-
image: eshop/mobileshoppingagg
136+
image: eshop/mobileshoppingagg:${TAG:-latest}
137137
build:
138138
context: .
139139
dockerfile: src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
140140

141141
webshoppingagg:
142-
image: eshop/webshoppingagg
142+
image: eshop/webshoppingagg:${TAG:-latest}
143143
build:
144144
context: .
145145
dockerfile: src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile

k8s/conf_cloud.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ metadata:
44
name: externalcfg
55
labels:
66
app: eshop
7-
data:
7+
data:
88
# Basket.API entries
9-
BasketBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
10-
BasketRedisConStr: REDIS CONNECTION STRING FOR BASKET
9+
basket__ConnectionString: REDIS CONNECTION STRING FOR BASKET
1110
# Catalog.API entries
12-
CatalogBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
13-
CatalogSqlDb: Catalog SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
11+
catalog__ConnectionString: Catalog SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
1412
# Identity.API entries
1513
IdentitySqlDb: Identity SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
1614
# Locations.API entries
@@ -30,5 +28,7 @@ data:
3028
# Payment.API entries
3129
PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
3230
# Global entries
33-
UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ)
34-
keystore: REDIS CONNECTION STRING FOR KEYSTORE
31+
all_UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ)
32+
keystore: REDIS CONNECTION STRING FOR KEYSTORE
33+
all_EventBusConnection: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
34+
all_InstrumentationKey: APPINSIGHTS KEY

k8s/conf_local.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,23 @@ metadata:
55
labels:
66
app: eshop
77
data:
8-
BasketBus: rabbitmq
9-
BasketRedisConStr: basket-data
10-
CatalogBus: rabbitmq
11-
CatalogSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;
12-
CatalogAzureStorageEnabled: "False"
13-
IdentitySqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;
14-
LocationsBus: rabbitmq
15-
LocationsNoSqlDb: mongodb://nosql-data
16-
LocationsNoSqlDbName: LocationsDb
17-
MarketingBus: rabbitmq
18-
MarketingNoSqlDb: mongodb://nosql-data
19-
MarketingNoSqlDbName: MarketingDb
20-
MarketingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word;
21-
OrderingBus: rabbitmq
22-
OrderingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;
23-
PaymentBus: rabbitmq
24-
UseAzureServiceBus: "False"
25-
EnableLoadTest: "False"
8+
basket__ConnectionString: basket-data
9+
catalog__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;
10+
catalog__AzureStorageEnabled: "False"
11+
identity__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;
12+
locations__ConnectionString: mongodb://nosql-data
13+
locations__Database: LocationsDb
14+
marketing__MongoConnectionString: mongodb://nosql-data
15+
marketing__MongoDatabase: MarketingDb
16+
marketing__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word;
17+
ordering__ConnectionString: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;
2618
keystore: keystore-data
27-
GracePeriodManager_GracePeriodTime: "1"
28-
GracePeriodManager_CheckUpdateTime: "15000"
29-
Instrumentation_Key: ""
19+
GracePeriodManager__GracePeriodTime: "1"
20+
GracePeriodManager__CheckUpdateTime: "15000"
21+
all__EventBusConnection: rabbitmq
22+
all__InstrumentationKey: ""
23+
all__EnableLoadTest: "False"
24+
all__UseAzureServiceBus: "False"
3025

3126

3227

k8s/deploy.ps1

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if ($buildImages) {
6565
docker-compose -p .. -f ../docker-compose.yml build
6666

6767
Write-Host "Pushing images to $registry/$dockerOrg..." -ForegroundColor Yellow
68-
$services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "ocelotapigw")
68+
$services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "ocelotapigw-mm", "ocelotapigw-ms", "ocelotapigw-wm", "ocelotapigw-ws", "mobileshoppingagg", "webshoppingagg")
6969

7070
foreach ($service in $services) {
7171
$imageFqdn = if ($useDockerHub) {"$dockerOrg/${service}"} else {"$registry/$dockerOrg/${service}"}
@@ -103,6 +103,7 @@ if (-not [string]::IsNullOrEmpty($dockerUser)) {
103103
Write-Host "Removing existing services & deployments.." -ForegroundColor Yellow
104104
ExecKube -cmd 'delete deployments --all'
105105
ExecKube -cmd 'delete services --all'
106+
ExecKube -cmd 'delete configmap internalurls'
106107
ExecKube -cmd 'delete configmap urls'
107108
ExecKube -cmd 'delete configmap externalcfg'
108109
ExecKube -cmd 'delete configmap ocelot'
@@ -116,47 +117,28 @@ if ($deployInfrastructure) {
116117

117118
Write-Host 'Deploying ocelot APIGW' -ForegroundColor Yellow
118119

119-
ExecKube "create configmap ocelot --from-file=ocelot/configuration.json"
120+
ExecKube "create configmap ocelot --from-file=mm=ocelot/configuration-mobile-marketing.json --from-file=ms=ocelot/configuration-mobile-shopping.json --from-file=wm=ocelot/configuration-web-marketing.json --from-file=ws=ocelot/configuration-web-shopping.json "
120121
ExecKube -cmd "apply -f ocelot/deployment.yaml"
121122
ExecKube -cmd "apply -f ocelot/service.yaml"
122123

123124
Write-Host 'Deploying code deployments (Web APIs, Web apps, ...)' -ForegroundColor Yellow
124125
ExecKube -cmd 'create -f services.yaml'
125126

127+
ExecKube -cmd 'create -f internalurls.yaml'
126128
ExecKube -cmd 'create configmap urls `
127-
--from-literal=BasketUrl=http://basket `
128-
--from-literal=BasketHealthCheckUrl=http://basket/hc `
129-
--from-literal=CatalogUrl=http://$($externalDns)/catalog-api `
130-
--from-literal=CatalogHealthCheckUrl=http://catalog/hc `
131-
--from-literal=PicBaseUrl=http://$($externalDns)/catalog-api/api/v1/catalog/items/[0]/pic/ `
132-
--from-literal=Marketing_PicBaseUrl=http://$($externalDns)/marketing-api/api/v1/campaigns/[0]/pic/ `
133-
--from-literal=IdentityUrl=http://$($externalDns)/identity `
134-
--from-literal=IdentityHealthCheckUrl=http://identity/hc `
135-
--from-literal=OrderingUrl=http://ordering `
136-
--from-literal=OrderingHealthCheckUrl=http://ordering/hc `
137-
--from-literal=MvcClientExternalUrl=http://$($externalDns)/webmvc `
138-
--from-literal=WebMvcHealthCheckUrl=http://webmvc/hc `
139-
--from-literal=MvcClientOrderingUrl=http://ordering `
140-
--from-literal=MvcClientCatalogUrl=http://catalog `
141-
--from-literal=MvcClientBasketUrl=http://basket `
142-
--from-literal=MvcClientMarketingUrl=http://marketing `
143-
--from-literal=MvcClientLocationsUrl=http://locations `
144-
--from-literal=MarketingHealthCheckUrl=http://marketing/hc `
145-
--from-literal=WebSpaHealthCheckUrl=http://webspa/hc `
146-
--from-literal=SpaClientMarketingExternalUrl=http://$($externalDns)/marketing-api `
147-
--from-literal=SpaClientOrderingExternalUrl=http://$($externalDns)/ordering-api `
148-
--from-literal=SpaClientCatalogExternalUrl=http://$($externalDns)/catalog-api `
149-
--from-literal=SpaClientBasketExternalUrl=http://$($externalDns)/basket-api `
150-
--from-literal=SpaClientIdentityExternalUrl=http://$($externalDns)/identity `
151-
--from-literal=SpaClientLocationsUrl=http://$($externalDns)/locations-api `
152-
--from-literal=LocationsHealthCheckUrl=http://locations/hc `
153-
--from-literal=SpaClientExternalUrl=http://$($externalDns) `
154-
--from-literal=LocationApiClient=http://$($externalDns)/locations-api `
155-
--from-literal=MarketingApiClient=http://$($externalDns)/marketing-api `
156-
--from-literal=BasketApiClient=http://$($externalDns)/basket-api `
157-
--from-literal=OrderingApiClient=http://$($externalDns)/ordering-api `
158-
--from-literal=PaymentHealthCheckUrl=http://payment/hc'
159-
129+
--from-literal=PicBaseUrl=http://$($externalDns)/webshoppingapigw/api/v1/c/catalog/items/[0]/pic/ `
130+
--from-literal=Marketing_PicBaseUrl=http://$($externalDns)/webmarketingapigw/api/v1/m/campaigns/[0]/pic/ `
131+
--from-literal=mvc_e=http://$($externalDns)/webmvc `
132+
--from-literal=marketingapigw_e=http://$($externalDns)/webmarketingapigw `
133+
--from-literal=webshoppingapigw_e=http://$($externalDns)/webshoppingapigw `
134+
--from-literal=mobileshoppingagg_e=http://$($externalDns)/mobileshoppingagg `
135+
--from-literal=webshoppingagg_e=http://$($externalDns)/webshoppingagg `
136+
--from-literal=identity_e=http://$($externalDns)/identity `
137+
--from-literal=spa_e=http://$($externalDns) `
138+
--from-literal=locations_e=http://$($externalDns)/locations-api `
139+
--from-literal=marketing_e=http://$($externalDns)/marketing-api `
140+
--from-literal=basket_e=http://$($externalDns)/basket-api `
141+
--from-literal=ordering_e=http://$($externalDns)/ordering-api '
160142

161143
ExecKube -cmd 'label configmap urls app=eshop'
162144

@@ -184,7 +166,14 @@ ExecKube -cmd 'set image deployments/payment payment=${registryPath}${dockerOrg}
184166
ExecKube -cmd 'set image deployments/webmvc webmvc=${registryPath}${dockerOrg}/webmvc:$imageTag'
185167
ExecKube -cmd 'set image deployments/webstatus webstatus=${registryPath}${dockerOrg}/webstatus:$imageTag'
186168
ExecKube -cmd 'set image deployments/webspa webspa=${registryPath}${dockerOrg}/webspa:$imageTag'
187-
ExecKube -cmd 'set image deployments/ocelot ocelot=${registryPath}${dockerOrg}/ocelotapigw:$imageTag'
169+
170+
ExecKube -cmd 'set image deployments/mobileshoppingagg mobileshoppingagg=${registryPath}${dockerOrg}/mobileshoppingagg:$imageTag'
171+
ExecKube -cmd 'set image deployments/webshoppingagg webshoppingagg=${registryPath}${dockerOrg}/webshoppingagg:$imageTag'
172+
173+
ExecKube -cmd 'set image deployments/apigwmm apigwmm=${registryPath}${dockerOrg}/ocelotapigw-mm:$imageTag'
174+
ExecKube -cmd 'set image deployments/apigwms apigwms=${registryPath}${dockerOrg}/ocelotapigw-ms:$imageTag'
175+
ExecKube -cmd 'set image deployments/apigwwm apigwwm=${registryPath}${dockerOrg}/ocelotapigw-wm:$imageTag'
176+
ExecKube -cmd 'set image deployments/apigwws apigwws=${registryPath}${dockerOrg}/ocelotapigw-ws:$imageTag'
188177

189178
Write-Host "Execute rollout..." -ForegroundColor Yellow
190179
ExecKube -cmd 'rollout resume deployments/basket'
@@ -197,7 +186,12 @@ ExecKube -cmd 'rollout resume deployments/payment'
197186
ExecKube -cmd 'rollout resume deployments/webmvc'
198187
ExecKube -cmd 'rollout resume deployments/webstatus'
199188
ExecKube -cmd 'rollout resume deployments/webspa'
200-
ExecKube -cmd 'rollout resume deployments/ocelot'
189+
ExecKube -cmd 'rollout resume deployments/mobileshoppingagg'
190+
ExecKube -cmd 'rollout resume deployments/webshoppingagg'
191+
ExecKube -cmd 'rollout resume deployments/apigwmm'
192+
ExecKube -cmd 'rollout resume deployments/apigwms'
193+
ExecKube -cmd 'rollout resume deployments/apigwwm'
194+
ExecKube -cmd 'rollout resume deployments/apigwws'
201195

202196
Write-Host "WebSPA is exposed at http://$externalDns, WebMVC at http://$externalDns/webmvc, WebStatus at http://$externalDns/webstatus" -ForegroundColor Yellow
203197

0 commit comments

Comments
 (0)