Integration in the Cloudy ecosystem » History » Version 2

Version 1 (Luca Baldesi, 02/16/2018 02:19 PM) → Version 2/12 (Luca Baldesi, 02/16/2018 02:20 PM)

h1. Integration in the Cloudy ecosystem

"Cloudy": is a project for service discovery and provisioning in community networks.

PeerStreamer-ng can be shipped for the Cloudy ecosystem easily through docker images.

The first part of this page will deal with the setup of a Cloudy node, while the second part with the creation of the PeerStreamer-ng docker image.

h2. Cloudy node setup

# Install a debian based distribution; by the time of writing debian 9 (Stretch) works just fine (even in the raspbian flavor).
# Install cloudy installation dependencies:
apt-get update; apt-get install -y curl lsb-release vim tmux git
# Install cloudy (you can find more detail on "cDistro repo":
sudo su
curl -k | bash -
# Setup a serf bootstrap node (otherwise "Serf": will not even start):
** Edit /etc/avahi-ps-serf.conf
** Change the parameter SERF_JOIN
** In case you need, you can start a serf node to be used as bootstrap one with:
serf agent -iface <net_interface> -bind <ip_addr>:<port>
** Browse localhost:7000 and go to Search->serf to start the Serf service
# Setup docker
* Browse localhost:7000 and go to Enterprise->docker, then click get docker
* Repeat the previous step to install docker
* Add PeerStreamer-ng docker image coordinates by editing var/local/cDistro/plug/resources/docker/containers/PeerStreamer-ng_latest.json:
"appname": "PeerStreamer-ng",
"description": "P2P live video streaming",
"arch": "<arch>",
"image": "--net host lbaldesi/peerstreamer:devel",
"name": "peerstreamer"
* Change "<arch>" in the with your machine architecture (e.g., armhf, amd64)
* Browse localhost:7000 and go to Enterprise->docker, then click "add predefined image" to select and install PeerStreamer-ng
(it may take some time and the web interface does not show any progress; wait few minutes or check "top" to be sure the command failed)

h2. PeerStreamer on docker

PeerStreamer-ng assumes a running instance of Serf is already setup, which goes reasonably well in the Cloudy environment.
Serf is needed as PeerStreamer-ng uses it for channel discovery and advertisement.

To build the docker image from scratch:
git clone
cd PeerStreamer-docker/
git checkout multiarch devel
sudo docker build -t lbaldesi/psng_<arch>:devel .

If you want to push it to docker hub:
sudo docker login
sudo docker push lbaldesi/psng_<arch>:devel

If you want to create a multiarch peerstreamer image ("tutorial":
image: lbaldesi/peerstreamer:devel
- image: lbaldesi/psng_amd64:devel
architecture: amd64
os: linux
- image: lbaldesi/psng_arm:devel
architecture: arm
os: linux