Skip to content

Commit

Permalink
Introduce default distribution config
Browse files Browse the repository at this point in the history
With this commit we introduce the notion of a default distribution. It
allows us to specify either a basic or trial license for the default
distribution without explicitly enabling modules. We can still enable
modules explicitly like Security or ML and for backwards-compability
reasons we will default to a trial license if the user did not specify
anything.

As a breaking change we we will now avoid disabling any modules
implicitly but rather keep the defaults and let users explicitly enable
modules if needed. We do not introduce mixin configurations to disable
modules but if needed users can do this by specifying the respective
values via `--car-params`.

Relates #6
  • Loading branch information
danielmitterdorfer authored Jan 21, 2019
1 parent 6ae0985 commit aecf6fb
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 11 deletions.
9 changes: 9 additions & 0 deletions cars/v1/basic-license.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[meta]
description = Basic License
type = mixin

[config]
base = default_distro

[variables]
license_type = basic
File renamed without changes.
14 changes: 14 additions & 0 deletions cars/v1/default_distro/templates/config/elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
xpack.license.self_generated.type: {{license_type|default('trial')}}

{%- if xpack_ml_enabled is defined %}
xpack.ml.enabled: {{xpack_ml_enabled}}
{%- endif %}
{%- if xpack_monitoring_enabled is defined %}
xpack.monitoring.enabled: {{xpack_monitoring_enabled}}
{%- endif %}
{%- if xpack_security_enabled is defined %}
xpack.security.enabled: {{xpack_security_enabled}}
{%- endif %}
{%- if xpack_watcher_enabled is defined %}
xpack.watcher.enabled: {{xpack_watcher_enabled}}
{%- endif %}
9 changes: 9 additions & 0 deletions cars/v1/trial-license.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[meta]
description = Trial License
type = mixin

[config]
base = default_distro

[variables]
license_type = trial
2 changes: 1 addition & 1 deletion cars/v1/x-pack-ml.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = X-Pack Machine Learning
type = mixin

[config]
base = x_pack/base,x_pack/ml
base = default_distro,x_pack/base,x_pack/ml

[variables]
xpack_ml_enabled = true
2 changes: 1 addition & 1 deletion cars/v1/x-pack-monitoring-http.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = X-Pack Monitoring (HTTP exporter)
type = mixin

[config]
base = x_pack/base,x_pack/monitoring
base = default_distro,x_pack/base,x_pack/monitoring

[variables]
xpack_monitoring_enabled = true
Expand Down
2 changes: 1 addition & 1 deletion cars/v1/x-pack-monitoring-local.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = X-Pack Monitoring (local exporter)
type = mixin

[config]
base = x_pack/base,x_pack/monitoring
base = default_distro,x_pack/base,x_pack/monitoring

[variables]
# just enable monitoring. It uses a local exporter by default (i.e. it uses the current cluster to store monitoring data)
Expand Down
2 changes: 1 addition & 1 deletion cars/v1/x-pack-security.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = X-Pack Security
type = mixin

[config]
base = x_pack/base,x_pack/security
base = default_distro,x_pack/base,x_pack/security

[variables]
xpack_security_enabled = true
7 changes: 0 additions & 7 deletions cars/v1/x_pack/base/templates/config/elasticsearch.yml

This file was deleted.

0 comments on commit aecf6fb

Please sign in to comment.