Update tosca lib to version 0.5
[parser.git] / tosca2heat / tosca-parser / toscaparser / tests / spec_samples / v1.0 / tosca_nodejs_mongodb_two_instances.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   TOSCA simple profile with nodejs and mongodb.
5
6 imports:
7   - custom_types/paypalpizzastore_nodejs_app.yaml
8
9 dsl_definitions:
10   host_capabilities: &host_capabilities
11     disk_size: 10 GB
12     num_cpus: 1
13     mem_size: 4096 MB
14   os_capabilities: &os_capabilities
15     architecture: x86_64
16     type: Linux
17     distribution: Ubuntu
18     version: 14.04
19
20 topology_template:
21   inputs:
22     my_cpus:
23       type: integer
24       description: Number of CPUs for the server.
25       constraints:
26         - valid_values: [ 1, 2, 4, 8 ]
27       default: 1
28     github_url:
29        type: string
30        description: The URL to download nodejs.
31        default: http://github.com/paypal/rest-api-sample-app-nodejs.git
32
33   node_templates:
34     paypal_pizzastore:
35       type: tosca.nodes.WebApplication.PayPalPizzaStore
36       properties:
37           github_url: { get_input: github_url }
38       requirements:
39         - host: nodejs
40         - database_connection: mongo_db
41       interfaces:
42         Standard:
43            configure:
44              implementation: nodejs/config.sh
45              inputs:
46                github_url: http://github.com/paypal/rest-api-sample-app-nodejs.git
47                mongodb_ip: { get_attribute: [mongo_server, private_address] }
48            start: nodejs/start.sh
49     nodejs:
50       type: tosca.nodes.WebServer
51       requirements:
52         - host: app_server
53       interfaces:
54         Standard:
55           create: nodejs/create.sh
56     mongo_db:
57       type: tosca.nodes.Database
58       requirements:
59         - host: mongo_dbms
60       interfaces:
61         Standard:
62           create: mongodb/create_database.sh
63     mongo_dbms:
64       type: tosca.nodes.DBMS
65       requirements:
66         - host: mongo_server
67       interfaces:
68         Standard:
69           create: mongodb/create.sh
70           configure:
71             implementation: mongodb/config.sh
72             inputs:
73               mongodb_ip: { get_attribute: [mongo_server, private_address] }
74           start: mongodb/start.sh
75     mongo_server:
76       type: tosca.nodes.Compute
77       capabilities:
78         host:
79           properties: *host_capabilities
80         os:
81           properties: *os_capabilities
82     app_server:
83       type: tosca.nodes.Compute
84       capabilities:
85         host:
86           properties: *host_capabilities
87         os:
88           properties: *os_capabilities
89
90   outputs:
91     nodejs_url:
92       description: URL for the nodejs server, http://<IP>:3000
93       value: { get_attribute: [app_server, private_address] }
94     mongodb_url:
95       description: URL for the mongodb server.
96       value: { get_attribute: [mongo_server, private_address] }