Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Customised oc.user.ubuntu:<tag> #7

Open
ananragha opened this issue Dec 10, 2023 · 6 comments
Open

New Customised oc.user.ubuntu:<tag> #7

ananragha opened this issue Dec 10, 2023 · 6 comments

Comments

@ananragha
Copy link

ananragha commented Dec 10, 2023

Hi,

I have built a customised oc.user.ubuntu image using the source and instructions given and pushed it to my docker repository exzaadmin/oc.user.ubuntu: and set this to be public repository.

In the od.config file, I have edited the below section:

graphical is the main abcdesktop container

include x11 service

'graphical' : {
'image': { 'default': 'exzadmin/oc.user.ubuntu:0.0.1' },
'imagePullPolicy': 'IfNotPresent',
'enable': True,
'acl': { 'permit': [ 'all' ] },
'waitportbin' : '/composer/node/wait-port/node_modules/.bin/wait-port',
# 'resources': {
# 'requests': { 'memory': "320Mi", 'cpu': "250m" },
# 'limits' : { 'memory': "1Gi", 'cpu': "1000m" }
# },
'securityContext': {
'readOnlyRootFilesystem': False,
'allowPrivilegeEscalation': True
},
'tcpport': 6081,
'secrets_requirement' : [ 'abcdesktop/vnc', 'abcdesktop/kerberos']
},

When loading the user desktop post login, the platform is able to read the od.config, but failing to pull the image and throwing the below error and user login is failing.

Warning Failed Failed to pull image "exzadmin/oc.user.ubuntu:0.0.1": failed to pull and unpack image "docker.io/exzadmin/oc.user.ubuntu:0.0.1": failed to resolve reference "docker.io/exzadmin/oc.user.ubuntu:0.0.1": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

However, this is a public repository and anyone can download and use it.

Is there anything specific to be done to pull this image properly?

Best regards,
Raghav

@alexandredevely
Copy link
Member

Hello Reghav,

I'm trying to pull your new image exzadmin/oc.user.ubuntu:0.0.1
I get the error message, from the public repository.
I'm not sure that 'anyone can download and use it.' ;-)

docker pull exzadmin/oc.user.ubuntu:0.0.1
Error response from daemon: pull access denied for exzadmin/oc.user.ubuntu, repository does not exist or may require 'docker login': denied: requested access to the resource is d

See you
Alexandre

@ananragha
Copy link
Author

Hello Alexandre,

There is a spelling mistake. It should be exzaadmin/oc.user.ubuntu:0.0.1 not exzadmin/oc.user.ubuntu:0.0.1. I sincerely apologise for the typo error by mistake.
This was the mistake even in od.config file. However, despite correcting it and redeploying abcdesktop-config and restarting pyod-od, same error persists.
Wondering whether I should recreate the entire namespace once again.
Best regards,
Raghav

@alexandredevely
Copy link
Member

Hello Raghav,

I have update od.config file with your own oc.user image exzaadmin/oc.user.ubuntu:0.0.1

