Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
update guestbook-demo to work on openshift (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
kadel authored and cdrage committed Nov 28, 2017
1 parent 0e1f38d commit 99e40dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
11 changes: 11 additions & 0 deletions examples/guestbook-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@ If you are using `minikube` for local Kubernetes deployment, you can access your
$ minikube service guestbook
Opening kubernetes service default/guestbook in default browser...
```

If you are using `minishift` for local OpenShift development, you can create Route and access your Guestbook instance using it.

```sh
$ oc expose svc frontend
route "frontend" exposed

$ oc get route frontend
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
frontend frontend-myproject.192.168.64.19.nip.io frontend frontend-8080 None
```
2 changes: 1 addition & 1 deletion examples/guestbook-demo/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ containers:
valueFrom:
configMapKeyRef:
name: mongodb-user
key: MONGODB_USERNAME
key: MONGODB_USER
- name: MONGODB_DATABASE
valueFrom:
configMapKeyRef:
Expand Down
8 changes: 3 additions & 5 deletions examples/guestbook-demo/db.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: mongodb

containers:
- image: bitnami/mongodb@sha256:0665d6f4be13b965a8ff60a11b770e6434b627ffc12df640e3c0527af53d449b

- image: centos/mongodb-32-centos7:3.2
envFrom:
- secretRef:
name: mongodb-admin
Expand All @@ -13,8 +12,7 @@ containers:

volumeMounts:
- name: mongodb-data
mountPath: /bitnami

mountPath: /var/lib/mongodb/data
services:
- portMappings:
- 27017
Expand All @@ -34,6 +32,6 @@ secrets:
configMaps:
- name: mongodb-user
data:
MONGODB_USERNAME: user
MONGODB_USER: user
MONGODB_DATABASE: db
MONGODB_SERVER: mongodb:27017

0 comments on commit 99e40dd

Please sign in to comment.