Merge remote-tracking branch 'eShopOnContainers/dev' into dev

# Conflicts:
#	k8s/deploy.ps1
This commit is contained in:
Eduard Tomas 2017-05-22 10:06:39 +02:00
commit fc06230c5a
9 changed files with 61674 additions and 6 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -70,7 +70,7 @@ if(-not $deployCI) {
docker-compose -p .. -f ../docker-compose.yml build
Write-Host "Pushing images to $registry..." -ForegroundColor Yellow
$services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "webmvc", "webspa")
$services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "webmvc", "webspa", "webstatus")
foreach ($service in $services) {
docker tag eshop/$service $registry/eshop/$service
docker push $registry/eshop/$service
@ -87,11 +87,18 @@ while ($true) {
}
ExecKube -cmd 'create configmap urls `
--from-literal=BasketUrl=http://basket `
--from-literal=CatalogUrl=http://catalog `
--from-literal=BasketUrl=http://$($frontendUrl)/basket-api `
--from-literal=BasketHealthCheckUrl=http://$($frontendUrl)/basket-api/hc `
--from-literal=CatalogUrl=http://$($frontendUrl)/catalog-api `
--from-literal=CatalogHealthCheckUrl=http://$($frontendUrl)/catalog-api/hc `
--from-literal=IdentityUrl=http://$($frontendUrl)/identity `
--from-literal=OrderingUrl=http://ordering `
--from-literal=IdentityHealthCheckUrl=http://$($frontendUrl)/identity/hc `
--from-literal=OrderingUrl=http://$($frontendUrl)/ordering-api `
--from-literal=OrderingHealthCheckUrl=http://$($frontendUrl)/ordering-api/hc `
--from-literal=MvcClient=http://$($frontendUrl)/webmvc `
--from-literal=WebMvcHealthCheckUrl=http://$($frontendUrl)/webmvc/hc `
--from-literal=WebStatusClient=http://$($frontendUrl)/webstatus `
--from-literal=WebSpaHealthCheckUrl=http://$($frontendUrl)/hc `
--from-literal=SpaClient=http://$($frontendUrl)'
ExecKube -cmd 'label configmap urls app=eshop'
@ -109,9 +116,11 @@ if(-not $deployCI) {
identity=$registry/eshop/identity.api `
ordering=$registry/eshop/ordering.api `
webmvc=$registry/eshop/webmvc `
webstatus=$registry/eshop/webstatus `
webspa=$registry/eshop/webspa'
}
ExecKube -cmd 'rollout resume -f deployments.yaml'
Write-Host "WebSPA is exposed at http://$frontendUrl, WebMVC at http://$frontendUrl/webmvc" -ForegroundColor Yellow
Write-Host "WebSPA is exposed at http://$frontendUrl, WebMVC at http://$frontendUrl/webmvc, WebStatus at http://$frontendUrl/webstatus" -ForegroundColor Yellow

View File

@ -186,6 +186,61 @@ spec:
imagePullSecrets:
- name: registry-key
---
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: webstatus
spec:
paused: true
template:
metadata:
labels:
app: eshop
component: webstatus
spec:
containers:
- name: webstatus
image: eshop/webstatus
imagePullPolicy: Always
env:
- name: ASPNETCORE_URLS
value: http://0.0.0.0:80/webstatus
- name: BasketUrl
valueFrom:
configMapKeyRef:
name: urls
key: BasketHealthCheckUrl
- name: CatalogUrl
valueFrom:
configMapKeyRef:
name: urls
key: CatalogHealthCheckUrl
- name: IdentityUrl
valueFrom:
configMapKeyRef:
name: urls
key: IdentityHealthCheckUrl
- name: OrderingUrl
valueFrom:
configMapKeyRef:
name: urls
key: OrderingHealthCheckUrl
- name: mvc
valueFrom:
configMapKeyRef:
name: urls
key: WebMvcHealthCheckUrl
- name: spa
valueFrom:
configMapKeyRef:
name: urls
key: WebSpaHealthCheckUrl
ports:
- containerPort: 80
imagePullSecrets:
- name: registry-key
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:

View File

@ -65,6 +65,12 @@ http {
proxy_set_header Host $host;
}
location /webstatus {
proxy_pass http://webstatus;
proxy_redirect off;
proxy_set_header Host $host;
}
location / {
proxy_pass http://webspa;
proxy_redirect off;

View File

@ -70,6 +70,20 @@ spec:
---
apiVersion: v1
kind: Service
metadata:
labels:
app: eshop
component: webstatus
name: webstatus
spec:
ports:
- port: 80
selector:
app: eshop
component: webstatus
---
apiVersion: v1
kind: Service
metadata:
labels:
app: eshop

File diff suppressed because one or more lines are too long