Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish an apt repository for go-livepeer #1367

Open
iameli opened this issue Feb 9, 2020 · 6 comments
Open

publish an apt repository for go-livepeer #1367

iameli opened this issue Feb 9, 2020 · 6 comments

Comments

@iameli
Copy link
Contributor

iameli commented Feb 9, 2020

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
@Strykar
Copy link
Contributor

Strykar commented Oct 16, 2023

Any chance this could be thawed?

@iameli
Copy link
Contributor Author

iameli commented Oct 16, 2023

@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.

@thomshutt
Copy link
Contributor

Sounds like a great candidate for a grant 🤔

@hjpotter92
Copy link
Member

hjpotter92 commented Oct 17, 2023

@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

@Strykar
Copy link
Contributor

Strykar commented Oct 17, 2023

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.

@Strykar
Copy link
Contributor

Strykar commented Oct 17, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants