abcdesktopio / pyos

abcdesktop API services
https://abcdesktopio.github.io/
GNU General Public License v2.0
2 stars 2 forks source link

Running applications #6

Closed spijker closed 1 year ago

spijker commented 1 year ago

Hi , I really like this idea of running a cloud desktop, but I always fail in the kubernetes setup -> adding applications. The standalone is working, but when I transfer the config to a kubernetes cluster it always fails on running applications.

The setup I use in the POC Single kubernetes node running k3s version v1.25.3+k3s1 with traefik disabled. docker vs 20.10.21 , running locally without tls.

A nginx in front because of the setup I'm using right now. Everything is running, can start a desktop, and even oath2 is working. From withing the pyos I can access the docker.socket, and read the images and do stuff. So then I pull abcdesktopio/terminal.d , and see the terminal in the applications menu. Then I start it, and I always get the following error, from the log :

2022-10-27T13:26:54.224076344+02:00 stdout F 2022-10-27 11:26:54 infra [INFO ] oc.od.infra.selectInfra:105011976393936995324 infra mode is kubernetes 2022-10-27T13:26:54.224962747+02:00 stdout F 2022-10-27 11:26:54 infra [INFO ] oc.od.infra.ODInfraKubernetes.init:105011976393936995324 rio 2022-10-27T13:26:54.225407577+02:00 stdout F 2022-10-27 11:26:54 infra [INFO ] oc.od.infra.ODInfraKubernetes.init:105011976393936995324 nodehostname=rio 2022-10-27T13:26:54.22583638+02:00 stdout F 2022-10-27 11:26:54 infra [INFO ] oc.od.infra.ODInfraKubernetes.getdockerClient:105011976393936995324 Creating client: base_url = 'tcp://rio:2375' 2022-10-27T13:26:54.282510626+02:00 stdout F 2022-10-27 11:26:54 composer_controller [ERROR ] controllers.composer_controller.ocrun:105011976393936995324 404 Client Error for http://rio:2375/v1.41/containers/containerd:/5cf42b09ad063a4097dfda0f17e2d6fcf7008ee6da62109ba83544d958f6005f/json: Not Found ("No such container: containerd:/5cf42b09ad063a4097dfda0f17e2d6fcf7008ee6da62109ba83544d958f6005f") 2022-10-27T13:26:54.285722674+02:00 stdout F 2022-10-27 11:26:54 od [INFO ] main.trace_response:105011976393936995324 /composer/ocrun {'status': 500, 'result': None, 'error': '404 Client Error for http://rio:2375/v1.41/containers/containerd:/5cf42b09ad063a4097dfda0f17e2d6fcf7008ee6da62109ba83544d958f6005f/json: Not Found ("No such container: containerd:/5cf42b09ad063a4097dfda0f17e2d6fcf7008ee6da62109ba83544d958f6005f")'}

Were to look.

spijker commented 1 year ago

Also , curl --unix-socket /var/run/docker.sock http://localhost/v1.41/containers/json I can access, but the containerd not , is that a valid API request ?

alexandredevely commented 1 year ago

Hello,

This response is only for release 1.x

Can you run a shell inside pyos daemonset, and test if a simple docker ps -a command works. pyos container uses dockerd to start an application.

Do you setup your dockerd to listen on port 2375 or do you use the tcp port 2375 for containerd ?

But I think you are in the dockershim case dockershim-faq

If you can roll back to kubernetes release 1.23, and use dockerd, your application will start. I'm writing a new release to remove dockerd dep.

Alexandre

spijker commented 1 year ago

Yes ! , great , works flawless now. next time for me , rtfm ;)

thx alot !