updates to ocelot
This commit is contained in:
parent
ea4e0ed6e8
commit
266ec51e54
@ -3,9 +3,8 @@
|
|||||||
[parameter(Mandatory=$true)][string]$location,
|
[parameter(Mandatory=$true)][string]$location,
|
||||||
[parameter(Mandatory=$false)][string]$registryName,
|
[parameter(Mandatory=$false)][string]$registryName,
|
||||||
[parameter(Mandatory=$true)][string]$serviceName,
|
[parameter(Mandatory=$true)][string]$serviceName,
|
||||||
[parameter(Mandatory=$true)][string]$dnsName,
|
|
||||||
[parameter(Mandatory=$true)][string]$createAcr=$true,
|
[parameter(Mandatory=$true)][string]$createAcr=$true,
|
||||||
[parameter(Mandatory=$false)][int]$nodeCount=2,
|
[parameter(Mandatory=$false)][int]$nodeCount=3,
|
||||||
[parameter(Mandatory=$false)][string]$nodeVMSize="Standard_D2_v2"
|
[parameter(Mandatory=$false)][string]$nodeVMSize="Standard_D2_v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -21,7 +20,7 @@ if ($createAcr -eq $true) {
|
|||||||
|
|
||||||
# Create kubernetes orchestrator
|
# Create kubernetes orchestrator
|
||||||
Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow
|
Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow
|
||||||
az aks create --resource-group=$resourceGroupName --name=$serviceName --dns-name-prefix=$dnsName --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize
|
az aks create --resource-group=$resourceGroupName --name=$serviceName --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize
|
||||||
|
|
||||||
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
|
# Retrieve kubernetes cluster configuration and save it under ~/.kube/config
|
||||||
az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName
|
az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName
|
||||||
|
@ -37,7 +37,7 @@ spec:
|
|||||||
servicePort: 80
|
servicePort: 80
|
||||||
- path: /marketing-api
|
- path: /marketing-api
|
||||||
backend:
|
backend:
|
||||||
serviceName: marketing
|
serviceName: ocelot
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
- path: /payment-api
|
- path: /payment-api
|
||||||
backend:
|
backend:
|
||||||
@ -51,5 +51,9 @@ spec:
|
|||||||
backend:
|
backend:
|
||||||
serviceName: webspa
|
serviceName: webspa
|
||||||
servicePort: 80
|
servicePort: 80
|
||||||
|
- path: /ocelot
|
||||||
|
backend:
|
||||||
|
serviceName: ocelot
|
||||||
|
servicePort: 80
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,14 +29,16 @@ namespace OcelotApiGw
|
|||||||
services.AddOcelot(_cfg);
|
services.AddOcelot(_cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
|
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
|
||||||
{
|
{
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseDeveloperExceptionPage();
|
app.UseDeveloperExceptionPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.UseOcelot();
|
loggerFactory.AddConsole(_cfg.GetSection("Logging"));
|
||||||
|
|
||||||
|
app.UseOcelot().Wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
10
src/Apigw/OcelotApiGw/appsettings.json
Normal file
10
src/Apigw/OcelotApiGw/appsettings.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"IncludeScopes": true,
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Trace",
|
||||||
|
"System": "Information",
|
||||||
|
"Microsoft": "Information"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user