diff options
Diffstat (limited to 'azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0')
37 files changed, 1693 insertions, 0 deletions
diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-1/block-storage-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-1/block-storage-1.yaml new file mode 100644 index 0000000..8b3bab3 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-1/block-storage-1.yaml @@ -0,0 +1,68 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with server and attached block storage using the normative AttachesTo + Relationship Type. + +metadata: + template_name: block-storage-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + description: Size of the storage to be created. + default: 1 GB + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 1 GB + os: + properties: + architecture: x86_64 + type: linux + distribution: fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + + my_storage: + type: BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + private_ip: + description: The private IP address of the newly created compute instance. + value: { get_attribute: [ my_server, private_address ] } + volume_id: + description: The volume id of the block storage instance. + value: { get_property: [ my_storage, volume_id ] } # ARIA NOTE: wrong in spec diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-1/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-1/inputs.yaml new file mode 100644 index 0000000..d0b0854 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-1/inputs.yaml @@ -0,0 +1,3 @@ +storage_snapshot_id: "snapshot-id" +storage_location: /mnt +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-2/block-storage-2.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-2/block-storage-2.yaml new file mode 100644 index 0000000..9a2c0b0 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-2/block-storage-2.yaml @@ -0,0 +1,75 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with server and attached block storage using a custom AttachesTo Relationship + Type. + +metadata: + template_name: block-storage-2 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +relationship_types: + + MyCustomAttachesTo: + derived_from: AttachesTo + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + description: Size of the storage to be created. + default: 1 GB + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4 GB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + # Declare custom AttachesTo type using the 'relationship' keyword + relationship: + type: MyCustomAttachesTo + properties: + location: { get_input: storage_location } + + my_storage: + type: BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + private_ip: + description: The private IP address of the newly created compute instance. + value: { get_attribute: [ my_server, private_address ] } + + volume_id: + description: The volume id of the block storage instance. + value: { get_property: [ my_storage, volume_id ] } # ARIA NOTE: wrong in spec diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-2/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-2/inputs.yaml new file mode 100644 index 0000000..d0b0854 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-2/inputs.yaml @@ -0,0 +1,3 @@ +storage_snapshot_id: "snapshot-id" +storage_location: /mnt +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-3/block-storage-3.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-3/block-storage-3.yaml new file mode 100644 index 0000000..0b09b34 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-3/block-storage-3.yaml @@ -0,0 +1,68 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with server and attached block storage using a named Relationship Template + for the storage attachment. + +metadata: + template_name: block-storage-3 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + description: Size of the storage to be created. + default: 1 GB + storage_location: + type: string + description: Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4 GB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + # Declare template to use with 'relationship' keyword + relationship: storage_attachment + + my_storage: + type: BlockStorage + properties: + size: { get_input: storage_size } + + relationship_templates: + + storage_attachment: + type: AttachesTo + properties: + location: { get_input: storage_location } + + outputs: + private_ip: + description: The private IP address of the newly created compute instance. + value: { get_attribute: [ my_server, private_address ] } + volume_id: + description: The volume id of the block storage instance. + value: { get_property: [ my_storage, volume_id ] } # ARIA NOTE: wrong in spec diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-3/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-3/inputs.yaml new file mode 100644 index 0000000..daca041 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-3/inputs.yaml @@ -0,0 +1,2 @@ +storage_location: /mnt +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-4/block-storage-4.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-4/block-storage-4.yaml new file mode 100644 index 0000000..d3c2614 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-4/block-storage-4.yaml @@ -0,0 +1,96 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with a Single Block Storage node shared by 2-Tier Application with custom + AttachesTo Type and implied relationships. + +metadata: + template_name: block-storage-4 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +relationship_types: + + MyAttachesTo: + derived_from: tosca.relationships.AttachesTo + properties: + location: + type: string + default: /default_location + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + default: 1 GB + description: Size of the storage to be created. + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + + node_templates: + + my_web_app_tier_1: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: MyAttachesTo + + my_web_app_tier_2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: + type: MyAttachesTo + properties: + location: /some_other_data_location + + my_storage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + private_ip_1: + description: The private IP address of the application's first tier. + value: { get_attribute: [ my_web_app_tier_1, private_address ] } + private_ip_2: + description: The private IP address of the application's second tier. + value: { get_attribute: [ my_web_app_tier_2, private_address ] } + volume_id: + description: The volume id of the block storage instance. + value: { get_property: [ my_storage, volume_id ] } # ARIA NOTE: wrong in spec diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-4/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-4/inputs.yaml new file mode 100644 index 0000000..18e457d --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-4/inputs.yaml @@ -0,0 +1,2 @@ +storage_snapshot_id: "snapshot-id" +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-5/block-storage-5.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-5/block-storage-5.yaml new file mode 100644 index 0000000..a0c2229 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-5/block-storage-5.yaml @@ -0,0 +1,109 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with a single Block Storage node shared by 2-Tier Application with custom + AttachesTo Type and explicit Relationship Templates. + +metadata: + template_name: block-storage-5 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +relationship_types: + + MyAttachesTo: + derived_from: tosca.relationships.AttachesTo + properties: + location: + type: string + default: /default_location + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + default: 1 GB + description: Size of the storage to be created. + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: >- + Block storage mount point (filesystem path). + + node_templates: + + my_web_app_tier_1: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: storage_attachesto_1 + + my_web_app_tier_2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: storage_attachesto_2 + + my_storage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + relationship_templates: + + storage_attachesto_1: + type: MyAttachesTo + properties: + location: /my_data_location + + storage_attachesto_2: + type: MyAttachesTo + properties: + location: /some_other_data_location + + outputs: + private_ip_1: + description: The private IP address of the application's first tier. + value: { get_attribute: [ my_web_app_tier_1, private_address ] } + private_ip_2: + description: The private IP address of the application's second tier. + value: { get_attribute: [ my_web_app_tier_2, private_address ] } + volume_id: + description: The volume id of the block storage instance. + value: { get_property: [ my_storage, volume_id ] } # ARIA NOTE: wrong in spec diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-5/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-5/inputs.yaml new file mode 100644 index 0000000..d0b0854 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-5/inputs.yaml @@ -0,0 +1,3 @@ +storage_snapshot_id: "snapshot-id" +storage_location: /mnt +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-6/block-storage-6.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-6/block-storage-6.yaml new file mode 100644 index 0000000..534884a --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-6/block-storage-6.yaml @@ -0,0 +1,102 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 2 servers each with different attached block storage. + +metadata: + template_name: block-storage-6 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + default: 1 GB + description: Size of the storage to be created. + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: >- + Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + + my_storage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + my_server2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage2 + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + + my_storage2: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + server_ip_1: + description: The private IP address of the application's first server. + value: { get_attribute: [ my_server, private_address ] } + server_ip_2: + description: The private IP address of the application's second server. + value: { get_attribute: [ my_server2, private_address ] } + volume_id_1: + description: The volume id of the first block storage instance. + value: { get_property: [ my_storage, volume_id ] } # ARIA NOTE: wrong in spec + volume_id_2: + description: The volume id of the second block storage instance. + value: { get_property: [ my_storage2, volume_id ] } # ARIA NOTE: wrong in spec diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-6/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-6/inputs.yaml new file mode 100644 index 0000000..d0b0854 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/block-storage-6/inputs.yaml @@ -0,0 +1,3 @@ +storage_snapshot_id: "snapshot-id" +storage_location: /mnt +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/compute-1/compute-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/compute-1/compute-1.yaml new file mode 100644 index 0000000..254d2b6 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/compute-1/compute-1.yaml @@ -0,0 +1,42 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile that just defines a single compute instance and selects a (guest) host + Operating System from the Compute node's properties. Note, this example does not include default + values on inputs properties. + +metadata: + template_name: compute-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 1 GB + os: + properties: + architecture: x86_64 + type: Linux + distribution: ubuntu + version: 12.04 + + outputs: + private_ip: + description: The private IP address of the deployed server instance. + value: { get_attribute: [ my_server, private_address ] } diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/compute-1/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/compute-1/inputs.yaml new file mode 100644 index 0000000..c1ee88a --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/compute-1/inputs.yaml @@ -0,0 +1 @@ +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/container-1/container-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/container-1/container-1.yaml new file mode 100644 index 0000000..f6f69fc --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/container-1/container-1.yaml @@ -0,0 +1,68 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with wordpress, web server and mysql on the same server. + +metadata: + template_name: compute-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../non-normative-types.yaml + +# Repositories to retrieve code artifacts from + +repositories: + + docker_hub: https://registry.hub.docker.com/ + +topology_template: + + inputs: + wp_host_port: + type: integer + description: The host port that maps to port 80 of the WordPress container. + db_root_pwd: + type: string + description: Root password for MySQL. + + node_templates: + + # The MYSQL container based on official MySQL image in Docker hub + + mysql_container: + type: tosca.nodes.Container.Application.Docker + # ARIA NOTE: moved to a requirement in the node type + #capabilities: + # # This is a capability that would mimic the Docker –link feature + # database_link: tosca.capabilities.Docker.Link + artifacts: + my_image: + file: mysql + type: tosca.artifacts.Deployment.Image.Container.Docker + repository: docker_hub + interfaces: + Standard: + create: + implementation: my_image + inputs: + db_root_password: { get_input: db_root_pwd } + + # The WordPress container based on official WordPress image in Docker hub + + wordpress_container: + type: tosca.nodes.Container.Application.Docker + requirements: + - database_link: mysql_container + artifacts: + my_image: + file: wordpress + type: tosca.artifacts.Deployment.Image.Container.Docker + repository: docker_hub + interfaces: + Standard: + create: + implementation: my_image + inputs: + host_port: { get_input: wp_host_port } diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/collectd.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/collectd.yaml new file mode 100644 index 0000000..6d28899 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/collectd.yaml @@ -0,0 +1,10 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Collectd: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - collectd_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/elasticsearch.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/elasticsearch.yaml new file mode 100644 index 0000000..72b210a --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/elasticsearch.yaml @@ -0,0 +1,8 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Elasticsearch: + derived_from: tosca.nodes.SoftwareComponent + capabilities: + app: tosca.capabilities.Endpoint diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/kibana.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/kibana.yaml new file mode 100644 index 0000000..4ee8700 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/kibana.yaml @@ -0,0 +1,12 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Kibana: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - search_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo + capabilities: + app: tosca.capabilities.Endpoint diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/logstash.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/logstash.yaml new file mode 100644 index 0000000..ea74c7e --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/logstash.yaml @@ -0,0 +1,12 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Logstash: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - search_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo + capabilities: + app: tosca.capabilities.Endpoint diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/rsyslog.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/rsyslog.yaml new file mode 100644 index 0000000..3bd7c2b --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/rsyslog.yaml @@ -0,0 +1,10 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Rsyslog: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - rsyslog_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/inputs.yaml new file mode 100644 index 0000000..5302bbf --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/inputs.yaml @@ -0,0 +1 @@ +my_cpus: 8
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/multi-tier-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/multi-tier-1.yaml new file mode 100644 index 0000000..50401ec --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/multi-tier-1/multi-tier-1.yaml @@ -0,0 +1,237 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and kibana each on a + separate server with monitoring enabled for nodejs server where a sample nodejs application is + running. The syslog and collectd are installed on a nodejs server. + +metadata: + template_name: multi-tier-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml # ARIA NOTE: moved + - custom_types/elasticsearch.yaml + - custom_types/logstash.yaml + - custom_types/kibana.yaml + - custom_types/collectd.yaml + - custom_types/rsyslog.yaml + +dsl_definitions: + + host_capabilities: &host_capabilities + # container properties (flavor) + disk_size: 10 GB + num_cpus: { get_input: my_cpus } + mem_size: 4096 MB + os_capabilities: &os_capabilities + architecture: x86_64 + type: Linux + distribution: Ubuntu + version: 14.04 + +topology_template: + + inputs: + my_cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + github_url: + type: string + description: The URL to download nodejs. + default: https://github.com/sample.git + + node_templates: + + paypal_pizzastore: + type: tosca.nodes.WebApplication.PayPalPizzaStore + properties: + github_url: { get_input: github_url } + requirements: + - host: nodejs + - database_connection: mongo_db + interfaces: + Standard: + configure: + implementation: scripts/nodejs/configure.sh + inputs: + github_url: { get_property: [ SELF, github_url ] } + mongodb_ip: { get_attribute: [ mongo_server, private_address ] } + start: scripts/nodejs/start.sh + + nodejs: + type: tosca.nodes.WebServer.Nodejs + requirements: + - host: app_server + interfaces: + Standard: + create: scripts/nodejs/create.sh + + mongo_db: + type: tosca.nodes.Database + properties: + name: 'pizzastore' # ARIA NOTE: missing in spec + requirements: + - host: mongo_dbms + interfaces: + Standard: + create: create_database.sh + + mongo_dbms: + type: tosca.nodes.DBMS + requirements: + - host: mongo_server + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/mongodb/create.sh + configure: + implementation: scripts/mongodb/config.sh + inputs: + mongodb_ip: { get_attribute: [ mongo_server, private_address ] } # ARIA NOTE: wrong in spec + start: scripts/mongodb/start.sh + + elasticsearch: + type: tosca.nodes.SoftwareComponent.Elasticsearch + requirements: + - host: elasticsearch_server + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/elasticsearch/create.sh + start: scripts/elasticsearch/start.sh + + logstash: + type: tosca.nodes.SoftwareComponent.Logstash + requirements: + - host: logstash_server + # ARIA NOTE: mangled in the spec + - search_endpoint: + node: elasticsearch + relationship: + interfaces: + Configure: + pre_configure_source: + implementation: python/logstash/configure_elasticsearch.py + inputs: + elasticsearch_ip: { get_attribute: [ elasticsearch_server, private_address ] } # ARIA NOTE: wrong in spec + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/lostash/create.sh + configure: scripts/logstash/config.sh + start: scripts/logstash/start.sh + + kibana: + type: tosca.nodes.SoftwareComponent.Kibana + requirements: + - host: kibana_server + - search_endpoint: elasticsearch + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/kibana/create.sh + configure: + implementation: scripts/kibana/config.sh + inputs: + elasticsearch_ip: { get_attribute: [ elasticsearch_server, private_address ] } # ARIA NOTE: wrong in spec + kibana_ip: { get_attribute: [ kibana_server, private_address ] } # ARIA NOTE: wrong in spec + start: scripts/kibana/start.sh + + app_collectd: + type: tosca.nodes.SoftwareComponent.Collectd + requirements: + - host: app_server + # ARIA NOTE: mangled in the spec + - collectd_endpoint: + node: logstash + relationship: + interfaces: + Configure: + pre_configure_target: + implementation: python/logstash/configure_collectd.py + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/collectd/create.sh + configure: + implementation: python/collectd/config.py + inputs: + logstash_ip: { get_attribute: [ logstash_server, private_address ] } # ARIA NOTE: wrong in spec + start: scripts/collectd/start.sh + + app_rsyslog: + type: tosca.nodes.SoftwareComponent.Rsyslog + requirements: + - host: app_server + # ARIA NOTE: mangled in the spec + - rsyslog_endpoint: + node: logstash + relationship: + interfaces: + Configure: + pre_configure_target: + implementation: python/logstash/configure_rsyslog.py + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/rsyslog/create.sh + configure: + implementation: scripts/rsyslog/config.sh + inputs: + logstash_ip: { get_attribute: [ logstash_server, private_address ] } # ARIA NOTE: wrong in spec + start: scripts/rsyslog/start.sh + + app_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + mongo_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + elasticsearch_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + logstash_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + kibana_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + outputs: + nodejs_url: + description: URL for the nodejs server. + value: { get_attribute: [ app_server, private_address ] } + mongodb_url: + description: URL for the mongodb server. + value: { get_attribute: [ mongo_server, private_address ] } + elasticsearch_url: + description: URL for the elasticsearch server. + value: { get_attribute: [ elasticsearch_server, private_address ] } + logstash_url: + description: URL for the logstash server. + value: { get_attribute: [ logstash_server, private_address ] } + kibana_url: + description: URL for the kibana server. + value: { get_attribute: [ kibana_server, private_address ] } diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-1/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-1/inputs.yaml new file mode 100644 index 0000000..9687bb0 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-1/inputs.yaml @@ -0,0 +1 @@ +network_name: "network"
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-1/network-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-1/network-1.yaml new file mode 100644 index 0000000..c66964f --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-1/network-1.yaml @@ -0,0 +1,49 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 1 server bound to a new network. + +metadata: + template_name: network-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + network_name: + type: string + description: Network name + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network: + type: tosca.nodes.network.Network + properties: + network_name: { get_input: network_name } + ip_version: 4 + cidr: '192.168.0.0/24' + start_ip: '192.168.0.50' + end_ip: '192.168.0.200' + gateway_ip: '192.168.0.1' + + my_port: + type: tosca.nodes.network.Port + requirements: + - binding: my_server + - link: my_network diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-2/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-2/inputs.yaml new file mode 100644 index 0000000..9687bb0 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-2/inputs.yaml @@ -0,0 +1 @@ +network_name: "network"
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-2/network-2.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-2/network-2.yaml new file mode 100644 index 0000000..017950d --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-2/network-2.yaml @@ -0,0 +1,46 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 1 server bound to an existing network. + +metadata: + template_name: network-2 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + network_name: + type: string + description: Network name + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network: + type: tosca.nodes.network.Network + properties: + network_name: { get_input: network_name } + + my_port: + type: tosca.nodes.network.Port + requirements: + - binding: + node: my_server + - link: + node: my_network diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-3/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-3/inputs.yaml new file mode 100644 index 0000000..9687bb0 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-3/inputs.yaml @@ -0,0 +1 @@ +network_name: "network"
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-3/network-3.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-3/network-3.yaml new file mode 100644 index 0000000..5fa40b7 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-3/network-3.yaml @@ -0,0 +1,81 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 2 servers bound to the 1 network. + +metadata: + template_name: network-3 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + network_name: + type: string + description: Network name + network_cidr: + type: string + default: 10.0.0.0/24 + description: CIDR for the network + network_start_ip: + type: string + default: 10.0.0.100 + description: Start IP for the allocation pool + network_end_ip: + type: string + default: 10.0.0.150 + description: End IP for the allocation pool + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_server2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network: + type: tosca.nodes.network.Network + properties: + ip_version: 4 + cidr: { get_input: network_cidr } + network_name: { get_input: network_name } + start_ip: { get_input: network_start_ip } + end_ip: { get_input: network_end_ip } + + my_port: + type: tosca.nodes.network.Port + requirements: + - binding: my_server + - link: my_network + + my_port2: + type: tosca.nodes.network.Port + requirements: + - binding: my_server2 + - link: my_network diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-4/network-4.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-4/network-4.yaml new file mode 100644 index 0000000..5b51117 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/network-4/network-4.yaml @@ -0,0 +1,70 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 1 server bound to 3 networks. + +metadata: + template_name: network-4 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network1: + type: tosca.nodes.network.Network + properties: + cidr: '192.168.1.0/24' + network_name: net1 + + my_network2: + type: tosca.nodes.network.Network + properties: + cidr: '192.168.2.0/24' + network_name: net2 + + my_network3: + type: tosca.nodes.network.Network + properties: + cidr: '192.168.3.0/24' + network_name: net3 + + my_port1: + type: tosca.nodes.network.Port + properties: + order: 0 + requirements: + - binding: my_server + - link: my_network1 + + my_port2: + type: tosca.nodes.network.Port + properties: + order: 1 + requirements: + - binding: my_server + - link: my_network2 + + my_port3: + type: tosca.nodes.network.Port + properties: + order: 2 + requirements: + - binding: my_server + - link: my_network3 diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml new file mode 100644 index 0000000..da89dcb --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml @@ -0,0 +1,177 @@ + +artifact_types: + + tosca.artifacts.Deployment.Image.Container.Docker: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.1.1 + derived_from: tosca.artifacts.Deployment.Image + description: Docker Container Image + + tosca.artifacts.Deployment.Image.VM.ISO: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.1.2 + derived_from: tosca.artifacts.Deployment.Image.VM + description: Virtual Machine (VM) image in ISO disk format + mime_type: application/octet-stream + file_ext: [ iso ] + + tosca.artifacts.Deployment.Image.VM.QCOW2: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.1.3 + derived_from: tosca.artifacts.Deployment.Image.VM + description: Virtual Machine (VM) image in QCOW v2 standard disk format + mime_type: application/octet-stream + file_ext: [ qcow2 ] + +capability_types: + + tosca.capabilities.Container.Docker: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.2.1 + derived_from: tosca.capabilities.Container + description: The type indicates capabilities of a Docker runtime environment (client). + properties: + version: + description: >- + The Docker version capability (i.e., the versions supported by the capability). + type: list + required: false + entry_schema: version + publish_all: + description: >- + Indicates that all ports (ranges) listed in the dockerfile using the EXPOSE keyword be + published. + type: boolean + default: false + required: false + publish_ports: + description: >- + List of ports mappings from source (Docker container) to target (host) ports to publish. + type: list + entry_schema: PortSpec + required: false + expose_ports: + description: >- + List of ports mappings from source (Docker container) to expose to other Docker containers + (not accessible outside host). + type: list + entry_schema: PortSpec + required: false + volumes: + description: >- + The dockerfile VOLUME command which is used to enable access from the Docker container to + a directory on the host machine. + type: list + entry_schema: string + required: false + # ARIA NOTE: these are missing in the spec + host_id: + description: >- + The optional identifier of an existing host resource that should be used to run this + container on. + type: string + required: false + volume_id: + description: >- + The optional identifier of an existing storage volume (resource) that should be used to + create the container's mount point(s) on. + type: string + required: false + + # ARIA NOTE: missing in spec + tosca.capabilities.Docker.Link: + derived_from: tosca.capabilities.Root + description: This is a capability that would mimic the Docker –link feature + +node_types: + + tosca.nodes.Database.MySQL: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.1 + derived_from: tosca.nodes.Database + requirements: + - host: + capability: tosca.capabilities.Container # ARIA NOTE: missing in spec + node: tosca.nodes.DBMS.MySQL + + tosca.nodes.DBMS.MySQL: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.2 + derived_from: tosca.nodes.DBMS + properties: + port: + description: reflect the default MySQL server port + type: integer # AIRA NOTE: missing in spec + default: 3306 + root_password: + # MySQL requires a root_password for configuration + # Override parent DBMS definition to make this property required + type: string # AIRA NOTE: missing in spec + required: true + capabilities: + # Further constrain the 'host' capability to only allow MySQL databases + host: + type: tosca.capabilities.Container # ARIA NOTE: missing in spec + valid_source_types: [ tosca.nodes.Database.MySQL ] + + tosca.nodes.WebServer.Apache: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.3 + derived_from: tosca.nodes.WebServer + + tosca.nodes.WebApplication.WordPress: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.4 + derived_from: tosca.nodes.WebApplication + properties: + admin_user: + type: string + required: false # ARIA NOTE: missing in spec + admin_password: + type: string + required: false # ARIA NOTE: missing in spec + db_host: + type: string + required: false # ARIA NOTE: missing in spec + requirements: + - database_endpoint: + capability: tosca.capabilities.Endpoint.Database + node: tosca.nodes.Database + relationship: tosca.relationships.ConnectsTo + + tosca.nodes.WebServer.Nodejs: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.5 + derived_from: tosca.nodes.WebServer + properties: + # Property to supply the desired implementation in the Github repository + github_url: + required: false + type: string + description: location of the application on the github. + default: https://github.com/mmm/testnode.git + interfaces: + Standard: + inputs: + github_url: + type: string + + tosca.nodes.Container.Application.Docker: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.6 + derived_from: tosca.nodes.Container.Application + requirements: + - host: + capability: tosca.capabilities.Container.Docker + - database_link: # ARIA NOTE: missing in spec + capability: tosca.capabilities.Docker.Link diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/object-storage-1/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/object-storage-1/inputs.yaml new file mode 100644 index 0000000..57f99a3 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/object-storage-1/inputs.yaml @@ -0,0 +1 @@ +objectstore_name: "objectstore"
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/object-storage-1/object-storage-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/object-storage-1/object-storage-1.yaml new file mode 100644 index 0000000..c55a4db --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/object-storage-1/object-storage-1.yaml @@ -0,0 +1,24 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA template for creating an object storage service. + +metadata: + template_name: object-storage-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + objectstore_name: + type: string + + node_templates: + + obj_store_server: + type: tosca.nodes.ObjectStorage + properties: + name: { get_input: objectstore_name } + size: 4096 MB + maxsize: 20 GB diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/software-component-1/inputs.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/software-component-1/inputs.yaml new file mode 100644 index 0000000..c1ee88a --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/software-component-1/inputs.yaml @@ -0,0 +1 @@ +cpus: 4
\ No newline at end of file diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/software-component-1/software-component-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/software-component-1/software-component-1.yaml new file mode 100644 index 0000000..fc1cfd7 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/software-component-1/software-component-1.yaml @@ -0,0 +1,54 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA Simple Profile with a SoftwareComponent node with a declared Virtual machine (VM) deployment + artifact that automatically deploys to its host Compute node. + +metadata: + template_name: software-component-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../non-normative-types.yaml + +topology_template: + + # ARIA NOTE: missing in spec + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + + node_templates: + + my_virtual_machine: + type: SoftwareComponent + artifacts: + my_vm_image: + file: images/fedora-18-x86_64.qcow2 + type: tosca.artifacts.Deployment.Image.VM.QCOW2 + requirements: + - host: my_server + # Automatically deploy the VM image referenced on the create operation + interfaces: + Standard: + create: my_vm_image + + # Compute instance with no Operating System guest host + my_server: + type: Compute + capabilities: + # Note: no guest OperatingSystem requirements as these are in the image. + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4 GB + + outputs: + private_ip: + description: The private IP address of the deployed server instance. + value: { get_attribute: [ my_server, private_address ] } diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-1/webserver-dbms-1.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-1/webserver-dbms-1.yaml new file mode 100644 index 0000000..daa24df --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-1/webserver-dbms-1.yaml @@ -0,0 +1,122 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with WordPress, a web server, a MySQL DBMS hosting the application's database + content on the same server. Does not have input defaults or constraints. + +metadata: + template_name: webserver-dbms-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../non-normative-types.yaml + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + db_name: + type: string + description: The name of the database. + db_user: + type: string + description: The username of the DB user. + db_pwd: + type: string + description: The WordPress database admin account password. + db_root_pwd: + type: string + description: Root password for MySQL. + db_port: + type: PortDef + description: Port for the MySQL database + # ARIA NOTE: missing in spec + context_root: + type: string + description: Context root for WordPress. + + node_templates: + + wordpress: + type: tosca.nodes.WebApplication.WordPress + properties: + context_root: { get_input: context_root } + requirements: + - host: webserver + - database_endpoint: mysql_database + interfaces: + Standard: + create: wordpress_install.sh + configure: + implementation: wordpress_configure.sh + inputs: + wp_db_name: { get_property: [ mysql_database, name ] } + wp_db_user: { get_property: [ mysql_database, user ] } + wp_db_password: { get_property: [ mysql_database, password ] } + # In my own template, find requirement/capability, find port property + wp_db_port: { get_property: [ SELF, database_endpoint, port ] } + + mysql_database: + type: Database + properties: + name: { get_input: db_name } + user: { get_input: db_user } + password: { get_input: db_pwd } + port: { get_input: db_port } + capabilities: + database_endpoint: + properties: + port: { get_input: db_port } + requirements: + - host: mysql_dbms + interfaces: + Standard: + configure: mysql_database_configure.sh + + mysql_dbms: + type: DBMS + properties: + root_password: { get_input: db_root_pwd } + port: { get_input: db_port } + requirements: + - host: server + interfaces: + Standard: + # ARIA NOTE: not declared in spec + #inputs: + # db_root_password: { get_property: [ mysql_dbms, root_password ] } + create: mysql_dbms_install.sh + start: mysql_dbms_start.sh + configure: mysql_dbms_configure.sh + + webserver: + type: WebServer + requirements: + - host: server + interfaces: + Standard: + create: webserver_install.sh + start: webserver_start.sh + + server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: linux + distribution: fedora + version: 17.0 + + outputs: + website_url: + description: URL for Wordpress wiki. + value: { get_attribute: [ server, public_address ] } diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml new file mode 100644 index 0000000..02bb399 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml @@ -0,0 +1,15 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.WebApplication.PayPalPizzaStore: + derived_from: tosca.nodes.WebApplication + properties: + github_url: + type: string + requirements: + - database_connection: + capability: tosca.capabilities.Node + + tosca.nodes.WebServer.Nodejs: + derived_from: tosca.nodes.WebServer diff --git a/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/webserver-dbms-2.yaml b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/webserver-dbms-2.yaml new file mode 100644 index 0000000..91f0b35 --- /dev/null +++ b/azure/aria/aria-extension-cloudify/src/aria/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/webserver-dbms-2.yaml @@ -0,0 +1,115 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with a nodejs web server hosting a PayPal sample application which connects + to a mongodb database. + +metadata: + template_name: webserver-dbms-2 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - custom_types/paypalpizzastore_nodejs_app.yaml + +dsl_definitions: + + ubuntu_node: &ubuntu_node + disk_size: 10 GB + num_cpus: { get_input: my_cpus } + mem_size: 4096 MB + os_capabilities: &os_capabilities + architecture: x86_64 + type: Linux + distribution: Ubuntu + version: 14.04 + +topology_template: + + inputs: + my_cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + default: 1 + github_url: + type: string + description: The URL to download nodejs. + default: https://github.com/sample.git + + node_templates: + + paypal_pizzastore: + type: tosca.nodes.WebApplication.PayPalPizzaStore + properties: + github_url: { get_input: github_url } + requirements: + - host: nodejs + - database_connection: mongo_db + interfaces: + Standard: + configure: + implementation: scripts/nodejs/configure.sh + inputs: + github_url: { get_property: [ SELF, github_url ] } + mongodb_ip: { get_attribute: [ mongo_server, private_address ] } + start: scripts/nodejs/start.sh + + nodejs: + type: tosca.nodes.WebServer.Nodejs + requirements: + - host: app_server + interfaces: + Standard: + create: scripts/nodejs/create.sh + + mongo_db: + type: tosca.nodes.Database + properties: + name: 'pizzastore' # ARIA NOTE: missing in spec + requirements: + - host: mongo_dbms + interfaces: + Standard: + create: create_database.sh + + mongo_dbms: + type: tosca.nodes.DBMS + requirements: + - host: mongo_server + properties: + port: 27017 + interfaces: + Standard: # ARIA NOTE: mistaken in spec + create: mongodb/create.sh + configure: + implementation: mongodb/config.sh + inputs: + mongodb_ip: { get_attribute: [ mongo_server, private_address ] } + start: mongodb/start.sh + + mongo_server: + type: tosca.nodes.Compute + capabilities: + os: + properties: *os_capabilities + host: + properties: *ubuntu_node + + app_server: + type: tosca.nodes.Compute + capabilities: + os: + properties: *os_capabilities + host: + properties: *ubuntu_node + + outputs: + + nodejs_url: + description: URL for the nodejs server, http://<IP>:3000 + value: { get_attribute: [ app_server, private_address ] } + mongodb_url: + description: URL for the mongodb server. + value: { get_attribute: [ mongo_server, private_address ] } |