Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add new profile setting for elastic subscription
  • Loading branch information
mrodm committed Mar 28, 2025
commit 9c4eb3cc0063a173d26d719a8e6bdceec2b092a4
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@ The following settings are available per profile:
the serverless stack provider.
* `stack.serverless.region` can be used to select the region to use when starting
serverless projects.
* `stack.elastic_subscription` allows to select the Elastic subscription type to be used in the stack.
Currently, it is supported "basic" and "trial". Defaults to "trial".

## Useful environment variables

Expand Down
2 changes: 2 additions & 0 deletions internal/profile/_static/config.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
# stack.agent.ports:
# - 127.0.0.1:1514:1514/udp

## Set license subscription
# stack.elastic_subscription: "basic"
1 change: 1 addition & 0 deletions internal/profile/testdata/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
stack.geoip_dir: "/home/foo/Documents/ingest-geoip"
stack.apm_enabled: true
stack.logstash_enabled: true
stack.elastic_subscription: basic

# An empty string, should exist, but return empty.
other.empty: ""
Expand Down
3 changes: 2 additions & 1 deletion internal/stack/_static/elasticsearch.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ http.host: "0.0.0.0"

indices.id_field_data.enabled: true

xpack.license.self_generated.type: "trial"
{{ $elastic_subscription := fact "elastic_subscription" }}
xpack.license.self_generated.type: "{{ $elastic_subscription }}"
xpack.security.enabled: true
xpack.security.authc.api_key.enabled: true
xpack.security.http.ssl.enabled: true
Expand Down
4 changes: 4 additions & 0 deletions internal/stack/_static/kibana.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,7 @@ xpack.fleet.outputs:
{{- if eq $version "9.0.0-SNAPSHOT" }}
xpack.fleet.internal.registry.kibanaVersionCheckEnabled: false
{{- end }}

logging.loggers:
- name: plugins.fleet
level: debug
14 changes: 8 additions & 6 deletions internal/stack/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ const (
elasticsearchUsername = "elastic"
elasticsearchPassword = "changeme"

configAPMEnabled = "stack.apm_enabled"
configGeoIPDir = "stack.geoip_dir"
configKibanaHTTP2Enabled = "stack.kibana_http2_enabled"
configLogsDBEnabled = "stack.logsdb_enabled"
configLogstashEnabled = "stack.logstash_enabled"
configSelfMonitorEnabled = "stack.self_monitor_enabled"
configAPMEnabled = "stack.apm_enabled"
configGeoIPDir = "stack.geoip_dir"
configKibanaHTTP2Enabled = "stack.kibana_http2_enabled"
configLogsDBEnabled = "stack.logsdb_enabled"
configLogstashEnabled = "stack.logstash_enabled"
configSelfMonitorEnabled = "stack.self_monitor_enabled"
configElasticSubscription = "stack.elastic_subscription"
)

var (
Expand Down Expand Up @@ -168,6 +169,7 @@ func applyResources(profile *profile.Profile, stackVersion string) error {
"logsdb_enabled": profile.Config(configLogsDBEnabled, "false"),
"logstash_enabled": profile.Config(configLogstashEnabled, "false"),
"self_monitor_enabled": profile.Config(configSelfMonitorEnabled, "false"),
"elastic_subscription": profile.Config(configElasticSubscription, "trial"),
})

if err := os.MkdirAll(stackDir, 0755); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions tools/readme/readme.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ The following settings are available per profile:
the serverless stack provider.
* `stack.serverless.region` can be used to select the region to use when starting
serverless projects.
* `stack.elastic_subscription` allows to select the Elastic subscription type to be used in the stack.
Currently, it is supported "basic" and "trial". Defaults to "trial".

## Useful environment variables

Expand Down