feat: change node.applications default to []
This commit is contained in:
parent
9ea923d9d7
commit
eb2a4df4af
|
@ -13,7 +13,6 @@ node {
|
||||||
cookie: emqxsecretcookie
|
cookie: emqxsecretcookie
|
||||||
data_dir: "{{ platform_data_dir }}"
|
data_dir: "{{ platform_data_dir }}"
|
||||||
etc_dir: "{{ platform_etc_dir }}"
|
etc_dir: "{{ platform_etc_dir }}"
|
||||||
applications: "{{ emqx_machine_boot_apps }}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log {
|
log {
|
||||||
|
|
|
@ -102,10 +102,39 @@ restart_type(App) ->
|
||||||
%% 2. after join a cluster
|
%% 2. after join a cluster
|
||||||
|
|
||||||
%% the list of (re)started apps depends on release type/edition
|
%% the list of (re)started apps depends on release type/edition
|
||||||
%% and is configured in rebar.config.erl/mix.exs
|
|
||||||
reboot_apps() ->
|
reboot_apps() ->
|
||||||
{ok, Apps} = application:get_env(emqx_machine, applications),
|
{ok, ConfigApps0} = application:get_env(emqx_machine, applications),
|
||||||
?BASIC_REBOOT_APPS ++ Apps.
|
BaseRebootApps = basic_reboot_apps(),
|
||||||
|
ConfigApps = lists:filter(fun(App) -> not lists:member(App, BaseRebootApps) end, ConfigApps0),
|
||||||
|
BaseRebootApps ++ ConfigApps.
|
||||||
|
|
||||||
|
basic_reboot_apps() ->
|
||||||
|
CE =
|
||||||
|
?BASIC_REBOOT_APPS ++
|
||||||
|
[
|
||||||
|
emqx_prometheus,
|
||||||
|
emqx_modules,
|
||||||
|
emqx_dashboard,
|
||||||
|
emqx_connector,
|
||||||
|
emqx_gateway,
|
||||||
|
emqx_statsd,
|
||||||
|
emqx_resource,
|
||||||
|
emqx_rule_engine,
|
||||||
|
emqx_bridge,
|
||||||
|
emqx_plugin_libs,
|
||||||
|
emqx_management,
|
||||||
|
emqx_retainer,
|
||||||
|
emqx_exhook,
|
||||||
|
emqx_authn,
|
||||||
|
emqx_authz,
|
||||||
|
emqx_slow_subs,
|
||||||
|
emqx_auto_subscribe,
|
||||||
|
emqx_plugins
|
||||||
|
],
|
||||||
|
case emqx_release:edition() of
|
||||||
|
ce -> CE;
|
||||||
|
ee -> CE ++ []
|
||||||
|
end.
|
||||||
|
|
||||||
sorted_reboot_apps() ->
|
sorted_reboot_apps() ->
|
||||||
Apps = [{App, app_deps(App)} || App <- reboot_apps()],
|
Apps = [{App, app_deps(App)} || App <- reboot_apps()],
|
||||||
|
|
37
mix.exs
37
mix.exs
|
@ -215,34 +215,6 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def emqx_machine_boot_apps(:community) do
|
|
||||||
[
|
|
||||||
:emqx_prometheus,
|
|
||||||
:emqx_modules,
|
|
||||||
:emqx_dashboard,
|
|
||||||
:emqx_connector,
|
|
||||||
:emqx_gateway,
|
|
||||||
:emqx_statsd,
|
|
||||||
:emqx_resource,
|
|
||||||
:emqx_rule_engine,
|
|
||||||
:emqx_bridge,
|
|
||||||
:emqx_plugin_libs,
|
|
||||||
:emqx_management,
|
|
||||||
:emqx_retainer,
|
|
||||||
:emqx_exhook,
|
|
||||||
:emqx_authn,
|
|
||||||
:emqx_authz,
|
|
||||||
:emqx_auto_subscribe,
|
|
||||||
:emqx_slow_subs,
|
|
||||||
:emqx_plugins
|
|
||||||
]
|
|
||||||
end
|
|
||||||
|
|
||||||
def emqx_machine_boot_apps(:enterprise) do
|
|
||||||
emqx_machine_boot_apps(:community) ++
|
|
||||||
[]
|
|
||||||
end
|
|
||||||
|
|
||||||
defp is_app(name) do
|
defp is_app(name) do
|
||||||
case Application.load(name) do
|
case Application.load(name) do
|
||||||
:ok ->
|
:ok ->
|
||||||
|
@ -256,13 +228,6 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
defp emqx_machine_boot_app_list(edition_type) do
|
|
||||||
edition_type
|
|
||||||
|> emqx_machine_boot_apps()
|
|
||||||
|> Enum.map(&Atom.to_string/1)
|
|
||||||
|> Enum.join(", ")
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_profile!() do
|
def check_profile!() do
|
||||||
valid_envs = [
|
valid_envs = [
|
||||||
:dev,
|
:dev,
|
||||||
|
@ -559,7 +524,6 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
erl_opts: "",
|
erl_opts: "",
|
||||||
emqx_description: emqx_description(release_type, edition_type),
|
emqx_description: emqx_description(release_type, edition_type),
|
||||||
emqx_schema_mod: emqx_schema_mod(edition_type),
|
emqx_schema_mod: emqx_schema_mod(edition_type),
|
||||||
emqx_machine_boot_apps: emqx_machine_boot_app_list(edition_type),
|
|
||||||
is_elixir: "yes",
|
is_elixir: "yes",
|
||||||
is_enterprise: if(edition_type == :enterprise, do: "yes", else: "no")
|
is_enterprise: if(edition_type == :enterprise, do: "yes", else: "no")
|
||||||
] ++ build_info()
|
] ++ build_info()
|
||||||
|
@ -582,7 +546,6 @@ defmodule EMQXUmbrella.MixProject do
|
||||||
erl_opts: "",
|
erl_opts: "",
|
||||||
emqx_description: emqx_description(release_type, edition_type),
|
emqx_description: emqx_description(release_type, edition_type),
|
||||||
emqx_schema_mod: emqx_schema_mod(edition_type),
|
emqx_schema_mod: emqx_schema_mod(edition_type),
|
||||||
emqx_machine_boot_apps: emqx_machine_boot_app_list(edition_type),
|
|
||||||
is_elixir: "yes",
|
is_elixir: "yes",
|
||||||
is_enterprise: if(edition_type == :enterprise, do: "yes", else: "no")
|
is_enterprise: if(edition_type == :enterprise, do: "yes", else: "no")
|
||||||
] ++ build_info()
|
] ++ build_info()
|
||||||
|
|
|
@ -256,14 +256,12 @@ overlay_vars_rel(cloud) ->
|
||||||
overlay_vars_edition(ce) ->
|
overlay_vars_edition(ce) ->
|
||||||
[
|
[
|
||||||
{emqx_schema_mod, emqx_conf_schema},
|
{emqx_schema_mod, emqx_conf_schema},
|
||||||
{is_enterprise, "no"},
|
{is_enterprise, "no"}
|
||||||
{emqx_machine_boot_apps, emqx_machine_boot_app_list(ce)}
|
|
||||||
];
|
];
|
||||||
overlay_vars_edition(ee) ->
|
overlay_vars_edition(ee) ->
|
||||||
[
|
[
|
||||||
{emqx_schema_mod, emqx_enterprise_conf_schema},
|
{emqx_schema_mod, emqx_enterprise_conf_schema},
|
||||||
{is_enterprise, "yes"},
|
{is_enterprise, "yes"}
|
||||||
{emqx_machine_boot_apps, emqx_machine_boot_app_list(ee)}
|
|
||||||
].
|
].
|
||||||
|
|
||||||
%% vars per packaging type, bin(zip/tar.gz/docker) or pkg(rpm/deb)
|
%% vars per packaging type, bin(zip/tar.gz/docker) or pkg(rpm/deb)
|
||||||
|
@ -362,37 +360,6 @@ relx_apps_per_edition(ee) ->
|
||||||
relx_apps_per_edition(ce) ->
|
relx_apps_per_edition(ce) ->
|
||||||
[].
|
[].
|
||||||
|
|
||||||
emqx_machine_boot_apps(ce) ->
|
|
||||||
[
|
|
||||||
emqx_prometheus,
|
|
||||||
emqx_modules,
|
|
||||||
emqx_dashboard,
|
|
||||||
emqx_connector,
|
|
||||||
emqx_gateway,
|
|
||||||
emqx_statsd,
|
|
||||||
emqx_resource,
|
|
||||||
emqx_rule_engine,
|
|
||||||
emqx_bridge,
|
|
||||||
emqx_plugin_libs,
|
|
||||||
emqx_management,
|
|
||||||
emqx_retainer,
|
|
||||||
emqx_exhook,
|
|
||||||
emqx_authn,
|
|
||||||
emqx_authz,
|
|
||||||
emqx_slow_subs,
|
|
||||||
emqx_auto_subscribe,
|
|
||||||
emqx_plugins
|
|
||||||
];
|
|
||||||
emqx_machine_boot_apps(ee) ->
|
|
||||||
emqx_machine_boot_apps(ce) ++
|
|
||||||
[].
|
|
||||||
|
|
||||||
emqx_machine_boot_app_list(Edition) ->
|
|
||||||
string:join(
|
|
||||||
[atom_to_list(AppName) || AppName <- emqx_machine_boot_apps(Edition)],
|
|
||||||
", "
|
|
||||||
).
|
|
||||||
|
|
||||||
relx_overlay(ReleaseType, Edition) ->
|
relx_overlay(ReleaseType, Edition) ->
|
||||||
[
|
[
|
||||||
{mkdir, "log/"},
|
{mkdir, "log/"},
|
||||||
|
|
Loading…
Reference in New Issue