From 291e36f8bc56ad466d2c32d562eaca02a2a7a725 Mon Sep 17 00:00:00 2001 From: wangjian Date: Thu, 1 Aug 2024 11:36:09 +0800 Subject: [PATCH 1/2] add fleet for kibana --- playbook/standalone.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/playbook/standalone.yml b/playbook/standalone.yml index f0889e8..e21e315 100644 --- a/playbook/standalone.yml +++ b/playbook/standalone.yml @@ -69,3 +69,26 @@ when: arch == aarch64 - name: start kibana shell: nohup /opt/kibana-7.17.16/bin/kibana --allow-root & + - name: install docker + dnf: + name: docker + state: present + - name: pull fleet for kibana + shell: docker pull docker.elastic.co/package-registry/distribution:7.17.23 + - name: Save the fleet Docker image locally + shell: docker save -o package-registry-7.17.23.tar docker.elastic.co/package-registry/distribution:7.17.23 + - name: Transfer the image to the air-gapped environment and load it + shell: docker load -i package-registry-7.17.23.tar + - name: Run the Elastic Package Registry + shell: docker run -it -p 8080:8080 docker.elastic.co/package-registry/distribution:7.17.23 + - name: change kibana config for fleet + lineinfile: + path: /opt/kibana-7.17.16/config/kibana.yml + regexp: '^#?xpack\.fleet\.registryUrl:\s*' + line: 'xpack.fleet.registryUrl: http://127.0.0.1:8080' + backup: yes + - name: stop kibana + shell: kill -9 $(ps -ef | grep "nohup /opt/kibana-7.17.16/bin/kibana --allow-root &" | grep -v grep | awk '{print $2}') + - name: start kibana + shell: nohup /opt/kibana-7.17.16/bin/kibana --allow-root & + -- Gitee From bff8d7a9dc8d1162299f443e26c030c1d724186f Mon Sep 17 00:00:00 2001 From: wangjian Date: Fri, 2 Aug 2024 16:59:10 +0800 Subject: [PATCH 2/2] add fleet docker service --- playbook/standalone.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playbook/standalone.yml b/playbook/standalone.yml index e21e315..519b79c 100644 --- a/playbook/standalone.yml +++ b/playbook/standalone.yml @@ -90,5 +90,4 @@ - name: stop kibana shell: kill -9 $(ps -ef | grep "nohup /opt/kibana-7.17.16/bin/kibana --allow-root &" | grep -v grep | awk '{print $2}') - name: start kibana - shell: nohup /opt/kibana-7.17.16/bin/kibana --allow-root & - + shell: nohup /opt/kibana-7.17.16/bin/kibana --allow-root & \ No newline at end of file -- Gitee