GithubHelp home page GithubHelp logo

tcraghu / live-streaming-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mcattarinussi/live-streaming-demo

0.0 0.0 0.0 36 KB

Demo project to experiment with live video streaming, nodejs and kubernetes

Shell 10.40% HTML 41.58% JavaScript 48.02%

live-streaming-demo's Introduction

Live streaming demo

Demo project to experiment with live video streaming, nodejs and kubernetes.

The app uses MPEG-DASH technique to stream live video content.

The live streaming is simulated by looping a sample video.

You can try the application at http://35.230.152.32. Login with email [email protected] and password pass.

Build and push Docker images

To build the Docker images locally you need to install Docker.

Then run

sh build.sh

This will build all the app components images and push them to the configured image registry.

Note: you need to be logged in your Docker registry service to push the images, see docker login.

Deploy the app on Google Cloud Platform

Install and configure the Google Cloud SDK.

The app will be deployed on Google Cloud using kubernetes.

Create the project

gcloud projects create live-streaming-demo

Create and activate the local configuration for the project

gcloud config configurations create live-streaming-demo --activate --account <YOUR_GMAIL_EMAIL> --project live-streaming-demo

Optionally, setup the region/zone where you want to deploy the kubernetes cluster (see available regions/zones)

gcloud config set compute/zone <YOUR_ZONE>

Enable container service (you need to enable the billing for the project, check here)

gcloud services enable container

Create the kubernetes cluster

gcloud container clusters create live-streaming-demo --node-version latest --num-nodes 1

Fetch credentials for the cluster

gcloud container clusters get-credentials live-streaming-demo

Deploy the application

kubectl create -f ./deployment

Check if all the services are up and running

$ kubectl get services
NAME                           TYPE           CLUSTER-IP      EXTERNAL-IP      PORT(S)        AGE
kubernetes                     ClusterIP      10.63.240.1     <none>           443/TCP        50m
live-streaming-demo-api        ClusterIP      10.63.244.172   <none>           80/TCP         50m
live-streaming-demo-encoder    ClusterIP      10.63.246.248   <none>           80/TCP         50m
live-streaming-demo-frontend   LoadBalancer   10.63.254.23    35.230.128.140   80:31281/TCP   50m
live-streaming-demo-redis      ClusterIP      10.63.255.224   <none>           6379/TCP       50m

Copy and paste the EXTERNAL_IP of the live-streaming-demo-frontend in your browser to use the app.

Run the app locally

To run the application locally you need to install Minikube.

Start the minikube cluster

minikube start

Use minikube cluster context

kubectl config use-context minikube

Deploy the application

kubectl create -f ./deployment

Open the app in your browser

  • On MacOS: open $(minikube service live-streaming-demo-frontend --url)
  • On linux: xdg-open $(minikube service live-streaming-demo-frontend --url)

live-streaming-demo's People

Contributors

mcattarinussi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.