-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New dockerfile and start script (#871)
- Loading branch information
Showing
11 changed files
with
360 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.DS_Store | ||
.project | ||
.cproject | ||
licode_config.js | ||
rtp_media_config.js | ||
build/ | ||
node_modules/ | ||
erizo/build | ||
erizoAPI/build | ||
erizoAPI/.lock-wscript | ||
erizo_controller/erizoClient/dist/erizofc.js | ||
erizo_controller/erizoClient/build/erizofc.js | ||
erizo_controller/erizoClient/dist/erizo.js | ||
erizo_controller/erizoController/node_modules/ | ||
erizo_controller/test/public/erizo.js | ||
erizo_controller/erizoAgent/out.log | ||
erizo_controller/erizoAgent/erizo-*.log | ||
extras/basic_example/node_modules | ||
extras/basic_example/public/assets/ | ||
extras/basic_example/public/erizo.js | ||
extras/basic_example/nuve.js | ||
extras/vagrant/.vagrant | ||
extras/vagrant/licode/ | ||
nuve/.DS_Store | ||
nuve/nuveClient/build | ||
nuve/nuveClient/dist | ||
nuve/nuveClient/dist | ||
nuve/cloudHandler/node_modules/ | ||
nuve/nuveAPI/node_modules/ | ||
libdeps/ | ||
scripts/libdeps/ | ||
spine/erizofc.js | ||
site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM ubuntu:14.04 | ||
|
||
MAINTAINER Lynckia | ||
|
||
WORKDIR /opt | ||
|
||
# Download latest version of the code and install dependencies | ||
RUN apt-get update && apt-get install -y git wget curl | ||
|
||
COPY . /opt/licode | ||
|
||
# Clone and install licode | ||
WORKDIR /opt/licode/scripts | ||
|
||
RUN ./installUbuntuDeps.sh --cleanup && \ | ||
./installErizo.sh && \ | ||
./../nuve/installNuve.sh && \ | ||
./installBasicExample.sh | ||
|
||
WORKDIR /opt | ||
|
||
ENTRYPOINT ["./licode/extras/docker/initDockerLicode.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,63 @@ | ||
# How to use this Dockerfile | ||
# Licode Docker Image | ||
|
||
To run a Licode Docker container you have two options: | ||
To run a Licode docker container you have two options: | ||
|
||
- You can build your own image using the Dockerfile we provide and then run the container from it or | ||
- you can run the container directly from the image we provide in Docker Hub. | ||
|
||
Both options require that you have [docker](https://docs.docker.com/installation/) installed on your machine. | ||
|
||
## Build your own image and run the container from it | ||
# Run the container from the latest release in Docker Hub | ||
|
||
You have to download the [Licode's code](https://github.com/ging/licode) from GitHub and navigate to `docker` directory. There, to compile your own image just run: | ||
|
||
sudo docker build -t licode-image . | ||
The easiest way to run licode is to use the [image we provide](https://hub.docker.com/r/lynckia/licode/) in Docker Hub. In this case you have only to execute the run command. But now the image name is lynckia/licode:*version* where `version` is the release you want to use: | ||
|
||
sudo docker run -d --name licode -p 3001:3001 -p 8080:8080 -p 3000:3000 -p 30000-31000:30000-31000/udp -e "PUBLIC_IP=XXX.XXX.XXX.XXX" lynckia/licode | ||
|
||
> **Note** | ||
> If you do not want to have to use `sudo` in this or in the next section follow [these instructions](https://docs.docker.com/installation/ubuntulinux/#create-a-docker-group). | ||
This builds a new Docker image following the steps in `Dockerfile` and saves it in your local Docker repository with the name `licode-image`. You can check the available images in your local repository using: | ||
|
||
sudo docker images | ||
|
||
> If you do not specify a version you are pulling from `latest` by default. | ||
> **Note** | ||
> If you want to know more about images and the building process you can find it in [Docker's documentation](https://docs.docker.com/userguide/dockerimages/). | ||
Now you can run a new container from the image you have just created with: | ||
> If you do not want to have to use `sudo` in this or in the next section follow [these instructions](https://docs.docker.com/installation/ubuntulinux/#create-a-docker-group). | ||
sudo docker run -d --name licode -p 3001:3001 -p 8080:8080 -p 3000:3000 -p 30000-31000:30000-31000/udp -e "PUBLIC_IP=XXX.XXX.XXX.XXX" licode-image | ||
|
||
Where the different params mean: | ||
Where the different parameters mean: | ||
|
||
* -d indicates that the container runs as a daemon | ||
* --name is the name of the new container (you can use the name you want) | ||
* -p stablishes a relation between local ports and a container's ports. | ||
* PUBLIC_IP tells Licode the IP that is used to access the server from outside | ||
* `-d` indicates that the container runs as a daemon | ||
* `--name` is the name of the new container (you can use the name you want) | ||
* `-p` stablishes a relation between local ports and a container's ports. | ||
* `PUBLIC_IP` tells Licode the IP that is used to access the server from outside | ||
* the last param is the name of the image | ||
|
||
Once the container is running you can view the console logs using: | ||
|
||
Once the container is running you can view the console logs using: | ||
``` | ||
sudo docker logs -f licode | ||
|
||
``` | ||
|
||
To stop the container: | ||
|
||
``` | ||
sudo docker stop licode | ||
``` | ||
|
||
Additionally, if you want to run a single Licode component inside the container you can select them by appending `--mongodb`, `--rabbitmq`, `--nuve`, `--erizoController`, `--erizoAgent` or `--basicExample` to the `docker run` command above. | ||
|
||
# Build your own image and run the container from it | ||
|
||
## Run the container from the last release in Docker Hub | ||
You have to git clone [Licode's code](https://github.com/ging/licode) from GitHub and navigate to `docker` directory. There, to compile your own image just run: | ||
|
||
You can also run the container from the [image we provide](https://hub.docker.com/r/lynckia/licode/) in Docker Hub. In this case you have only to execute the run command. But now the image name is lynckia/licode:*version* where `version` is the release you want to use: | ||
``` | ||
sudo docker build -t licode-image . | ||
``` | ||
|
||
sudo docker run -d --name licode -p 3001:3001 -p 8080:8080 -p 3000:3000 -p 30000-31000:30000-31000/udp -e "PUBLIC_IP=XXX.XXX.XXX.XXX" lynckia/licode | ||
This builds a new Docker image following the steps in `Dockerfile` and saves it in your local Docker repository with the name `licode-image`. You can check the available images in your local repository using: | ||
|
||
``` | ||
sudo docker images | ||
``` | ||
|
||
> **Note** | ||
> If you do not specify a version you are pulling from `latest` by default. | ||
> If you want to know more about images and the building process you can find it in [Docker documentation](https://docs.docker.com/userguide/dockerimages/). | ||
Now you can run a new container from the image you have just created with: | ||
``` | ||
sudo docker run -d --name licode -p 3001:3001 -p 8080:8080 -p 3000:3000 -p 30000-31000:30000-31000/udp -e "PUBLIC_IP=XXX.XXX.XXX.XXX" licode-image | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Overview | ||
This guide will guide you through the basics of getting a Licode instance with a basic videoconferencing application up and running. | ||
|
||
# Prerequisites | ||
We **only** officially support **Ubuntu 14.04** for production environments. | ||
|
||
We do maintain compatibility with **Mac OS X** for **development and testing purposes**. | ||
|
||
|
||
|Ubuntu 14.04 | Mac OS X > 10.11 | | ||
|-------------|------------------| | ||
|git|Xcode Command Line Tools| | ||
| |git| | ||
|
||
|
||
# Clone Licode | ||
Let's start by cloning the Licode repository | ||
``` | ||
git clone https://github.com/lynckia/licode.git | ||
cd licode | ||
``` | ||
The repository contains scripts for the rest of the steps of this guide. | ||
# Install dependencies | ||
This step installs the dependencies of all the Licode components. This is the only step that depends on your OS | ||
#### Ubuntu | ||
``` | ||
./scripts/installUbuntuDeps.sh | ||
``` | ||
#### Mac OS X | ||
``` | ||
./scripts/installMacDeps.sh | ||
``` | ||
|
||
# Install Licode | ||
Here we will install all the Licode components in your computer. | ||
``` | ||
./scripts/installNuve.sh | ||
./scripts/installErizo.sh | ||
``` | ||
# Install basicExample | ||
The basicExample is a really simple node-based web application that relies on Licode to provide a videoconferencing room. | ||
``` | ||
./scripts/installBasicExample.sh | ||
``` | ||
|
||
# Start Licode! | ||
At this points, you have successfully installed all the Licode components in your computer and also a simple application that will let you try it. | ||
Let's use the convenience script to start all Licode components: | ||
``` | ||
./scripts/initLicode.sh | ||
``` | ||
After that, we just have to start our node application, we also have a script for that: | ||
``` | ||
./scripts/initBasicExample.sh | ||
``` | ||
** Now you can connect to _http://localhost:3001_ with Chrome or Firefox and test your basic videoconference example! ** | ||
|
||
# What's next? | ||
|
||
Well you now have a taste of what Licode can do. You can start by modifying basicExample. You can find the code in `licode/extras/basic_example`: | ||
* `basicServer.js` is the node.js server that manages the communication between the clients and Nuve. Here you can add your own methods using the server side API (NuveAPI) | ||
|
||
Head to [Licode Architecture](index.md) for more information about different Licode components, or start developing your custom service getting into the client or server APIs. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.