Integration in the Cloudy ecosystem » History » Version 1

Version 1/12 - Next » - Current version
Luca Baldesi, 02/16/2018 02:19 PM


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.

Cloudy node setup

  1. Install a debian based distribution; by the time of writing debian 9 (Stretch) works just fine (even in the raspbian flavor).
  2. Install cloudy installation dependencies:
    apt-get update; apt-get install -y curl lsb-release vim tmux git
    
  3. Install cloudy (you can find more detail on cDistro repo)
    sudo su
    curl -k https://raw.githubusercontent.com/Clommunity/cloudynitzar/master/cloudynitzar.sh | bash -
    
  4. 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
  5. 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)

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    git@github.com:netCommonsEU/PeerStreamer-docker.git 
cd PeerStreamer-docker/
git checkout 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
manifests:
  - image: lbaldesi/psng_amd64:devel
    platform:
      architecture: amd64
      os: linux
  - image: lbaldesi/psng_arm:devel
    platform:
      architecture: arm
      os: linux