Class: Gitlab::QA::Component::AiGateway

Inherits:
Base
  • Object
show all
Defined in:
lib/gitlab/qa/component/ai_gateway.rb

Constant Summary collapse

DOCKER_IMAGE =
'registry.gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/model-gateway'
DOCKER_IMAGE_TAG =
'latest'

Constants inherited from Base

Base::CERTIFICATES_PATH

Instance Attribute Summary

Attributes inherited from Base

#additional_hosts, #airgapped_network, #docker, #environment, #logger, #network, #network_aliases, #ports, #runner_network, #volumes

Instance Method Summary collapse

Methods inherited from Base

#add_network_alias, #hostname, #image, #initialize, #instance, #ip_address, #prepare, #prepare_airgapped_network, #prepare_docker_container, #prepare_docker_image, #prepare_network, #prepare_runner_network, #process_exec_commands, #pull, #restart, #start, #start_instance, #tag, #teardown, #teardown!

Methods included from Scenario::Actable

#act, included

Constructor Details

This class inherits a constructor from Gitlab::QA::Component::Base

Instance Method Details

#configure_environment(gitlab_hostname:) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/gitlab/qa/component/ai_gateway.rb', line 14

def configure_environment(gitlab_hostname:)
  @environment = {
    'AIGW_GITLAB_URL' => "http://#{gitlab_hostname}",
    'AIGW_GITLAB_API_URL' => "http://#{gitlab_hostname}/api/v4",
    'AIGW_CUSTOMER_PORTAL_URL' => Runtime::Env.customer_portal_url,
    'AIGW_USE_FAKE_MODELS' => true
  }
end

#nameObject



10
11
12
# File 'lib/gitlab/qa/component/ai_gateway.rb', line 10

def name
  @name ||= 'ai-gateway'
end