Tuesday, October 31, 2023

Setup Cockpit Web Console on openSUSE 15.5 Leap

Setup Cockpit Web Console on openSUSE 15.5 Leap  requires activation an additional repo mentioned first in the post, which by some reasons wasn't activated during standard installation by default . Now proceed as follows :-

boris@localhost:~> sudo zypper addrepo https://download.opensuse.org/repositories/systemsmanagement:cockpit/15.5/systemsmanagement:cockpit.repo

[sudo] password for root: 

Adding repository 'cockpit-project.org (15.5)' ....................................................[done]

Repository 'cockpit-project.org (15.5)' successfully added

URI         : https://download.opensuse.org/repositories/systemsmanagement:/cockpit/15.5/

Enabled     : Yes

GPG Check   : Yes

Autorefresh : No

Priority    : 99 (default priority)

Repository priorities are without effect. All enabled repositories share the same priority.

boris@localhost:~> sudo zypper refresh

Repository 'Update repository of openSUSE Backports' is up to date.                                      

Repository 'Non-OSS Repository' is up to date.                                                           

Repository 'Open H.264 Codec (openSUSE Leap)' is up to date.                                             

Repository 'Main Repository' is up to date.                                                              

Repository 'Update repository with updates from SUSE Linux Enterprise 15' is up to date.                 

Repository 'Main Update Repository' is up to date.                                                       

Repository 'Update Repository (Non-Oss)' is up to date.                                                  


New repository or package signing key received:

  Repository:       cockpit-project.org (15.5)

  Key Fingerprint:  50E6 0431 5448 5D99 0732 B5D6 ACAA 9CF7 E6E5 A213

  Key Name:         systemsmanagement OBS Project <systemsmanagement@build.opensuse.org>

  Key Algorithm:    RSA 2048

  Key Created:      Mon 11 Oct 2021 05:00:48 AM EDT

  Key Expires:      Wed 20 Dec 2023 04:00:48 AM EST (expires in 50 days)

  Rpm Name:         gpg-pubkey-e6e5a213-6163fd40

    Note: Signing data enables the recipient to verify that no modifications occurred after the data

    were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system

    and in extreme cases even to a system compromise.

    Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If

    you are not sure whether the presented key is authentic, ask the repository provider or check

    their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they

    are using.

Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): a

Retrieving repository 'cockpit-project.org (15.5)' metadata .......................................[done]

Building repository 'cockpit-project.org (15.5)' cache ............................................[done]

All repositories have been refreshed.

boris@localhost:~> sudo zypper install cockpit

Loading repository data...

Reading installed packages...

Resolving package dependencies...

The following 2 recommended packages were automatically selected:

  cockpit-networkmanager cockpit-storaged

The following package is recommended, but will not be installed due to conflicts or dependency issues:

  cockpit-packagekit

The following 2 packages are suggested, but will not be installed:

  cockpit-pcp cockpit-selinux

The following 9 NEW packages are going to be installed:

  cockpit cockpit-bridge cockpit-networkmanager cockpit-storaged cockpit-suse-theme cockpit-system

  cockpit-ws libpwquality-tools libudisks2-0_lvm2

9 new packages to install.

Overall download size: 7.9 MiB. Already cached: 0 B. After the operation, additional 9.2 MiB will be

used.

Continue? [y/n/v/...? shows all options] (y): y

Retrieving: libpwquality-tools-1.4.4-150400.15.4.x86_64 (Main Repository)            (1/9),  18.6 KiB    

Retrieving: libpwquality-tools-1.4.4-150400.15.4.x86_64.rpm .......................................[done]

Retrieving: libudisks2-0_lvm2-2.9.2-150400.3.3.1.x86_64 (Main Repository)            (2/9),  57.0 KiB    

Retrieving: libudisks2-0_lvm2-2.9.2-150400.3.3.1.x86_64.rpm ...........................[done (1.1 KiB/s)]

Retrieving: cockpit-bridge-300.1-lp155.122.1.x86_64 (cockpit-project.org (15.5))     (3/9), 358.5 KiB    

Retrieving: cockpit-bridge-300.1-lp155.122.1.x86_64.rpm ...............................[done (1.1 MiB/s)]

Retrieving: cockpit-suse-theme-0.1-lp155.6.1.noarch (cockpit-project.org (15.5))     (4/9), 855.8 KiB    

Retrieving: cockpit-suse-theme-0.1-lp155.6.1.noarch.rpm ...............................[done (1.7 MiB/s)]

Retrieving: cockpit-ws-300.1-lp155.122.1.x86_64 (cockpit-project.org (15.5))         (5/9),   1.7 MiB    

Retrieving: cockpit-ws-300.1-lp155.122.1.x86_64.rpm ...................................[done (3.1 MiB/s)]

Retrieving: cockpit-system-300.1-lp155.122.1.noarch (cockpit-project.org (15.5))     (6/9),   3.2 MiB    

Retrieving: cockpit-system-300.1-lp155.122.1.noarch.rpm ...............................[done (2.7 MiB/s)]

Retrieving: cockpit-storaged-300.1-lp155.122.1.noarch (cockpit-project.org (15.5))   (7/9), 899.7 KiB    

