-
Notifications
You must be signed in to change notification settings - Fork 11
Home
Finn Årup Nielsen edited this page Aug 1, 2019
·
19 revisions
become wembedder
webservice --backend=kubernetes python shell
source ~/www/python/venv/bin/activate
cd ~/www/python/wembedder ; git pull
webservice --backend=kubernetes python restart # Takes several minutes
tail -f ~/uwsgi.log # look at web log
Documentation available at https://wikitech.wikimedia.org/wiki/Help:Tool_Labs/Web#python_.28Python3_.2B_Kubernetes.29.
Within the container the default startup of the uwsgi process(es) have the form
/usr/bin/uwsgi --plugin python,python3 --http-socket :8000 --chdir /data/project/wembedder/www/python/src --logto /data/project/wembedder/uwsgi.log --callable app --manage-script-name --workers 4 --mount /wembedder=/data/project/wembedder/www/python/src/app.py --die-on-term --strict --master --venv /data/project/wembedder/www/python/venv
Get information about a pod:
kubectl describe pod `kubectl get pods | tail -n 1 | awk '{print $1}'`
Get information about a node:
kubectl describe node `kubectl describe pods -l name=wembedder | head -n 3 | tail -n 1 | awk '{print $2}' | awk -F"/" '{print $1}'`
Login to pod:
kubectl exec -it `kubectl describe pods -l name=wembedder | head -n 1 | awk '{print $2}'` -- /bin/bash