Skip to content

Instantly share code, notes, and snippets.

my_server:
type: my.server.type
properties:
ssh_public_key_filename: /some/path/mykey.pub
iaas_url: http://somecloud.com/compute
my.server.type:
derived_from: tosca.nodes.Compute
properties:
ssh_public_key_filename:
type: string
iaas_url:
type: string
attributes:
ip_address:
type: string
outputs:
spark_master_ui:
description: Apache Spark master UI
value:
concat:
- http://
- get_attribute: [ master_ip, address ]
- ":8080"
pi_calculation:
type: dice.components.spark.Application
properties:
jar: http://dice-project.github.io/DICE-Deployment-Examples/spark/simple-app-0.1.0.jar
class: eu.diceh2020.SimpleApp
name: pi_calc
args:
- 10
relationships:
- type: dice.relationships.spark.SubmittedBy
worker:
type: dice.components.spark.Worker
relationships:
- type: dice.relationships.ContainedIn
target: worker_vm
- type: dice.relationships.spark.ConnectedToMaster
target: master
worker_fw:
type: dice.firewall_rules.spark.Worker
worker_vm:
type: dice.hosts.ubuntu.Medium
instances:
deploy: 2
relationships:
- type: dice.relationships.ProtectedBy
target: worker_fw
master:
type: dice.components.spark.Master
relationships:
- type: dice.relationships.ContainedIn
target: master_vm
master_vm:
type: dice.hosts.ubuntu.Medium
relationships:
- type: dice.relationships.IPAvailableFrom
target: master_ip
- type: dice.relationships.ProtectedBy
target: master_fw
master_ip:
type: dice.VirtualIP
master_fw:
type: dice.firewall_rules.spark.Master
node_templates: