30dbcc088e8d17ab9b77d3d13574d6d494e93822
[snaps.git] / examples / inst-w-volume / deploy-vm-with-volume.yaml
1 # Copyright (c) 2016 Cable Television Laboratories, Inc. ("CableLabs")
2 #                    and others.  All rights reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 ---
16 openstack:
17   connections:
18     # Note - when http_proxy is set, you must also configure ssh for proxy tunneling on your host.
19     - connection:
20         name: admin-creds
21         username: {{ admin_user }}
22         project_name: {{ admin_proj }}
23         password: {{ admin_pass }}
24         auth_url: {{ auth_url }}
25         identity_api_version: {{ id_api_version }}
26   projects:
27     - project:
28         os_creds_name: admin-creds
29         name: {{ proj }}
30         description: Project for Orchestrators
31         users:
32           - {{ username }}
33           - {{ admin_user }}
34   users:
35     - user:
36         os_creds_name: admin-creds
37         name: {{ username }}
38         password: {{ pass }}
39         project_name: {{ proj }}
40         roles: {admin: {{ proj }}}
41   flavors:
42     - flavor:
43         os_creds_name: admin-creds
44         name: {{ flavor_name }}
45         ram: {{ flavor_ram }}
46         disk: {{ flavor_disk }}
47         vcpus: {{ flavor_cpus }}
48   qos_specs:
49     - qos_spec:
50         os_creds_name: admin-creds
51         name: {{ qos_name }}
52         consumer: both
53   volume_types:
54     - volume_type:
55         os_creds_name: admin-creds
56         name: {{ vol_type_name }}
57         encryption:
58           name: {{ vol_type_encryption_name }}
59           provider_class: LuksEncryptor
60           control_location: front-end
61   volumes:
62     - volume:
63         os_user:
64           name: {{ username }}
65           project_name: {{ proj }}
66         name: {{ volume_name }}
67         size: 10
68   images:
69     - image:
70         os_creds_name: admin-creds
71         name: {{ image_name }}
72         format: {{ image_format }}
73         image_user: {{ image_user }}
74         download_url: {{ image_url }}
75         image_file: {{ image_file }}
76         public: True
77   networks:
78     - network:
79         os_user:
80           name: {{ username }}
81           project_name: {{ proj }}
82         name: {{ net_name }}
83         project_name: {{ proj }}
84         subnets:
85           - subnet:
86               name: {{ subnet_name }}
87               project_name: {{ proj }}
88               cidr: {{ cidr }}
89               dns_nameservers: [8.8.8.8]
90   routers:
91     - router:
92         os_user:
93           name: {{ username }}
94           project_name: {{ proj }}
95         name: {{ router_name }}
96         external_gateway: {{ ext_net }}
97         internal_subnets:
98           - {{ subnet_name }}
99   keypairs:
100     - keypair:
101         os_user:
102           name: {{ username }}
103           project_name: {{ proj }}
104         name: {{ kp_name }}
105         public_filepath: {{ kp_pub_path }}
106         private_filepath: {{ kp_priv_path }}
107         delete_on_clean: True
108   security_groups:
109     - security_group:
110         os_user:
111           name: {{ username }}
112           project_name: {{ proj }}
113         name: {{ sg_name }}
114         rules:
115           - direction: ingress
116             protocol: icmp
117           - direction: ingress
118             protocol: tcp
119             port_range_min: 22
120             port_range_max: 22
121   instances:
122     - instance:
123         os_user:
124           name: {{ username }}
125           project_name: {{ proj }}
126         name: {{ inst_name }}
127         flavor: {{ flavor_name }}
128         imageName: {{ image_name }}
129         keypair_name: {{ kp_name }}
130         security_group_names: [{{ sg_name }}]
131         volume_names:
132           - {{ volume_name }}
133         ports:
134           - port:
135               name: {{ port_name_prfx }}-1a
136               network_name: {{ net_name }}
137         floating_ips:
138           - floating_ip:
139               name: fip1
140               port_name: {{ port_name }}
141               router_name: {{ router_name }}