Commit Graph

735 Commits

Author SHA1 Message Date
William Yang 5b79fd55a2
Merge pull request #8176 from qzhuyan/dev/william/kill-quic
chore: don't build quic on MacOS
2022-06-13 14:34:39 +02:00
William Yang d49a75ae28 chore: don't build quic on MacOS 2022-06-13 13:09:20 +02:00
Zaiming (Stone) Shi c76d5c0181 build(mix): copy generated docs to release 2022-06-12 21:18:00 +02:00
Zaiming (Stone) Shi 1b4f29bd64 chore: update ekka to 0.12.9
compring to 0.12.8, it included a version bump of erlang_rocksdb
which fixed a CI build issue (bad version number uploaded to github
artifacts, caused cached build result to always fail to download
hence fallback to compile from source code)
2022-06-10 13:59:30 +02:00
lafirest 787724bb99
Merge pull request #8143 from lafirest/chore/bump_esockd_version
chore: bump esockd version
2022-06-08 10:17:02 +08:00
firest 0b84479221 chore: bump esockd version 2022-06-07 13:20:56 +08:00
Zhongwen Deng eb2a4df4af feat: change node.applications default to [] 2022-06-07 10:19:26 +08:00
Zaiming (Stone) Shi 9ea923d9d7
Merge pull request #8138 from zmstone/ci-use-emqx-builder-5.0-16
ci: use emqx-builder 5.0-16
2022-06-06 14:55:18 +01:00
Zaiming (Stone) Shi fc4d9e4dcd ci: use emqx-builder 5.0-16
Fixed openssl compatibility issue
2022-06-06 10:54:26 +02:00
Zhongwen Deng de5e388afb chore: hocon validate message 2022-06-06 09:55:12 +08:00
Zaiming (Stone) Shi a690902cab chore: pin jq v0.3.4 2022-05-31 17:46:06 +02:00
Shawn e664a3bc30 chore: ping jq v0.3.3 2022-05-31 22:47:59 +08:00
Zhongwen Deng 1345b7e993 chore: bump hocon to 0.28.0 2022-05-31 19:20:27 +08:00
ieQu1 d5649d1f89 chore(mria): Bump version to 0.2.7 2022-05-30 20:20:23 +02:00
Zaiming (Stone) Shi eacd3847ed fix(emqx_mgmt): show used and total ram from lc 2022-05-27 14:04:30 +02:00
Zaiming (Stone) Shi ebe4d7c3fb refactor: stop releasing edge edition
Prior to EMQX 5.0, the edge edition's main difference comaring
to standard edition are:
* Less number of plugins in the release (smaller package size)
* Smaller number is vm.args (for lower memory usage)

Starting from 5.0 most of the plugins are included as features,
the tuned vm.args arguments does not justify a special release edition.

Also as nanomq is getting mature,
EMQ's recommendtation for MQTT broker in edge is https://nanomq.io/
2022-05-26 20:05:46 +02:00
Shawn 8650842994 fix: pin jq v0.3.2 2022-05-22 14:14:02 +08:00
Shawn 7bc2d9edbb fix: remove bison from the required tools when building emqx 2022-05-21 14:17:12 +08:00
Kjell Winblad 402ab7e759 chore: remove unnecessary repeated code
Co-authored-by: Zaiming (Stone) Shi <zmstone@gmail.com>
2022-05-18 07:21:16 +02:00
Kjell Winblad 05032467bd feat(rule_engine): default timeout for jq/2 and jq/3 with timeout
This commit adds a default timeout of 10 seconds to the rule engine's
`jq/2` function, and adds a new function `jq/3` (where the last parameter is
a timeout value). The default timeout can be configured with the setting
"rule_engine.jq_function_default_timeout".

