Skip to content
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

Add instructions to what need to volumes in the documentation for containerized deployments #313

Open
linghengqian opened this issue Apr 7, 2022 · 0 comments
Labels
documentation Improvements or additions to documentation Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@linghengqian
Copy link

Describe the enhancement:

Add instructions to mount /var/run/docker.sock and more about volumes in the documentation for containerized deployments.

Describe a specific use case for the enhancement or feature:

  • Assume that there is already an ElatsicSearch and Kibana instance locally, and Elastic Agent is being configured.
version: "3.8"
services:
  elasticsearch-node01:
    image: elastic/elasticsearch:8.1.2
    environment:
      bootstrap.memory_lock: true
      ELASTIC_PASSWORD: "1234AF57-35CA-B2E0-BE8B-12345D5C929E"
    volumes:
      - elasticsearch-data01:/usr/share/elasticsearch/data
      - elasticsearch-config01:/usr/share/elasticsearch/config:rw
    ports:
      - "9200:9200"
      - "9300:9300"
    ulimits:
      memlock:
        soft: -1
        hard: -1
  kibana:
    image: elastic/kibana:8.1.2
    environment:
      XPACK_SECURITY_ENCRYPTIONKEY: fc12345ea123eb1234dac7b12345ac12e
      XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: 1bb12c4e9ed1c12ae4a8ead1234567f1
      XPACK_REPORTING_ENCRYPTIONKEY: af5cbdd2e2f4da12a72f12f1e123456f
    ports:
      - "5601:5601"
    volumes:
      - kibana-data:/usr/share/kibana/data
      - kibana-config:/usr/share/kibana/config
  elastic-agent-node01:
    image: elastic/elastic-agent:8.1.2
    restart: always
    user: root
    environment:
      FLEET_SERVER_ENABLE: true
      FLEET_SERVER_ELASTICSEARCH_HOST: https://172.20.0.2:9200
      FLEET_SERVER_SERVICE_TOKEN: "AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2NDkzMzUzMjQ5NzY6Q09FUU92aVpSRHl4QmVuNGRkQ2ctdw"
      FLEET_SERVER_POLICY_ID: fleet-server-policy
      FLEET_SERVER_ELASTICSEARCH_CA_TRUSTED_FINGERPRINT: "64f60363137d9620b7b864b145823e2ddb195634768c37886cfd26d6e10a1e7a"
      FLEET_SERVER_INSECURE_HTTP: true
  • When deploying Elastic Agent when configuring Fleet, there will be an unintuitive log in the docker log.
{"log.level":"warn","@timestamp":"2022-04-07T13:25:03.974Z","log.logger":"tls","log.origin":{"file.name":"tlscommon/tls_config.go","file.line":105},"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"}

{"log.level":"info","@timestamp":"2022-04-07T13:25:04.224Z","log.logger":"composable.providers.docker","log.origin":{"file.name":"docker/docker.go","file.line":43},"message":"Docker provider skipped, unable to connect: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?","ecs.version":"1.6.0"}

{"log.level":"info","@timestamp":"2022-04-07T13:25:04.225Z","log.logger":"api","log.origin":{"file.name":"api/server.go","file.line":62},"message":"Starting stats endpoint","ecs.version":"1.6.0"}
  • This is implying that the user mounts /var/run/docker.sock:/var/run/docker.sock, but there is no related introduction in https://www.elastic.co/guide/en/fleet/8.1/elastic-agent-container.html .

  • At the same time, the documentation does not mention volumes mounts like elastic-agent-log:/usr/share/elastic-agent/state/data/logs to persist logs. Elastic Agent itself has the function of collecting system information, but the documentation does not indicate what directory should be mounted to help Elastic Agent collect information. I think this is an improvement point for the documentation .

@ph ph added documentation Improvements or additions to documentation Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

2 participants