4 Use launcher.py to deploy and clean up example environments. These examples are described in YAML files.
6 #. Add your OpenStack connection information to the deploy-complex-network.yaml.
8 Edit <path to repo>/examples/complex-network/deploy-complex-network.yaml
10 - openstack: the top level tag that denotes configuration for the OpenStack components
12 - connection: - contains the credentials and endpoints required to
13 connect with OpenStack
14 - username: - the project's user (required)
15 - password: - the tentant's user password (required)
16 - auth\_url: - the URL to the OpenStack APIs (required)
17 - project\_name: - the name of the OpenStack project for the user
19 - http\_proxy: - the {{ host }}:{{ port }} of the proxy server the
20 HTTPPhotoman01(optional)
22 #. Go to the examples directory.
26 cd <snaps repo>/examples/
28 #. Deploy the launcher.
32 python launch.py -t ./complex-network/deploy-complex-network.yaml -d
34 #. Clean the deployment.
38 python launch.py -t ./complex-network/deploy-complex-network.yaml -c
40 #. Customize the deployment by changing the yaml file.
42 The configuration file used to deploy and provision a virtual environment has been designed to describe the required
43 images, networks, SSH public and private keys, associated VMs, as well as any required post deployment provisioning
46 - openstack: the top level tag that denotes configuration for the
49 - connections: the different connections/credentials to be used by the
52 - connection: the credentials and endpoints required to connect to an
53 OpenStack project/tenant
55 - name: the name of the credentials for use when creating objects (required)
56 - username: the project's user (required)
57 - password: the tentant's user password (required)
58 - auth\_url: the URL to the OpenStack APIs (required)
59 - project\_name: the name of the OpenStack project for the user
61 - identity\_api\_version: the Keystone client version to use (default = 2)
62 - image\_api\_version: the Glance client version to use (default = 2)
63 - network\_api\_version: the Neutron client version to use (default = 2)
64 - compute\_api\_version: the Nova client version to use (default = 2)
65 - heat\_api\_version: the Heat client version to use (default = 1)
66 - volume\_api\_version: the Cinder client version to use (default = 2)
67 - user\_domain\_id: the user domain ID to use (default = 'default')
68 - user\_domain\_name: the user domain name to use (default = 'Default')
69 - project\_domain\_id: the project domain ID to use (default = 'default')
70 - project\_domain\_name: the project domain name to use (default = 'Default')
71 - interface: Used to specify the endpoint type for keystone (default = 'public')
72 - cacert: True for https or the certification file location (default = False)
73 - region\_name: the region (default = None)
74 - proxy\_settings: for accessing APIs hidden behind an HTTP proxy
76 - host: hostname or IP of HTTP proxy host (required)
77 - port: port number of the HTTP proxy server (required)
78 - http\_host: hostname or IP of HTTPS proxy host (default = host)
79 - port: port number of the HTTPS proxy server (default = port)
80 - ssh\_proxy\_cmd: the OpenSSH command used to access the SSH port
83 - projects: the projects/tenants to create
85 - project: a project/tenant to create (admin user credentials required)
87 - os\_creds\_name: the connection name (default = 'default'
88 required or use "os\_user" below instead)
89 - name: the project's name (required)
90 - domain or domain_name: the project's domain name (default = 'Default')
91 - description: the description (optional)
92 - users: a list of users to associate to the project (optional)
93 - enabled: when True the project will be enabled on creation (default = True)
95 - users: the users to create
97 - user: a user to create (admin user credentials required)
99 - os\_creds\_name: the connection name (required)
100 - name: the username (required)
101 - password: the user's password (required)
102 - project\_name: the user's primary project name (optional)
103 - domain\_name: the user's domain name (default = 'Default')
104 - email: the user's email address (optional)
105 - roles: dict where key is the role's name and value is the name
106 of the project to associate with the role (optional)
108 - flavors: the flavors to create
110 - flavor: a flavor to create (admin user credentials required)
112 - os\_creds\_name: the connection name (default = 'default'
113 required or use "os\_user" below instead)
114 - name: the name (required)
115 - flavor\_id: the string ID (default 'auto')
116 - ram: the required RAM in MB (required)
117 - disk: the size of the root disk in GB (required)
118 - vcpus: the number of virtual CPUs (required)
119 - ephemeral: the size of the ephemeral disk in GB (default 0)
120 - swap: the size of the dedicated swap disk in GB (default 0)
121 - rxtx\_factor: the receive/transmit factor to be set on ports if
122 backend supports QoS extension (default 1.0)
123 - is\_public: denotes whether or not the flavor is public (default = True)
124 - metadata: freeform dict() for special metadata (optional)
126 - images: describes each image to create
129 - os\_creds\_name: the connection name (default = 'default'
130 required or use "os\_user" below instead)
131 - os\_user: the connection from a new user defined in template
132 (required or use "os\_creds\_name" above
134 - name: the user's name (required)
135 - project\_name: the project name to use
137 - name: The unique image name. If the name already exists for
138 your project, a new one will not be created (required)
139 - image\_user: the image's default sudo user (required)
140 - format or img\_format: the image format type (required i.e. qcow2)
141 - url or download\_url: The HTTP download location of the image file
142 (required when "image_file" below has not been configured)
143 - image\_file: the image file location (required when "url" has not
145 - kernel\_image\_settings: the settings for a kernel image (optional)
146 - ramdisk\_image\_settings: the settings for a kernel image (optional)
147 - public: publically visibile when True (default = True)
152 - os\_creds\_name: the connection name (default = 'default'
153 required or use "os\_user" below instead)
154 - os\_user: the connection from a new user defined in template
155 (required or use "os\_creds\_name" above
157 - name: the user's name (required)
158 - project\_name: the project name to use
160 - name: The name of the network to be created. If one already
161 exists, a new one will not be created (required)
162 - admin\_state\_up: T\|F (default True)
164 - project\_name: Name of the project who owns the network. Note:
165 only administrative users can specify projects other than their
167 - external: T\|F whether or not network is external (default False)
168 - network\_type: The type of network to create (optional)
169 - physical\_network: the name of the physical network
170 (required when network_type is 'flat')
171 - segmentation\_id: the id of the segmentation
172 (required when network_type is 'vlan')
176 - name: The name of the network to be created. If one already
177 exists, a new one will not be created. Note: although
178 OpenStack allows for multiple subnets to be applied to any
179 given network, we have not included support as our current
180 use cases does not utilize this functionality (required)
181 - cidr: The subnet mask value (required)
182 - dns\_nameservers: A list of IP values used for DNS
183 resolution (default: 8.8.8.8)
184 - ip\_version: 4\|6 (default: 4)
185 - project\_name: Name of the project who owns the network.
186 Note: only administrative users can specify projects other
187 than their own (optional)
188 - start: The start address for allocation\_pools (optional)
189 - end: The ending address for allocation\_pools (optional)
190 - gateway\_ip: The IP address to the gateway (optional)
191 - enable\_dhcp: T\|F (optional)
192 - dns\_nameservers: List of DNS server IPs (default = ['8.8.8.8']
193 - host\_routes: A list of host route dictionaries (optional)
195 ``yaml "host_routes":[ { "destination":"0.0.0.0/0", "nexthop":"123.456.78.9" }, { "destination":"192.168.0.0/24", "nexthop":"192.168.0.1" } ]``
196 - destination: The destination for a static route (optional)
197 - nexthop: The next hop for the destination (optional)
198 - ipv6\_ra\_mode: Valid values: "dhcpv6-stateful",
199 "dhcpv6-stateless", and "slaac" (optional)
200 - ipv6\_address\_mode: Valid values: "dhcpv6-stateful",
201 "dhcpv6-stateless", and "slaac" (optional)
207 - os\_creds\_name: the connection name (default = 'default'
208 required or use "os\_user" below instead)
209 - os\_user: the connection from a new user defined in template
210 (required or use "os\_creds\_name" above
212 - name: the user's name (required)
213 - project\_name: the project name to use
215 - name: The name of the security group to be created (required)
216 - description: The security group's description (optional)
217 - project\_name: Name of the project who owns the security group (optional)
218 - rule\_settings: List of rules to place onto security group (optional)
220 - description: the rule's description (optional)
221 - protocol: rule's protcol ('icmp' or 'tcp' or 'udp' or 'null')
222 - ethertype: rule's ethertype ('4' or '6')
223 - port\_range\_min: The minimum port number in the range that is
224 matched by the security group rule. When the protocol is 'tcp'
225 or 'udp', this value must be <= 'port_range_max' (optional)
226 - port\_range\_max: The maximum port number in the range that is
227 matched by the security group rule. When the protocol is 'tcp'
228 or 'udp', this value must be <= 'port_range_max' (optional)
229 - remote\_ip\_prefix: The remote IP prefix to associate with this
230 metering rule packet (optional)
236 - os\_creds\_name: the connection name (default = 'default'
237 required or use "os\_user" below instead)
238 - os\_user: the connection from a new user defined in template
239 (required or use "os\_creds\_name" above
241 - name: the user's name (required)
242 - project\_name: the project name to use
244 - name: The name of the router to be created (required)
245 - project\_name: Name of the project who owns the network (optional)
246 - external\_gateway: Name of the external network to which to route
248 - admin\_state\_up: T\|F (default True)
249 - external\_fixed\_ids: Dictionary containing the IP address
250 parameters (optional)
251 - internal\_subnets: List of subnet names to which to connect this
254 - port_settings (Leverages the same class/structure as port objects on
255 VM instances. See port definition below for a
256 full accounting of the port attributes. The ones listed
257 below are generally used for routers)
259 - name: The name given to the new port (required and must be
261 - network\_name: The name of the network on which to create
263 - admin\_state\_up: T\|F (default True)
264 - project\_name: Name of the project who owns the network (optional)
265 - mac\_address: The port's MAC address (optional)
266 - ip\_addrs: A list of k/v pairs (optional)
267 - security\_groups: a list of names of the the security groups
269 - opt\_value: The extra DHCP option value (optional)
270 - opt\_name: The extra DHCP option name (optional)
276 - os\_creds\_name: the connection name (default = 'default'
277 required or use "os\_user" below instead)
278 - os\_user: the connection from a new user defined in template
279 (required or use "os\_creds\_name" above
281 - name: the user's name (required)
282 - project\_name: the project name to use
284 - name: The name of the keypair to be created. If one already
285 exists, a new one will not be created but simply loaded from
286 its configured file location (required)
287 - public\_filepath: The path to where the generated public key
288 will be stored if it does not exist (optional but really
289 required for provisioning purposes)
290 - private\_filepath: The path to where the generated private key
291 will be stored if it does not exist (optional but really
292 required for provisioning purposes)
298 - os\_creds\_name: the connection name (default = 'default'
299 required or use "os\_user" below instead)
300 - os\_user: the connection from a new user defined in template
301 (required or use "os\_creds\_name" above
303 - name: the user's name (required)
304 - project\_name: the project name to use
306 - name: The unique instance name for project. (required)
307 - flavor: Must be one of the preconfigured flavors (required)
308 - imageName: The name of the image to be used for deployment
310 - keypair\_name: The name of the keypair to attach to instance
311 (optional but required for NIC configuration and Ansible
313 - sudo\_user: The name of a sudo\_user that is attached to the
314 keypair (optional but required for NIC configuration and
315 Ansible provisioning)
316 - vm\_boot\_timeout: The number of seconds to block waiting for
317 an instance to deploy and boot (default 900)
318 - vm\_delete\_timeout: The number of seconds to block waiting for
319 an instance to be deleted (default 300)
320 - ssh\_connect\_timeout: The number of seconds to block waiting
321 for an instance to achieve an SSH connection (default 120)
322 - ports: A list of port configurations (should contain at least
324 - port: Denotes the configuration of a NIC
326 - name: The unique port name for project (required)
327 - network\_name: The name of the network to which the port is
329 - ip\_addrs: Static IP addresses to be added to the port by
331 - subnet\_name: The name of the subnet
332 - ip: The assigned IP address (when null, OpenStack will
333 assign an IP to the port)
334 - admin\_state\_up: T\|F (default True)
335 - project\_name: The name of the project who owns the network.
336 Only administrative users can specify a the project ID other
337 than their own (optional)
338 - mac\_address: The desired MAC for the port (optional)
339 - fixed\_ips: A dictionary that allows one to specify only a
340 subnet ID, OpenStack Networking allocates an available IP
341 from that subnet to the port. If you specify both a subnet
342 ID and an IP address, OpenStack Networking tries to allocate
343 the specified address to the port. (optional)
344 - seurity\_groups: A list of security group IDs (optional)
345 - allowed\_address\_pairs: A dictionary containing a set of
346 zero or more allowed address pairs. An address pair contains
347 an IP address and MAC address. (optional)
348 - opt\_value: The extra DHCP option value (optional)
349 - opt\_name: The extra DHCP option name (optional)
350 - device\_owner: The ID of the entity that uses this port. For
351 example, a DHCP agent (optional)
352 - device\_id: The ID of the device that uses this port. For
353 example, a virtual server (optional)
355 - floating\_ips: list of floating\_ip configurations (optional)
358 - name: Must be unique for VM instance (required)
359 - port\_name: The name of the port requiring access to the
360 external network (required)
361 - subnet\_name: The name of the subnet contains the IP address on
362 the port on which to create the floating IP (optional)
363 - router\_name: The name of the router connected to an external
364 network used to attach the floating IP (required)
365 - provisioning: (True\|False) Denotes whether or not this IP can
366 be used for Ansible provisioning (default True)
368 - ansible: Each set of attributes below are contained in a list
370 - playbook\_location: Full path or relative to the directory in
371 which the deployment file resides (required)
372 - hosts: A list of hosts to which the playbook will be executed
374 - variables: Should your Ansible scripts require any substitution
375 values to be applied with Jinga2templates, the values defined here
376 will be used to for substitution
377 - tag name = substitution variable names. For instance, for any file
378 being pushed to the host being provisioned containing a value such
379 as {{ foo }}, you must specify a tag name of "foo"
382 - type: string\|port\|os\_creds\|vm-attr (note: will need to make
383 changes to deploy\_venv.py#\_\_get\_variable\_value() for
385 - when type == string, an tag name "value" must exist and its
386 value will be used for template substituion
387 - when type == port, custom code has been written to extract
388 certain assigned values to the port:
390 - vm\_name: must correspond to a VM's name as configured in
392 - port\_name: The name of the port from which to extract the
393 substitution values (required)
394 - port\_value: The port value. Currently only supporting
395 "mac\_address" and "ip\_address" (only the first)
397 - when type == os\_creds, custom code has been written to extract
398 the file's connection values:
400 - username: connection's user
401 - password: connection's password
402 - auth\_url: connection's URL
403 - project\_name: connection's project
405 - when type == vm-attr, custom code has been written to extract
406 the following attributes from the vm:
408 - vm\_name: must correspond to a VM's name as configured in
410 - value -> floating\_ip: is currently the only vm-attr