Update tosca lib to version 0.5
[parser.git] / tosca2heat / tosca-parser / toscaparser / tests / data / tosca_single_instance_wordpress_with_local_abspath_import.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   TOSCA simple profile with wordpress, web server and mysql on the same server.
5   Parsing of this test template will fail with errors if provided imports does
6   not refer to a valid absolute path.
7
8 imports:
9   - /tmp/tosca-parser/toscaparser/tests/data/custom_types/wordpress.yaml
10
11 topology_template:
12   inputs:
13     cpus:
14       type: integer
15       description: Number of CPUs for the server.
16       constraints:
17         - valid_values: [ 1, 2, 4, 8 ]
18       default: 1
19     db_name:
20       type: string
21       description: The name of the database.
22       default: wordpress
23     db_user:
24       type: string
25       description: The user name of the DB user.
26       default: wp_user
27     db_pwd:
28       type: string
29       description: The WordPress database admin account password.
30       default: wp_pass
31     db_root_pwd:
32       type: string
33       description: Root password for MySQL.
34     db_port:
35       type: PortDef
36       description: Port for the MySQL database.
37       default: 3306
38
39   node_templates:
40     wordpress:
41       type: tosca.nodes.WebApplication.WordPress
42       requirements:
43         - host: webserver
44         - database_endpoint: mysql_database
45       interfaces:
46         Standard:
47           create: wordpress/wordpress_install.sh
48           configure:
49             implementation: wordpress/wordpress_configure.sh
50             inputs:
51               wp_db_name: wordpress
52               wp_db_user: wp_user
53               wp_db_password: wp_pass
54
55     mysql_database:
56       type: tosca.nodes.Database
57       properties:
58         name: { get_input: db_name }
59         user: { get_input: db_user }
60         password: { get_input: db_pwd }
61       capabilities:
62         database_endpoint:
63           properties:
64             port: { get_input: db_port }
65       requirements:
66         - host:
67             node: mysql_dbms
68       interfaces:
69         Standard:
70           configure:
71             implementation: mysql/mysql_database_configure.sh
72             inputs:
73               db_name: wordpress
74               db_user: wp_user
75               db_password: wp_pass
76               db_root_password: passw0rd
77     mysql_dbms:
78       type: tosca.nodes.DBMS
79       properties:
80         root_password: { get_input: db_root_pwd }
81         port: { get_input: db_port }
82       requirements:
83         - host: server
84       interfaces:
85         Standard:
86           create:
87             implementation: mysql/mysql_dbms_install.sh
88             inputs:
89               db_root_password: passw0rd
90           start: mysql/mysql_dbms_start.sh
91           configure:
92             implementation: mysql/mysql_dbms_configure.sh
93             inputs:
94               db_port: 3366
95
96     webserver:
97       type: tosca.nodes.WebServer
98       requirements:
99         - host: server
100       interfaces:
101         Standard:
102           create: webserver/webserver_install.sh
103           start: webserver/webserver_start.sh
104     server:
105       type: tosca.nodes.Compute
106       capabilities:
107         host:
108           properties:
109             disk_size: 10 GB
110             num_cpus: { get_input: cpus }
111             mem_size: 4096 MB
112         os:
113           properties:
114             architecture: x86_64
115             type: Linux
116             distribution: Ubuntu
117             version: 14.04
118
119   outputs:
120     website_url:
121       description: URL for Wordpress wiki.
122       value: { get_attribute: [server, private_address] }