'graphical' : { 
    'image': { 
      'default': 'exzaadmin/oc.user.ubuntu:0.0.1',
    }, ...

But it seems that nodejs spawnner service doesn't start. This service is required by pyos to check if the pod is started, and by the frontend to send control commands.

kubectl exec -n abcdesktop -it  fry-2fdbb --  ps -ef
Defaulted container "x-planet-fry" out of: x-planet-fry, c-planet-fry, s-planet-fry, f-planet-fry, o-planet-fry, i-planet-fry (init)
UID        PID  PPID  C STIME TTY          TIME CMD
28243        1     0  0 18:46 ?        00:00:00 /pause
28243       17     0  0 18:46 ?        00:00:00 bash /composer/docker-entrypoint.sh
28243       34    17  0 18:46 ?        00:00:00 /usr/bin/python3 /usr/bin/supervisord --pidfile /var/run/desktop/supervisord.pid --nodaemon --configuration /etc/supervisord.conf
root        35     0  0 18:46 ?        00:00:00 /bin/sh -c /docker-entrypoint.sh
root        41    35  0 18:46 ?        00:00:00 /bin/bash /docker-entrypoint.sh
root        44    41  0 18:46 ?        00:00:00 /usr/bin/python3 /usr/bin/supervisord --pidfile /var/run/desktop/supervisord.pid --nodaemon --configuration /etc/supervisord.conf
28243       45     0  0 18:46 ?        00:00:00 /bin/sh -c /docker-entrypoint.sh
28243       51    45  0 18:46 ?        00:00:00 /bin/bash /docker-entrypoint.sh
28243       58    51  0 18:46 ?        00:00:00 python3 /signalling/simple_server.py --disable-ssl --addr 10.244.0.252 --port 29787
28243       59    51  0 18:46 ?        00:00:00 python3 /sendrecv/webrtc_sendrecv.py --signallingserver ws://10.244.0.252:29787 front.abcdesktop
28243       60    51  0 18:46 ?        00:00:00 /usr/bin/pulseaudio --realtime=true --load=module-native-protocol-tcp listen=10.244.0.252 auth-cookie=/etc/pulse/abcdesktopcookie --log-level=4 -vvvv
28243       63     0  0 18:46 ?        00:00:00 /bin/sh /docker-entrypoint.sh
28243       71    63  0 18:46 ?        00:00:00 node /composer/node/file-service/file-service.js
28243       74     0  0 18:46 ?        00:00:00 /pause
root        86    44  0 18:46 ?        00:00:00 /usr/sbin/cupsd -c /etc/cups/cupsd.conf -f
nobody      87    44  0 18:46 ?        00:00:00 node /composer/node/file-service/file-service.js
nobody      88    44  0 18:46 ?        00:00:00 node /composer/node/printer-service/printer-service.js
28243     1088     0  0 18:48 pts/0    00:00:00 ps -ef

See you
Alexandre

@ananragha
Copy link
Author

Hello Alexandre,
I did not change anything except added a new desktop wallpaper image to composer/wallpapers folder and built the docker image using command "make ubuntu". Of course I have small change to --tag in Makefile. I have attached the Makefile here for your reference,
Makefile.txt
While running the command "make ubuntu", it did throw errors like "package.json" not found in "composer/node/common-libraries" and "composer/node/ocrun". I specifically downloaded the package.json files from git hub and copied them to respective folder. Finally, I ran " make ubuntu" which completed without any issues.
Need to figure out why spanner service is not starting.
Best regards,
Raghav

@ananragha
Copy link
Author

Hello Alexandre,

In the Docker.ubuntu file, I found the section:

WORKDIR /composer/node/spawner-service

install node-gyp to build spawner-service

RUN yarn global add node-gyp
RUN yarn install --production=true

&& npm i --package-lock-only && npm audit fix.

Here, it does not seem to build the spawner-service. Or node-gyp is expected to build and start the spawner-service?
Best regards,
Raghav

@alexandredevely
Copy link
Member

alexandredevely commented Dec 11, 2023

Hello Raghav,

I don't know what's going wrong with this image. I've just updated the Makefile and rebuild it from another node.

To clone the oc.user repo

git clone -b 3.1 https://github.com/abcdesktopio/oc.user.git
cd oc.user
git submodule update --init --recursive --remote

Build the oc.user image

TAG=3.1 make 

When you start the image with a docker command you should read

docker run -it abcdesktopio/oc.user.ubuntu:3.1 
NAMESPACE=abcdesktop
X11LISTEN=udp
Container local ip addr is 172.17.0.2
uid=4096(balloon) gid=4096(balloon) groups=4096(balloon)
error not vnc password has been set, everything is going wrong
run a ls -la /var/secrets/abcdesktop/vnc to help troubleshooting
ls: cannot access '/var/secrets/abcdesktop/vnc': No such file or directory
fix use changemeplease as vncpassword
create ~/.store directory
create ~/Desktop directory
create  ~/.config  directory
error PULSEAUDIO_COOKIE is not defined, sound goes wrong
create ~/.config/nautilus directory
create ~/.gtkrc-2.0 file
/home/balloon/.wallpapers does not exist
create /home/balloon/.wallpapers
copy new wallpaper files in /home/balloon/.wallpapers
run xdg-user-dirs-update
KUBERNETES_SERVICE_HOST is not set, this is wrong
fix KUBERNETES_SERVICE_HOST=localhost as dummy value
DEFAULT_WALLPAPER=
SET_DEFAULT_WALLPAPER is not defined, keep default wallpapers config
SET_DEFAULT_COLOR is not defined, keep default value
2023-12-11 12:29:27,216 INFO Included extra file "/etc/supervisor/conf.d/broadcast-service.conf" during parsing
2023-12-11 12:29:27,216 INFO Included extra file "/etc/supervisor/conf.d/novnc.conf" during parsing
2023-12-11 12:29:27,216 INFO Included extra file "/etc/supervisor/conf.d/openbox.conf" during parsing
2023-12-11 12:29:27,216 INFO Included extra file "/etc/supervisor/conf.d/spawner-service.conf" during parsing
2023-12-11 12:29:27,216 INFO Included extra file "/etc/supervisor/conf.d/tigervnc.conf" during parsing
2023-12-11 12:29:27,216 INFO Included extra file "/etc/supervisor/conf.d/xsettingsd.conf" during parsing
2023-12-11 12:29:27,216 INFO Included extra file "/etc/supervisor/conf.d/xterm.conf" during parsing
2023-12-11 12:29:27,219 INFO RPC interface 'supervisor' initialized
2023-12-11 12:29:27,219 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-12-11 12:29:27,219 INFO supervisord started with pid 31
2023-12-11 12:29:28,223 INFO spawned: 'xserver' with pid 32
2023-12-11 12:29:28,226 INFO spawned: 'spawner-service' with pid 33
2023-12-11 12:29:28,228 INFO spawned: 'broadcast-service' with pid 34
2023-12-11 12:29:28,229 INFO spawned: 'novnc' with pid 35
2023-12-11 12:29:28,232 INFO spawned: 'openbox' with pid 38
2023-12-11 12:29:28,234 INFO spawned: 'xterm.js' with pid 39
2023-12-11 12:29:29,253 INFO success: spawner-service entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-12-11 12:29:29,253 INFO success: broadcast-service entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-12-11 12:29:29,253 INFO success: xterm.js entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-12-11 12:29:30,284 INFO success: xserver entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
2023-12-11 12:29:30,284 INFO success: novnc entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
2023-12-11 12:29:30,284 INFO success: openbox entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)

See you

Alexandre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants