diff --git a/docker/htcondor_mini.yaml b/docker/htcondor_mini.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1d6cfda53f0bf5c1456acd20a2bfbdc2ce19d5fa --- /dev/null +++ b/docker/htcondor_mini.yaml @@ -0,0 +1,104 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +imports: + - indigo_custom_types: https://baltig.infn.it/infn-cloud/tosca-types/-/raw/htcondor_mini/tosca_types/infrastructure/htcondor_mini_types.yaml + +description: Start htcondor playground + +metadata: + display_name: HTCondor playground + +topology_template: + + inputs: + + num_cpus: + type: integer + description: Number of virtual cpus for the VM + default: 1 + + mem_size: + type: scalar-unit.size + description: Amount of memory for the VM + default: 2 GB + + image_tag: + type: string + description: "Tag of the image htcondor/mini" + default: 10.0.0-el7 + + users: + type: list + description: list of users to create on the VM + entry_schema: + type: tosca.datatypes.indigo.User + default: [] + required: false + + node_templates: + + pub_network: + type: tosca.nodes.network.Network + properties: + network_type: public + + server_pub_port: + type: tosca.nodes.network.Port + properties: + order: 1 + requirements: + - binding: server + - link: pub_network + + priv_network: + type: tosca.nodes.network.Network + properties: + network_type: private + + server_priv_port: + type: tosca.nodes.network.Port + properties: + order: 0 + requirements: + - binding: server + - link: priv_network + + server: + type: tosca.nodes.indigo.Compute + properties: + os_users: { get_input: users } + capabilities: + endpoint: + properties: + ports: { "htcondor": {"protocol": "tcp", "source": 9618} } + scalable: + properties: + count: 1 + host: + properties: + num_cpus: { get_input: num_cpus } + mem_size: { get_input: mem_size } + os: + properties: + distribution: ubuntu + version: 20.04 + type: linux + + htcondor_mini: + type: tosca.nodes.indigo.htcondorMini + properties: + os_users: { get_input: users } + docker_appname: mini + docker_image: htcondor/mini + docker_tag: { get_input: image_tag } + docker_ports: [ "9618:9618" ] + requirements: + - host: server + + outputs: + node_ip: + value: { get_attribute: [ server, public_address, 0 ] } + node_creds: + value: { get_attribute: [ server, endpoint, credential, 0 ] } + os_users: + value: { get_property: [ server, os_users, 0 ] }