Having a timeout when executing jq code in the rule engine is important
as jq code can potentially run forever. Also, the Erlang jq library
limits the number of jq programs that can execute concurrently so a jq
program that loops forever could potentially also prevent a "non-buggy"
jq program from ever starting.
2022-05-17 19:36:32 +02:00
Zaiming (Stone) Shi 382d9079e1
Merge pull request #7923 from zmstone/0511-pin-lc-0.3.0-fix-memory-usage-false-alarm
pin lc 0.3.0 fix memory usage false alarm
2022-05-13 21:55:23 +01:00
Zaiming (Stone) Shi eb592df275 chore: pin lc version 0.3.0
lc 0.3.0 has new APIs added to get total RAM and usage ratio
2022-05-13 13:06:27 +02:00
Kjell Winblad e107f84d7e fix: update jq to v0.2.2
This commit makes jq compile error reporting better and avoids a crash
when the program contains an include expression.
2022-05-13 10:59:57 +02:00
Zhongwen Deng af8cad3856 chore: bump minirest to 1.3.3(force generate dispatch rule) 2022-05-12 16:42:20 +08:00
lafirest d06377d82d
Merge pull request #7925 from lafirest/chore/esockd_version
chore: update esockd to 5.9.2
2022-05-12 15:49:08 +08:00
firest 8a5c11744f chore: update esockd to 5.9.2 2022-05-12 10:18:37 +08:00
JianBo He 481fbe856b chore: pin gun to 1.3.7 2022-05-12 10:15:46 +08:00
JianBo He 1320cc3122 chore: update ehttpc to 0.2.0
In ehttpc v0.2.0, we have optimized the implementation for request collection
to reduce resource consumption. see: emqx/ehttpc#31
2022-05-12 10:15:46 +08:00
Thales Macedo Garitezi 11b61881de
chore: bump ekka -> 0.12.6, mria -> 0.2.5
reduce mria logs when in RLOG mode.

https://github.com/emqx/ekka/pull/161
https://github.com/emqx/mria/pull/84
https://github.com/emqx/mria/pull/86
2022-05-11 15:15:41 -03:00
Zhongwen Deng 9c42c9216d fix: bump minirest to 1.3.2(pmap api_spec will crash if timeout) 2022-05-10 09:38:48 +08:00
Zhongwen Deng b91e9e59ba chore: bump minirest to 1.3.1(generate api_spec concurrency) 2022-05-10 09:38:48 +08:00
Zhongwen Deng 23a01e393c chore: bump minirest to 1.3.0 2022-05-10 09:38:48 +08:00
Xinyu Liu 62d448fb28
Merge pull request #7889 from terry-xiaoyu/jq_v0.1.1
chore: update jq to v0.2.0
2022-05-07 09:57:48 +08:00
Shawn 82da4d82be chore: update jq to v0.2.0 2022-05-06 22:20:35 +08:00
Thales Macedo Garitezi 2771193359
chore(ekka): bump ekka -> 0.12.5
Improves autocluster resilience against split-brain during startup.

https://github.com/emqx/ekka/pull/160
2022-05-05 17:02:47 -03:00
Kjell Winblad 74c33cd4e5 feat(rule_engine): add jq function to the rule engine
This commit adds a function to the rule engine that alows users
to transform text or JSON objects using [jq filter programs][1].

[jq][1] is a command line tool that can be used to transform
and filter JSON text using jq's built-in language. The rule engine
function that is added with this commit uses the
[Erlang jq NIF library][2] that wraps the jq C library in an
Erlang NIF function.

