4b5ba89368f06b250281f67705a60273fdbe26bc
[snaps.git] / examples / two-network / deploy-two-net-centos.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   connection:
18     # Note - when http_proxy is set, you must also configure ssh for proxy tunneling on your host.
19     username: admin
20     password: NotMyPass!
21     auth_url: http://10.10.10.50:5000/v2.0/
22     project_name: admin
23     http_proxy: localhost:3128
24   images:
25     - image:
26         name: centos
27         format: qcow2
28         image_user: centos
29         download_url: http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2
30         nic_config_pb_loc: provisioning/ansible/centos-network-setup/playbooks/configure_host.yml
31   networks:
32     - network:
33         name: net-1
34         subnets:
35           - subnet:
36               name: subnet-1
37               cidr: 10.0.1.0/24
38               dns_nameservers: [8.8.8.8]
39     - network:
40         name: net-2
41         subnets:
42           - subnet:
43               name: subnet-2
44               cidr: 10.0.2.0/24
45               dns_nameservers: [8.8.8.8]
46   routers:
47     - router:
48         name: router-1
49         external_gateway: external
50         internal_subnets:
51           - subnet-1
52   keypairs:
53     - keypair:
54         name: two-net
55         public_filepath: /tmp/two-net.pub
56         private_filepath: /tmp/two-net
57   instances:
58     - instance:
59         name: vm1
60         flavor: m1.small
61         imageName: centos
62         keypair_name: two-net
63         ports:
64           - port:
65               name: port-1-vm1
66               network_name: net-1
67           - port:
68               name: port-2-vm1
69               network_name: net-2
70         floating_ips:
71           - floating_ip:
72               name: fip1
73               port_name: port-1-vm1
74               router_name: router-1
75               subnet_name: subnet-1
76     - instance:
77         name: vm2
78         flavor: m1.small
79         imageName: centos
80         keypair_name: two-net
81         ports:
82           - port:
83               name: port-1-vm2
84               network_name: net-1
85           - port:
86               name: port-2-vm2
87               network_name: net-2
88               ip_addrs:
89                 - subnet_name: subnet-2
90                   ip: 10.0.2.101
91         floating_ips:
92           - floating_ip:
93               name: fip1
94               port_name: port-1-vm2
95               router_name: router-1
96               subnet_name: subnet-1