Skip to content

Commit

Permalink
containers/ws: Enable beibooting and install standard cockpit pages
Browse files Browse the repository at this point in the history
This provides similar functionality as the Client, so that the ws
bastion container can connect to machines which don't have any Cockpit
packages installed.

Install cockpit-system and cockpit-networkmanager into the container for
now. We'll likely expand this in the future, but let's start small.

https://issues.redhat.com/browse/COCKPIT-954
  • Loading branch information
martinpitt committed Sep 26, 2024
1 parent e42ea6f commit 5a0c357
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
4 changes: 1 addition & 3 deletions containers/ws/cockpit-auth-ssh-key
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ def main(args):
{"password": "denied"})
return

# for the time being, we only support running an installed cockpit-bridge on the remote,
# and leave beibooting to the flatpak
os.execlpe("python3", "python3", "-m", "cockpit.beiboot", "--remote-bridge=always", host, os.environ)
os.execlpe("python3", "python3", "-m", "cockpit.beiboot", host, os.environ)


if __name__ == '__main__':
Expand Down
7 changes: 5 additions & 2 deletions containers/ws/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ rpm=$(ls /container/rpms/cockpit-ws-*$OSVER.*$arch.rpm /container/rpms/cockpit-b

# If there are rpm files in the current directory we'll install those
if [ -n "$rpm" ]; then
$INSTALL /container/rpms/cockpit-ws-*$OSVER.*$arch.rpm /container/rpms/cockpit-bridge-*$OSVER.*$arch.rpm
$INSTALL /container/rpms/cockpit-ws-*$OSVER.*$arch.rpm \
/container/rpms/cockpit-bridge-*$OSVER.*$arch.rpm \
/container/rpms/cockpit-system-*$OSVER.*$arch.rpm \
/container/rpms/cockpit-networkmanager-*$OSVER.*$arch.rpm
else
$INSTALL cockpit-ws cockpit-bridge
$INSTALL cockpit-ws cockpit-bridge cockpit-system cockpit-networkmanager
fi

rm -rf /build/var/cache/dnf /build/var/lib/dnf /build/var/lib/rpm* /build/var/log/*
Expand Down
12 changes: 8 additions & 4 deletions test/ostree.install
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/bin/sh
set -eu

# install/upgrade RPMs that apply to OSTree
# Note: cockpit-selinux would be desirable, but needs setroubleshoot-server which isn't installed
cd /var/tmp/

# install/upgrade RPMs that apply to OSTree
# Note: cockpit-selinux would be desirable, but needs setroubleshoot-server which isn't installed
rpm-ostree install --cache-only cockpit-bridge-*.rpm \
cockpit-networkmanager-*.rpm cockpit-system-*.rpm cockpit-tests-*.rpm

# update cockpit-ws and install scripts in the container
for rpm in /var/tmp/cockpit-ws-*.rpm /var/tmp/cockpit-bridge-*.rpm; do
# update cockpit packages and install scripts in the container
for rpm in /var/tmp/cockpit-ws-*.rpm \
/var/tmp/cockpit-bridge-*.rpm \
/var/tmp/cockpit-networkmanager-*.rpm \
/var/tmp/cockpit-system-*.rpm \
/var/tmp/cockpit-tests-*.rpm; do
rpm2cpio "$rpm" | cpio -i --make-directories --directory=/var/tmp/install
done
podman run --name build-cockpit -i \
Expand Down

0 comments on commit 5a0c357

Please sign in to comment.