I have just created a tool (wembedder) on Tools Labs and trying to get a Python Flask webserver up and running. I have made a venv in Python3 so I would use kurbernetes (AFAIU). I am trying something like:
webservice --backend=kubernetes python
I get an error message:
(venv)tools.wembedder@tools-bastion-03:~$ webservice --backend=kubernetes python status Traceback (most recent call last): File "/usr/local/bin/webservice", line 131, in <module> job = KubernetesBackend(tool, args.type, args.extra_args) File "/usr/lib/python2.7/dist-packages/toollabs/webservice/backends/kubernetesbackend.py", line 174, in __init__ os.path.expanduser('~/.kube/config') File "/usr/lib/python2.7/dist-packages/pykube/config.py", line 72, in from_file raise exceptions.PyKubeError("Configuration file {} not found".format(filename)) pykube.exceptions.PyKubeError: Configuration file /data/project/wembedder/.kube/config not found
My .kube directory is owned by root for some reason (I see that another tool I have it is owned by the tool user).
(venv)tools.wembedder@tools-bastion-03:~$ ls -al .kube/ total 8 drwxr-sr-x 2 root tools.wembedder 4096 Jul 5 08:16 . drwxrwsr-x 9 tools.wembedder tools.wembedder 4096 Jul 5 10:30 ..
I wonder if that is a problem? Is the config file missing or will it be constructed with the webservice call? Should a sysadm change the permissions on the ~/.kube/ directory? Or is it something I can do?
I see no job with qstat. I have erased the ~/service.manifest (I believe that came after I tried starting it with uwsgi-python or uwsgi-plain).