<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>ElasticSearch :: Ay Docs</title>
    <link>https://ops.docs.72602.space/buckup/elasticsearch/index.html</link>
    <description>ES [Local Disk] ES [S3 Compatible] ES Auto BackUp Example Shell Script</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 07 Oct 2024 19:58:45 +0800</lastBuildDate>
    <atom:link href="https://ops.docs.72602.space/buckup/elasticsearch/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>ES [Local Disk]</title>
      <link>https://ops.docs.72602.space/buckup/elasticsearch/es_local_disk_bk/index.html</link>
      <pubDate>Mon, 07 Oct 2024 19:58:45 +0800</pubDate>
      <guid>https://ops.docs.72602.space/buckup/elasticsearch/es_local_disk_bk/index.html</guid>
      <description>Preliminary ElasticSearch has installed, if not check link&#xA;The elasticsearch.yml has configed path.repo, which should be set the same value of settings.location (this will be handled by helm chart, don’t worry)&#xA;ES argocd-app yaml apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: elastic-search spec: syncPolicy: syncOptions: - CreateNamespace=true project: default source: repoURL: https://charts.bitnami.com/bitnami chart: elasticsearch targetRevision: 19.11.3 helm: releaseName: elastic-search values: | global: kibanaEnabled: true clusterName: elastic image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent security: enabled: false service: type: ClusterIP extraConfig: path: repo: /tmp ingress: enabled: true annotations: cert-manager.io/cluster-issuer: self-signed-ca-issuer nginx.ingress.kubernetes.io/rewrite-target: /$1 hostname: elastic-search.dev.72602.online ingressClassName: nginx path: /?(.*) tls: true master: masterOnly: false replicaCount: 1 persistence: enabled: false resources: requests: cpu: 2 memory: 1024Mi limits: cpu: 4 memory: 4096Mi heapSize: 2g data: replicaCount: 0 persistence: enabled: false coordinating: replicaCount: 0 ingest: enabled: true replicaCount: 0 service: enabled: false type: ClusterIP ingress: enabled: false metrics: enabled: false image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent volumePermissions: enabled: false image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent sysctlImage: enabled: true registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent kibana: elasticsearch: hosts: - &#39;{{ include &#34;elasticsearch.service.name&#34; . }}&#39; port: &#39;{{ include &#34;elasticsearch.service.ports.restAPI&#34; . }}&#39; esJavaOpts: &#34;-Xmx2g -Xms2g&#34; destination: server: https://kubernetes.default.svc namespace: application diff from oirginal file : extraConfig: path: repo: /tmp</description>
    </item>
    <item>
      <title>ES [S3 Compatible]</title>
      <link>https://ops.docs.72602.space/buckup/elasticsearch/es_s3_bk/index.html</link>
      <pubDate>Mon, 07 Oct 2024 19:58:45 +0800</pubDate>
      <guid>https://ops.docs.72602.space/buckup/elasticsearch/es_s3_bk/index.html</guid>
      <description>Preliminary ElasticSearch has installed, if not check link&#xA;ES argocd-app yaml apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: elastic-search spec: syncPolicy: syncOptions: - CreateNamespace=true project: default source: repoURL: https://charts.bitnami.com/bitnami chart: elasticsearch targetRevision: 19.11.3 helm: releaseName: elastic-search values: | global: kibanaEnabled: true clusterName: elastic image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent security: enabled: true service: type: ClusterIP extraEnvVars: - name: S3_ACCESSKEY value: admin - name: S3_SECRETKEY value: ZrwpsezF1Lt85dxl extraConfig: s3: client: default: protocol: http endpoint: &#34;http://&lt;PRIVATE_STORAGE_HOST&gt;:9090&#34; path_style_access: true initScripts: configure-s3-client.sh: | elasticsearch_set_key_value &#34;s3.client.default.access_key&#34; &#34;${S3_ACCESSKEY}&#34; elasticsearch_set_key_value &#34;s3.client.default.secret_key&#34; &#34;${S3_SECRETKEY}&#34; hostAliases: - ip: &lt;PRIVATE_STORAGE_HOST&gt; hostnames: - minio-api.dev.72602.online ingress: enabled: true annotations: cert-manager.io/cluster-issuer: self-signed-ca-issuer nginx.ingress.kubernetes.io/rewrite-target: /$1 hostname: elastic-search.dev.72602.online ingressClassName: nginx path: /?(.*) tls: true master: masterOnly: false replicaCount: 1 persistence: enabled: false resources: requests: cpu: 2 memory: 1024Mi limits: cpu: 4 memory: 4096Mi heapSize: 2g data: replicaCount: 0 persistence: enabled: false coordinating: replicaCount: 0 ingest: enabled: true replicaCount: 0 service: enabled: false type: ClusterIP ingress: enabled: false metrics: enabled: false image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent volumePermissions: enabled: false image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent sysctlImage: enabled: true registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent kibana: elasticsearch: hosts: - &#39;{{ include &#34;elasticsearch.service.name&#34; . }}&#39; port: &#39;{{ include &#34;elasticsearch.service.ports.restAPI&#34; . }}&#39; esJavaOpts: &#34;-Xmx2g -Xms2g&#34; destination: server: https://kubernetes.default.svc namespace: application diff from oirginal file : extraEnvVars: - name: S3_ACCESSKEY value: admin - name: S3_SECRETKEY value: ZrwpsezF1Lt85dxl extraConfig: s3: client: default: protocol: http endpoint: &#34;http://&lt;PRIVATE_STORAGE_HOST&gt;:9090&#34; path_style_access: true initScripts: configure-s3-client.sh: | elasticsearch_set_key_value &#34;s3.client.default.access_key&#34; &#34;${S3_ACCESSKEY}&#34; elasticsearch_set_key_value &#34;s3.client.default.secret_key&#34; &#34;${S3_SECRETKEY}&#34; hostAliases: - ip: &lt;PRIVATE_STORAGE_HOST&gt; hostnames: - minio-api.dev.72602.online</description>
    </item>
    <item>
      <title>ES Auto BackUp</title>
      <link>https://ops.docs.72602.space/buckup/elasticsearch/es_auto_bk/index.html</link>
      <pubDate>Mon, 07 Oct 2024 19:58:45 +0800</pubDate>
      <guid>https://ops.docs.72602.space/buckup/elasticsearch/es_auto_bk/index.html</guid>
      <description>Preliminary ElasticSearch has installed, if not check link&#xA;We use local disk to save the snapshots, more deatils check link&#xA;And the security is enabled.&#xA;ES argocd-app yaml apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: elastic-search spec: syncPolicy: syncOptions: - CreateNamespace=true project: default source: repoURL: https://charts.bitnami.com/bitnami chart: elasticsearch targetRevision: 19.11.3 helm: releaseName: elastic-search values: | global: kibanaEnabled: true clusterName: elastic image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent security: enabled: true tls: autoGenerated: true service: type: ClusterIP extraConfig: path: repo: /tmp ingress: enabled: true annotations: cert-manager.io/cluster-issuer: self-signed-ca-issuer nginx.ingress.kubernetes.io/rewrite-target: /$1 hostname: elastic-search.dev.72602.online ingressClassName: nginx path: /?(.*) tls: true master: masterOnly: false replicaCount: 1 persistence: enabled: false resources: requests: cpu: 2 memory: 1024Mi limits: cpu: 4 memory: 4096Mi heapSize: 2g data: replicaCount: 0 persistence: enabled: false coordinating: replicaCount: 0 ingest: enabled: true replicaCount: 0 service: enabled: false type: ClusterIP ingress: enabled: false metrics: enabled: false image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent volumePermissions: enabled: false image: registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent sysctlImage: enabled: true registry: m.zjvis.net/docker.io pullPolicy: IfNotPresent kibana: elasticsearch: hosts: - &#39;{{ include &#34;elasticsearch.service.name&#34; . }}&#39; port: &#39;{{ include &#34;elasticsearch.service.ports.restAPI&#34; . }}&#39; esJavaOpts: &#34;-Xmx2g -Xms2g&#34; destination: server: https://kubernetes.default.svc namespace: application diff from oirginal file : security: enabled: true extraConfig: path: repo: /tmp</description>
    </item>
    <item>
      <title>Example Shell Script</title>
      <link>https://ops.docs.72602.space/buckup/elasticsearch/example_shell_script/index.html</link>
      <pubDate>Thu, 14 Mar 2024 15:00:59 +0800</pubDate>
      <guid>https://ops.docs.72602.space/buckup/elasticsearch/example_shell_script/index.html</guid>
      <description>Init ES Backup Setting create an ES backup setting in s3, and make an snapshot after creation&#xA;#!/bin/bash ES_HOST=&#34;http://192.168.58.2:30910&#34; ES_BACKUP_REPO_NAME=&#34;s3_fs_repository&#34; S3_CLIENT=&#34;default&#34; ES_BACKUP_BUCKET_IN_S3=&#34;es-snapshot&#34; ES_SNAPSHOT_TAG=&#34;auto&#34; CHECK_RESPONSE=$(curl -s -k -X POST &#34;$ES_HOST/_snapshot/$ES_BACKUP_REPO_NAME/_verify?pretty&#34; ) CHECKED_NODES=$(echo &#34;$CHECK_RESPONSE&#34; | jq -r &#39;.nodes&#39;) if [ &#34;$CHECKED_NODES&#34; == null ]; then echo &#34;Doesn&#39;t exist an ES backup setting...&#34; echo &#34;A default backup setting will be generated. (using &#39;$S3_CLIENT&#39; s3 client and all backup files will be saved in a bucket : &#39;$ES_BACKUP_BUCKET_IN_S3&#39;&#34; CREATE_RESPONSE=$(curl -s -k -X PUT &#34;$ES_HOST/_snapshot/$ES_BACKUP_REPO_NAME?pretty&#34; -H &#39;Content-Type: application/json&#39; -d &#34;{\&#34;type\&#34;:\&#34;s3\&#34;,\&#34;settings\&#34;:{\&#34;bucket\&#34;:\&#34;$ES_BACKUP_BUCKET_IN_S3\&#34;,\&#34;client\&#34;:\&#34;$S3_CLIENT\&#34;}}&#34;) CREATE_ACKNOWLEDGED_FLAG=$(echo &#34;$CREATE_RESPONSE&#34; | jq -r &#39;.acknowledged&#39;) if [ &#34;$CREATE_ACKNOWLEDGED_FLAG&#34; == true ]; then echo &#34;Buckup setting &#39;$ES_BACKUP_REPO_NAME&#39; has been created successfully!&#34; else echo &#34;Failed to create backup setting &#39;$ES_BACKUP_REPO_NAME&#39;, since $$CREATE_RESPONSE&#34; fi else echo &#34;Already exist an ES backup setting &#39;$ES_BACKUP_REPO_NAME&#39;&#34; fi CHECK_RESPONSE=$(curl -s -k -X POST &#34;$ES_HOST/_snapshot/$ES_BACKUP_REPO_NAME/_verify?pretty&#34; ) CHECKED_NODES=$(echo &#34;$CHECK_RESPONSE&#34; | jq -r &#39;.nodes&#39;) if [ &#34;$CHECKED_NODES&#34; != null ]; then SNAPSHOT_NAME=&#34;meta-data-$ES_SNAPSHOT_TAG-snapshot-$(date +%s)&#34; SNAPSHOT_CREATION=$(curl -s -k -X PUT &#34;$ES_HOST/_snapshot/$ES_BACKUP_REPO_NAME/$SNAPSHOT_NAME&#34;) echo &#34;Snapshot $SNAPSHOT_NAME has been created.&#34; else echo &#34;Failed to create snapshot $SNAPSHOT_NAME .&#34; fi</description>
    </item>
  </channel>
</rss>