summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2017-05-09 12:11:51 (GMT)
committerMonty Taylor <mordred@inaugust.com>2017-05-09 12:49:05 (GMT)
commit8ab3b94833e341dc700ab1e7f62dc514848181f3 (patch)
tree2f712dd06afb44d05667ee169cc31c81caf21aa9
parent5a9bcdde9a88a40ddfa71097990acc3f2fc0f66e (diff)
Add shade: Everything you ever wanted as a cloud user
-rw-r--r--src/talks/everything-you-ever-wanted.hbs1335
1 files changed, 1335 insertions, 0 deletions
diff --git a/src/talks/everything-you-ever-wanted.hbs b/src/talks/everything-you-ever-wanted.hbs
new file mode 100644
index 0000000..a5c79fc
--- /dev/null
+++ b/src/talks/everything-you-ever-wanted.hbs
@@ -0,0 +1,1335 @@
1<!doctype html>
2<html lang="en">
3
4 <head>
5 <meta charset="utf-8">
6
7 <title>shade: Everything You Ever Wanted As a Cloud User</title>
8 </head>
9 <body>
10
11 <section id="who-am-i-redhat" class="slide level2">
12 <h1>Who am I?</h1>
13 <img style="float:right; margin:24pt" src="/images/Logo_RH_CMYK_Default.jpg" />
14 <p> Office of Technology </p>
15 <p> Zuul </p>
16 <p> Ansible </p>
17 </section>
18
19 <section id="who-am-i-openstack" class="slide level2">
20 <h1>Who am I?</h1>
21 <img style="float:right; margin-right:24pt; width:300px; height: auto" src="/images/openstack-cloud-software-vertical-large.png" />
22 <p>Technical Committee</p>
23 <p>Developer Infrastructure Core Team</p>
24 </section>
25
26 <section id="what-are-we-going-to-talk-about" class="slide level2">
27 <h1>What are we going to talk about?</h1>
28 <ul>
29 <li>What</li>
30 <li>Why</li>
31 <li>Configuration</li>
32 <li>Basics</li>
33 <li>Advanced things
34 <ul>
35 <li>Caching</li>
36 <li>Task Management</li>
37 </ul>
38 </li>
39 </ul>
40 </section>
41
42 <section class="slide level2">
43 <h1>shade: a Python library to wrap business logic around
44 OpenStack resources and operations</h1>
45 </section>
46
47 <section class="slide level2">
48 <h1>Design Principles</h1>
49 <ul>
50 <li class='fragment'>Expose a single API that works on all clouds</li>
51 <li class='fragment'>Hide all vendor or deployer differences</li>
52 <li class='fragment'>Support multi-cloud (<em>write once, run anywhere</em>)</li>
53 <li class='fragment'>Simple to use (<em>sane defaults</em>)</li>
54 <li class='fragment'>No plugins *</li>
55 <li class='fragment'>Efficient at scale</li>
56 <li class='fragment'>API always backwards compatible</li>
57 </ul>
58 </section>
59
60 <section class="slide level2">
61 <h1>Current Status</h1>
62 <h3>https://git.openstack.org/cgit/openstack-infra/shade</h3>
63 <h3>https://pypi.python.org/pypi/shade</h3>
64 <ul>
65 <li class='fragment'>Used in Ansible</li>
66 <li class='fragment'>Used in Infra Nodepool</li>
67 <li class='fragment'>Official OpenStack Project</li>
68 <li class='fragment'>Backend conversion to pure REST almost done</li>
69 </ul>
70 </section>
71
72 <section class="slide level2">
73 <h1>Why?</h1>
74 </section>
75
76 <section class="slide level2">
77 <blockquote>
78 Brand experts insist that success comes from promoting your unique
79 attributes, but in practice differentiation is less profitable than
80 consolidation.
81 </blockquote>
82 </section>
83
84 <section class="slide level2" data-transition='zoom'>
85 <h1>OpenStack Leaks Abstractions</h1>
86 </section>
87
88 <section class="slide level2" data-transition='zoom'>
89 <h1>OpenStack Breaks APIs</h1>
90 </section>
91
92 <section class="slide level2" data-transition='zoom'>
93 <h1>Basic concepts are needlessly complex</h1>
94 </section>
95
96 <section class="slide level2" data-transition='zoom'>
97 <h1>Client libraries are really for server-server communication</h1>
98 </section>
99
100 <section class="slide level2">
101 <h1>Infra solved these problems</h1>
102 <p>Infra runs across 14 clouds at massive scale (20k servers per day)</p>
103 <p>Why not share what we've learned with other people?</p>
104 </section>
105
106 <section class="slide level2">
107 <h1>simplicity</h1>
108 <p>This is what using a cloud should look like</p>
109 <pre><code>
110cloud = openstack_cloud('vexxhost')
111image = cloud.create_image(
112 'image-name', filename='image-filename.qcow2', wait=True)
113flavor = cloud.get_flavor_by_ram(512)
114cloud.create_server(
115 'my-server', image=image, flavor=flavor, wait=True, auto_ip=True)
116 </code></pre>
117 </section>
118
119 <section class="slide level2" data-transition='zoom'>
120 <h1>existence of shade is a bug</h1>
121 </section>
122
123 <section class="slide level2" data-transition='zoom'>
124 <h1>existence of shade is a <em>feature</em></h1>
125 </section>
126
127 <section class="slide level2">
128 <h1>Using shade</h1>
129 <h2>Step One: Configuration</h2>
130 </section>
131
132 <section class="slide level2">
133 <h1>os-client-config</h1>
134 <h3>http://git.openstack.org/cgit/openstack/os-client-config</h3>
135 <ul>
136 <li>A library to handle config information for openstack clients</li>
137 <li>Tracks differences in vendors that can't be discovered</li>
138 <li>Also used for ansible, python-openstackclient and openstacksdk</li>
139 <li>Reads clouds.yaml config file, environment vars and argparse</li>
140 </ul>
141 </section>
142
143 <section class="slide level2">
144 <h1>clouds.yaml - simple</h1>
145 <pre><code>
146clouds:
147 my-citycloud:
148 profile: citycloud
149 auth:
150 username: mordred
151 password: XXXXXXXXXXXXX
152 project_id: 65222a4d09ea4c68934fa1028c77f394
153 user_domain_id: d0919bd5e8d74e49adf0e145807ffc38
154 project_domain_id: d0919bd5e8d74e49adf0e145807ffc38
155 </code></pre>
156 </section>
157
158 <section class="slide level2">
159 <h1>clouds.yaml - mildly complex</h1>
160 <pre><code>
161 my-vexxhost:
162 volume_api_version: 3
163 profile: vexxhost
164 auth:
165 user_domain_id: default
166 project_domain_id: default
167 project_name: d8af8a8f-a573-48e6-898a-af333b970a2d
168 username: 0b8c435b-cc4d-4e05-8a47-a2ada0539af1
169 password: XXXXXXXXXXXXX
170 regions:
171 - ca-ymq-1
172 image_endpoint_override: https://image-ca-ymq-1.vexxhost.net/v2
173 </code></pre>
174 </section>
175
176 <section class="slide level2">
177 <h1>clouds.yaml - complex</h1>
178 <pre><code>
179 my-internap:
180 auth:
181 auth_url: https://identity.api.cloud.iweb.com
182 username: api-55f9a00fb2619
183 project_name: inap-17037
184 password: XXXXXXXXXXXXX
185 identity_api_version: 3
186 floating_ip_source: None
187 regions:
188 - name: ams01
189 values:
190 networks:
191 - name: inap-17037-WAN1654
192 routes_externally: true
193 default_interface: true
194 - name: inap-17037-LAN3631
195 routes_externally: false
196 </code></pre>
197 </section>
198
199 <section class="slide level2">
200 <h1>Environment Variables</h1>
201 <ul>
202 <li>os-client-config also processes OS_ environment variables</li>
203 <li>If present, they go into a cloud named "envvars"</li>
204 </ul>
205 </section>
206
207 <section class="slide level2">
208 <h1>auth_type</h1>
209 <p>keystone has pluggable authentication</p>
210
211 <ul>
212 <li>auth dict contents vary based on plugin</li>
213 <li>Defaults to 'password' which autodetects based on parameters</li>
214 <li>Other options: admin_token, v3oidcpassword, v3oidcauthcode</li>
215 <li>This is where I said "*" on "no plugins" earlier</li>
216 </ul>
217 </section>
218
219 <section class="slide level2">
220 <h1>auth_type - not part of auth_dict</h1>
221 <pre><code>
222 my-vexxhost:
223 profile: vexxhost
224 auth_type: v3password
225 auth:
226 user_domain_id: default
227 project_domain_id: default
228 project_name: d8af8a8f-a573-48e6-898a-af333b970a2d
229 username: 0b8c435b-cc4d-4e05-8a47-a2ada0539af1
230 password: XXXXXXXXXXXXX
231 regions:
232 - ca-ymq-1
233 </code></pre>
234 </section>
235
236 <section class="slide level2">
237 <h1>python-openstackclient</h1>
238 <pre>
239openstack --os-cloud=my-vexxhost servers list
240 </pre>
241 Or
242 <pre>
243export OS_CLOUD=my-vexxhost
244openstack servers list
245 </pre>
246 </section>
247
248 <section class="slide level2">
249 <h1>shade inventory</h1>
250 <ul>
251 <li>Code behind ansible OpenStack dynamic inventory plugin</li>
252 <li>All resources in all of your clouds</li>
253 </ul>
254 <pre>
255mordred@camelot:~$ shade-inventory --list --yaml
256 </pre>
257 <pre><code>
258- accessIPv4: 199.204.45.50
259 accessIPv6: 2604:e100:1:0:f816:3eff:feb5:ce98
260 addresses:
261 public:
262 - OS-EXT-IPS-MAC:mac_addr: fa:16:3e:b5:ce:98
263 OS-EXT-IPS:type: fixed
264 addr: 2604:e100:1:0:f816:3eff:feb5:ce98
265 version: 6
266 - OS-EXT-IPS-MAC:mac_addr: fa:16:3e:b5:ce:98
267 OS-EXT-IPS:type: fixed
268 addr: 199.204.45.50
269 version: 4
270 adminPass: null
271 created: '2017-04-02T17:04:49Z'
272 disk_config: AUTO
273 flavor:
274 id: bbcb7eb5-5c8d-498f-9d7e-307c575d3566
275 name: v1-standard-1
276 has_config_drive: false
277 host_id: 5b303fdae29a6b2c39c90a2a1c6dc1191297840d8c395e09c4e319b7
278 id: 5b3cde7d-ad17-4b28-9c08-9f4627abc659
279 image:
280 id: dd33a4c8-5a86-40ec-9fe0-8578d6a6dc10
281 name: Ubuntu 16.04.1 LTS [2017-03-03]
282 interface_ip: 199.204.45.50
283 key_name: mordred
284 launched_at: '2017-04-02T17:05:02.000000'
285 location:
286 cloud: my-vexxhost
287 project:
288 domain_id: default
289 domain_name: null
290 id: db92b20496ae4fbda850a689ea9d563f
291 name: d8af8a8f-a573-48e6-898a-af333b970a2d
292 region_name: ca-ymq-1
293 zone: ca-ymq-2
294 metadata: {}
295 name: irc-bouncer
296 networks:
297 public:
298 - 2604:e100:1:0:f816:3eff:feb5:ce98
299 - 199.204.45.50
300 power_state: 1
301 private_v4: ''
302 progress: 0
303 properties: {}
304 public_v4: 199.204.45.50
305 public_v6: 2604:e100:1:0:f816:3eff:feb5:ce98
306 security_groups:
307 - description: default
308 id: 22f8104a-2359-4091-aa61-9a4c48d6df3f
309 location:
310 cloud: my-vexxhost
311 project:
312 domain_id: default
313 domain_name: null
314 id: db92b20496ae4fbda850a689ea9d563f
315 name: d8af8a8f-a573-48e6-898a-af333b970a2d
316 region_name: ca-ymq-1
317 zone: null
318 name: default
319 properties: {}
320 security_group_rules:
321 - direction: ingress
322 ethertype: IPv4
323 id: 2172daaa-e402-4cf0-b353-1a7cb7dae184
324 location:
325 cloud: my-vexxhost
326 project:
327 domain_id: default
328 domain_name: null
329 id: db92b20496ae4fbda850a689ea9d563f
330 name: d8af8a8f-a573-48e6-898a-af333b970a2d
331 region_name: ca-ymq-1
332 zone: null
333 port_range_max: null
334 port_range_min: null
335 properties:
336 group: {}
337 protocol: null
338 remote_group_id: null
339 remote_ip_prefix: 0.0.0.0/0
340 security_group_id: 22f8104a-2359-4091-aa61-9a4c48d6df3f
341 - direction: ingress
342 ethertype: IPv4
343 id: 47fb6b4c-2f9b-4279-a77c-a645f7fc964f
344 location:
345 cloud: my-vexxhost
346 project:
347 domain_id: default
348 domain_name: null
349 id: db92b20496ae4fbda850a689ea9d563f
350 name: d8af8a8f-a573-48e6-898a-af333b970a2d
351 region_name: ca-ymq-1
352 zone: null
353 port_range_max: null
354 port_range_min: null
355 properties:
356 group:
357 name: default
358 tenant_id: db92b20496ae4fbda850a689ea9d563f
359 protocol: null
360 remote_group_id: null
361 remote_ip_prefix: null
362 security_group_id: 22f8104a-2359-4091-aa61-9a4c48d6df3f
363 - direction: ingress
364 ethertype: IPv4
365 id: 8287f9be-614b-4145-9f00-62fa9c856362
366 location:
367 cloud: my-vexxhost
368 project:
369 domain_id: default
370 domain_name: null
371 id: db92b20496ae4fbda850a689ea9d563f
372 name: d8af8a8f-a573-48e6-898a-af333b970a2d
373 region_name: ca-ymq-1
374 zone: null
375 port_range_max: null
376 port_range_min: null
377 properties:
378 group:
379 name: default
380 tenant_id: db92b20496ae4fbda850a689ea9d563f
381 protocol: null
382 remote_group_id: null
383 remote_ip_prefix: null
384 security_group_id: 22f8104a-2359-4091-aa61-9a4c48d6df3f
385 - direction: ingress
386 ethertype: IPv4
387 id: fdd91863-c19b-4b4b-a1bc-822cb8b0adf7
388 location:
389 cloud: my-vexxhost
390 project:
391 domain_id: default
392 domain_name: null
393 id: db92b20496ae4fbda850a689ea9d563f
394 name: d8af8a8f-a573-48e6-898a-af333b970a2d
395 region_name: ca-ymq-1
396 zone: null
397 port_range_max: null
398 port_range_min: null
399 properties:
400 group: {}
401 protocol: null
402 remote_group_id: null
403 remote_ip_prefix: 0.0.0.0/0
404 security_group_id: 22f8104a-2359-4091-aa61-9a4c48d6df3f
405 status: ACTIVE
406 task_state: null
407 terminated_at: null
408 updated: '2017-04-02T17:05:02Z'
409 user_id: e9b21dc437d149858faee0898fb08e92
410 vm_state: active
411 volumes:
412 - attachments:
413 - attached_at: '2017-04-11T19:11:09.000000'
414 attachment_id: 60f81620-4714-438b-b481-cd8fd7a4dd3e
415 device: /dev/vdc
416 host_name: null
417 id: 7aa81299-bb1c-449b-8a73-b55a9bdc5fca
418 server_id: 5b3cde7d-ad17-4b28-9c08-9f4627abc659
419 volume_id: 7aa81299-bb1c-449b-8a73-b55a9bdc5fca
420 can_multiattach: false
421 consistencygroup_id: null
422 created_at: '2017-04-11T19:10:20.000000'
423 description: ''
424 device: /dev/vdc
425 host: null
426 id: 7aa81299-bb1c-449b-8a73-b55a9bdc5fca
427 is_bootable: false
428 is_encrypted: false
429 location:
430 cloud: my-vexxhost
431 project:
432 domain_id: default
433 domain_name: null
434 id: db92b20496ae4fbda850a689ea9d563f
435 name: d8af8a8f-a573-48e6-898a-af333b970a2d
436 region_name: ca-ymq-1
437 zone: ca-ymq-2
438 metadata:
439 attached_mode: rw
440 readonly: 'False'
441 migration_status: null
442 name: foo
443 properties:
444 volume_image_metadata: {}
445 replication_driver: null
446 replication_extended_status: null
447 replication_status: disabled
448 size: 1
449 snapshot_id: null
450 source_volume_id: null
451 status: in-use
452 updated_at: '2017-04-11T19:11:09.000000'
453 volume_type: null
454 - attachments:
455 - attached_at: '2017-04-02T17:06:27.000000'
456 attachment_id: 4f24b276-ea5c-4a79-824f-434183c3c518
457 device: /dev/vdb
458 host_name: null
459 id: 9b6110df-cd97-4e37-9596-af371653a791
460 server_id: 5b3cde7d-ad17-4b28-9c08-9f4627abc659
461 volume_id: 9b6110df-cd97-4e37-9596-af371653a791
462 can_multiattach: false
463 consistencygroup_id: null
464 created_at: '2017-04-02T16:34:41.000000'
465 description: ''
466 device: /dev/vdb
467 host: null
468 id: 9b6110df-cd97-4e37-9596-af371653a791
469 is_bootable: true
470 is_encrypted: false
471 location:
472 cloud: my-vexxhost
473 project:
474 domain_id: default
475 domain_name: null
476 id: db92b20496ae4fbda850a689ea9d563f
477 name: d8af8a8f-a573-48e6-898a-af333b970a2d
478 region_name: ca-ymq-1
479 zone: ca-ymq-2
480 metadata:
481 attached_mode: rw
482 readonly: 'False'
483 migration_status: null
484 name: mordred-irc-save
485 properties:
486 volume_image_metadata:
487 base_image_ref: 69c99b45-cd53-49de-afdc-f24789eb8f83
488 checksum: dddc88434b12b5b61b6c7a3a5a880c35
489 clean_attempts: '7'
490 container_format: bare
491 disk_format: raw
492 hw_rng_model: virtio
493 image_id: 1659da1f-7650-4b91-b316-c3d69623e3fc
494 image_location: snapshot
495 image_name: mordred-irc-save
496 image_state: available
497 image_type: snapshot
498 instance_uuid: 811c5197-dba7-4d3a-a3f6-68ca5328b9a7
499 libvirt_use_agent: 'True'
500 min_disk: '40'
501 min_ram: '0'
502 network_allocated: 'True'
503 os_type: linux
504 owner_id: db92b20496ae4fbda850a689ea9d563f
505 size: '42949672960'
506 user_id: e9b21dc437d149858faee0898fb08e92
507 replication_driver: null
508 replication_extended_status: null
509 replication_status: disabled
510 size: 40
511 snapshot_id: null
512 source_volume_id: null
513 status: in-use
514 updated_at: '2017-04-02T17:06:27.000000'
515 volume_type: null
516- accessIPv4: 89.40.216.229
517 accessIPv6: ''
518 addresses:
519 private:
520 - OS-EXT-IPS-MAC:mac_addr: fa:16:3e:29:6d:20
521 OS-EXT-IPS:type: fixed
522 addr: 10.4.0.22
523 version: 4
524 - OS-EXT-IPS-MAC:mac_addr: fa:16:3e:29:6d:20
525 OS-EXT-IPS:type: floating
526 addr: 89.40.216.229
527 version: 4
528 adminPass: null
529 created: '2017-05-08T18:48:34Z'
530 disk_config: MANUAL
531 flavor:
532 id: 10973fe6-81ba-480c-bc36-bec93ee03d5c
533 name: 4C-4GB-100GB
534 has_config_drive: false
535 host_id: 8ed21447e12616c0c24f6e246f0ec423d6be1532716869a3617fbe80
536 id: a72fd3ea-9357-482d-b33a-fe61d7c37bfc
537 image:
538 id: 95e4c449-8abf-486e-97d9-dc3f82417d2d
539 name: Ubuntu 16.04 Xenial Xerus
540 interface_ip: 89.40.216.229
541 key_name: null
542 launched_at: '2017-05-08T18:48:39.000000'
543 location:
544 cloud: my-citycloud
545 project:
546 domain_id: d0919bd5e8d74e49adf0e145807ffc38
547 domain_name: null
548 id: 65222a4d09ea4c68934fa1028c77f394
549 name: null
550 region_name: Buf1
551 zone: nova
552 metadata: {}
553 name: my-server
554 networks:
555 private:
556 - 10.4.0.22
557 - 89.40.216.229
558 power_state: 1
559 private_v4: 10.4.0.22
560 progress: 0
561 properties: {}
562 public_v4: 89.40.216.229
563 public_v6: ''
564 security_groups:
565 - description: Default security group
566 id: 9fb5ba44-5c46-4357-8e60-8b55526cab54
567 location:
568 cloud: my-citycloud
569 project:
570 domain_id: d0919bd5e8d74e49adf0e145807ffc38
571 domain_name: null
572 id: 65222a4d09ea4c68934fa1028c77f394
573 name: null
574 region_name: Buf1
575 zone: null
576 name: default
577 properties: {}
578 security_group_rules:
579 - direction: ingress
580 ethertype: IPv4
581 id: 67cbd716-ace1-4822-93e3-1a14a2763efa
582 location:
583 cloud: my-citycloud
584 project:
585 domain_id: d0919bd5e8d74e49adf0e145807ffc38
586 domain_name: null
587 id: 65222a4d09ea4c68934fa1028c77f394
588 name: null
589 region_name: Buf1
590 zone: null
591 port_range_max: null
592 port_range_min: null
593 properties:
594 group:
595 name: default
596 tenant_id: 65222a4d09ea4c68934fa1028c77f394
597 protocol: null
598 remote_group_id: null
599 remote_ip_prefix: null
600 security_group_id: 9fb5ba44-5c46-4357-8e60-8b55526cab54
601 - direction: ingress
602 ethertype: IPv4
603 id: f5e80c4c-fe7a-4bfc-a8c0-0105b2c272d5
604 location:
605 cloud: my-citycloud
606 project:
607 domain_id: d0919bd5e8d74e49adf0e145807ffc38
608 domain_name: null
609 id: 65222a4d09ea4c68934fa1028c77f394
610 name: null
611 region_name: Buf1
612 zone: null
613 port_range_max: null
614 port_range_min: null
615 properties:
616 group:
617 name: default
618 tenant_id: 65222a4d09ea4c68934fa1028c77f394
619 protocol: null
620 remote_group_id: null
621 remote_ip_prefix: null
622 security_group_id: 9fb5ba44-5c46-4357-8e60-8b55526cab54
623 status: ACTIVE
624 task_state: null
625 terminated_at: null
626 updated: '2017-05-08T18:48:39Z'
627 user_id: c17534835f8f42bf98fc367e0bf35e09
628 vm_state: active
629 volumes: []
630- accessIPv4: 173.231.180.251
631 accessIPv6: ''
632 addresses:
633 inap-17037-WAN1654:
634 - OS-EXT-IPS-MAC:mac_addr: fa:16:3e:6b:97:9c
635 OS-EXT-IPS:type: fixed
636 addr: 173.231.180.251
637 version: 4
638 adminPass: null
639 created: '2017-05-08T18:48:56Z'
640 disk_config: null
641 flavor:
642 id: A1.4
643 name: A1.4
644 has_config_drive: true
645 host_id: 6d0c22f3176c3bcbb78a418a93809ba6bfa16267a4c38bd614a892d9
646 id: ba864796-b56a-4154-b220-e1b96daf39c0
647 image:
648 id: a6fefc9b-c208-4cd0-acc3-2ab09a38054b
649 name: Ubuntu 16.04 LTS (Xenial Xerus)
650 interface_ip: 173.231.180.251
651 key_name: null
652 launched_at: null
653 location:
654 cloud: my-internap
655 project:
656 domain_id: null
657 domain_name: null
658 id: 760e6c137b3840d78472d313dfa3df45
659 name: inap-17037
660 region_name: ams01
661 zone: null
662 metadata: {}
663 name: my-server
664 networks:
665 inap-17037-WAN1654:
666 - 173.231.180.251
667 power_state: 1
668 private_v4: ''
669 progress: 0
670 properties: {}
671 public_v4: 173.231.180.251
672 public_v6: ''
673 security_groups:
674 - description: default
675 id: 69871901-68c6-486b-9a1b-6a9adb88ea23
676 location:
677 cloud: my-internap
678 project:
679 domain_id: null
680 domain_name: null
681 id: 760e6c137b3840d78472d313dfa3df45
682 name: inap-17037
683 region_name: ams01
684 zone: null
685 name: default
686 properties: {}
687 security_group_rules:
688 - direction: ingress
689 ethertype: IPv4
690 id: 24b2ce3a-bf29-44fb-849f-f958e3efb736
691 location:
692 cloud: my-internap
693 project:
694 domain_id: null
695 domain_name: null
696 id: 760e6c137b3840d78472d313dfa3df45
697 name: inap-17037
698 region_name: ams01
699 zone: null
700 port_range_max: 65535
701 port_range_min: 1
702 properties:
703 group: {}
704 protocol: tcp
705 remote_group_id: null
706 remote_ip_prefix: 0.0.0.0/0
707 security_group_id: 69871901-68c6-486b-9a1b-6a9adb88ea23
708 - direction: ingress
709 ethertype: IPv4
710 id: 374aa520-c101-4de3-be88-f0025396bdb7
711 location:
712 cloud: my-internap
713 project:
714 domain_id: null
715 domain_name: null
716 id: 760e6c137b3840d78472d313dfa3df45
717 name: inap-17037
718 region_name: ams01
719 zone: null
720 port_range_max: null
721 port_range_min: null
722 properties:
723 group:
724 name: default
725 tenant_id: 760e6c137b3840d78472d313dfa3df45
726 protocol: null
727 remote_group_id: null
728 remote_ip_prefix: null
729 security_group_id: 69871901-68c6-486b-9a1b-6a9adb88ea23
730 - direction: ingress
731 ethertype: IPv4
732 id: 376b67c2-284b-4a81-a989-e7b8f6d44a07
733 location:
734 cloud: my-internap
735 project:
736 domain_id: null
737 domain_name: null
738 id: 760e6c137b3840d78472d313dfa3df45
739 name: inap-17037
740 region_name: ams01
741 zone: null
742 port_range_max: 65535
743 port_range_min: 1
744 properties:
745 group: {}
746 protocol: udp
747 remote_group_id: null
748 remote_ip_prefix: 0.0.0.0/0
749 security_group_id: 69871901-68c6-486b-9a1b-6a9adb88ea23
750 - direction: ingress
751 ethertype: IPv4
752 id: 481f9402-753d-4286-8079-be45a414023c
753 location:
754 cloud: my-internap
755 project:
756 domain_id: null
757 domain_name: null
758 id: 760e6c137b3840d78472d313dfa3df45
759 name: inap-17037
760 region_name: ams01
761 zone: null
762 port_range_max: null
763 port_range_min: null
764 properties:
765 group: {}
766 protocol: icmp
767 remote_group_id: null
768 remote_ip_prefix: 0.0.0.0/0
769 security_group_id: 69871901-68c6-486b-9a1b-6a9adb88ea23
770 - direction: ingress
771 ethertype: IPv4
772 id: 832aaf3b-b0fb-4103-b2fa-def955077667
773 location:
774 cloud: my-internap
775 project:
776 domain_id: null
777 domain_name: null
778 id: 760e6c137b3840d78472d313dfa3df45
779 name: inap-17037
780 region_name: ams01
781 zone: null
782 port_range_max: null
783 port_range_min: null
784 properties:
785 group:
786 name: default
787 tenant_id: 760e6c137b3840d78472d313dfa3df45
788 protocol: null
789 remote_group_id: null
790 remote_ip_prefix: null
791 security_group_id: 69871901-68c6-486b-9a1b-6a9adb88ea23
792 status: ACTIVE
793 task_state: null
794 terminated_at: null
795 updated: '2017-05-08T18:49:05Z'
796 user_id: c18bd37c27d14b1ba4c424e6d42f2ccd
797 vm_state: active
798 volumes: []
799 </code></pre>
800 </section>
801
802 <section class="slide level2">
803 <h1>Cloud-Region</h1>
804 <p>Each OpenStackCloud object represents one region of one cloud</p>
805 </section>
806
807 <section class="slide level2">
808 <h1>Simplest Cloud Construction</h1>
809 <ul>
810 <li>Works if you only have one cloud</li>
811 </ul>
812
813 <pre><code>
814import shade
815cloud = shade.openstack_cloud()
816 </code></pre>
817 </section>
818
819 <section class="slide level2">
820 <h1>Simplest Cloud Construction - More than one</h1>
821 <pre><code>
822clients:
823 default:
824 cloud: vexxhost
825 </code></pre>
826
827 <pre><code>
828import shade
829cloud = shade.openstack_cloud()
830 </code></pre>
831 </section>
832
833 <section class="slide level2">
834 <h1>Simple Cloud Construction</h1>
835 <pre><code>
836import shade
837cloud = shade.openstack_cloud(cloud='ustack', region_name='bj1')
838 </code></pre>
839 </section>
840
841 <section class="slide level2">
842 <h1>Complex Cloud Construction</h1>
843 <pre><code>
844import os_client_config
845import shade
846
847config = os_client_config.OpenStackConfig()
848cloud_config = config.get_one_cloud(
849 cloud='ustack', region_name='bj1',
850 argparse=my_args, **other_arguments)
851cloud = shade.OpenStackCloud(cloud_config=cloud_config)
852 </code></pre>
853 </section>
854
855 <section class="slide level2">
856 <h1>logging</h1>
857 <ul>
858 <li>Python logging</li>
859 <li>shade.simple_logging() helper function</li>
860 <li>Turns off annoying warnings</li>
861 <li>debug=True - turn on debug logging and request_id logging</li>
862 <li>http_debug=True - debug=True + http request tracing</li>
863 </ul>
864 </section>
865
866 <section class="slide level2">
867 <h1>A note on Exceptions</h1>
868 <ul>
869 <li>All (remaining) python*client exceptions are hidden and re-raised</li>
870 <li>Hiding exceptions is evil and I'm a bad person</li>
871 <li>Exceptions are part of the interface</li>
872 <li>Can't hide vendor choice if shade user catches underlying exception</li>
873 <li>See also: Restification later</li>
874 </section>
875
876 <section class="slide level2">
877 <h1>Exceptions</h1>
878 <ul>
879 <li>All Exceptions are subclasses of OpenStackCloudException</li>
880 <li>Direct REST calls throw OpenStackCloudHTTPError</li>
881 <li>OpenStackCloudHTTPError subclasses OpenStackCloudException
882 and requests.exceptions.HTTPError</li>
883 <li>OpenStackCloudURINotFound for 404</li>
884 <li>OpenStackCloudBadRequest for 400</li>
885 </ul>
886 </section>
887
888 <section class="slide level2">
889 <h1>Putting it all together</h1>
890 <pre><code>
891import shade
892
893shade.simple_logging(debug=True)
894cloud = shade.openstack_cloud(cloud='vexxhost')
895image = cloud.create_image(
896 'ubuntu-trusty', filename='ubuntu-trusty.qcow2', wait=True)
897flavor = cloud.get_flavor_by_ram(512)
898cloud.create_server(
899 'my-server', image=image['id'], flavor=flavor['id'],
900 wait=True, auto_ip=True)
901 </code></pre>
902 </section>
903
904 <section class="slide level2">
905 <h1>Problem: Image API version</h1>
906 <ul>
907 <li class='fragment'>
908 v1 PUT: Catalyst, Datacentred, Internap
909 </li>
910 <li class='fragment'>
911 v2 PUT: Auro, City Cloud, Dreamhost, Elastx, Enter Cloud Suite, OVH, RunAbove, Vexxhost, Ultimum, UnitedStack
912 </li>
913 <li class='fragment'>
914 v2 Tasks: Switch Engines, Rackspace
915 </li>
916 </ul>
917 </section>
918
919 <section class="slide level2">
920 <h1>Image Upload Code</h1>
921 <pre><code>
922cloud = shade.openstack_cloud(cloud='vexxhost', region_name='ca-ymq-1')
923cloud.create_image('my-image', filename='my-image.qcow2', wait=True)
924 </code></pre>
925 </section>
926
927 <section class="slide level2">
928 <h1>Image Upload PUT v2 Log</h1>
929 <pre><code>
930Calculating hashes for my-image.qcow2
931Image file my-image.vhd md5:b28fa44077b94ba635842a73eecc1d8c sha256:9a3da71e37ef1579657c4a77ff2caf936dd9be8361d1a02595cc116f0ffd328d
932Manager my-vexxhost:ca-ymq-1 running task image.GET.images
933Manager my-vexxhost:ca-ymq-1 ran task image.GET.images in 1.38961982727s
934GET call to image for https://image-ca-ymq-1.vexxhost.net/v2/images used request id req-2bbc8c10-6c4c-4aa3-8bb7-6ba425cb0ea7
935Manager my-vexxhost:ca-ymq-1 running task image.GET.images
936Manager my-vexxhost:ca-ymq-1 ran task image.GET.images in 0.245140790939s
937GET call to image for https://image-ca-ymq-1.vexxhost.net/v2/images?marker=5ebb74ba-c9c5-4006-8c77-ceebf9833428 used request id req-da204dc3-eb07-460d-b9f5-74b6ea5fe944
938Manager my-vexxhost:ca-ymq-1 running task image.POST.images
939Manager my-vexxhost:ca-ymq-1 ran task image.POST.images in 0.114197969437s
940POST call to image for https://image-ca-ymq-1.vexxhost.net/v2/images used request id req-02a5fd04-ca9a-4a71-bfe1-4ff80e49cdea returning object 28d3e4b2-4607-4778-84bd-e84ef217d21c
941Manager my-vexxhost:ca-ymq-1 running task image.PUT.images.file
942Manager my-vexxhost:ca-ymq-1 ran task image.PUT.images.file in 2.10132312775s
943PUT call to image for https://image-ca-ymq-1.vexxhost.net/v2/images/28d3e4b2-4607-4778-84bd-e84ef217d21c/file used request id req-71e3ed5e-77dc-4062-9ba8-13d495713e13
944 </code></pre>
945 </section>
946
947 <section class="slide level2">
948 <h1>Image Tasks</h1>
949 <pre><code>
950cloud = shade.openstack_cloud(cloud='rax', region_name='DFW')
951cloud.create_image('my-image', filename='my-image.<span style='color: red'>vhd</span>', wait=True)
952 </code></pre>
953 </section>
954
955
956 <section class="slide level2">
957 <h1>Image Upload Tasks Log</h1>
958 <pre><code>
959Calculating hashes for my-image.vhd
960Image file my-image.vhd md5:b28fa44077b94ba635842a73eecc1d8c sha256:9a3da71e37ef1579657c4a77ff2caf936dd9be8361d1a02595cc116f0ffd328d
961Manager rax:DFW running task image.GET.discovery
962Manager rax:DFW ran task image.GET.discovery in 1.65571808815s
963Glance version discovery failed, assuming endpoint in the catalog is already versioned. (404) Client Error: Not Found for https://dfw.images.api.rackspacecloud.com/v2/
964Manager rax:DFW running task image.GET.images
965Manager rax:DFW ran task image.GET.images in 0.637840032578s
966GET call to image for https://dfw.images.api.rackspacecloud.com/v2/images used request id req-b716bd86-121f-4cdc-b386-2f50546e8d88
967Manager rax:DFW running task image.GET.images
968Manager rax:DFW ran task image.GET.images in 0.491132974625s
969GET call to image for https://dfw.images.api.rackspacecloud.com/v2/v2/images?marker=e389ab51-1327-488a-867c-4d7c14e6c916 used request id req-90746cbf-610a-4c3d-aab8-f81e673b315a
970Manager rax:DFW running task image.GET.images
971Manager rax:DFW ran task image.GET.images in 0.371850967407s
972GET call to image for https://dfw.images.api.rackspacecloud.com/v2/v2/images?marker=3eba4fbb-51da-4233-b699-8a4030561add used request id req-00937f32-f573-4ac3-86d5-0aeada7432d1
973Manager rax:DFW running task object-store.GET.info
974Manager rax:DFW ran task object-store.GET.info in 0.335763931274s
975Manager rax:DFW running task object-store.HEAD.images
976Manager rax:DFW ran task object-store.HEAD.images in 0.393274784088s
977Manager rax:DFW running task object-store.HEAD.images
978Manager rax:DFW ran task object-store.HEAD.images in 3.68135595322s
979swift stale check, no object: images/my-image
980swift uploading my-image.vhd to images/my-image
981Manager rax:DFW running task object-store.PUT.images
982Manager rax:DFW ran task object-store.PUT.images in 3.57636904716s
983Manager rax:DFW running task image.GET.images
984Manager rax:DFW ran task image.GET.images in 0.616628885269s
985GET call to image for https://dfw.images.api.rackspacecloud.com/v2/images used request id req-ee7091ae-88a2-4cdb-ac8e-35159ef4cda0
986Manager rax:DFW running task image.GET.images
987Manager rax:DFW ran task image.GET.images in 0.527029037476s
988GET call to image for https://dfw.images.api.rackspacecloud.com/v2/v2/images?marker=e389ab51-1327-488a-867c-4d7c14e6c916 used request id req-d2caefd2-d69f-46d2-86c1-a062f039ce74
989Manager rax:DFW running task image.GET.images
990Manager rax:DFW ran task image.GET.images in 0.317733049393s
991GET call to image for https://dfw.images.api.rackspacecloud.com/v2/v2/images?marker=3eba4fbb-51da-4233-b699-8a4030561add used request id req-56411197-65ce-4ac9-847d-0a7e7041766d
992Manager rax:DFW running task image.POST.tasks
993Manager rax:DFW ran task image.POST.tasks in 0.796432971954s
994POST call to image for https://dfw.images.api.rackspacecloud.com/v2/tasks used request id req-edc7842f-5fca-4a08-96b3-55a67c840d16 returning object 45df1ffa-3837-4fbc-a8fb-f213f845b18c
995 </code></pre>
996 </section>
997
998 <section class="slide level2">
999 <h1>Problem: Version Discovery</h1>
1000 <ul>
1001 <li>OpenStack Services have version discovery documents</li>
1002 <li>Deployers register versioned endpoints in catalog</li>
1003 <li>Some services (cinder, mistral) have versioned service types (volumev2, workflowv2)</li>
1004 <li>Users can't (sanely) do version discovery</li>
1005 <li>shade fixes this for glance and cinder today</li>
1006 </ul>
1007 </section>
1008
1009 <section class="slide level2">
1010 <h1>Version Discovery Solutions</h1>
1011 <ul>
1012 <li>shade will fix for everything by end of the month</li>
1013 <li>OpenStack Service Types Authority</li>
1014 <li>API-WG specs on Full Service Type and Version Discovery Process</li>
1015 <li>Work with other languages to implement API-WG specs</li>
1016 <li>User requests:<ul>
1017 <li>image version 2</li>
1018 <li>workflow LATEST</li>
1019 <li>compute</li>
1020 <li>volume versions 2 or 3</li>
1021 </ul></li>
1022 <li>Later today we'll be discussing moving this forward (Room 102 at 4:40)</li>
1023 </ul>
1024 </section>
1025
1026 <section class="slide level2">
1027 <h1>Problem: Networking choices</h1>
1028 <ul>
1029 <li class='fragment'>Cloud has externally routable IP from neutron (OVH)</li>
1030 <li class='fragment'>Cloud has externally routable IP neutron AND supports optional private tenant networks (vexxhost)</li>
1031 <li class='fragment'>Cloud has private tenant network provided by neutron and requires floating IP (citycloud)</li>
1032 <li class='fragment'>Cloud has private tenant network provided by nova-network and requires floating-ip for external routing (auro)</li>
1033 <li class='fragment'>Cloud has externally routable IP from neutron but no neutron APIs (Rackspace)</li>
1034 </ul>
1035 </section>
1036
1037 <section class="slide level2">
1038 <h1>The Floating IP Case</h1>
1039 <pre><code>
1040import shade
1041
1042shade.simple_logging(debug=True)
1043cloud = shade.openstack_cloud(cloud='my-citycloud')
1044cloud.create_server(
1045 'my-server',
1046 image='Ubuntu 16.04 Xenial Xerus',
1047 flavor=dict(id='0dab10b5-42a2-438e-be7b-505741a7ffcc'),
1048 wait=True, auto_ip=True)
1049 </code></pre>
1050 </section>
1051
1052 <section class="slide level2">
1053 <h1>The Floating IP Case Log</h1>
1054 <pre><code>
1055Manager my-citycloud:Buf1 running task network.GET.networks
1056Manager my-citycloud:Buf1 ran task network.GET.networks in 1.29657912254s
1057GET call to network for https://buf1.citycloud.com:9696/v2.0/networks.json used request id req-a65496e6-984f-4323-98d5-3adb339875c6
1058Manager my-citycloud:Buf1 running task network.GET.subnets
1059Manager my-citycloud:Buf1 ran task network.GET.subnets in 0.713509082794s
1060GET call to network for https://buf1.citycloud.com:9696/v2.0/subnets.json used request id req-66ccbfce-ceb6-4e0a-a969-0eaf62605d92
1061Manager my-citycloud:Buf1 running task image.GET.discovery
1062Manager my-citycloud:Buf1 ran task image.GET.discovery in 0.474808931351s
1063Manager my-citycloud:Buf1 running task image.GET.images
1064Manager my-citycloud:Buf1 ran task image.GET.images in 0.714179039001s
1065GET call to image for https://buf1.citycloud.com:9292/v2/images used request id req-9a7756c3-2ee4-416d-a6ad-804027330e5f
1066Manager my-citycloud:Buf1 running task ServerCreate
1067Manager my-citycloud:Buf1 ran task ServerCreate in 3.38534998894s
1068Manager my-citycloud:Buf1 running task ServerList
1069Manager my-citycloud:Buf1 ran task ServerList in 0.959898948669s
1070Waiting 2.0 seconds
1071Manager my-citycloud:Buf1 running task ServerList
1072Manager my-citycloud:Buf1 ran task ServerList in 1.21962594986s
1073Manager my-citycloud:Buf1 running task network.GET.ports
1074Manager my-citycloud:Buf1 ran task network.GET.ports in 0.287118911743s
1075GET call to network for https://buf1.citycloud.com:9696/v2.0/ports.json?device_id=1e2211f2-993f-4ba0-aa54-01743cc49181 used request id req-fd5acf95-21bd-40bb-ad08-e15ac7107874
1076Manager my-citycloud:Buf1 running task network.GET.floatingips
1077Manager my-citycloud:Buf1 ran task network.GET.floatingips in 0.228282928467s
1078GET call to network for https://buf1.citycloud.com:9696/v2.0/floatingips.json?port_id=af554254-ac9f-4440-b93a-e4ec64783758 used request id req-ed52ca15-9924-488e-a3c0-3a805348eca3
1079Manager my-citycloud:Buf1 running task network.GET.ports
1080Manager my-citycloud:Buf1 ran task network.GET.ports in 0.200226068497s
1081GET call to network for https://buf1.citycloud.com:9696/v2.0/ports.json?device_id=1e2211f2-993f-4ba0-aa54-01743cc49181 used request id req-f808b9e0-d136-4bd7-a51b-b08d3c6eddb3
1082Manager my-citycloud:Buf1 running task network.GET.floatingips
1083Manager my-citycloud:Buf1 ran task network.GET.floatingips in 0.140635967255s
1084GET call to network for https://buf1.citycloud.com:9696/v2.0/floatingips.json used request id req-880919b7-4af3-42a3-8e07-4b80a6ae5bac
1085Manager my-citycloud:Buf1 running task network.GET.ports
1086Manager my-citycloud:Buf1 ran task network.GET.ports in 0.317744970322s
1087GET call to network for https://buf1.citycloud.com:9696/v2.0/ports.json?device_id=1e2211f2-993f-4ba0-aa54-01743cc49181 used request id req-af4bb447-e157-44c1-a727-2cecfb595c0e
1088Manager my-citycloud:Buf1 running task network.PUT.floatingips
1089Manager my-citycloud:Buf1 ran task network.PUT.floatingips in 0.425180912018s
1090PUT call to network for https://buf1.citycloud.com:9696/v2.0/floatingips/e69179dc-a904-4c9a-a4c9-891e2ecb984c.json used request id req-2241d8b6-bf50-41c1-9129-c8cfca2c73bc returning object e69179dc-a904-4c9a-a4c9-891e2ecb984c
1091Manager my-citycloud:Buf1 running task ServerList
1092Manager my-citycloud:Buf1 ran task ServerList in 1.19975018501s
1093Manager my-citycloud:Buf1 running task network.GET.ports
1094Manager my-citycloud:Buf1 ran task network.GET.ports in 0.184152126312s
1095GET call to network for https://buf1.citycloud.com:9696/v2.0/ports.json?device_id=1e2211f2-993f-4ba0-aa54-01743cc49181 used request id req-9f49b751-d741-45ff-a5fc-ca750826df63
1096Manager my-citycloud:Buf1 running task network.GET.floatingips
1097Manager my-citycloud:Buf1 ran task network.GET.floatingips in 0.21661400795s
1098GET call to network for https://buf1.citycloud.com:9696/v2.0/floatingips.json?port_id=af554254-ac9f-4440-b93a-e4ec64783758 used request id req-81e231c6-a4d5-466a-bffd-0af6f4dc4be8
1099 </code></pre>
1100 </section>
1101
1102 <section class="slide level2">
1103 <h1>The Direct Attached IP Case</h1>
1104 <pre><code>
1105import shade
1106
1107shade.simple_logging(debug=True)
1108cloud = shade.openstack_cloud(cloud='internap', region_name='ams01')
1109cloud.create_server(
1110 'my-server',
1111 image='Ubuntu 16.04 LTS (Xenial Xerus)',
1112 flavor=dict(id='A1.4'),
1113 wait=True, auto_ip=True)
1114 </code></pre>
1115 </section>
1116
1117 <section class="slide level2">
1118 <h1>Direct Attached IP Log</h1>
1119 <pre><code>
1120Manager my-internap:ams01 running task network.GET.networks
1121Manager my-internap:ams01 ran task network.GET.networks in 0.783267021179s
1122GET call to network for https://network.api.ams01.cloud.iweb.com/v2.0/networks.json used request id req-807686be-238a-46e1-b0e5-5dfa31949316
1123Manager my-internap:ams01 running task network.GET.subnets
1124Manager my-internap:ams01 ran task network.GET.subnets in 0.155231952667s
1125GET call to network for https://network.api.ams01.cloud.iweb.com/v2.0/subnets.json used request id req-9e71772d-70dc-4dc9-8da4-734639a10dd4
1126Manager my-internap:ams01 running task image.GET.discovery
1127Manager my-internap:ams01 ran task image.GET.discovery in 0.589816093445s
1128Manager my-internap:ams01 running task image.GET.images
1129Manager my-internap:ams01 ran task image.GET.images in 0.568889856339s
1130GET call to image for https://image.api.ams01.cloud.iweb.com/v2/images used request id req-b0e25143-a581-4c6a-baab-2376626e529a
1131Manager my-internap:ams01 running task ServerCreate
1132Manager my-internap:ams01 ran task ServerCreate in 1.55480098724s
1133Manager my-internap:ams01 running task ServerList
1134Manager my-internap:ams01 ran task ServerList in 0.316590070724s
1135Waiting 2.0 seconds
1136Manager my-internap:ams01 running task ServerList
1137Manager my-internap:ams01 ran task ServerList in 0.317390918732s
1138 </code></pre>
1139 </section>
1140
1141 <section class="slide level2">
1142 <h1>Problem: Finding an Image</h1>
1143 <ul>
1144 <li>Ubuntu 16.04.1 LTS [2017-03-03]</li>
1145 <li>Ubuntu 16.04 Xenial Xerus</li>
1146 <li>Ubuntu 16.04 LTS (Xenial Xerus)</li>
1147 <li>Easy for a human - hard for a computer</li>
1148 </ul>
1149 </section>
1150
1151 <section class="slide level2">
1152 <h1>Solution: Sorry - no good solution yet</h1>
1153 <ul>
1154 <li>Always Upload your Own Images</li>
1155 <li>Discussed in Glance Deployer Session Yesterday</li>
1156 <li>Next step - collecting full set of User Stories</li>
1157 <li>Hopefully we'll define common metadata</li>
1158 <li>Hopefully we'll define "correct" image lifecycle</li>
1159 </ul>
1160 </section>
1161
1162 <section class="slide level2">
1163 <h1>Problem: Crazy Dependencies</h1>
1164 <ul>
1165 <li>shade started life depending on python-*client</li>
1166 <li>Giant dependency chain</li>
1167 <li>Users should ALWAYS use the latest shade</li>
1168 <li>Conflicting depends makes this hard</li>
1169 </ul>
1170 </section>
1171
1172 <section class="slide level2">
1173 <h1>Solution: 'RESTification'</h1>
1174 <ul>
1175 <li>Have been hard at work moving to REST</li>
1176 <li>Done with heat, magnum, swift, glance, trove</li>
1177 <li>cinder and neutron done but unreleased</li>
1178 <li>nova, ironic, designate left</li>
1179 <li>Thanks Rosario and Slaweq!!!</li>
1180 </ul>
1181 <h2>BTW - The code is easier with REST</h2>
1182 </section>
1183
1184 <section class="slide level2">
1185 <h1>Advanced Things</h1>
1186 <ul>
1187 <li>shade should DTRT 95% of the time</li>
1188 <li>Sometimes, you need to be extra advanced</li>
1189 <li>We want to suppor that too</li>
1190 </ul>
1191 </section>
1192
1193 <section class="slide level2">
1194 <h1>Task Manager</h1>
1195 <pre>
1196Manager zetta ran task ServerGet in 0.726951122284s
1197 </pre>
1198 <ul>
1199 <li>Every API operation is a Task() that is run by a TaskManager()</li>
1200 <li>Default shade TaskManager immediately executes the call</li>
1201 <li>nodepool passes in a threaded TaskManager to manage API throttling</li>
1202 <pre><code>
1203cloud = shade.OpenStackCloud(
1204 cloud_config=cloud_config,
1205 manager=MyTaskManager())
1206 </code></pre>
1207 </ul>
1208 </section>
1209
1210 <section class="slide level2">
1211 <h1>list vs. get</h1>
1212 <ul>
1213 <li>get_server is a wrapper around list_servers</li>
1214 <li>*sometimes* we can push filter conditions to the cloud</li>
1215 <li>Actually done in SUPPORT of scaling</li>
1216 </ul>
1217 </section>
1218
1219 <section class="slide level2">
1220 <h1>Caching and Rate Limiting</h1>
1221 <ul>
1222 <li>API Operations can be expensive</li>
1223 <li>Support grew from nodepool's needs</li>
1224 <li>shade uses dogpile.cache - default to NullCache</li>
1225 </li>
1226 </section>
1227
1228 <section class="slide level2">
1229 <h1>Cache Config</h1>
1230 <h2>clouds.yaml</h2>
1231 <pre><code>
1232cache:
1233 class: dogpile.cache.dbm
1234 expiration_time: 3600
1235 arguments:
1236 filename: /home/mordred/.cache/openstack/shade.dbm
1237 expiration:
1238 server: 5
1239 </code></pre>
1240 </section>
1241
1242 <section class="slide level2">
1243 <h1>Caching Special Case</h1>
1244 <ul>
1245 <li>servers, ports and floating-ips have custome caching</li>
1246 <li>Specifically done for nodepool</li>
1247 <li>After RESTification, will migrate them to dogpile</li>
1248 <li>Two levels - caching and rate-limiting</li>
1249 </ul>
1250 </section>
1251
1252 <section class="slide level2">
1253 <h1>What if you're not a Python developer?</h1>
1254 <p class='fragment'>Yes, we love you too</p>
1255 </section>
1256
1257 <section class="slide level2">
1258 <h1>ansible</h1>
1259 <pre><code>
1260- os_image:
1261 cloud: vexxhost
1262 name: centos-7
1263 file: centos-7.qcow2
1264 wait: true
1265- os_server:
1266 cloud: vexxhost
1267 name: my-server
1268 flavor_ram: 1024
1269 image: centos-7
1270 wait: true
1271 </code></pre>
1272 </section>
1273
1274 <section class="slide level2">
1275 <h1>ansible</h1>
1276 <h2>Add my keypair to 30 Regions in 13 clouds<h2>
1277 <pre><code>
1278- os_keypair:
1279 cloud: "{{ item.cloud }}"
1280 region_name: "{{ item.region_name }}"
1281 name: mordred
1282 public_key_file: ~/.ssh/id_rsa.pub
1283 with-items:
1284 - {cloud: vexxhost, region_name: ca-ymq-1}
1285 - {cloud: ovh, region_name: SBG1}
1286 - {cloud: ovh, region_name: BHS1}
1287 - {cloud: ovh, region_name: GRA1}
1288 - {cloud: citycloud, region_name: Buf1}
1289 - {cloud: citycloud, region_name: La1}
1290 - {cloud: citycloud, region_name: Fra1}
1291 - {cloud: citycloud, region_name: Lon1}
1292 - {cloud: citycloud, region_name: Sto2}
1293 - {cloud: citycloud, region_name: Kna1}
1294 - {cloud: internap, region_name: ams01}
1295 - {cloud: internap, region_name: da01}
1296 - {cloud: internap, region_name: nyj01}
1297 - {cloud: internap, region_name: sin01}
1298 - {cloud: internap, region_name: sjc01}
1299 - {cloud: infracloud, region_name: vanilla}
1300 - {cloud: infracloud, region_name: chocolate}
1301 - {cloud: fuga, region_name: cystack}
1302 - {cloud: datacentred, region_name: sal01}
1303 - {cloud: clouda, region_name: regionOne}
1304 - {cloud: auro, region_name: van1}
1305 - {cloud: ustack, region_name: bj1}
1306 - {cloud: zetta, region_name: no-osl1}
1307 - {cloud: kiss, region_name: region1}
1308 - {cloud: rax, region_name: IAD}
1309 - {cloud: rax, region_name: ORD}
1310 - {cloud: rax, region_name: SYD}
1311 - {cloud: rax, region_name: LON}
1312 - {cloud: rax, region_name: DFW}
1313 - {cloud: rax, region_name: HKG}
1314 </code></pre>
1315 </section>
1316
1317 <section class="slide level2">
1318 <h1>The Future: Pushing Back Into OpenStack APIs</h1>
1319 <ul>
1320 <li>Discussions later today</li>
1321 <li>Service Discovery</li>
1322 <li>Version Discovery</li>
1323 <li>Vendors Publishing Vendor Profile Documents</li>
1324 <li>Capabilities Discovery</li>
1325 <li>Connecting those to Interop Working Group</li>
1326 </ul>
1327 </section>
1328
1329 <section class="slide level2">
1330 <h1>Thank You!</h1>
1331 </section>
1332
1333 </body>
1334</html>
1335