Revision 756b9cdd README.md

View differences:

README.md
7 7
```
8 8

  
9 9
If you intend to push the image on docker hub it is better to use directly the
10
tag that includes your used name. Supposing the username is xxx and the
10
tag that includes your user name. Supposing the username is xxx and the
11 11
repository is called peerstreamer:
12 12

  
13 13
```
......
17 17
In order to push the new image the following command are required (and an
18 18
account on [hub.dovker](https://hub.docker.com)):
19 19

  
20
```bash
20 21
docker login (this requires username and password)
21 22
docker push xxx/peerstreamer (this implies latest as tag, use
22 23
peerstreamer:<tag> to change the version)
24
```
23 25

  
24 26
Run the container with the following command:
25 27

  
......
48 50
docker run --rm -t -i peerstreamer /sbin/my\_init -- bash -l
49 51
```
50 52

  
53
# Cloudy
54

  
55
This section contains a short tutorial that explains how to install the
56
PeerStreamer-ng Docker image into
57
[Cloudy](https://github.com/netCommonsEU/cDistro). This guide does not
58
describe how to install Cloudy, we assume that a node with Cloudy correctly
59
installed and configured is already available. If Cloudy is available you
60
should be able to connect to the Cloudy node by pointing you browser to
61
http://<cloudy_node_ip>:7000.
62

  
63
> WARNING: the latest tested version of Cloudy (commit 8ffd754) contains a
64
few bugs that make it impossible to install the PeerStreamer-ng Docker image
65
using only the web interface provided by Cloudy. The bugs can be bypassed by
66
manually writing one of the required configuration files and in order to do
67
this you need local access with root permissions to the cloudy node.
68

  
69
The first step for installing the PeerStreamer-ng Docker image requires to
70
create a configuration file that describes the PeerStreamer-ng Docker image
71
in a format recognized by Cloudy. In order to complete this step you need
72
local access to the Cloudy node with root permissions.
73

  
74
In `/var/local/cDistro/plug/resources/docker/containers/` create a new file
75
called `PeerStreamer-ng_latest.json` with the following content:
76

  
77
```code
78
{
79
 "appname": "PeerStreamer-ng",
80
 "description": "P2P live video streaming",
81
 "image": "--net host nfunitn/peerstreamer:latest",
82
 "name": "peerstreamer"
83
}
84
```
85

  
86
Now point your browser to http://<cloudy_node_ip>:7000 and enter the login
87
credentials. From the Cloudy start page click on "Enterprise cloud" ->
88
"Docker" as shown in the screenshot reported below:
89

  
90
![cloudy_startpage](./images/cloudy_startpage.png)
91

  
92
Now you are on the "Docker" page that should appear similar to the screenshot
93
reported below:
94

  
95
![cloudy_dockerpage](./images/cloudy_dockerpage.png)
96

  
97
Now open the list of available Docker images by clicking on "Add predefined
98
Docker images". This should open the page containing the list of Docker
99
images ready to be launched and PeerStreamer-ng shoud appear among them.
100
In the example reported below PeerStreamer-ng is the first entry:
101

  
102
![cloudy_imageslist](./images/cloudy_imageslist.png)
103

  
104
Now you can finally launch PeerStreamer-ng by clicking on "Launch". This will
105
start the PeerStreamer-ng container in background.
106

  
107
> NOTE: if this is the first time you perform this operation, Cloudy will
108
take care of downloading the peerstreamer image from [Docker
109
Hub](https://hub.docker.com/r/nfunitn/peerstreamer/). The time required for
110
this operation depends on the download speed of your connection. Once the
111
image has been downloaded, the next time you launch the container the startup
112
time should be negligible.
113

  
114
Now, if you go back to "Enterprise cloud" -> "Docker", you should see the
115
peerstreamer container listed under "Running Docker containers" as shown in
116
the example reported below:
117

  
118
![running_containers](./images/cloudy_runningcontainers.png)
119

  
120
Now you can connect to PeerStreamer-ng web page by pointing your browser to
121
http://<cloudy_node_ip>:3000 and something similar to the example reported
122
below should appear:
123

  
124
![psng](./images/psng.png)
125

  
126
as you can see the available channels are listed on the right side of the page.
127

  
128
>NOTE: for adding and deleting channels from the Serf cluster see the
129
[`psng-pyserf` tool
130
documentation](https://github.com/netCommonsEU/psng-pyserf/blob/master/README.md)
131

  
132
>NOTE: for information about how to stream a video content take a look at the
133
script provided
134
[here](https://github.com/netCommonsEU/PeerStreamer-ng/tree/webrtp#the-source)

Also available in: Unified diff