Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions .ci/.e2e-tests-for-elastic-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ SUITES:
platforms:
- labels: "arm64"
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
scenarios:
- name: "Fleet"
pullRequestFilter: " && ~debian"
tags: "fleet_mode_agent"
platforms:
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
- name: "Integrations"
pullRequestFilter: " && ~debian"
tags: "integrations"
Expand All @@ -27,13 +27,13 @@ SUITES:
- name: "System Integration"
platforms:
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
pullRequestFilter: " && ~debian"
tags: "system_integration"
- name: "Stand-alone"
platforms:
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
pullRequestFilter: " && ~ubi8"
tags: "stand_alone_agent"
- name: "Backend Processes"
Expand Down
10 changes: 5 additions & 5 deletions .ci/.e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ SUITES:
platforms:
- labels: "arm64"
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
scenarios:
- name: "Fleet"
pullRequestFilter: " && ~debian"
tags: "fleet_mode_agent"
platforms:
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
- labels: "windows-2019"
provider: "docker"
provider: "elastic-package"
- name: "Integrations"
pullRequestFilter: " && ~debian"
tags: "integrations"
Expand All @@ -42,13 +42,13 @@ SUITES:
- name: "System Integration"
platforms:
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
pullRequestFilter: " && ~debian"
tags: "system_integration"
- name: "Stand-alone"
platforms:
- labels: "ubuntu-18.04"
provider: "docker"
provider: "elastic-package"
pullRequestFilter: " && ~ubi8"
tags: "stand_alone_agent"
- name: "Backend Processes"
Expand Down
8 changes: 3 additions & 5 deletions cli/config/compose/profiles/fleet/default/kibana.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ elasticsearch.username: elastic
elasticsearch.password: changeme
xpack.monitoring.ui.container.elasticsearch.enabled: true

xpack.fleet.enabled: true
xpack.fleet.registryUrl: https://epr-staging.elastic.co
xpack.fleet.registryUrl: "http://package-registry:8080"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adam-stokes you are right! Updating this value I broke the build because when the provider is not elastic-package (i.e. ARM flavour uses Docker), then the compose file we host does not have a package-registry service.

Will submit a fix NOW

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, I tried it locally first and it's not fixed. The thing relates to all the changes that are happening on Kibana, package registry and packages for 8.0

xpack.fleet.agents.enabled: true
xpack.fleet.agents.elasticsearch.host: http://elasticsearch:9200
xpack.fleet.agents.fleet_server.hosts:
["http://fleet-server:8220"]
xpack.fleet.agents.elasticsearch.host: "http://elasticsearch:9200"
xpack.fleet.agents.fleet_server.hosts: ["http://fleet-server:8220"]

xpack.encryptedSavedObjects.encryptionKey: "12345678901234567890123456789012"
xpack.fleet.agents.tlsCheckDisabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ server.host: "0.0.0.0"

telemetry.enabled: false

elasticsearch.hosts: ["http://elasticsearch:9200"]
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
elasticsearch.username: elastic
elasticsearch.password: changeme
xpack.monitoring.ui.container.elasticsearch.enabled: true

xpack.fleet.enabled: true
xpack.fleet.registryUrl: https://epr-staging.elastic.co
xpack.fleet.registryUrl: "http://package-registry:8080"
xpack.fleet.agents.enabled: true
xpack.fleet.agents.elasticsearch.host: http://elasticsearch:9200
xpack.fleet.agents.elasticsearch.host: "http://elasticsearch:9200"
xpack.fleet.agents.fleet_server.hosts: ["http://fleet-server:8220"]

xpack.encryptedSavedObjects.encryptionKey: "12345678901234567890123456789012"
xpack.fleet.agents.tlsCheckDisabled: true

xpack.fleet.outputs:
- name: "Test output"
type: "elasticsearch"
Expand Down
20 changes: 4 additions & 16 deletions internal/deploy/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,28 @@ func Test_New(t *testing.T) {
t.Run("New Docker Provider", func(t *testing.T) {
provider := New("docker")

s, ok := provider.(Deployment)
assert.True(t, ok, "Provider is not a Deployment")

s, ok = s.(*dockerDeploymentManifest)
_, ok := provider.(*dockerDeploymentManifest)
assert.True(t, ok, "Provider is not Docker")
})

t.Run("New Elastic Package Provider", func(t *testing.T) {
provider := New("elastic-package")

s, ok := provider.(Deployment)
assert.True(t, ok, "Provider is not a Deployment")

s, ok = s.(*EPServiceManager)
_, ok := provider.(*EPServiceManager)
assert.True(t, ok, "Provider is not Elastic Package")
})

t.Run("New K8S Provider", func(t *testing.T) {
provider := New("kubernetes")

s, ok := provider.(Deployment)
assert.True(t, ok, "Provider is not a Deployment")

s, ok = s.(*kubernetesDeploymentManifest)
_, ok := provider.(*kubernetesDeploymentManifest)
assert.True(t, ok, "Provider is not Kubernetes")
})

t.Run("New Remote Provider", func(t *testing.T) {
provider := New("remote")

s, ok := provider.(Deployment)
assert.True(t, ok, "Provider is not a Deployment")

s, ok = s.(*remoteDeploymentManifest)
_, ok := provider.(*remoteDeploymentManifest)
assert.True(t, ok, "Provider is not Remote")
})

Expand Down
3 changes: 2 additions & 1 deletion internal/deploy/elastic_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func (ep *EPServiceManager) Add(ctx context.Context, profile ServiceRequest, ser

func checkElasticPackageProfile(ctx context.Context, kibanaProfile string) error {
// check compose profile
kibanaProfileFile := filepath.Join(config.OpDir(), "compose", "profiles", "fleet", kibanaProfile, "kibana.config.yml")
// The kibana config file is only valid in 8.0.0, for other maintenance branches it's kibana.config.default.yml
kibanaProfileFile := filepath.Join(config.OpDir(), "compose", "profiles", "fleet", kibanaProfile, "kibana.config.8x.yml")
found, err := io.Exists(kibanaProfileFile)
if !found || err != nil {
return err
Expand Down