Browse Source

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

# Conflicts:
#	k8s/deploy.ps1
pull/235/head
Eduard Tomas 7 years ago
parent
commit
fc06230c5a
9 changed files with 61674 additions and 6 deletions
  1. +20024
    -0
      k8s/.kube/schema/v1.5.3/api/v1/schema.json
  2. +10768
    -0
      k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json
  3. +20024
    -0
      k8s/.kube/schema/v1.5.3/schema095733259
  4. +10768
    -0
      k8s/.kube/schema/v1.5.3/schema392735526
  5. +14
    -5
      k8s/deploy.ps1
  6. +55
    -0
      k8s/deployments.yaml
  7. +6
    -0
      k8s/nginx.conf
  8. +14
    -0
      k8s/services.yaml
  9. +1
    -1
      src/Web/WebMVC/wwwroot/css/site.min.css

+ 20024
- 0
k8s/.kube/schema/v1.5.3/api/v1/schema.json
File diff suppressed because it is too large
View File


+ 10768
- 0
k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json
File diff suppressed because it is too large
View File


+ 20024
- 0
k8s/.kube/schema/v1.5.3/schema095733259
File diff suppressed because it is too large
View File


+ 10768
- 0
k8s/.kube/schema/v1.5.3/schema392735526
File diff suppressed because it is too large
View File


+ 14
- 5
k8s/deploy.ps1 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

+ 55
- 0
k8s/deployments.yaml 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:


+ 6
- 0
k8s/nginx.conf 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;


+ 14
- 0
k8s/services.yaml 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


+ 1
- 1
src/Web/WebMVC/wwwroot/css/site.min.css
File diff suppressed because it is too large
View File


Loading…
Cancel
Save