[1]: https://stedolan.github.io/jq/
[2]: https://github.com/emqx/jq
2022-05-04 17:09:16 +02:00
Zhongwen Deng 6f1610257f feat: bump hocon to 0.27.5 to remove FROM_ENV 2022-04-29 08:48:12 +08:00
Zhongwen Deng b06747d961 chore: bump typeref to 0.9.1 to fix flatten error 2022-04-28 14:05:39 +08:00
Zhongwen Deng 08cad804bf fix: bump hocon to 0.27.4 to obfuscate sensitive as binary 2022-04-27 13:55:42 +08:00
Zhongwen Deng f5e09c9f2f fix: bump minirest to 1.2.13 to fix crash when upload large form data 2022-04-27 13:55:42 +08:00
ieQu1 73733221d5 chore: Bump versions of mria, ekka, snabbkaffe 2022-04-26 17:35:30 +02:00
Zhongwen Deng 5223c3ee61 feat: obfuscate sensitive values default_password 2022-04-24 09:41:29 +08:00
ieQu1 3618296eed
Merge pull request #7729 from ieQu1/sysmon-3.0.3
chore(system_monitor): Bump version to 3.0.3
2022-04-22 14:31:44 +02:00
ieQu1 0bdb8e01a0 chore(system_monitor): Bump version to 3.0.3 2022-04-22 12:58:18 +02:00
Zaiming (Stone) Shi 9212906c5b chore: pin hocon 0.27.2 2022-04-22 08:53:30 +02:00
Zhongwen Deng bdffa8d502 chore: bump emqx_http_lib to 0.5.1 2022-04-20 10:59:22 +08:00
DDDHuang 034fa3b9be fix: update mix dep version 2022-04-16 16:37:10 +08:00
Zhongwen Deng 868e26cabc fix: emqx_auto_subscribe emqx_slow_subs don't restart when ekka:join. 2022-04-16 00:34:00 +08:00
zhongwencool ce915f0bbd
Merge pull request #7590 from zhongwencool/doc-i18n
feat: desc/label support i18n
2022-04-15 17:43:16 +08:00
Zhongwen Deng 700c2cfb39 feat: move *i18n.conf from etc to i18n dir 2022-04-15 10:43:37 +08:00
Zhongwen Deng 630cc8ee34 feat: support i18n with desc struct. 2022-04-15 08:42:13 +08:00
Zaiming (Stone) Shi d09e050864 chore: pin replayq 0.3.4 2022-04-13 21:55:05 +02:00
Zaiming (Stone) Shi 438be98e15 chore(build): delete unused template-var platform_lib_dir 2022-04-13 13:50:25 +02:00
Zaiming (Stone) Shi 1c50841dea chore(build): delete unused template var platform_bin_dir 2022-04-13 13:50:25 +02:00
Zaiming (Stone) Shi c8242816b0 refactor(bin/emqx): no need to template-render RUNNER_ROOT_DIR 2022-04-13 13:50:25 +02:00
William Yang 041a8b1607 feat: diagnostic logging for mnesia wait_for_table
bump mria to 0.2.3
2022-04-06 20:21:01 +02:00
Zaiming (Stone) Shi 32694e601a refactor: rename RUNNER_ETC_DIR to EMQX_ETC_DIR 2022-04-05 23:08:45 +02:00
Zaiming (Stone) Shi 6fd902ebc8 chore: update dependency app versions
lc: 0.2.1
emqtt: 1.5.0
2022-04-04 21:07:02 +02:00
ieQu1 aecfa77985 chore(hocon): Bump version 2022-03-29 14:09:32 +02:00
Zhongwen Deng 8d46332b30 chore: upgrade hocon to 0.26.4 to limit HOCON_MAP's key format 2022-03-25 15:00:51 +08:00
Thales Macedo Garitezi 29ca83184a
chore: bump ekka -> 0.12.3, mria -> 0.2.2 2022-03-23 14:41:10 -03:00
Zhongwen Deng bf6339ebf4 chore: upgrade hocon to 0.26.3 to fix dialyzer warning 2022-03-21 17:56:22 +08:00
Thales Macedo Garitezi c45578c130
chore: bump gen_rpc 2022-03-16 15:20:13 -03:00
Zaiming (Stone) Shi 4a35aaa50e
Merge pull request #7304 from zmstone/update-emqtt-to-1.4.8
chore: update emqtt to 1.4.8
2022-03-15 17:50:38 +01:00
Zaiming (Stone) Shi f8d8bcb8bc chore: pin ekka 0.12.2
with mnesia_down vs node_down fix
and fast rocksdb build
2022-03-15 12:16:47 +01:00
Zaiming (Stone) Shi 420ad32aa7 chore: update emqtt to 1.4.8 2022-03-15 12:11:44 +01:00
Zaiming (Stone) Shi e36b0fedf0 chore: pin mria 0.2.1
for fast pre-built binary download of rocksdb nif
2022-03-11 14:50:48 +01:00
Zaiming (Stone) Shi 4e64010a3b build: more structured build info 2022-03-02 21:22:03 +01:00
Thales Macedo Garitezi e69ca61d49
fix(mix): do not include gpb in the release
Since `gpb` is a GPL compile-time-only dependency, we should not
include it in the release.

