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

Commit

Permalink
Travis fix (#21)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
AnthonyAmanse authored Aug 17, 2017
1 parent 48fe8bd commit 2749501
Show file tree
Hide file tree
Showing 17 changed files with 951 additions and 374 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ before_install:
group: stable
dist: precise
os: linux
notifications:
slack:
secure: hDrr73QN8Fyay6o/ByGgECUdf9BxW2jYgyULFGgF+0OW0zerfG91ASuflUkd60z1hpQcV3PRPMHtw0HBEx4GRSV/CsKNdaOFML3K70pcHn8wcXDiq1RSbInhwfFIkJpssBkJgk1XMAapCfDot+wdd8WhA5Pa1RT5UbvSjg9Xi/sIrKLdnBvKGaOKVSkLLuMmC7U99Yl4U/oYpCCqQys838ZCegbNDgn1ZhomRBBKi02d4wk9xBdiE6CtdmfDrKMZKdvuLN4bUDAXN9DVxV8o6kY1F1Y9ufiAxLC0cThxpwGYebE8Tv1EvinuNNqkhxyKTS5PqNIEiI9vRti4BQ5qYR7kilQGcAy7AZ24YJO7TxtiVpI/pyHanFcgu7Z6bUcETpB1wzl/gP/AA2l0TzY/39mnuWihiH+nWkfcBMNW4mJbvHXlzAkZ7mzHqMKaHSQjxuEDWz6jzdy7xIO5mPLEH83x7ciQ9xQFmhBjg0glXieaINcdkNdC5hnWjBUwkFaoopN5o+1MX2j/0Y7fJNwVd6bbelHhbghkRNcL7wXxk7OnB3ekQfRmHgmjtE0wOTCCJhOHEZdNu7XMi6FRItgBD0cv1wiImdiBX3HwtXO9bVV20KqKLb6lYuUT/rbASg53OqGBFky/5PblZpbJ9vl8gFi3ELmfv3/PtEjduWeZ4Eg=
on_failure: always
on_success: change
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ If you want to deploy GameOn! directly to Bluemix, click on 'Deploy to Bluemix'
[![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)

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

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

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

# 1. Modify the Core services yaml files
You can use the script provided that replaces the default values in the yaml files to the IP of your current cluster.
* `./scripts/replace_ip_linux.sh` for linux
* `./scripts/replace_ip_OSX.sh` for macOS
# 1. Modify the ConfigMap yaml file
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`
> For minikube, you can get the IP using `minikube ip`
> 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`)*.
```yaml
FRONT_END_PLAYER_URL: https://PLACEHOLDER_IP:30443/players/v1/accounts
FRONT_END_SUCCESS_CALLBACK: https://PLACEHOLDER_IP:30443/#/login/callback
FRONT_END_FAIL_CALLBACK: https://PLACEHOLDER_IP:30443/#/game
FRONT_END_AUTH_URL: https://PLACEHOLDER_IP:30443/auth
...
PROXY_DOCKER_HOST: 'PLACEHOLDER_IP'
```
[Other usage for the script can be found here.](/scripts#replace_ip_-os-sh)
An easy way to change these values is to do
`sed -i s#PLACEHOLDER_IP#<Public-IP-of-your-cluster#g gameon-configmap.yaml`
or `sed -i '' s#PLACEHOLDER_IP#<Public-IP-of-your-cluster>#g gameon-configmap.yaml`.

Then, apply the config map on your cluster:
```bash
$ kubectl create -f gameon-configmap.yaml
configmap "gameon-env" created
```

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

## References

Expand Down
155 changes: 124 additions & 31 deletions core/auth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,67 +41,160 @@ spec:
name: auth
env:
- name: service_map
value : https://map:9443/map/v1/sites
valueFrom:
configMapKeyRef:
name: gameon-env
key: service_map
- name: service_room
value : ws://room:9080/rooms
valueFrom:
configMapKeyRef:
name: gameon-env
key: service_room
- name: service_simpleroom
value : ws://simpleroom:9090/rooms
valueFrom:
configMapKeyRef:
name: gameon-env
key: service_simpleroom
- name: GITHUB_APP_ID
value : ''
valueFrom:
configMapKeyRef:
name: gameon-env
key: GITHUB_APP_ID
- name: GITHUB_APP_SECRET
value : ''
valueFrom:
configMapKeyRef:
name: gameon-env
key: GITHUB_APP_SECRET
- name: TWITTER_CONSUMER_KEY
value : ''
valueFrom:
configMapKeyRef:
name: gameon-env
key: TWITTER_CONSUMER_KEY
- name: TWITTER_CONSUMER_SECRET
value : ''
valueFrom:
configMapKeyRef:
name: gameon-env
key: TWITTER_CONSUMER_SECRET
- name: MAP_SERVICE_URL
value : http://127.0.0.1:6379/map/map/v1/sites
valueFrom:
configMapKeyRef:
name: gameon-env
key: MAP_SERVICE_URL
- name: PLAYER_SERVICE_URL
value : http://127.0.0.1:6379/players/players/v1/accounts
valueFrom:
configMapKeyRef:
name: gameon-env
key: PLAYER_SERVICE_URL
- name: COUCHDB_SERVICE_URL
value : http://couchdb:5984
valueFrom:
configMapKeyRef:
name: gameon-env
key: COUCHDB_SERVICE_URL
- name: KAFKA_SERVICE_URL
value : kafka:9092
valueFrom:
configMapKeyRef:
name: gameon-env
key: KAFKA_SERVICE_URL
- name: FRONT_END_PLAYER_URL
value : https://169.47.241.213:30443/players/v1/accounts
valueFrom:
configMapKeyRef:
name: gameon-env
key: FRONT_END_PLAYER_URL
- name: FRONT_END_SUCCESS_CALLBACK
value : https://169.47.241.213:30443/#/login/callback
valueFrom:
configMapKeyRef:
name: gameon-env
key: FRONT_END_SUCCESS_CALLBACK
- name: FRONT_END_FAIL_CALLBACK
value : https://169.47.241.213:30443/#/game
valueFrom:
configMapKeyRef:
name: gameon-env
key: FRONT_END_FAIL_CALLBACK
- name: FRONT_END_AUTH_URL
value : https://169.47.241.213:30443/auth
valueFrom:
configMapKeyRef:
name: gameon-env
key: FRONT_END_AUTH_URL
- name: GAMEON_MODE
value : development
valueFrom:
configMapKeyRef:
name: gameon-env
key: GAMEON_MODE
- name: TARGET_PLATFORM
value : local
valueFrom:
configMapKeyRef:
name: gameon-env
key: TARGET_PLATFORM
- name: SYSTEM_ID
value : game-on.org
valueFrom:
configMapKeyRef:
name: gameon-env
key: SYSTEM_ID
- name: LICENSE
value : accept
valueFrom:
configMapKeyRef:
name: gameon-env
key: LICENSE
- name: PROXY_DOCKER_HOST
value : '169.47.241.213'
valueFrom:
configMapKeyRef:
name: gameon-env
key: PROXY_DOCKER_HOST
- name: ADMIN_PASSWORD
value : admin
valueFrom:
configMapKeyRef:
name: gameon-env
key: ADMIN_PASSWORD
- name: WLP_SKIP_MAXPERMSIZE
value : 'true'
valueFrom:
configMapKeyRef:
name: gameon-env
key: WLP_SKIP_MAXPERMSIZE
- name: WLP_OUTPUT_DIR
value : /opt/ibm/wlp/usr/servers/
valueFrom:
configMapKeyRef:
name: gameon-env
key: WLP_OUTPUT_DIR
- name: LOG_DIR
value : /opt/ibm/wlp/usr/servers/defaultServer/logs
valueFrom:
configMapKeyRef:
name: gameon-env
key: LOG_DIR
- name: MAP_KEY
value : fish
valueFrom:
configMapKeyRef:
name: gameon-env
key: MAP_KEY
- name: COUCHDB_USER
value : mapUser
valueFrom:
configMapKeyRef:
name: gameon-env
key: COUCHDB_USER
- name: COUCHDB_PASSWORD
value : myCouchDBSecret
valueFrom:
configMapKeyRef:
name: gameon-env
key: COUCHDB_PASSWORD
- name: A8_REGISTRY_URL
value : http://registry:8080
valueFrom:
configMapKeyRef:
name: gameon-env
key: A8_REGISTRY_URL
- name: A8_CONTROLLER_URL
value : http://controller:8080
valueFrom:
configMapKeyRef:
name: gameon-env
key: A8_CONTROLLER_URL
- name: A8_CONTROLLER_POLL
value : 5s
valueFrom:
configMapKeyRef:
name: gameon-env
key: A8_CONTROLLER_POLL
- name: A8_CONTROLLER_POLL
value : 5s
valueFrom:
configMapKeyRef:
name: gameon-env
key: A8_CONTROLLER_POLL
ports:
- containerPort: 9080
name: auth-1
Expand Down
Loading

0 comments on commit 2749501

Please sign in to comment.