Skip to content

Commit

Permalink
case #18
Browse files Browse the repository at this point in the history
  • Loading branch information
DickChesterwood committed May 16, 2018
1 parent 3cded05 commit 7f830e9
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 49 deletions.
9 changes: 9 additions & 0 deletions k8s-fleetman-webapp-angular/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM nginx:1.14.0-alpine

MAINTAINER Richard Chesterwood "richard@inceptiontraining.co.uk"

RUN rm -rf /usr/share/nginx/html/*

COPY /dist /usr/share/nginx/html

CMD ["nginx", "-g", "daemon off;"]`
2 changes: 1 addition & 1 deletion k8s-fleetman-webapp-angular/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {NgbModule} from '@ng-bootstrap/ng-bootstrap';

const stompConfig: StompConfig = {
// Which server?
url: 'ws://localhost:8080/updates',
url: 'ws://192.168.99.100:30030/updates',
headers: {
},
// How often to heartbeat?
Expand Down
35 changes: 0 additions & 35 deletions k8s-manifests/docker-compose.yaml

This file was deleted.

40 changes: 29 additions & 11 deletions k8s-manifests/replica-set.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: queue-replicaset
name: queue
labels:
app: queue
spec:
# this replicas value is default
# modify it according to your case
replicas: 1
selector:
matchLabels:
Expand All @@ -18,14 +16,14 @@ spec:
spec:
containers:
- name: fleetman-queue
image: richardchesterwood/k8s-fleetman-queue
image: richardchesterwood/k8s-fleetman-queue:release1
ports:
- containerPort: 8161
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: simulator-replicaset
name: simulator
labels:
app: simulator
spec:
Expand All @@ -40,12 +38,12 @@ spec:
spec:
containers:
- name: fleetman-position-simulator
image: richardchesterwood/k8s-fleetman-position-simulator
image: richardchesterwood/k8s-fleetman-position-simulator:release1
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: tracker-replicaset
name: tracker
labels:
app: tracker
spec:
Expand All @@ -60,12 +58,32 @@ spec:
spec:
containers:
- name: fleetman-position-tracker
image: richardchesterwood/k8s-fleetman-position-tracker
image: richardchesterwood/k8s-fleetman-position-tracker:release1
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: webapp-replicaset
name: api-gateway
labels:
app: api-gateway
spec:
replicas: 1
selector:
matchLabels:
app: api-gateway
template:
metadata:
labels:
app: api-gateway
spec:
containers:
- name: fleetman-api-gateway
image: richardchesterwood/k8s-fleetman-api-gateway:release1
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: webapp
labels:
app: webapp
spec:
Expand All @@ -80,5 +98,5 @@ spec:
spec:
containers:
- name: fleetman-webapp
image: richardchesterwood/k8s-fleetman-webapp
image: richardchesterwood/k8s-fleetman-webapp-angular:release1

18 changes: 16 additions & 2 deletions k8s-manifests/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,27 @@ spec:
---
kind: Service
apiVersion: v1
metadata:
name: fleetman-api-gateway
spec:
selector:
app: api-gateway
ports:
- name: http
port: 8080
nodePort: 30000
type: NodePort
---
kind: Service
apiVersion: v1
metadata:
name: fleetman-webapp
spec:
selector:
app: webapp
ports:
- name: http
port: 8080
nodePort: 30030
port: 80
nodePort: 30040
type: NodePort

0 comments on commit 7f830e9

Please sign in to comment.