The easiest way to install Livepeer is by downloading the livepeer
and livepeer_cli
executables from the release page on Github.
- Download the packages for your OS - darwin for Macs and linux for linux.
- Untar them and optionally move the executables to your PATH.
There are also binaries produced from every GitHub commit made available in the #builds channel of the Livepeer Discord server. Those binaries are produced from go-livepeer's CI process, shown in this diagram:
You can also build the executables from scratch.
1. If you have never set up your Go programming environment, do so according to Go's Getting Started Guide.
2. You can fetch the code running go get github.com/livepeer/go-livepeer/cmd/livepeer
in terminal.
3. Make sure you have the necessary libraries installed:
-
Linux:
apt-get update && apt-get -y install build-essential pkg-config autoconf gnutls-dev
-
OSX:
brew update && brew install pkg-config autoconf gnutls
4. You need to install ffmpeg
as a dependency. Run ./install_ffmpeg.sh
. This will install the dependencies in ~/compiled
. You need to have pkg-config
installed.
5. You can now run HIGHEST_CHAIN_TAG=<CHAIN_NAME> PKG_CONFIG_PATH=~/compiled/lib/pkgconfig make
from the project root directory. To get latest version, git pull
from the project root directory.
a. HIGHEST_CHAIN_TAG
(available values: dev
, rinkeby
& mainnet
) represents the highest compatible chain to build for with an ordering of dev < rinkeby < mainnet
, e.g. using HIGHEST_CHAIN_TAG=rinkeby
will allow the node to run on the public Rinkeby test network but throw an error when trying to connect to the main Ethereum network.
b. PKG_CONFIG_PATH
is the path where pkg-config
files for ffmpeg
dependencies have been installed (see step 3 & 4).
6. To run tests locally ./test.sh
, to run in docker container run ./test_docker.sh
If you prefer to use the official livepeer docker image by simply pulling it
docker pull livepeer/go-livepeer
Or if you'd like to modify the code or try something out, you can build the image using the Dockerfile.debian
in the repo
# clone this repo
git clone https://github.com/livepeer/go-livepeer.git
# do the modification you'd like to do the code
# ...
# have the repo tags exported to file
echo $(git describe --tags) > .git.describe
# in repo root folder
docker build -t livepeerbinary:debian -f docker/Dockerfile.debian .
# test it
docker run -it livepeerbinary:debian livepeer -version
To setup a full Livepeer network deployment, try out our test-harness which automates the process of deploying the Livepeer developer testnet. This includes the Livepeer solidity contracts along with secondary services like a full metrics suite for debugging and a fully working Livepeer nodes running locally or on Google Cloud Platform (GCP).
Read more about GCP deployments here.