Skip to content

Latest commit

 

History

History
 
 

elasticsearch

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Elasticsearch Github Action

Elasticsearch Github Action Stability:experimental

This action spins up an Elasticsearch instance that can be accessed and used in your subsequent steps.


NOTE: This action is still under active development, and it is not yet recommended to use it in your workflows.


Inputs

Name Required Default Description
stack-version Yes The version of the Elastic Stack you need to use, you can use any version present in docker.elastic.co.
security-enabled No true Only available in v8. Set to false to disable https and basic authentication
nodes No 1 Number of nodes in the cluster.
port No 9200 Port where you want to run Elasticsearch.
elasticsearch_password No changeme The password for the user elastic in your cluster

Usage

You must also add the Configure sysctl limits step, otherwise Elasticsearch will not be able to boot.

- name: Configure sysctl limits
  run: |
    sudo swapoff -a
    sudo sysctl -w vm.swappiness=1
    sudo sysctl -w fs.file-max=262144
    sudo sysctl -w vm.max_map_count=262144

- name: Runs Elasticsearch
  uses: elastic/elastic-github-actions/elasticsearch@master
  with:
    stack-version: 7.6.0

Disable security

Disabling security is not recommended, however, for testing purposes, you can do it with:

- name: Configure sysctl limits
  run: |
    sudo swapoff -a
    sudo sysctl -w vm.swappiness=1
    sudo sysctl -w fs.file-max=262144
    sudo sysctl -w vm.max_map_count=262144

- name: Runs Elasticsearch
  uses: elastic/elastic-github-actions/elasticsearch@master
  with:
    stack-version: 8.2.0
    security-enabled: false

License

This software is licensed under the Apache 2 license.