Simple App for Kubernetes / OpenShift / OKD to test several things
- Python 60.5%
- Go Template 34.2%
- Shell 5.3%
| helm | ||
| kustomize | ||
| .gitignore | ||
| docker-entrypoint.sh | ||
| Dockerfile.pingpong | ||
| Dockerfile.pingsaml | ||
| flask.tar.gz | ||
| LICENSE | ||
| pingpong.py | ||
| pingsaml.py | ||
| Readme.md | ||
The PingPong Test Application
This is an application to see the following features in an OKD / OpenShift Cluster:
- automatic docker build from an external repo (this!)
- deployment with kustomize (runs also in ArgoCD)
- horizontal scaled applications with dynamic load distribution (try reload in your browser, ...)
This app can act as template for your own first OKD / OpenShift playground.
build
oc login -u myuser api.myfamouscluster.net:6443
oc project myproject
oc apply -k kustomize/build/
oc start-build pingpong-app --follow
oc start-build pingsaml-app --follow
run
oc apply -k ./kustomize/pingpong-template
or use ArgoCD ;-)
use helm
Go in directory helm.
-
Create helm package:
helm package pingpong -
Make an index:
helm repo index . --merge index.yaml -
Install (after editing
helm/values.yaml):cd helm helm install myfamous-release pingpong --values values.yaml
SAML example config
For the second SAML example (pingsaml) you have to config your variables in ./kustomize/pingsaml-template:
- import
keycloak-import.jsonin your KeyCloak instance as starting point - setting your variables in
kustomization.yamlto the correct values - convert the client-certificate and the realm cert from KeyCloak:
- in KeyCloak: Clients ->
https://YourClient-> Keys -> Export -> PKCS12 -> Download (you have to set to temp passwords) - import this PKCS#12 file and generate the 3 PEM files: clientcert.pem, clientkey.pem and idpcert.pem
- I'm using XCA (https://hohnstaedt.de/xca/) for this, it's absolutely great!
- in KeyCloak: Clients ->
- deploy your app with
oc apply -k ./kustomize/pingsaml-template - it should work now ;-)
peter pflaeging peter@pflaeging.net