Commit Graph

117 Commits

Author SHA1 Message Date
Zaiming (Stone) Shi d8cad2cc6c refactor(bin/emqx_ctl): simplify emqx_ctl
There is no need to duplicate the node name/cookie resolution
in another script, everything is ready in bin/emqx
2022-04-12 23:05:52 +02:00
Zaiming (Stone) Shi 2da27392f7 chore: refine boot script with more readable help info 2022-04-12 23:05:17 +02:00
Zaiming (Stone) Shi 5e652217c8 fix: make possible to have white spaces in root path 2022-04-12 00:05:26 +02:00
Zaiming (Stone) Shi 8798a5160c fix: ensure install_upgrace.escript always restore cwd 2022-04-04 19:10:52 +02:00
Zaiming (Stone) Shi cd06edf8c8 fix(relup): upgrader node hidden connect target node 2022-03-31 18:30:20 +02:00
Zaiming (Stone) Shi 1a02e60640
docs: fix message typo in bin/emqx 2022-03-04 13:52:11 +01:00
Zaiming (Stone) Shi a0de86f327 chore: refine boot message on missing dynlibs 2022-03-04 09:31:33 +01:00
Shawn 71100427dd fix(relup): release upgrade failed if release dir is removed
If the target vsn is in `unpacked` state, but the release dir
`releases/<vsn>` is removed, then installing the target vsn
again will fail with error `{error,enoent}`.