Retrieving: cockpit-storaged-300.1-lp155.122.1.noarch.rpm .............................[done (2.4 MiB/s)]

Retrieving: cockpit-networkmanager-300.1-lp155.122.1.noarch (cockpit-project.org (15.5))

                                                                                     (8/9), 780.4 KiB    

Retrieving: cockpit-networkmanager-300.1-lp155.122.1.noarch.rpm .......................[done (1.9 MiB/s)]

Retrieving: cockpit-300.1-lp155.122.1.x86_64 (cockpit-project.org (15.5))            (9/9),  43.1 KiB    

Retrieving: cockpit-300.1-lp155.122.1.x86_64.rpm ......................................[done (2.4 KiB/s)]

Checking for file conflicts: ......................................................................[done]

(1/9) Installing: libpwquality-tools-1.4.4-150400.15.4.x86_64 .....................................[done]

(2/9) Installing: libudisks2-0_lvm2-2.9.2-150400.3.3.1.x86_64 .....................................[done]

(3/9) Installing: cockpit-bridge-300.1-lp155.122.1.x86_64 .........................................[done]

(4/9) Installing: cockpit-suse-theme-0.1-lp155.6.1.noarch .........................................[done]

(5/9) Installing: cockpit-ws-300.1-lp155.122.1.x86_64 .............................................[done]

(6/9) Installing: cockpit-system-300.1-lp155.122.1.noarch .........................................[done]

(7/9) Installing: cockpit-storaged-300.1-lp155.122.1.noarch .......................................[done]

(8/9) Installing: cockpit-networkmanager-300.1-lp155.122.1.noarch .................................[done]

(9/9) Installing: cockpit-300.1-lp155.122.1.x86_64 ................................................[done]


boris@localhost:~> sudo systemctl start cockpit

boris@localhost:~> sudo systemctl status cockpit

\u25cf cockpit.service - Cockpit Web Service

     Loaded: loaded (/usr/lib/systemd/system/cockpit.service; static)

     Active: active (running) since Tue 2023-10-31 04:19:30 EDT; 8s ago

TriggeredBy: \u25cf cockpit.socket

       Docs: man:cockpit-ws(8)

    Process: 5809 ExecStartPre=/usr/lib/cockpit-certificate-ensure --for-cockpit-tls (code=exited, statu>

   Main PID: 5830 (cockpit-tls)

      Tasks: 1 (limit: 4915)

     CGroup: /system.slice/cockpit.service

             \u2514\u2500 5830 /usr/lib/cockpit-tls


Oct 31 04:19:29 localhost.localdomain systemd[1]: Starting Cockpit Web Service...

Oct 31 04:19:29 localhost.localdomain cockpit-certificate-ensure[5824]: /usr/lib/cockpit-certificate-hel>

Oct 31 04:19:29 localhost.localdomain cockpit-certificate-ensure[5825]: Generating a RSA private key

Oct 31 04:19:30 localhost.localdomain cockpit-certificate-ensure[5825]: ................................>

Oct 31 04:19:30 localhost.localdomain cockpit-certificate-ensure[5825]: ................................>

Oct 31 04:19:30 localhost.localdomain cockpit-certificate-ensure[5825]: writing new private key to '0-se>

Oct 31 04:19:30 localhost.localdomain cockpit-certificate-ensure[5825]: -----

Oct 31 04:19:30 localhost.localdomain systemd[1]: Started Cockpit Web Service.

[boris@ServerFedora38 ~]$ ssh boris@192.168.0.37

(boris@192.168.0.37) Password: 

Last login: Tue Oct 31 04:08:45 2023 from 192.168.0.18

Have a lot of fun...

boris@localhost:~> sudo firewall-cmd --add-service=cockpit --zone=public --permanent

[sudo] password for root: 

success

boris@localhost:~> sudo firewall-cmd --reload

success

 

































Deploying F40 KVM guest via bridge0

































One additional step was required

localhost:/usr/lib/systemd/system # cat cockpit.service

[Unit]

Description=Cockpit Web Service

Documentation=man:cockpit-ws(8)

Requires=cockpit.socket

Requires=cockpit-wsinstance-http.socket cockpit-wsinstance-https-factory.socket

After=cockpit-wsinstance-http.socket cockpit-wsinstance-https-factory.socket

[Service]

RuntimeDirectory=cockpit/tls

# systemd ≥ 241 sets this automatically

Environment=RUNTIME_DIRECTORY=/run/cockpit/tls

ExecStartPre=+/usr/lib/cockpit-certificate-ensure --for-cockpit-tls

ExecStart=/usr/lib/cockpit-tls

User=cockpit-ws

Group=cockpit-ws

NoNewPrivileges=true

ProtectSystem=strict

ProtectHome=true

PrivateTmp=true

PrivateDevices=true

ProtectKernelTunables=true

RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6

MemoryDenyWriteExecute=true

# This lines have been added to enable cockpit.service

[Install]

WantedBy=graphical.target

*******************************************************

Managing VMs via Cockpit Web Console on openSUSE 15.5 Leap

*******************************************************


































No comments:

Post a Comment