sysbox icon indicating copy to clipboard operation
sysbox copied to clipboard

Add systemd file for Sysbox for users that build / install from source.

Open myugan opened this issue 5 years ago • 5 comments

Basically after we install sysbox, we don't get any systemd file copied to manage sysbox directly from systemctl maybe you can add this to Makefile or give it the systemd file to the repository so the user can copy manually to the system.

myugan avatar Oct 24 '20 19:10 myugan

@myugan, thanks for filing the issue.

Question: what do you mean by "we don't get any system file"? If you installed Sysbox making use of the deb package we have published, you should definitely be able to manage sysbox through the systemctl interface. See example below:

$ sudo systemctl restart sysbox

$ systemctl status sysbox
● sysbox.service - Sysbox General Service
     Loaded: loaded (/lib/systemd/system/sysbox.service; enabled; vendor preset: enabled)
     Active: active (exited) since Thu 2020-10-22 21:00:37 EDT; 1 day 18h ago
    Process: 3029318 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 3029318 (code=exited, status=0/SUCCESS)

These are the systemd files that Sysbox installer carries to allow systemctl interaction:

$ ls -lrt /etc/systemd/system/multi-user.target.wants/sysbox.service
lrwxrwxrwx 1 root root 34 Sep 11 17:13 /etc/systemd/system/multi-user.target.wants/sysbox.service -> /lib/systemd/system/sysbox.service
$
$ ls -lrt /etc/systemd/system/sysbox.service.wants/
total 0
lrwxrwxrwx 1 root root 37 Sep 11 17:13 sysbox-fs.service -> /lib/systemd/system/sysbox-fs.service
lrwxrwxrwx 1 root root 38 Sep 11 17:13 sysbox-mgr.service -> /lib/systemd/system/sysbox-mgr.service
$

Don't you see these files in your setup?

rodnymolina avatar Oct 24 '20 20:10 rodnymolina

I've got no systemd file for sysbox, i tried with systemctl status sysbox but not found the service.

myugan avatar Oct 25 '20 03:10 myugan

Did you install sysbox making use of the deb package that we provided? Or are you building sysbox binaries youself?

rodnymolina avatar Oct 25 '20 03:10 rodnymolina

I'm building from the source.

myugan avatar Oct 25 '20 04:10 myugan

Oh I see, got confused by your initial "after we install sysbox" comment.

Right, we could create a new makefile target (e.g. make install-systemd) to do what you're suggesting. Will add it to our todo-list (or let me know if you want to do it yourself, sounds like something simple to implement if you have an hour to spare -- ping me if curious).

In the meantime, in case that you haven't seen it yet, we have a small script to launch sysbox components (scr/sysbox) -- I know that it's not what you are asking, but perhaps can serve you as a temporary workaround.

The other alternative, as I said earlier, is to install Sysbox through its installer.

Thanks for your suggestion!

rodnymolina avatar Oct 25 '20 05:10 rodnymolina