Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #171 from nuvlaedge/improved_search_compute-api
Browse files Browse the repository at this point in the history
If getting a NE component container by name doesn't work, try by service name and project name.
And do not fail if compute-api is not found.
  • Loading branch information
schaubl committed Jun 7, 2023
2 parents 48fd618 + 0678850 commit f6316f8
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 72 deletions.
5 changes: 4 additions & 1 deletion code/agent/common/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
base_label = 'nuvlaedge.component=True'
default_project_name = 'nuvlaedge'
compose_project_name = os.getenv('COMPOSE_PROJECT_NAME', default_project_name)
compute_api = compose_project_name + '-compute-api'
compute_api_service_name = 'compute-api'
compute_api = compose_project_name + '-' + compute_api_service_name
job_engine_service_name = 'job-engine-lite'
vpn_client_service_name = 'vpn-client'

COMPUTE_API_INTERNAL_PORT = 5000

Expand Down
4 changes: 2 additions & 2 deletions code/agent/orchestrator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class ContainerRuntimeClient(ABC):

def __init__(self):
self.client = None
self.job_engine_lite_component = util.compose_project_name + "-job-engine-lite"
self.job_engine_lite_component = util.compose_project_name + "-" + util.job_engine_service_name
self.job_engine_lite_image = None
self.vpn_client_component = util.compose_project_name + '-vpn-client'
self.vpn_client_component = util.compose_project_name + '-' + util.vpn_client_service_name
self.ignore_env_variables = ['NUVLAEDGE_API_KEY', 'NUVLAEDGE_API_SECRET']
self.data_gateway_name = None

Expand Down

0 comments on commit f6316f8

Please sign in to comment.