-
Notifications
You must be signed in to change notification settings - Fork 460
Use agent docker image #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not get this working on my end. In Kibana I get:
request to http://package-registry:8080/search?package=base&internal=true failed, reason: getaddrinfo ENOTFOUND package-registry package-registry:8080
And in the logs I see:
elastic-agent_1 | fail to enroll: fail to execute request to Kibana: Status code: 401, Kibana returned an error: Unauthorized, message: [security_exception] missing authentication credentials for REST request [/_security/_authenticate], with { header={ WWW-Authenticate={ 0="ApiKey" & 1="Basic realm=\"security\" charset=\"UTF-8\"" } } }
environments_elastic-agent_1 exited with code 1
testing/environments/agent.yml
Outdated
version: '2.3' | ||
services: | ||
elastic-agent: | ||
image: docker.elastic.co/observability-ci/elastic-agent:8.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuisathaverat Can we make this image public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not get this working on my end. In Kibana I get:
request to http://package-registry:8080/search?package=base&internal=true failed, reason: getaddrinfo ENOTFOUND package-registry package-registry:8080
And in the logs I see:
elastic-agent_1 | fail to enroll: fail to execute request to Kibana: Status code: 401, Kibana returned an error: Unauthorized, message: [security_exception] missing authentication credentials for REST request [/_security/_authenticate], with { header={ WWW-Authenticate={ 0="ApiKey" & 1="Basic realm=\"security\" charset=\"UTF-8\"" } } } environments_elastic-agent_1 exited with code 1
Did you take down all running containers? It looks like it referred to not existing one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, we can make it public, Which namespace you want to push it?
... or with Elastic Agent: | ||
|
||
```bash | ||
$ docker-compose -f snapshot.yml -f local.yml -f agent.yml up --force-recreate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First time I run this I got:
Creating environments_package-registry_1 ... done
Creating environments_elasticsearch_1 ... done
ERROR: for kibana Container "82665ad5fd87" is unhealthy.
ERROR: Encountered errors while bringing up the project.
I assume the timeout was too low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm.. you can try to wipe out docker images. Anyway, this one is weird. If it's not a one-time issue, would be good to reproduce it.
... or with Elastic Agent: | ||
|
||
```bash | ||
$ docker-compose -f snapshot.yml -f local.yml -f agent.yml up --force-recreate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have a mage command for this, easier to remember (at least for me).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it all depends what do you need, either entire fleet with enrolled agent or you prefer to keep the agent aside on your host.
I can add one or two default mage targets, but it will limit configurability of available docker-compose options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets wait with it and see what most of us use frequently.
I noticed other issue. I don't see any metricbeat and filebeat processes running:
@michalpristas does it look like a bug or should I enable something else? |
depends on a config, can you get a config retrieved? |
Does it mean the agent docker image is not published on regular basis?
|
this seems rather old ^^ @kuisathaverat how often is docker image published? |
There is also |
we push with every correct merge to master, 7.x, and 7.7 to docker.elastic.co/observability-ci/elastic-agent:BRANCH_NAME and docker.elastic.co/observability-ci/elastic-agent:SHA1 you can check the images at https://container-library.elastic.co/r/observability-ci/elastic-agent This namespace is private, if you need them on public we can make it |
any suggestions regarding the public namespace/project? "beats/elastic-agent"? BTW It would great to clean all other namespaces from old agent's images. |
we do not have permission we will open an infra issue for that. |
@kuisathaverat How is this different from |
Those images (docker.elastic.co/beats/elastic-agent:8.0.0-SNAPSHOT) are released by the snapshot process from the RElease team, they are generated once a day |
But the content of the file is the same? My assumption would be for the use case here from @mtojek once a day should normally be enough? |
Absolutely, it works for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Figured out why it didn't work. I had a fresh checkout of the repo and never run mage build
so the registry stopped because of no packages.
I added a hint to the README. |
This PR adds support for Elastic Agent image.
Docker-compose allows for scaling agent instances.