Class: Gitlab::QA::Component::Elasticsearch
- Defined in:
- lib/gitlab/qa/component/elasticsearch.rb
Constant Summary collapse
- DOCKER_IMAGE =
'docker.elastic.co/elasticsearch/elasticsearch'.freeze
Instance Attribute Summary
Attributes inherited from Base
#docker, #environment, #network, #runner_network, #volumes
Instance Method Summary collapse
Methods inherited from Base
#add_network_alias, #hostname, #image, #initialize, #instance, #prepare, #prepare_docker_container, #prepare_docker_image, #prepare_network, #process_exec_commands, #pull, #restart, #teardown, #teardown!
Methods included from Scenario::Actable
Constructor Details
This class inherits a constructor from Gitlab::QA::Component::Base
Instance Method Details
#name ⇒ Object
7 8 9 |
# File 'lib/gitlab/qa/component/elasticsearch.rb', line 7 def name @name ||= "elastic68" end |
#start ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/gitlab/qa/component/elasticsearch.rb', line 15 def start @docker.run(image: image, tag: tag) do |command| command << "-d" command << "--name #{name}" command << "--net #{network}" command << "--publish 9200:9200" command << "--publish 9300:9300" command.env("discovery.type", "single-node") end end |
#tag ⇒ Object
11 12 13 |
# File 'lib/gitlab/qa/component/elasticsearch.rb', line 11 def tag Runtime::Env.elastic_version end |