Giter VIP home page Giter VIP logo

one_more_emqx's Introduction

one_more_emqx

For emqx 4.x and before

A shell script for creating a new emqx node for an existing one.

It simply copies the existing emqx directory to new one and then changes the port configs in it.

Usage:

cd _rel
➜  ls
emqx one_more_emqx.sh
➜  ./one_more_emqx.sh emqx2
creating emqx2 ...
using increment factor: 836
.
.
.
.
processing config file: emqx2/etc/plugins/emqx_management.conf
inc port for management.listener.http
-- from: 8080
-- to: 8916
inc port for management.listener.https
-- from:
-- to: 836
.
processing config file: emqx2/etc/plugins/emqx_dashboard.conf
inc port for dashboard.listener.http
-- from: 18083
-- to: 18919
inc port for dashboard.listener.https
-- from:
-- to: 836
.
.
.
.
processing config file: emqx2/etc/emqx.conf
inc port for node.dist_listen_min
-- from: 6369
-- to: 7205
inc port for dist_listen_max
-- from: 6369
-- to: 7205
inc port for tcp_server_port
-- from: 5369
-- to: 6205
inc port for tcp_client_port
-- from: 5369
-- to: 6205
inc port for listener.tcp.external
-- from: 0.0.0.0:1883
-- to: 0.0.0.0:2719
inc port for listener.tcp.internal
-- from: 127.0.0.1:11883
-- to: 127.0.0.1:12719
inc port for listener.ssl.external
-- from: 8883
-- to: 9719
inc port for listener.ws.external
-- from: 8083
-- to: 8919
inc port for listener.wss.external
-- from: 8084
-- to: 8920
inc port for listener.tcp.internal
-- from: 127.0.0.1:12719
-- to: 127.0.0.1:13555
.

For emqx 5.x and later

EMQX 5.0 uses HOCON formatted configs and supports changing the configs using envioronment variables. So this script is not needed any more.

  1. Duplicate the emqx directory to emqx2.
cp emqx emqx2
  1. Start the emqx2:
cd emqx2

EMQX_NODE__NAME='[email protected]' \
EMQX_STATSD__SERVER='127.0.0.1:8124' \
EMQX_LISTENERS__TCP__DEFAULT__BIND='0.0.0.0:1882' \
EMQX_LISTENERS__SSL__DEFAULT__BIND='0.0.0.0:8882' \
EMQX_LISTENERS__WS__DEFAULT__BIND='0.0.0.0:8082' \
EMQX_LISTENERS__WSS__DEFAULT__BIND='0.0.0.0:8085' \
EMQX_DASHBOARD__LISTENERS__HTTP__BIND='0.0.0.0:18082' \
./bin/emqx console

one_more_emqx's People

Contributors

terry-xiaoyu avatar rory-z avatar

Stargazers

Edwin Wang avatar Padeny.yang avatar  avatar JianBo He avatar Sihan Chen avatar DDDHuang avatar Wu.Zhang avatar  avatar Edoardo Longo avatar zhouzb avatar Gilbert avatar

Watchers

James Cloos avatar  avatar

one_more_emqx's Issues

Same tcp_client_port and tcp_server_port in case of >2 emqx nodes

rpc.tcp_client_port and rpc.tcp_server_port remain the same when more than 2 emqx nodes are created. This arises problems when multiple nodes run concurrently (i.e., the 3rd, 4th and so on crash due to port conflict).
My workaround is to add PORT_INC also to tcp_client_port and tcp_server_port. I don't know if this can cause some problem in RPC

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.