Open iameli opened 4 years ago
Any chance this could be thawed?
@hjpotter92, could you drop a reference to your work on this? I know we had a Homebrew package working but maybe we hadn't gotten as far as an apt package quite yet.
Sounds like a great candidate for a grant 🤔
@hjpotter92, could you drop a reference to your work on this? I know we had a Homebrew package working but maybe we hadn't gotten as far as an apt package quite yet.
https://forum.livepeer.org/t/create-debian-package-via-github-workflow/2057/2
i think the workflow changes got lost in one of the worktrees; but the fpm
config file is the same.
--input-type dir
--name go-livepeer
--license MIT
--maintainer "Livepeer CI Robot <support@livepeer.org>"
--description "Official Go implementation of the Livepeer protocol"
--provides livepeer
--verbose
livepeer=/usr/bin/livepeer livepeer_bench=/usr/bin/livepeer_bench livepeer_cli=/usr/bin/livepeer_cli livepeer_router=/usr/bin/livepeer_router
Sounds like a great candidate for a grant 🤔
Funny you should say that, I was suggested against it two years ago when I brought it up.
i think the workflow changes got lost in one of the worktrees; but the
fpm
config file is the same.--input-type dir --name go-livepeer --license MIT --maintainer "Livepeer CI Robot <support@livepeer.org>" --description "Official Go implementation of the Livepeer protocol" --provides livepeer --verbose livepeer=/usr/bin/livepeer livepeer_bench=/usr/bin/livepeer_bench livepeer_cli=/usr/bin/livepeer_cli livepeer_router=/usr/bin/livepeer_router
The CI workflow is the right place to publish this package instead of an apt repository. If I may suggest some changes so the package adheres to the Debian / Ubuntu packaging handbook:
The package should be named go-livepeer
instead of livepeer
, for ex. --provides go-livepeer
The binaries should be installed to /usr/local/bin/
instead of /usr/bin/
The newfangled livepeer-linux-gpu-${ARCH}.tar.gz
should rename the livepeer binary to livepeer-gpu
or livepeer-transcoder
and should create its own package since livepeer-linux-${ARCH}.tar.gz
ships with an Orchestrator-only version. Livepeer shipping this would be considered a breaking change by downstream package maintainers.
The package should create a livepeer
user and group with shell set to /usr/sbin/nologin
and a home dir of /var/lib/livepeer
with appropriate perms like livepeer:livepeer
The package should create an empty /etc/go-livepeer/
directory with perms of root:livepeer
It should have a useful post-install message indicating to users what goes where and why and where they may seek support. Something like (taken from my Arch Linux livepeer package):
$ cat go-livepeer.install
post_install() {
id livepeer 2>/dev/null || useradd -r -U -M -s /bin/false -d /var/lib/livepeer livepeer
mkdir -p "/var/lib/livepeer"
chown livepeer:livepeer /var/lib/livepeer
echo -e "####################################################"
echo -e "## Before first start you must edit the Livepeer ##"
echo -e "## configuration file with your orchestrator info ##"
echo -e "## /etc/go-livepeer/livepeer.conf ##"
echo -e "## ##"
echo -e "## Active Orchestrators should copy the existing ##"
echo -e "## ~/.lpData directory along with the wallet and ##"
echo -e "## orchestrator password files to ##"
echo -e "## /var/lib/livepeer before starting the service. ##"
echo -e "## ##"
echo -e "## Update these values with your own and then run ##"
echo -e "## sudo systemctl enable --now livepeer.service ##"
echo -e "## ##"
echo -e "## Support may be found at Livepeer's official ##"
echo -e "## community channels on their forum & Discord - ##"
echo -e "## https://discord.gguaPhtyrWsF ##"
echo -e "## https://forum.livepeer.org ##"
echo -e "####################################################"
}
And perhaps a line that shows how to import the Livepeer CI Robot's signing key like gpg --recv-keys A2F9039A8603C44C21414432A2224D4537874DB2
Chuffed to see this get traction, thanks @iameli
I've never done this, but I believe the process requires GPG signing of all executables, so this is blocked by #1366.
The objective would be to make it this easy for Debian/Ubuntu users to install and update go-livepeer: