-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlgiommi-template-scenario1.yml
79 lines (72 loc) · 2.21 KB
/
lgiommi-template-scenario1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
tosca_definitions_version: tosca_simple_yaml_1_2
imports:
- https://raw.githubusercontent.com/lgiommi/mlaas_cloud/master/lgiommi-custom-type.yml
description: TOSCA template for MLaaS - LUCA
topology_template:
inputs:
num_cpus:
type: integer
default: 4
mem_size:
type: string
default: "8 GB"
server_image:
type: string
# default: ost://cloud-api-pub.cr.cnaf.infn.it/94a76d1e-cacb-48ce-ad69-c0b26fd9bb53 # ubuntu 16.04
default: ost://cloud-api-pub.cr.cnaf.infn.it/9ed8e7ef-e932-4850-9576-805668f7ce25 # ubuntu 18.04
# MLaaS
run:
type: string
default: "false"
work_dir:
type: string
default: "/tmp/work_dir"
default_container_name:
type: string
default: "docker"
default_container_image:
type: string
default: "felixfelicislp/mlaas_cloud:mlaas_test_2"
default_container_command:
type: string
default: "--files=files_test.txt --labels=labels_test.txt --model=keras_model.py --params=params_test.json"
node_templates:
mlaas_install:
type: tosca.nodes.DODAS.MLaaS
properties:
run: { get_input: run }
work_dir: { get_input: work_dir }
default_container_name: { get_input: default_container_name }
default_container_image: { get_input: default_container_image }
default_container_command: { get_input: default_container_command }
requirements:
- host: vm_server
vm_server:
type: tosca.nodes.indigo.Compute
capabilities:
endpoint:
properties:
network_name: PUBLIC
ports:
jupyter:
protocol: tcp
source: 8888
grafana:
protocol: tcp
source: 3000
scalable:
properties:
count: 1
host:
properties:
num_cpus: { get_input: num_cpus }
mem_size: { get_input: mem_size }
os:
properties:
image: { get_input: server_image }
outputs:
node_ip:
value: { get_attribute: [ vm_server, public_address, 0 ] }
node_creds:
value: { get_attribute: [ vm_server, endpoint, credential, 0 ] }