Note that adding `gpb: :none` to the release applications list *will*
make Mix include its files *and* reference them in the startup +
release scripts...
2022-03-02 14:49:06 -03:00
Zaiming (Stone) Shi 96815539c1 chore: delete unused template values 2022-02-28 15:25:51 +01:00
Zaiming (Stone) Shi 7df2a4655a chore: pin hocon 0.26.1
0.26.0 had a bug where 'mapping' field is encoded as a integerx- list
2022-02-28 12:54:49 +01:00
Zaiming (Stone) Shi 3bdcf18590
Merge pull request #7133 from zmstone/chore-build-with-rockylinux
build: rockylinux for 5.0
2022-02-28 09:14:48 +01:00
Zaiming (Stone) Shi edb16f902e chore: pin hocon 0.16.0 for 'mappings' in generated config doc 2022-02-27 14:44:28 +01:00
zhongwencool 13a0eff678
Merge pull request #7125 from zhongwencool/schema-json
feat: generate hot config's schema.json and remove nullable option.
2022-02-25 17:18:20 +08:00
Zaiming (Stone) Shi b2cb7f1bd5 build: update to latest builder image 2022-02-25 09:09:30 +01:00
Zhongwen Deng db584f79d6 feat: upgrade hocon to 0.25.0 to replace nullable with required. 2022-02-24 22:39:03 +08:00
JianBo He fa921775e7
Merge pull request #6999 from lafirest/feat/esockd_limiter
feat(emqx_limiter): use hierarchical limiter for esockd
2022-02-24 17:33:51 +08:00
DDDHuang 90ee450a84 feat: support http error code & error code api 2022-02-22 17:14:35 +08:00
k32 115c3f2d29 chore: Fix URLs 2022-02-21 10:13:09 +01:00
Ilya Averyanov 2aeb1bc0e8
Merge pull request #7059 from savonarola/elixir-stylecheck
chore(codestyle): add formatting check for Elixir code
2022-02-21 11:43:14 +03:00
lafirest be2c36cfa0 feat(emqx_limiter): use hierarchical limiter for esockd 2022-02-21 11:37:38 +08:00
Ilya Averyanov 634d861b90 chore(codestyle): add formatting check for Elixir code 2022-02-18 19:43:48 +03:00
Zaiming (Stone) Shi e330f789af fix(ekka): pin version 0.12.1
print lock owner status before killing it
2022-02-18 09:19:57 +01:00
Zaiming (Stone) Shi 2e94880bb6 docs: More EMQ X -> EMQX rename in descriptive strings 2022-02-15 22:39:11 +01:00
Ilya Averyanov 64c59b5469 feat(license): check license before node start 2022-02-11 11:49:29 +03:00
k32 8d5241b1d0 chore(system_monitor): Bump version to 3.0.2
This version optimizes inserts into the postgres database
2022-02-08 18:23:27 +01:00
k32 72dc7276ed
Merge pull request #6940 from k32/fix-sysmon-start
fix(system_monitor): Fix conditional start
2022-02-08 13:33:37 +01:00
k32 5a1b18ae86 fix(system_monitor): Fix conditional start 2022-02-08 12:46:27 +01:00
Thales Macedo Garitezi eea217093b
fix(mix): include `node_dump` in tgz and packages 2022-02-07 18:15:17 -03:00
k32 58b69f97fd
Merge pull request #6933 from k32/sysmon301
chore(system_monitor): Bump version to 3.0.1
2022-02-07 21:33:00 +01:00
k32 490278ccb7 chore(system_monitor): Bump version to 3.0.1 2022-02-07 20:49:28 +01:00
Ilya Averyanov 17599432d1 feat(license): add license application 2022-02-07 19:05:47 +03:00
k32 9c5d35e0db chore(ekka): Bump version to 0.12.0 2022-02-07 14:39:43 +01:00
k32 dbe1282d32 chore(mria): Bump version to 0.2.0 2022-02-07 12:37:13 +01:00
k32 f699de9773 feat(system_monitor): Bump version to 3.0.0 2022-02-07 02:22:11 +01:00
Zaiming (Stone) Shi 507952c473 feat: dump schema json file to dashbarod static dir 2022-01-31 16:38:41 +01:00
Thales Macedo Garitezi d4a16fc94a
Merge pull request #6887 from emqx/mix-use-mix_env
chore(mix): use MIX_ENV to define build profile and edition

