Giter VIP home page Giter VIP logo

janus-gateway-dev's Introduction

Janus Gateway development with Docker

This repo contains development environment for convenient development to Janus Gateway core (don't mess with Janus Conference plugin).

Janus Gateway is being maintained by Meetecho and sometimes we send pull requests in C for them. For that purpose we have a fork however we must not include our development environment (dockerfiles, configs, etc.) in those PRs so we store it here in a separate repo and the fork repo is mounted as a git submodule.

How to make a PR to Janus Gateway

Say, you need to make changes in the Janus Gateway codebase.

  1. Clone this repo and cd to it:
git clone [email protected]:netology-group/janus-gateway-dev.git
cd janus-gateway-dev
  1. Copy docker/janus.plugin.conference.environment.sample as janus.plugin.conference.environment and fill in actual values.

  2. Add Meetecho's repo as upstream to the submodule:

cd janus-gateway
git remote add upstream https://github.com/meetecho/janus-gateway.git
  1. Fetch the latest changes from the upstream, merge them to the fork's master branch and push to start from the latest version:
git fetch upstream
git merge upstream/master
git push origin master
  1. Create a new branch:
git checkout -b my-feature
  1. Make your changes in the C codebase.

  2. cd to the repo's root and run docker-compose to build and start Janus Gateway with your changes + Janus Conference plugin along with VerneMQ broker + MQTT Gateway plugin:

cd ..
export COMPOSE_FILE=docker/docker-compose.yml
docker-compose up -d
docker-compose exec janus /opt/janus/bin/janus
  1. If everything compiled and started properly test your feature and basic Janus Conference scenarios manually. WARNING: Janus Conference plugin may be outdated in this repo. You may need to update the version in docker/develop.dockerfile.

  2. Commit and push your changes into the fork repository:

cd janus-gateway
git add .
git commit -m "Add some awesome stuff"
git push origin my-feature
  1. Open the fork repo on GitHub and create a pull request to the Meetecho's repo.

  2. If you can't wait for the PR to be merged you can temporarily switch to the fork repo in Janus Conference. For that change Dockerfile and develop.dockerfile by changing https://github.com/meetecho/janus-gateway to https://github.com/netology-group/janus-gateway and setting JANUS_GATEWAY_COMMIT to your branch's head.

  3. When Lorenzo from Meetecho merges the PR you should update JANUS_GATEWAY_COMMIT to the latest SHA1 from Meetecho's repo master branch and switch back to that repo if you have switched to the fork in the previous step. Build and test it again before pushing/deploying because other commits might been made in Janus Gateway that could break some things.

Debugging with GDB in VSCode

This repo has debug configuration for VSCode in .vscode/launch.json.

  1. Run Janus under gdbserver: gdbserver :2000 /opt/janus/bin/janus.
  2. Set breakpoints in the C code in janus-gateway directory.
  3. In VSCode choose Debug -> Start Debugging.

janus-gateway-dev's People

Contributors

feymartynov avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

erineyes

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.