From 22ab0f1a87a61a84dc78721ecbdde43ec2b1c556 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 1 Aug 2015 02:53:18 +1000 Subject: Add talks --- src/talks/os-client-config/index.html | 242 ++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 src/talks/os-client-config/index.html (limited to 'src/talks/os-client-config') diff --git a/src/talks/os-client-config/index.html b/src/talks/os-client-config/index.html new file mode 100644 index 0000000..04ef2fd --- /dev/null +++ b/src/talks/os-client-config/index.html @@ -0,0 +1,242 @@ + + + + + + + os-client-config: Making OpenStack usability easier, starting with client configuration + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+

+ os-client-config +

+

Monty Taylor

+

http://inaugust.com/talks/os-client-config.html

+

twitter: @e_monty

+
+ +
+

I'm awash in cloud accounts

+
    +
  • Infra has 5
      +
    • control plane and nodepool in 3 Rackspace regions
    • +
    • control plane and nodepool in HP
    • +
  • +
  • two personal on HP and one on Rackspace
  • +
  • two internal HP accounts
  • +
  • That's 12 OpenStack cloud-regions
  • +
+
+ +
+ How do I connect to them? +
+ +
+ List Servers +
+openstack \
+        --auth-url=https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0 \
+        --username=mordred@inaugust.com \
+        --password=XXXXXX \
+        --project-name=mordred@inaugust.com \
+        --region-name=region-b.geo-1 \
+    server list
+          
+
+ +
+ Well that's silly +
+ +
+ Consistent Environment Variables +
+export OS_AUTH_URL=https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0
+export OS_USERNAME=mordred@inaugust.com
+export OS_PASSWORD=XXXXXXXXXXXXX
+export OS_TENANT_NAME=mordred@inaugust.com
+export OS_REGION_NAME=region-b.geo-1
+          
+
+ +
+ 12 shell script snippet files +
+ +
+ ENV processing is in command line tools, not client libraries +
+ +
+ ENV processing is just copied everywhere +
+$ egrep -r 'add_(option|argument).*os-username' openstack/python*client | wc -l
+13
+          
+
+ +
+

Pre-existing knowledge

+
    +
  • auth-url
  • +
  • glance API version
  • +
  • override settings
      +
    • URLs (swift URL in rackspace keystone catalog is wrong)
    • +
    • service types (DNS in HP is hpext:dns)
    • +
  • +
+
+ +
+

I wrote a library (yay!)

+

os-client-config

+
+ +
+

Processes, in this order

+
    +
  • config file: clouds.yaml
  • +
  • env vars
  • +
  • command line args
  • +
+
+ +
+

Provides vendor defaults

+
+CLOUD_DEFAULTS = dict(
+    hp=dict(
+        auth_url='https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0',
+        dns_service_type='hpext:dns',
+    ),
+    rackspace=dict(
+        auth_url='https://identity.api.rackspacecloud.com/v2.0/',
+        database_service_type='rax:database',
+        image_api_version='2',
+    )
+)
+            
+

Patches welcome for any cloud

+
+ +
+

clouds.yaml

+
+clouds:
+  mordred:
+    cloud: hp
+    username: mordred@inaugust.com
+    password: XXXXXXXXXX
+    project_name: mordred@inaugust.com
+    region_name: region-b.geo-1
+  monty:
+    cloud: https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0
+    username: monty.taylor@hp.com
+    password: XXXXXXXXX
+    project_name: monty.taylor@hp.com-default-tenant
+    region_name: region-b.geo-1
+    dns_service_type: hpext:dns
+  rax:
+    cloud: rackspace
+    username: openstackci
+    password: XXXXXXX
+    project_id: 610275
+    region_name: DFW,ORD,IAD
+            
+
+ +
+

Allows for named clouds

+
+openstack --cloud=mordred server list
+            
+
+export OS_CLOUD=mordred
+openstack server list
+            
+
+ + +
+

Where is it in use?

+
    +
  • Shade library
  • +
  • python-openstackclient (patch in flight)
  • +
  • ansible (patch in flight)
  • +
+
+ +
+

Where is it?

+

http://git.openstack.org/stackforge/os-client-config

+

http://pypi.python.org/pypi/os-client-config

+
+ +
+

Where is it?

+

http://git.openstack.org/stackforge/os-client-config

+

http://pypi.python.org/pypi/os-client-config

+
+ +
+ + +
+ + + + + + + + -- cgit v1.2.3