fa4c8b2b7ba837bb9378ddb562301641a61a934d
[snaps.git] / examples / simple / deploy-simple.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: cable123
21     auth_url: http://192.168.67.10:5000/v2.0
22     project_name: admin
23     http_proxy: 10.197.123.27:3128
24     ssh_proxy_cmd: '/usr/local/bin/corkscrew 10.197.123.27 3128 %h %p'
25   images:
26     - image:
27         name: Ubuntu14
28         format: qcow2
29         image_user: ubuntu
30         download_url: http://uec-images.ubuntu.com/releases/trusty/14.04/ubuntu-14.04-server-cloudimg-amd64-disk1.img
31   networks:
32     - network:
33         name: simple-net
34         subnets:
35           - subnet:
36               name: simple-subnet
37               cidr: 10.0.1.0/24
38               dns_nameservers: [10.5.0.8, 8.8.8.8]
39   routers:
40     - router:
41         name: simple-router
42         external_gateway: external
43         internal_subnets:
44           - subnet:
45               project_name: admin
46               network_name: simple-net
47               subnet_name: simple-subnet
48   keypairs:
49     - keypair:
50         name: simple-kp
51         public_filepath: /tmp/simple-kp.pub
52         private_filepath: /tmp/simple-kp
53   instances:
54     - instance:
55         name: simple-1
56         flavor: m1.small
57         imageName: Ubuntu14
58         keypair_name: simple-kp
59         userdata: "#cloud-config\npassword: cable123\nchpasswd: { expire: False }\nsshr_pwauth: True"
60         ports:
61           - port:
62               name: simple-net-port
63               network_name: simple-net
64         floating_ips:
65           - floating_ip:
66               name: fip1
67               port_name: simple-net-port
68               router_name: simple-router
69               subnet_name: simple-subnet
70 ansible:
71     - playbook_location: main.yml
72       hosts:
73         - simple-1
74       variables:
75         greeting_msg:
76           type: string
77           value: Greetings
78         os_user:
79           type: os_creds
80           value: username
81         os_pass:
82           type: os_creds
83           value: password
84         os_auth_url:
85           type: os_creds
86           value: auth_url
87         os_project:
88           type: os_creds
89           value: project_name
90         fip1:
91           type: vm-attr
92           vm_name: simple-1
93           value: floating_ip
94         mac1:
95           type: port
96           vm_name: simple-1
97           port_name: simple-net-port
98           port_value: mac_address
99         ip1:
100           type: port
101           vm_name: simple-1
102           port_name: simple-net-port
103           port_value: ip_address