Distinguished Technologist
HP Cloud
                      Technical Committee
Foundation Board of Directors
Developer Infrastructure Core Team
              As an application developer,
                  I want to deploy and run an application on the internet
                  so that my customers all over the world can consume it.
As an application developer,
                  I want to deploy the application across multiple clouds
                  so that my service survives issues in any one of them.
                  10-20k VMs per-day
3 (soon to be 6) clouds
Only using OpenStack APIs
Every commit is fully integration tested (twice) before landing
This is that "cloud scale out" part
It all runs across HP and Rackspace Public Clouds.

              
              
                  
              What next?
Make it easier
Get (make/fetch/find) a base image
Upload it to each cloud
Boot a VM on one or more of the clouds
Ensure it's on the Internet
OpenStack diskimage-builder
packer
Download pre-built image from Ubuntu/RedHat/SuSE
Good news! We made a plan for this at the summit
swift upload --object-name local-image-filename images image-name
glance task-create
   --type=import
   --input='{"import_from": "images/image-name",
             "image_properties" : {"name": "My Image Name"}}'
                  
                  
glance image-create --name=image-name --file=local-image-filename
                  
              
def get_server_external_ipv4(cloud, server):
    if cloud.has_service('network'):
        try:
            server_ports = cloud.search_ports(
                filters={'device_id': server.id})
            ext_nets = cloud.search_networks(filters={'router:external': True})
        except NeutronClientException as e:
            pass  # fall through
        else:
            for net in ext_nets:
                for port in server_ports:
                    if net['id'] == port['network_id']:
                        for ip in port['fixed_ips']:
                            if _utils.is_ipv4(ip['ip_address']):
                                return ip['ip_address']
    ext_ip = get_server_ip(server, key_name='public')
    if ext_ip is not None:
        return ext_ip
    for interfaces in server.addresses.values():
        for interface in interfaces:
            if _utils.is_ipv4(interface['addr']) and \
                    _utils.is_globally_routable_ipv4(interface['addr']):
                return interface['addr']
    return None
                  
              A library to handle config information for openstack clients
Tracks differences in vendors that can't be discovered
In use in python-openstackclient and ansible
~/.config/openstack/clouds.yaml
clouds:
  hp-mordred:
    profile: hp
    auth:
      username: mordred@inaugust.com
      password: XXXXXXXXXXXXX
      project_name: mordred@inaugust.com
    region_name: region-b.geo-1
  dreamhost:
    profile: dreamhost
    auth:
      username: montay6
      project_name: dhc2111978
      password: XXXXXXXXXXXXX
    region_name: RegionOne
                  
              A library to wrap business logic around client libraries
cloud.create_image('image-name', filename='image-filename.qcow2')
cloud.create_server('my-server', image='immage-name', auto_ip=True)
                  
                  In use in Infra Nodepool and ansible
Brand new modules, based on shade
Coming in 2.0 release
- os_keypair:
    cloud: hp-mordred
    name: mordred
    public_key_file: ~/.ssh/id_rsa.pub
- os_image:
    cloud: hp-mordred
    name: Monty Ubuntu
    file: ubuntu.vhd
- os_server:
    cloud: hp-mordred
    name: my-server
    flavor_ram: 1024
    image: Monty Ubuntu
                  
              multi-cloud support
- os_keypair:
    cloud: "{{ item }"
    name: mordred
    public_key_file: ~/.ssh/id_rsa.pub
    with-items:
    - vexxhost
    - rackspace
    - mordred-hp
    - ovh