Class: Gitlab::QA::Component::AiGateway
- 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'
- LOG_DIR =
'/var/log'
Constants inherited from Base
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
Constructor Details
This class inherits a constructor from Gitlab::QA::Component::Base
Instance Method Details
#configure_environment(gitlab_hostname:) ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/gitlab/qa/component/ai_gateway.rb', line 22 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, 'AIGW_LOGGING__LEVEL' => 'debug', 'AIGW_LOGGING__TO_FILE' => "..#{LOG_DIR}/modelgateway_debug.log" } end |
#log_volume ⇒ Object
15 16 17 18 19 20 |
# File 'lib/gitlab/qa/component/ai_gateway.rb', line 15 def log_volume @log_volume ||= { src: File.join(Runtime::Env.host_artifacts_dir, @name, 'logs'), dest: LOG_DIR } end |
#name ⇒ Object
11 12 13 |
# File 'lib/gitlab/qa/component/ai_gateway.rb', line 11 def name @name ||= 'ai-gateway' end |