Skip to content

Commit

Permalink
Merge pull request #176 from DSD-DBS/feat/importer
Browse files Browse the repository at this point in the history
Feat/importer
  • Loading branch information
MoritzWeber0 authored Aug 12, 2022
2 parents 1c56c31 + 722c717 commit dd7b9e3
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ capella: capella-download
docker build -t base capella-dockerimages/base
docker build -t capella/base capella-dockerimages/capella

importer:
docker build -t t4c/client/importer -t $(LOCAL_REGISTRY_NAME):$(REGISTRY_PORT)/t4c/client/importer capella-dockerimages/importer
docker push $(LOCAL_REGISTRY_NAME):$(REGISTRY_PORT)/t4c/client/importer

capella/remote: capella
docker build -t capella/remote -t $(LOCAL_REGISTRY_NAME):$(REGISTRY_PORT)/t4c/client/remote capella-dockerimages/remote
docker push $(LOCAL_REGISTRY_NAME):$(REGISTRY_PORT)/t4c/client/remote
Expand Down Expand Up @@ -72,7 +76,7 @@ capella-dockerimages: capella t4c-client readonly ease
deploy: backend frontend capella/remote docs mock helm-deploy open rollout

# Deploy with full T4C support:
deploy-t4c: backend frontend capella t4c-client readonly ease docs mock helm-deploy open rollout
deploy-t4c: backend frontend capella t4c-client importer readonly ease docs mock helm-deploy open rollout

helm-deploy:
k3d cluster list $(CLUSTER_NAME) 2>&- || $(MAKE) create-cluster
Expand Down
1 change: 1 addition & 0 deletions backend/t4cclient/extensions/backups/ease/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def create_backup(
"GIT_REPO_BRANCH": gitmodel.revision,
"T4C_REPO_HOST": config["modelsources"]["t4c"]["host"],
"T4C_REPO_PORT": config["modelsources"]["t4c"]["port"],
"T4C_CDO_PORT": config["modelsources"]["t4c"]["cdoPort"],
"T4C_REPO_NAME": project,
"T4C_PROJECT_NAME": t4cmodel.name,
"T4C_USERNAME": username,
Expand Down
16 changes: 13 additions & 3 deletions backend/t4cclient/sessions/operators/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,19 @@ def get_job_logs(self, id: str) -> str:
)

def create_cronjob(
self, image: str, environment: t.Dict[str, str], schedule="* * * * *"
self,
image: str,
environment: t.Dict[str, str],
schedule="* * * * *",
timeout=18000,
) -> str:
id = self._generate_id()
self._create_cronjob(
name=id,
image=image,
environment=environment,
schedule=schedule,
timeout=timeout,
)
return id

Expand Down Expand Up @@ -392,7 +397,12 @@ def _create_deployment(
return self.v1_apps.create_namespaced_deployment(cfg["namespace"], body)

def _create_cronjob(
self, name: str, image: str, environment: t.Dict[str, str], schedule="* * * * *"
self,
name: str,
image: str,
environment: t.Dict[str, str],
schedule="* * * * *",
timeout=18000,
) -> kubernetes.client.V1CronJob:
body = {
"kind": "CronJob",
Expand Down Expand Up @@ -429,7 +439,7 @@ def _create_cronjob(
}
},
"backoffLimit": 1,
"activeDeadlineSeconds": 600,
"activeDeadlineSeconds": timeout,
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion capella-dockerimages
1 change: 1 addition & 0 deletions helm/config/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ modelsources:

host: "{{ .Values.t4cServer.host }}"
port: "{{ .Values.t4cServer.port }}"
cdoPort: "{{ .Values.t4cServer.cdoPort }}"
licence: "{{ .Values.t4cServer.licenseKey }}"

backups:
Expand Down
1 change: 1 addition & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ t4cServer:
# IPv4 Address of the T4C Server
host: localhost
port: 2036
cdoPort: 12036
licenseKey: tbd

jenkins:
Expand Down

0 comments on commit dd7b9e3

Please sign in to comment.