Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 2749501

Browse files
authoredAug 17, 2017
Travis fix (#21)
* Fix travis.yml * Fix travis.yml * Fix travis script * Fix travis script * Fix travis script * Fix travis script * Used config map for environment variables * Fix travis * default values * Update README * Update README & minikube fix * Change default IP to PLACEHOLDER string * Update troubleshooting section * Update README
1 parent 48fe8bd commit 2749501

File tree

17 files changed

+951
-374
lines changed

17 files changed

+951
-374
lines changed
 

‎.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ before_install:
66
group: stable
77
dist: precise
88
os: linux
9+
notifications:
10+
slack:
11+
secure: hDrr73QN8Fyay6o/ByGgECUdf9BxW2jYgyULFGgF+0OW0zerfG91ASuflUkd60z1hpQcV3PRPMHtw0HBEx4GRSV/CsKNdaOFML3K70pcHn8wcXDiq1RSbInhwfFIkJpssBkJgk1XMAapCfDot+wdd8WhA5Pa1RT5UbvSjg9Xi/sIrKLdnBvKGaOKVSkLLuMmC7U99Yl4U/oYpCCqQys838ZCegbNDgn1ZhomRBBKi02d4wk9xBdiE6CtdmfDrKMZKdvuLN4bUDAXN9DVxV8o6kY1F1Y9ufiAxLC0cThxpwGYebE8Tv1EvinuNNqkhxyKTS5PqNIEiI9vRti4BQ5qYR7kilQGcAy7AZ24YJO7TxtiVpI/pyHanFcgu7Z6bUcETpB1wzl/gP/AA2l0TzY/39mnuWihiH+nWkfcBMNW4mJbvHXlzAkZ7mzHqMKaHSQjxuEDWz6jzdy7xIO5mPLEH83x7ciQ9xQFmhBjg0glXieaINcdkNdC5hnWjBUwkFaoopN5o+1MX2j/0Y7fJNwVd6bbelHhbghkRNcL7wXxk7OnB3ekQfRmHgmjtE0wOTCCJhOHEZdNu7XMi6FRItgBD0cv1wiImdiBX3HwtXO9bVV20KqKLb6lYuUT/rbASg53OqGBFky/5PblZpbJ9vl8gFi3ELmfv3/PtEjduWeZ4Eg=
12+
on_failure: always
13+
on_success: change

‎README.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ If you want to deploy GameOn! directly to Bluemix, click on 'Deploy to Bluemix'
4040
4141
[![Create Toolchain](https://github.com/IBM/container-journey-template/blob/master/images/button.png)](https://console.ng.bluemix.net/devops/setup/deploy/?repository=https://github.com/IBM/GameOn-Java-Microservices-on-Kubernetes)
4242

43-
Please follow the [Toolchain instructions](https://github.com/IBM/container-journey-template/blob/master/Toolchain_Instructions.md) to complete your toolchain and pipeline.
43+
Please follow the [Toolchain instructions](https://github.com/IBM/container-journey-template/blob/master/Toolchain_Instructions_new.md) to complete your toolchain and pipeline.
4444

4545
## Steps
4646
1. [Modify the Core services yaml files](#1-modify-the-core-services-yaml-files)
@@ -53,14 +53,28 @@ Please follow the [Toolchain instructions](https://github.com/IBM/container-jour
5353

5454
#### [Troubleshooting](#troubleshooting-1)
5555

56-
# 1. Modify the Core services yaml files
57-
You can use the script provided that replaces the default values in the yaml files to the IP of your current cluster.
58-
* `./scripts/replace_ip_linux.sh` for linux
59-
* `./scripts/replace_ip_OSX.sh` for macOS
56+
# 1. Modify the ConfigMap yaml file
57+
Change these values on the `gameon-configmap.yaml` file. Change `PLACEHOLDER_IP` to the public IP of your cluster. You can get the IP from `bx cs workers <your-cluster-name>` for the Bluemix Container Service. Ex. `192.168.99.100`
58+
> For minikube, you can get the IP using `minikube ip`
6059
61-
> The script replaces every instance of `169.47.241.213` in the files of your [core services](#core-microservices) yaml files and `setup.yaml` to the IP of your cluster *(found by executing `kubectl get nodes`)*.
60+
```yaml
61+
FRONT_END_PLAYER_URL: https://PLACEHOLDER_IP:30443/players/v1/accounts
62+
FRONT_END_SUCCESS_CALLBACK: https://PLACEHOLDER_IP:30443/#/login/callback
63+
FRONT_END_FAIL_CALLBACK: https://PLACEHOLDER_IP:30443/#/game
64+
FRONT_END_AUTH_URL: https://PLACEHOLDER_IP:30443/auth
65+
...
66+
PROXY_DOCKER_HOST: 'PLACEHOLDER_IP'
67+
```
6268
63-
[Other usage for the script can be found here.](/scripts#replace_ip_-os-sh)
69+
An easy way to change these values is to do
70+
`sed -i s#PLACEHOLDER_IP#<Public-IP-of-your-cluster#g gameon-configmap.yaml`
71+
or `sed -i '' s#PLACEHOLDER_IP#<Public-IP-of-your-cluster>#g gameon-configmap.yaml`.
72+
73+
Then, apply the config map on your cluster:
74+
```bash
75+
$ kubectl create -f gameon-configmap.yaml
76+
configmap "gameon-env" created
77+
```
6478

6579
# 2. Create a Volume for your Cluster
6680
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](#core-microservices).
@@ -253,6 +267,7 @@ To register the deployed rooms in the cluster, you will need to use the UI of yo
253267
* `kubectl delete svc,deploy,pvc -l app=gameon`
254268
* `kubectl delete pod setup`
255269
* `kubectl delete pv local-volume-1`
270+
* `kubectl delete -f gameon-configmap.yaml`
256271

257272
## References
258273

‎core/auth.yaml

Lines changed: 124 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,67 +41,160 @@ spec:
4141
name: auth
4242
env:
4343
- name: service_map
44-
value : https://map:9443/map/v1/sites
44+
valueFrom:
45+
configMapKeyRef:
46+
name: gameon-env
47+
key: service_map
4548
- name: service_room
46-
value : ws://room:9080/rooms
49+
valueFrom:
50+
configMapKeyRef:
51+
name: gameon-env
52+
key: service_room
4753
- name: service_simpleroom
48-
value : ws://simpleroom:9090/rooms
54+
valueFrom:
55+
configMapKeyRef:
56+
name: gameon-env
57+
key: service_simpleroom
4958
- name: GITHUB_APP_ID
50-
value : ''
59+
valueFrom:
60+
configMapKeyRef:
61+
name: gameon-env
62+
key: GITHUB_APP_ID
5163
- name: GITHUB_APP_SECRET
52-
value : ''
64+
valueFrom:
65+
configMapKeyRef:
66+
name: gameon-env
67+
key: GITHUB_APP_SECRET
5368
- name: TWITTER_CONSUMER_KEY
54-
value : ''
69+
valueFrom:
70+
configMapKeyRef:
71+
name: gameon-env
72+
key: TWITTER_CONSUMER_KEY
5573
- name: TWITTER_CONSUMER_SECRET
56-
value : ''
74+
valueFrom:
75+
configMapKeyRef:
76+
name: gameon-env
77+
key: TWITTER_CONSUMER_SECRET
5778
- name: MAP_SERVICE_URL
58-
value : http://127.0.0.1:6379/map/map/v1/sites
79+
valueFrom:
80+
configMapKeyRef:
81+
name: gameon-env
82+
key: MAP_SERVICE_URL
5983
- name: PLAYER_SERVICE_URL
60-
value : http://127.0.0.1:6379/players/players/v1/accounts
84+
valueFrom:
85+
configMapKeyRef:
86+
name: gameon-env
87+
key: PLAYER_SERVICE_URL
6188
- name: COUCHDB_SERVICE_URL
62-
value : http://couchdb:5984
89+
valueFrom:
90+
configMapKeyRef:
91+
name: gameon-env
92+
key: COUCHDB_SERVICE_URL
6393
- name: KAFKA_SERVICE_URL
64-
value : kafka:9092
94+
valueFrom:
95+
configMapKeyRef:
96+
name: gameon-env
97+
key: KAFKA_SERVICE_URL
6598
- name: FRONT_END_PLAYER_URL
66-
value : https://169.47.241.213:30443/players/v1/accounts
99+
valueFrom:
100+
configMapKeyRef:
101+
name: gameon-env
102+
key: FRONT_END_PLAYER_URL
67103
- name: FRONT_END_SUCCESS_CALLBACK
68-
value : https://169.47.241.213:30443/#/login/callback
104+
valueFrom:
105+
configMapKeyRef:
106+
name: gameon-env
107+
key: FRONT_END_SUCCESS_CALLBACK
69108
- name: FRONT_END_FAIL_CALLBACK
70-
value : https://169.47.241.213:30443/#/game
109+
valueFrom:
110+
configMapKeyRef:
111+
name: gameon-env
112+
key: FRONT_END_FAIL_CALLBACK
71113
- name: FRONT_END_AUTH_URL
72-
value : https://169.47.241.213:30443/auth
114+
valueFrom:
115+
configMapKeyRef:
116+
name: gameon-env
117+
key: FRONT_END_AUTH_URL
73118
- name: GAMEON_MODE
74-
value : development
119+
valueFrom:
120+
configMapKeyRef:
121+
name: gameon-env
122+
key: GAMEON_MODE
75123
- name: TARGET_PLATFORM
76-
value : local
124+
valueFrom:
125+
configMapKeyRef:
126+
name: gameon-env
127+
key: TARGET_PLATFORM
77128
- name: SYSTEM_ID
78-
value : game-on.org
129+
valueFrom:
130+
configMapKeyRef:
131+
name: gameon-env
132+
key: SYSTEM_ID
79133
- name: LICENSE
80-
value : accept
134+
valueFrom:
135+
configMapKeyRef:
136+
name: gameon-env
137+
key: LICENSE
81138
- name: PROXY_DOCKER_HOST
82-
value : '169.47.241.213'
139+
valueFrom:
140+
configMapKeyRef:
141+
name: gameon-env
142+
key: PROXY_DOCKER_HOST
83143
- name: ADMIN_PASSWORD
84-
value : admin
144+
valueFrom:
145+
configMapKeyRef:
146+
name: gameon-env
147+
key: ADMIN_PASSWORD
85148
- name: WLP_SKIP_MAXPERMSIZE
86-
value : 'true'
149+
valueFrom:
150+
configMapKeyRef:
151+
name: gameon-env
152+
key: WLP_SKIP_MAXPERMSIZE
87153
- name: WLP_OUTPUT_DIR
88-
value : /opt/ibm/wlp/usr/servers/
154+
valueFrom:
155+
configMapKeyRef:
156+
name: gameon-env
157+
key: WLP_OUTPUT_DIR
89158
- name: LOG_DIR
90-
value : /opt/ibm/wlp/usr/servers/defaultServer/logs
159+
valueFrom:
160+
configMapKeyRef:
161+
name: gameon-env
162+
key: LOG_DIR
91163
- name: MAP_KEY
92-
value : fish
164+
valueFrom:
165+
configMapKeyRef:
166+
name: gameon-env
167+
key: MAP_KEY
93168
- name: COUCHDB_USER
94-
value : mapUser
169+
valueFrom:
170+
configMapKeyRef:
171+
name: gameon-env
172+
key: COUCHDB_USER
95173
- name: COUCHDB_PASSWORD
96-
value : myCouchDBSecret
174+
valueFrom:
175+
configMapKeyRef:
176+
name: gameon-env
177+
key: COUCHDB_PASSWORD
97178
- name: A8_REGISTRY_URL
98-
value : http://registry:8080
179+
valueFrom:
180+
configMapKeyRef:
181+
name: gameon-env
182+
key: A8_REGISTRY_URL
99183
- name: A8_CONTROLLER_URL
100-
value : http://controller:8080
184+
valueFrom:
185+
configMapKeyRef:
186+
name: gameon-env
187+
key: A8_CONTROLLER_URL
101188
- name: A8_CONTROLLER_POLL
102-
value : 5s
189+
valueFrom:
190+
configMapKeyRef:
191+
name: gameon-env
192+
key: A8_CONTROLLER_POLL
103193
- name: A8_CONTROLLER_POLL
104-
value : 5s
194+
valueFrom:
195+
configMapKeyRef:
196+
name: gameon-env
197+
key: A8_CONTROLLER_POLL
105198
ports:
106199
- containerPort: 9080
107200
name: auth-1

0 commit comments

Comments
 (0)