publish an apt repository for go-livepeer
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:
sudo apt-get install -y apt-transport-https software-properties-common curl
wget -q -O - https://apt.livepeer.org/gpg.key | sudo apt-key add -
echo "deb https://apt.livepeer.org/ latest main" | sudo tee -a /etc/apt/sources.list.d/livepeer.list
sudo apt-get update
sudo apt-get install -y livepeer
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 <[email protected]>"
--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
fpmconfig file is the same.--input-type dir --name go-livepeer --license MIT --maintainer "Livepeer CI Robot <[email protected]>" --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-livepeerinstead oflivepeer, 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.gzshould rename the livepeer binary tolivepeer-gpuorlivepeer-transcoderand should create its own package sincelivepeer-linux-${ARCH}.tar.gzships with an Orchestrator-only version. Livepeer shipping this would be considered a breaking change by downstream package maintainers. -
The package should create a
livepeeruser and group with shell set to/usr/sbin/nologinand a home dir of/var/lib/livepeerwith appropriate perms likelivepeer:livepeer -
The package should create an empty
/etc/go-livepeer/directory with perms ofroot: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