Instead of reading some environment variables to define the build profile for the Elixir build, we use the MIX_ENV value to emulate Rebar3's profiles. Also, that makes the build output directory more similar to EMQ X's current scheme.
2022-01-31 10:38:00 -03:00
zhongwencool 8041524d20 chore(dashboard): warning wehn stop dashboard listener not found. 2022-01-29 10:36:53 +08:00
Thales Macedo Garitezi a597e92576
chore(mix): use MIX_ENV to define build profile and edition 2022-01-28 17:24:35 -03:00
Zaiming (Stone) Shi d6f7ffec3c
Merge pull request #6881 from zmstone/refactor-upgrade-hocon-0.23.0
refactor: upgrade to hocon 0.23.0
2022-01-27 15:48:23 +01:00
Thales Macedo Garitezi bd0d331b64
Merge pull request #6636 from emqx/elixir-packages-mkII
ci(mix): build emqx packages with elixir
2022-01-27 11:10:30 -03:00
Zaiming (Stone) Shi 8c114db168 chore: pin hocon 0.23.0 2022-01-27 00:23:08 +01:00
Thales Macedo Garitezi 506dad169a
chore(elixir_otp): bump emqx-builder images 2022-01-26 16:59:50 -03:00
Thales Macedo Garitezi 01092982c1
fix(elixir): do not start logger before config
Despite Hocon generating the same config in both Elixir and Erlang
releases, apparently starting Logger before other applications has the
subtle effect of redirecting all logs to `log/erlang.log.N`, even
those lines that should appear in `log/emqx.log.N`.  Simply not adding
it to the application list restores the Erlang release behavior.
2022-01-26 16:59:48 -03:00
Thales Macedo Garitezi bc498a8041
ci(mix): add fvt tests and docker images with elixir 2022-01-26 16:59:48 -03:00
Thales Macedo Garitezi 6dd11665bb
ci(mix): build emqx packages with elixir 2022-01-26 16:59:48 -03:00
Thales Macedo Garitezi f34e87daeb
chore(ekka): update ekka -> 0.11.3
This ekka tag contains the core node discovery callback feature.
2022-01-26 14:19:39 -03:00
Zaiming (Stone) Shi d2a0b163da build: mix build version per edition type 2022-01-26 14:25:59 +01:00
DDDHuang e2ba0fc4ae fix(minirest): app version to 1.2.10 support string desc in api spec 2022-01-21 09:41:13 +08:00
Zaiming (Stone) Shi a04c834d05 chore: relocate some release files from data/ to rel/
data dir at the root is easily confused with the data
dir for EMQ X at run time
2022-01-14 16:41:22 +01:00
zhouzb e2676bcbd8 fix: fix dep of epgsql 2022-01-13 11:39:48 +08:00
k32 6ee18b6104 refactor(broker): Don't use a macro 2022-01-05 01:28:31 +01:00
Zaiming (Stone) Shi 1eaac9ea12 feat: add redbug 2022-01-04 00:56:25 +01:00
Zaiming (Stone) Shi 57a466f372 chore: sync rebar dependency to mix build 2022-01-03 12:53:49 +01:00
Thales Macedo Garitezi 6858f496a7
chore(hocon): update hocon version 2021-12-31 14:13:39 -03:00
Thales Macedo Garitezi c70a47bba6
refactor(mix): undo the `bin/emqx` script split into helper files 2021-12-30 13:45:13 -03:00
Thales Macedo Garitezi cea54365dd
chore(mix): keep debug info and docs in beams 2021-12-28 10:27:17 -03:00
Thales Macedo Garitezi 32b7dc406f
docs: document the elixir release vars 2021-12-28 08:46:33 -03:00
Thales Macedo Garitezi 1e567ac2b1
chore(mix): populate BUILT_ON file 2021-12-27 17:28:46 -03:00
Thales Macedo Garitezi 360a00622b
chore(mix): copy more files required by relup 2021-12-27 16:07:38 -03:00
Thales Macedo Garitezi 432faf7bd2
chore(mix): copy emqx_ctl to release as well 2021-12-27 14:09:48 -03:00
Thales Macedo Garitezi a54e108296
ci(mix): add application mode check
This adds a CI check to ensure that applications and their modes are
in sync between Elixir and Rebar release builds.
2021-12-27 13:09:55 -03:00
Thales Macedo Garitezi c14e8db869
style(format): format elixir files 2021-12-27 10:51:12 -03:00
Thales Macedo Garitezi a4fd777d77
chore(mix): take into account different release/package/edition types 2021-12-27 09:57:56 -03:00
Thales Macedo Garitezi cc652c3343
ci(mix): add elixir deps check
Checks whether there are discrepancies between rebar3 and mix deps.
2021-12-24 14:44:49 -03:00
Thales Macedo Garitezi 08571f0914
chore(mix): fix: vm.args is actually a template file 2021-12-24 09:59:53 -03:00
Thales Macedo Garitezi 4977921cdb
chore(mix): produce tar and copy more files to release 2021-12-24 09:59:30 -03:00
Thales Macedo Garitezi 4287a8f88d
chore(mix): auto-discover umbrella apps 2021-12-24 08:22:26 -03:00
Thales Macedo Garitezi 67cca5d3a1
chore(mix): use the same script in mix release as in rebar release
Surprisingly enough, by doing small cirurgical changes in the existing
EMQX control scripts, we are able to get it running with Elixir and
with existing functionalities (`console`, `remote_console`, `start`,
`stop`, `ctl`, `foreground`, `eval`).
2021-12-23 17:20:04 -03:00
Thales Macedo Garitezi 238895a301
chore(mix): correctly define release version
With this, we no longer need the last hack in `mix_release.sh`.

