RedHatQuickCourses / rhde-build

This course teaches how to create Red Hat Device Edge images for edge devices and kiosk computers.
https://redhatquickcourses.github.io/rhde-build/
1 stars 0 forks source link

enabling cockpit and composer on RHEL 9.4 #15

Open flozanorht opened 6 days ago

flozanorht commented 6 days ago

the command from the first lab fails

[student@workstation ~]$ sudo systemctl enable cockpit The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled or disabled using systemctl. ...

Not sure if this is the correct way [student@workstation ~]$ sudo systemctl enable cockpit.socket Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket → /usr/lib/systemd/system/cockpit.socket.

flozanorht commented 6 days ago

Also got this error on the same lab

[student@workstation ~]$ composer-cli compose types ERROR: Types Error: /run/weldr/api.socket does not exist. Check to make sure that osbuild-composer.socket is enabled and started. eg. systemctl enable osbuild-composer.socket && systemctl start osbuild-composer.socket

Did as in the error message

[student@workstation ~]$ sudo systemctl enable osbuild-composer.socket Created symlink /etc/systemd/system/sockets.target.wants/osbuild-composer.socket → /usr/lib/systemd/system/osbuild-composer.socket. [student@workstation ~]$ sudo systemctl start osbuild-composer.socket [student@workstation ~]$

flozanorht commented 6 days ago

More errors

[student@workstation ~]$ sudo cp /usr/share/osbuild-composer/repositories/rhel-92.json /etc/osbuild-composer/repositories/ cp: cannot stat '/usr/share/osbuild-composer/repositories/rhel-92.json': No such file or directory [student@workstation ~]$ [student@workstation ~]$ sudo cp /usr/share/osbuild-composer/repositories/rhel-94.json /etc/osbuild-composer/repositories/ cp: cannot stat '/usr/share/osbuild-composer/repositories/rhel-94.json': No such file or directory [student@workstation ~]$

Change of file name in package upgrade?

[student@workstation ~]$ sudo cp /usr/share/osbuild-composer/repositories/rhel-9.4.json /etc/osbuild-composer/repositories/ [student@workstation ~]$

flozanorht commented 6 days ago

:-(

[student@workstation ~]$ sudo systemctl restart osbuild-composer [student@workstation ~]$ composer-cli sources list ERROR: Types Error: Get "http://localhost/api/v1/projects/source/list": dial unix /run/weldr/api.socket: connect: connection refused [student@workstation ~]$ composer-cli compose types ERROR: Types Error: Get "http://localhost/api/v1/compose/types": dial unix /run/weldr/api.socket: connect: connection refused

flozanorht commented 6 days ago

[student@workstation ~]$ sudo systemctl restart osbuild-composer.socket [student@workstation ~]$ [student@workstation ~]$ composer-cli compose types ERROR: Types Error: Get "http://localhost/api/v1/compose/types": read unix @->/run/weldr/api.socket: read: connection reset by peer [student@workstation ~]$ [student@workstation ~]$ composer-cli compose types ERROR: Types Error: Get "http://localhost/api/v1/compose/types": dial unix /run/weldr/api.socket: connect: connection refused

flozanorht commented 5 days ago

New day, rebooting all VMs, I can use the composer-cli. Guess I was using it from a terminal that was not logged off, so it didn't have the weldr group on its environment. Back to figuring out the repo settings

flozanorht commented 5 days ago

Product docs ask to enable only the '.socket' from composer and cockpit, not the service unit, like I did https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/composing_a_customized_rhel_system_image/installing-composer_composing-a-customized-rhel-system-image#installing-composer-in-a-virtual-machine_installing-composer

But they restart the composer unit, like I did.... checking the docs on configuring repos

flozanorht commented 5 days ago

Looks like the error may be related to the lack of a subscription... I did clean unsubscribed as part of the RHEL 9.2-->9.4 upgrade hacks, but was the original classroom pre-subscribed?

flozanorht commented 5 days ago

Even following current docs on how to configure repos and restart osbuild services, it didn't work. Having a subscription makes no difference. Fixing JSON errors also didn't. But a reboot fixed all... no subscription required. :-( Let's see if it can build an ostree compose.