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