A version schema with 3 parts (Major.Minor.Patch) is required by
Elixir:

https://hexdocs.pm/elixir/1.13.1/Version.html#module-versions
2021-12-22 15:43:43 -03:00
Thales Macedo Garitezi 62024854e5
chore(mix): wrap produced script and set required variables
We create a shim script that calls the one produced by Mix Release,
creating and setting the required configurations.
2021-12-22 15:15:19 -03:00
Thales Macedo Garitezi 93d603e336
chore(mix): copy more required files to release
This adds a few more required file copying/templating to the release
build step.
2021-12-22 09:46:40 -03:00
Thales Macedo Garitezi 34d6dbca61
chore(mix): simplify build by using rebar3 for umbrella apps
By treating the apps in the umbrella as dependencies to be managed and
built by rebar3, we can simplify the maintenance of the release, at
the cost of increased build times: using Mix as before, it could track
changed files better than using rebar.  But the complexity and
possibility of discrepancies make it using rebar much more compelling.
2021-12-22 09:40:01 -03:00
Thales Macedo Garitezi 2ff46a6dbb
chore(mix): create a few more required files during release
Since Mix does not support hot upgrades out of the box, it does not
create a `RELEASES` file by default.  Here, we introduce functionality
similar to what `relx` does in order for that file to be generated.

fdc8d7237e/src/rlx_assemble.erl (L928-L948)

The `RELEASES` file, in its turn, is required for `nodetool` to work
properly, and `nodetool` is required for us to generate several
required config files using `hocon`.  Since the `start{_clean}.boot`
file used by the files generated by Elixir must be explicitly defined
in the `RELEASE_LIB` `boot_var`, we apply a small patch in the
existing `nodetool` in order to inject that required parameter when
calling the escript.
2021-12-21 17:28:39 -03:00
Thales Macedo Garitezi 917575de5a
chore(mix): minimal elixir mix release build
This commit enables a minimal working build of EMQX release using
Mix.  However, to properly start the release, several configuration
steps are still missing.  A `mix_release.sh` script does a few hacks
to get the release built with Mix to start properly, by first assuming
that `make emqx` has been run prior to the release, ran once to
generate the `app.*.config` files, and then it copies that and some
other files to the expected places.

Also, `emqx_telemetry` hangs the start procedure because it thinks
it's in an official release and tries to make a request.  We disable
it temporarily via config just to get a working build for now.
2021-12-21 13:51:22 -03:00