In this case we should extract the tar ball again and then continue
to install the release.
2022-03-01 10:13:17 +08:00
Shawn 442a1290a8 fix(relup): release upgrade failed on symlink already exists 2022-02-23 19:14:59 +08:00
Zaiming (Stone) Shi 2325e8cfb3 chore: ensure remsh node name prefix for upgrader
for remsh prefixed nodes, ekka pick a random port to listen on
instead of following the conventional port mapping rule:
ekka listens on 4370 for emqx or emqx0 and 4371 for
emqx1 and so on
2022-02-20 19:57:56 +01:00
Zaiming (Stone) Shi d2840a8aa1 docs: change EMQ X to EMQX in more descriptive info 2022-02-15 22:18:25 +01:00
Zaiming (Stone) Shi 72c909051b fix: stop command should detect defunct pid 2022-01-26 23:48:31 +01:00
Zaiming (Stone) Shi 967dc7d55e fix: portable shebang 2021-12-27 15:40:25 +01:00
Zaiming Shi 122842a656 build: copy only libcrypto and libtinfo 2021-11-22 15:46:19 +01:00
William Yang a0fb78a38d
Merge pull request #6209 from qzhuyan/backport/william/4.3/node_dump-log-dir 2021-11-17 21:36:11 +01:00
William Yang 59656b3c3a fix: source emqx_vars in node_dump tool 2021-11-17 13:19:05 +01:00
William Yang 4f0d86dd57 fix(node_dump): locate log dir for package installation 2021-11-17 13:18:59 +01:00
Shawn 133609a040 fix(relup): configs for plugins are missing after relup 2021-11-10 11:10:23 +08:00
Zaiming Shi f5a2421fdb fix(bin/emqx): ensure NAME is set 2021-11-08 13:27:38 +01:00
Zaiming Shi ecb6c1c59e build: copy dynamic libs for zip package 2021-10-31 17:21:26 +01:00
Zaiming Shi 18fc82855b fix(bin/emqx): handle flags in vm.args
prior to this fix, the flags such as -heart in vm.args file were taken
as KEY="", VALUE="-heart"
as a result, the sed replacement replaces all lines with "-heart"
causing beam to crash at boot
2021-10-28 21:09:06 +02:00
Zaiming Shi 2e3c98dd55 fix(bin/emqx): fix boot log
prior to this fix the logger message (syslog) has the name and pid
missing.
with this change, the programe name, and its boot command is logged
to syslog, so the console boot is cleaner
2021-07-31 00:29:53 +02:00
Turtle 99c22eb2a8 fix(relup): fix relup badfun 2021-06-05 13:56:27 +08:00
Zaiming Shi d4dcf94da6 fix(emqx.cmd): windows boot 2021-05-18 20:30:48 +08:00
Zaiming Shi a1162249b5 fix(nodetool): find release in releases 2021-05-13 22:57:44 +02:00
Zaiming Shi 53291ac3ff fix(nodetool): add path from RELEASES file 2021-05-13 21:59:08 +08:00
Zaiming Shi 873459a07f fix(emqx_ctl): ensure env variables are exported 2021-05-11 14:25:46 +02:00
Zaiming Shi 3aba50605a chore(nodetool): ensure correct lib dirs
Prioro to this change, ekka lib dir was added by inspecting
the ekka lib version in persisted RELEASES file.
However, this file may not be the true version if a hot
upgrade failed in the middle.
In this fix, it reads the per-version emqx.rel file
content to load lib paths.
2021-05-10 12:04:22 +02:00
k32 eb0488828b fix(node_dump): Remove bashisms from node_dump script 2021-05-06 14:19:09 +02:00
k32 cb3dce598c feat(node_dump): Add an option to set max log file age 2021-05-06 14:19:09 +02:00
k32 5302459a36 fix(node_dump): Please shellcheck 2021-05-06 14:19:09 +02:00
k32 f3083601ff fix(node_dump): Avoid collecting old log files 2021-05-06 14:19:09 +02:00
k32 1db8483bb3 feat(node_dump): Hide `secret' configuration keys
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2021-05-06 14:19:09 +02:00
k32 e6c85dfb04 fix(node_dump): Attempt to censor passwords 2021-05-06 14:19:09 +02:00
k32 d913a7d20d feat(node_dump): Create a node dump script 2021-05-06 14:19:09 +02:00
Zaiming Shi 2a9a5e74d7 fix(bin/emqx): print cuttlefish error 2021-04-10 08:48:13 +00:00
Yudai Kiyofuji e3a5f65c88
feat(config): print override env (#4517) 2021-04-09 16:28:01 +02:00
Zaiming Shi a8a9bda484 chore(bin/emqx): Fix typo 2021-04-02 15:53:19 +08:00
z8674558 299d489ef9 refactor(bin/emqx): use cuttlefish `get` to get values from .conf 2021-04-02 08:42:58 +02:00
Zaiming Shi d4c6b6b926 chore(scripts): ensure no space in cookie 2021-03-29 09:40:10 +02:00
Zaiming Shi a898f6be1e chore(scripts): boot commands also need node name and cookie 2021-03-24 16:21:15 +01:00
Zaiming Shi 6476a5ea92 fix(script): nodetool use remsh prefixed node name 2021-03-24 16:21:15 +01:00
Zaiming Shi 4ee0dbdea4 fix(scripts): Finds node name and cookie from vm.args
For node name and cookie overriden from environment variable
the only way to find it from another shell is to inspect
the vm.args file.

For node boot commands, the vm.args file may not have been created
yet, so we need to inspect node name in emqx.conf
2021-03-24 16:21:15 +01:00
zhanghongtong b732d87da9 chore(script): delete emqx_env 2021-03-23 23:08:56 +08:00
zhanghongtong 106b738a89 chore(script): make emqx work with docker entrypoint 2021-03-23 23:08:56 +08:00
Zaiming Shi 78afdd8b57 chore(script): make emqx_ctl work with docker entrypoint 2021-03-23 22:44:37 +08:00
Zaiming Shi 09c4f6eef0 chore(boot): Do not ps -ef inspect node name
In case there are multiple nodes running
the current code (before this commit) will fail

If we choose to fix, it may stop the wrong node
2021-03-23 14:48:03 +01:00
Zaiming Shi 178404c821 chore(build): add rebar_mix plugin 2021-03-19 12:22:43 +01:00
Zaiming Shi 96bd561790 feat(windows): Support environment variable override for windows 2021-03-16 11:26:17 +01:00
Zaiming Shi b629a6c58c chore(scripts): fix typo for var names 2021-03-09 20:22:48 +01:00
turtleDeng 115397523d
chore(build): add more enterprise build support (#4302) 2021-03-08 20:47:31 +08:00
Zaiming Shi 5d71e51985 fix(config): Do not allow customizing cuttlefish env override prefix
We have quite a few EMQX_ prefixed variables used in bash scripts
having to meta-programming bash is not quite readable
2021-03-02 15:29:44 +01:00
Zaiming Shi fc03d7aea9 fix(config): use config value default log.to for daemon mode 2021-03-02 15:28:13 +01:00
Zaiming Shi 6b2949e2c1 chore(config): Change default log_to config
By default log to file.
When start from console or forgreground, only log to console.
Only log to file for package builds.
2021-03-02 14:05:04 +01:00
Zaiming Shi 7bf5bb26e7 fix(scripts): Ensure ekka in ERL_LIBS for remote nodes 2021-03-02 18:55:55 +08:00
Zaiming Shi 98b319a0c0
Merge pull request #4190 from zmstone/refactor-assing-names-to-listeners
feat(listeners): Add identifier to listeners
2021-02-19 07:50:27 +01:00
Zaiming Shi 64cfaf4385 improve(print): io:format error message without indentation
Avoid squeezing lines to the right.
2021-02-19 07:45:37 +01:00
z8674558 74b7ea34d9 feat(bin): let cuttlefish read env var 2021-02-19 01:09:06 +09:00
Yudai Kiyofuji aadd1ba11a
add shellcheck to ci (#4126)
* chore(shell): disable some shellcheck

* refactor(shell): fix shellcheck

* test(ci): add shellcheck
2021-02-04 16:51:48 +09:00
Zaiming Shi d13a33463f chore(bin/emqx): set program name 2021-01-29 09:42:35 +08:00
Zaiming Shi cf23d9efe9 chore(bin/emqx): Do not rely on beam.smp program name 2021-01-29 09:42:35 +08:00
Zaiming Shi cbc07d9937 fix(bin/emqx): Fix the boot file path for start_clean 2021-01-15 09:31:01 +01:00
Zaiming Shi 084ce97d41 fix(rel): rel_vsn renamed to release_version 2020-12-08 22:28:46 +01:00
terry-xiaoyu 151d820058 feature(project): change to rebar3 umbrella project 2020-10-31 11:07:25 +08:00
Ery Lee 1e02cd1363 rm bin and fix README 2012-12-26 14:44:19 +08:00
erylee 425bc2157e add auth support 2012-12-22 16:42:32 +08:00
erylee efc1d9f424 add bin/ and some files 2012-12-21 17:33:21 +08:00