Skip to content

Commit b243ca2

Browse files
committed
update readme
1 parent 7d82f71 commit b243ca2

File tree

3 files changed

+28
-34
lines changed

3 files changed

+28
-34
lines changed

README.md

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,23 @@
22

33
# GameOn! Java Microservices deployment on Kubernetes Cluster
44

5-
This project demonstrates deployment of a Microservices based application [Game On!](https://gameontext.org/#/) on to Kubernetes cluster. Game On! is a throwback text-based adventure built to help you explore microservice architectures and related concepts. GameOn! users start by creating a simple room, the building block of any adventure game. A user can create in text a simple room in any one of various languages in just a few minutes.
5+
This project demonstrates deployment of a Microservices based application Game On! on to Kubernetes cluster. Game On! is a throwback text-based adventure built to help you explore microservice architectures and related concepts. GameOn! users start by creating a simple room, the building block of any adventure game. A user can create in text a simple room in any one of various languages in just a few minutes.
66

77
There are several microservices used in this app
88

9-
![GameOn](images/gameon-microservices.png)
10-
119
### Core MicroServices:
1210

13-
There are five core Java microservices, using [JAX-RS](https://en.wikipedia.org/wiki/Java_API_for_RESTful_Web_Services), [CDI](https://dzone.com/articles/cdi-di-p1) etc. from [MicroProfile](http://microprofile.io) framework spec.
14-
15-
- [Player](https://github.com/gameontext/gameon-player): Players, are represented by the player Java microservice service, which provides a public API for CRUD operations, and for managing API tokens.
16-
- [Auth](https://github.com/gameontext/gameon-auth): Java microservice to allow players to connect and identify themselves via a selected "social login"
17-
- [Mediator](https://github.com/gameontext/gameon-mediator): The Mediator service is implemented in Java using WebSphere Liberty, and connects players to rooms over Websockets
18-
- [Map](https://github.com/gameontext/gameon-map): The Map service is a Java EE application running on WebSphere Liberty that provides a public REST API using JAX-RS. It stores data in a NoSQL data store, either couchdb or Cloudant
19-
- [Room](https://github.com/gameontext/gameon-room): Java based room implementation
20-
21-
In addition, Proxy and WebApp complete the core microservices
22-
23-
- [Proxy](https://github.com/gameontext/gameon-proxy): HAProxy based, and is responsible for surfacing the collection of APIs as a single facade for the entire application.
24-
- [WebApp](https://github.com/gameontext/gameon-webapp): Webapp is a simple nginx process that serves the static files that comprise the front-end of the UI.
25-
11+
- Proxy: HAProxy based, and is responsible for surfacing the collection of APIs as a single facade for the entire application.
12+
- WebApp: Webapp is a simple nginx process that serves the static files that comprise the front-end of the UI.
13+
- Player: Players, are represented by the player Java microservice service, which provides a public API for CRUD operations, and for managing API tokens.
14+
- Auth: Java microservice to allow players to connect and identify themselves via a selected "social login"
15+
- Mediator: The Mediator service is implemented in Java using WebSphere Liberty, and connects players to rooms over Websockets
16+
- Map: The Map service is a Java EE application running on WebSphere Liberty that provides a public REST API using JAX-RS. It stores data in a NoSQL data store, either couchdb or Cloudant
17+
Room: Java based room implementation
2618

2719
### Platform Services:
28-
29-
- [Amalgam8](https://www.amalgam8.io/): Content-based Routing Fabric for Polyglot Microservices. Amalgam8 supplies Registry, and a Controller, via which it implements the Service Discovery, and Service Proxying. In addition, there ia an Amalgam8 sidecar associated with each microservice, which automatically registers the microservice with the registry.
30-
- [Kafka](https://kafka.apache.org): Publish/Subscribe solution used by Amalgam8
20+
- Amalgam8: Amalgam8 supplies Registry, and a Controller, via which it implements the Service Discovery, and Service Proxying
21+
- Kafka: Publish/Subscribe solution used by Amalgam8
3122

3223
Everything would be hosted on a Kubernetes Cluster where you can access your own GameOn app from anywhere.
3324

@@ -54,8 +45,12 @@ Please follow the [Toolchain instructions](https://github.com/IBM/container-jour
5445
- 5.2 [Add Rooms](#52-add-rooms)
5546

5647
# 1. Modify the Core services yaml files
57-
First, you'll need to update the yaml files for the **core services** and **setup.yaml**.
58-
You will need to get the Public IP address of your cluster.
48+
You can also use the script provided that replaces the default values to the IP of your current cluster.
49+
* `./scripts/replace_ip_linux.sh` for linux
50+
* `./scripts/replace_ip_OSX.sh` for macOS
51+
52+
Or alternatively:
53+
Get the Public IP address of your cluster.
5954
```bash
6055
$ kubectl get nodes
6156
NAME STATUS AGE
@@ -67,10 +62,6 @@ Take note of the IP address. Go to the **core** folder and change the following
6762
> value : https://169.47.241.yyy:30443/players/v1/accounts **TO ->** value : https://169.xx.xxx.xxx:30443/players/v1/accounts
6863
> ...
6964
70-
You can also use the script provided that replaces the default values to the IP of your current cluster.
71-
* `./replace_ip_linux.sh` for linux
72-
* `./replace_ip_OSX.sh` for macOS
73-
7465
```yaml
7566
Core yaml files should look like this. Change the following env variables
7667
spec:
@@ -106,17 +97,20 @@ spec:
10697
...
10798
```
10899
# 2. Create Volumes in your Cluster
109-
You would need to create a volume for your cluster. You can use the provided yaml file. The volume will also be used by the core services. This would contain some required keystores and server configurations.
100+
You would need to create a volume for your cluster. You can use the provided yaml file. The required keystores will be stored in this volume. The volume will also be used by the core services.
110101
```bash
111102
$ kubectl create -f local-volumes.yaml
112103
persistent volumes "local-volume-1" created
113104
persistent volumes "keystore-claim" created
114105
```
115106

116-
You can now create the required keystores using the **setup.yaml** file. This will create a Pod and create the keystores. Once it is done, the Pod will terminate. You may delete the pod after.
107+
You can now create the required keystores using the **setup.yaml** file. This will create a Pod and create the keystores.
117108
```bash
118109
$ kubectl create -f setup.yaml
119110
```
111+
112+
Once it is done, the Pod will not run again. You can delete the Pod after using `kubectl delete pod setup` (optional).
113+
120114
If you want to confirm that the Pod has successfully imported the keystores, you can view the Pod's logs.
121115
```bash
122116
$ kubectl logs setup
@@ -136,7 +130,7 @@ Import command completed: 104 entries successfully imported, 0 entries failed o
136130
```
137131

138132
# 3. Create the Platform Services
139-
You can now create the Platform services and deployments of the app.
133+
You can now create the [Platform services](#platform-services) and deployments of the app.
140134
```bash
141135
$ kubectl create -f platform
142136
OR alternatively
@@ -155,8 +149,8 @@ If both of them outputs 200, you can proceed to the next step.
155149
> Note: It can take around 1-2 minutes for the Pods to setup completely.
156150
157151
# 4. Create the Core Services
158-
Finally, you can create the Core services and deployments of the app.
159-
*(If you want to have social logins, please follow the steps [here](#a-adding-social-logins) before deploying the core services)*
152+
Finally, you can create the **[Core services](#core-microservices)** and deployments of the app.
153+
*(If you want to have social logins, please follow the steps [here](#a-adding-social-logins) before deploying the [core services](#core-microservices))*
160154

161155

162156
```bash
@@ -167,7 +161,7 @@ $ kubectl create -f core/<file-name>.yaml
167161
...
168162
$ kubectl create -f core/webapp.yaml
169163
```
170-
To verify if the core services has finished setting up, you would need to check the logs of the Pod of the proxy. You can get the Pod name of the proxy using **kubectl get pods**
164+
To verify if the [core services](#core-microservices) has finished setting up, you would need to check the logs of the Pod of the proxy. You can get the Pod name of the proxy using **kubectl get pods**
171165
```bash
172166
kubectl logs proxy-***-**
173167
```
@@ -198,7 +192,7 @@ Now that you have successfully deployed your own app in the Bluemix Kubernetes C
198192
You may want to add social logins so you and your friends can explore the rooms together.
199193
To add social logins you would need to have developer accounts on the social app you want to use.
200194

201-
> You will need to redeploy your **Core** services with the your own modified yaml files. The next step will show you where to add your API Keys.
195+
> You will need to redeploy your **[Core services](#core-microservices)** with the your own modified yaml files. The next step will show you where to add your API Keys.
202196
203197

204198
## Github
@@ -212,7 +206,7 @@ For the Authorization callback URL, you will need to put the IP address and the
212206
213207
You can edit that in the GitHub later if you made a new cluster.
214208
Now, take note of the **Client ID** and **Client Secret** of the app.
215-
You will need to add this in the environment variables on the yaml files of your **Core services**
209+
You will need to add this in the environment variables on the yaml files of your **[Core services](#core-microservices)**
216210
```yaml
217211
...
218212
- name: GITHUB_APP_ID
@@ -236,7 +230,7 @@ For the Authorization callback URL, you will need to put the IP address and the
236230
> https://169.xxx.xxx.xxx:30443/auth/TwitterAuth
237231
238232
Go to the Keys and Access Tokens section of the twitter application you just registered and take note of the **Consumer Key** and **Consumer Secret** of the app.
239-
You will need to add this in the environment variables on the yaml files of your **Core services**
233+
You will need to add this in the environment variables on the yaml files of your **[Core services](#core-microservices)**
240234
```yaml
241235
...
242236
- name: TWITTER_CONSUMER_KEY

scripts/replace_ip_OSX.sh

100644100755
File mode changed.

scripts/replace_ip_linux.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)