Name: shiptoasting
Owner: CCP Games
Description: For when you really need to give a toast to a ship in Eve Online.
Created: 2016-04-20 08:37:59.0
Updated: 2017-10-19 14:48:38.0
Pushed: 2016-04-24 12:41:40.0
Homepage: null
Size: 37
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
For when you really need to give a toast to a ship in Eve Online.
This is a silly thing that was made for Eve Fanfest 2016 to demonstrate some of the capabilities of Google Cloud and Kubernetes. You should have all the required pieces in this repository to be able to create your own container and deploy it on GKE. It can also serve as a point of reference for integrating EVE SSO into a python flask web app.
A python module called doitlive. The doit.sh
script was what I used on stage (doitlive play doit.sh
). I could of deployed the shiptoasting-kube-all.yaml
in that script as well, but wanted to demonstrate the Kubernetes dashboard. Hence the bash-fu at the end to extract the admin password from kubectl config straight into the clipboard.
key.pem
and cert.pem
in ./ssl/
sso-config.json
./key.json
)docker build -t <region>.gcr.io/<project-id>/shiptoasting .
gcloud docker push <region>.gcr.io/<project-id>/shiptoasting
gcloud
to install kubectl
by running gcloud components install kubectl
gcloud
or on https://console.cloud.google.com/kubernetes/kubectl
access with gcloud container clusters get-credentials <cluster-name>
nginx.conf
and shiptoasting-kube-all.yaml
to your project-id and hostnamefavicon.ico
with something else, if you wantkubectl create
command in doit.sh
ReplicationController
and Service
objects either with kubectl create -f shiptoasting-kube-all.yaml
or by using the dashboardkubectl get services
to get the loadbalancer IP)Ok friend, no worries. Let's assume your docker host is available by name at docker
. After copying the credentials used to the docker host (in this example, the docker
user's home dir), you could use a docker run
command similar to:
er run -d --name=shiptoasting \
123:8080 \
LASK_APP_SECRET_KEY=/flask/secret \
LASK_HOST_NAME=http://docker:8123 \
VE_SSO_CONFIG=/ccp/config.json \
VE_SSO_CALLBACK=http://docker:8123/callback \
CLOUD_DATASET_ID="eve-tech" \
OOGLE_APPLICATION_CREDENTIALS="/google/key.json" \
PAM_IS_ALLOWED=1 \
home/docker/shiptoasting/ccp:/ccp \
home/docker/shiptoasting/flask:/flask \
home/docker/shiptoasting/google:/google \
toasting:latest shiptoasting-dev
You'll need to change GCLOUD_DATASET_ID
to be the project-id (name) of your GCE project. Using shiptoasting-dev
as the run command will run the web frontend with flask only (and in debug mode), remove the command to use gunicorn (and without debug) instead.