You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
This project demonstrates deployment of a Microservices based application Game On! on to Kubernetes cluster service from Bluemix. 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. With the tutorials available at the [GameOn! website](https://gameontext.org), 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 service from Bluemix. 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. With the tutorials available at the [GameOn! website](https://book.gameontext.org), a user can create in text a simple room in any one of various languages in just a few minutes.
6
6
7
7
There are several microservices used in this app ranging from **couchdb, redis, to frontend tier services**. Everything would be hosted in Bluemix Kubernetes Container Service where you can access your own GameOn app from anywhere.
8
8
@@ -31,7 +31,7 @@ Please follow the [Toolchain instructions](https://github.com/IBM/container-jour
31
31
5.[Explore your GameOn App](#5-explore-your-gameon-app)
32
32
33
33
A. [Adding Social Logins](#a-adding-social-logins)
34
-
34
+
B. [Adding Rooms](#b-adding-rooms)
35
35
36
36
# 1. Modify the yaml files
37
37
First, you'll need to update the yaml files for the **core services** and **setup.yaml**.
You can now create the Platform services and deployments of the app. You can use the script provided to create the services and deployments in one command or, alternatively, you can use **kubectl create -f** with every yaml file in the platform directory.
116
+
You can now create the Platform services and deployments of the app.
117
117
```bash
118
-
$ ./platform-services.sh
118
+
$ kubectl create -f platform
119
119
OR alternatively
120
120
$ kubectl create -f platform/controller.yaml
121
121
$ kubectl create -f platform/<file-name>.yaml
122
122
...
123
123
$ kubectl create -f platform/registry.yaml
124
124
```
125
+
126
+
To check if the control plane (controller and registry) is up:
127
+
```bash
128
+
$ curl -w "%{http_code}""<Public IP of your cluster>:31200/health" -o /dev/null
129
+
$ curl -w "%{http_code}""<Public IP of your kubernetes>:31300/uptime" -o /dev/null
130
+
```
131
+
If both of them outputs 200, you can proceed to the next step.
125
132
> Note: It can take around 1-2 minutes for the Pods to setup completely.
126
133
127
134
# 4. Create the Core Services
128
-
Finally, you can create the Core services and deployments of the app. Like creating the platform services, you can use the script provided or use **kubectl create -f** with every yaml file in the core directory.
135
+
Finally, you can create the Core services and deployments of the app.
136
+
*(If you want to have social logins, please follow the steps [here](#a-adding-social-logins) before deploying the core services)*
137
+
138
+
129
139
```bash
130
-
$ ./core-services.sh
140
+
$ kubectl create -f core
131
141
OR alternatively
132
142
$ kubectl create -f core/auth.yaml
133
143
$ kubectl create -f core/<file-name>.yaml
@@ -138,11 +148,13 @@ To verify if the core services has finished setting up, you would need to check
138
148
```bash
139
149
kubectl logs proxy-***-**
140
150
```
141
-
You should look for the map, auth, and room servers. Confirm if they are UP.
151
+
You should look for the map, auth, mediator, player and room servers. Confirm if they are UP.
142
152
```bash
143
153
[WARNING] 094/205214 (11) : Server room/room1 is UP, reason: Layer7 check passed ...
144
154
[WARNING] 094/205445 (11) : Server auth/auth1 is UP, reason: Layer7 check passed ...
145
155
[WARNING] 094/205531 (11) : Server map/map1 is UP, reason: Layer7 check passed ...
156
+
[WARNING] 094/205531 (11) : Server mediator/mediator1 is UP, reason: Layer7 check passed ...
157
+
[WARNING] 094/205531 (11) : Server player/player1 is UP, reason: Layer7 check passed ...
146
158
```
147
159
> It can take around 5-10 minutes for these services to setup completely.
148
160
@@ -161,7 +173,11 @@ Now that you have successfully deployed your own app in the Bluemix Kubernetes C
161
173
162
174
# A. Adding Social Logins
163
175
You may want to add social logins so you and your friends can explore the rooms together.
164
-
To add social logins you would need to have developer accounts on the social app you want to use.
176
+
To add social logins you would need to have developer accounts on the social app you want to use.
177
+
178
+
> 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.
179
+
180
+
165
181
## Github
166
182
You can register your application in this link: [New OAuth Application](https://github.com/settings/applications/new)
167
183

@@ -207,3 +223,34 @@ You will need to add this in the environment variables on the yaml files of your
207
223
...
208
224
```
209
225
> The application uses the keys(name) **TWITTER_CONSUMER_KEY** and **TWITTER_CONSUMER_SECRET** and must exactly match these in the core yaml files.
226
+
227
+
# B. Adding Rooms
228
+
229
+
You can build your own rooms by following [**this guide**](https://gameontext.gitbooks.io/gameon-gitbook/content/walkthroughs/createRoom.html) by the GameOn team. They have some sample rooms written in Java, Swift, Go, and more.
230
+
231
+
In this journey, you will deploy the sample rooms written in **Java** and **Swift**. You will deploy it in the same cluster as your GameOn App.
232
+
233
+
You can create these rooms by executing
234
+
```bash
235
+
$ kubectl create -f sample-rooms
236
+
```
237
+
238
+
To register the deployed rooms in the cluster, you will need to use the UI of your app.
239
+
* Click on the Registered Rooms button at the top right.
240
+

241
+
242
+
* Enter the necessary information of the room. (*Leave the Github Repo and Health Endpoint fields blank.*) Then click `Register`
243
+
> Note: In the samples, the Java Room uses port 9080, while the Swift room uses port 8080.
244
+
245
+

246
+

247
+
* You now have successfully registered your rooms in your Map. You can go to them directly by typing these commands in the UI: `/listmyrooms` and use the id in `/teleport <id-of-the-room>`
248
+
You can learn more about the details of registering a room [**here**](https://gameontext.gitbooks.io/gameon-gitbook/content/walkthroughs/registerRoom.html).
249
+
250
+
## References
251
+
252
+
*[GameOn](https://gameontext.org) - The original game on app [deployed using Dockers](https://book.gameontext.org/walkthroughs/local-docker.html)
0 commit comments