Author: Richard Seroter

  • Comparing Clouds: API Capabilities

    API access is quickly becoming the most important aspect of any cloud platform. How easily can you automate activities using programmatic interfaces? What hooks do you have to connect on-premises apps to cloud environments? So far in this long-running blog series, I’ve taken a look at how to provision, scale, and manage the cloud environments of five leading cloud providers. In this post, I’ll explore the virtual-machine-based API offerings of the same providers. Specifically, I’m assessing:

    • Login mechanism. How do you access the API? Is it easy for developers to quickly authenticate and start calling operations?
    • Request and response shape. Does the API use SOAP or REST? Are payloads XML, JSON, or both? Does a result set provide links to follow to additional resources?
    • Breadth of services. How comprehensive is the API? Does it include most of the capabilities of the overall cloud platform?
    • SDKs, tools, and documentation. What developer SDKs are available, and is there ample documentation for developers to leverage?
    • Unique attributes. What stands out about the API? Does it have any special capabilities or characteristics that make it stand apart?

    As an aside, there’s no “standard cloud API.” Each vendor has unique things they offer, and there’s no base interface that everyone conforms to. While that makes it more challenge to port configurations from one provider to the next, it highlights the value of using configuration management tools (and to a lesser extent, SDKs) to provide abstraction over a cloud endpoint.

    Let’s get moving, in alphabetical order.

    DISCLAIMER: I’m the VP of Product for CenturyLink’s cloud platform. Obviously my perspective is colored by that. However, I’ve taught four well-received courses on AWS, use Microsoft Azure often as part of my Microsoft MVP status, and spend my day studying the cloud market and playing with cloud technology. While I’m not unbiased, I’m also realistic and can recognize strengths and weaknesses of many vendors in the space.

    Amazon Web Services

    Amazon EC2 is among the original cloud infrastructure providers, and has a mature API.

    Login mechanism

    For AWS, you don’t really “log in.” Every API request includes an HTTP header made up of the hashed request parameters signed with your private key. This signature is verified by AWS before executing the requested operation.

    A valid request to the API endpoint might look like this (notice the Authorization header):

    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    X-Amz-Date: 20150501T130210Z
    Host: ec2.amazonaws.com
    Authorization: AWS4-HMAC-SHA256 Credential=KEY/20150501/us-east-1/ec2/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=ced6826de92d2bdeed8f846f0bf508e8559e98e4b0194b84example54174deb456c
    
    [request payload]
    

    Request and response shape

    Amazon still supports a deprecated SOAP endpoint, but steers everyone to it’s HTTP services. To be clear, it’s not REST; while the API does use GET and POST, it typically throws a command and all the parameters into the URL. For instance, to retrieve a list of instances in your account, you’d issue a request to:

    https://ec2.amazonaws.com/?Action=DescribeInstances&AUTHPARAMS

    For cases where lots of parameters are required – for instance, to create a new EC2 instance – all the parameters are signed in the Authorization header and added to the URL.

    https://ec2.amazonaws.com/?Action=RunInstances
    &ImageId=ami-60a54009
    &MaxCount=3
    &MinCount=1
    &KeyName=my-key-pair
    &Placement.AvailabilityZone=us-east-1d
    &AUTHPARAMS
    

    Amazon APIs return XML. Developers get back a basic XML payload such as:

    <DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2014-10-01/">
      <requestId>fdcdcab1-ae5c-489e-9c33-4637c5dda355</requestId>
        <reservationSet>
          <item>
            <reservationId>;r-1a2b3c4d</reservationId>
            <ownerId>123456789012</ownerId>
            <groupSet>
              <item>
                <groupId>sg-1a2b3c4d</groupId>
                <groupName>my-security-group</groupName>
              </item>
            </groupSet>
            <instancesSet>
              <item>
                <instanceId>i-1a2b3c4d</instanceId>
                <imageId>ami-1a2b3c4d</imageId>
    

    Breadth of services

    Each AWS service exposes an impressive array of operations. EC2 is no exception with well over 100. The API spans server provisioning and configuration, as well as network and storage setup.

    2015.07.30api01

    I’m hard pressed to find anything in the EC2 management UI that isn’t available in the API set.

    SDKs, tools, and documentation

    AWS is known for its comprehensive documentation that stays up-to-date. The EC2 API documentation includes a list of operations, a basic walkthrough of creating API requests, parameter descriptions, and information about permissions.

    SDKs give developers a quicker way to get going with an API, and AWS provides SDKs for Java, .NET, Node.js. PHP, Python and Ruby. Developers can find these SDKs in package management systems like npm (Node.js) and NuGet (.NET).

    As you may expect, there are gobs of 3rd party tools that integrate with AWS. Whether it’s configuration management plugins for Chef or Ansible, or build automation tools like Terraform, you can expect to find AWS plugins.

    Unique attributes

    The AWS API is comprehensive with fine-grained operations. It also has a relatively unique security process (signature hashing) that may steer you towards the SDKs that shield you from the trickiness of correctly signing your request. Also, because EC2 is one of the first AWS services ever released, it’s using an older XML scheme. Newer services like DynamoDB or Kinesis offer a JSON syntax.

    Amazon offers push-based notification through CloudWatch + SNS, so developers can get an HTTP push message when things like Autoscale events fire, or a performance alarm gets triggered.

    CenturyLink Cloud

    Global telecommunications and technology company CenturyLink offers a public cloud in regions around the world. The API has evolved from a SOAP/HTTP model (v1) to a fully RESTful one (v2).

    Login mechanism

    To use the CenturyLink Cloud API, developers send their platform credentials to a “login” endpoint and get back a reusable bearer token if the credentials are valid. That token is required for any subsequent API calls.

    A request for token may look like:

    POST https://api.ctl.io/v2/authentication/login HTTP/1.1
    Host: api.ctl.io
    Content-Type: application/json
    Content-Length: 54
    
    {
      "username": "[username]",
      "password": "[password]"
    }

    A token (and role list) comes back with the API response, and developers use that token in the “Authorization” HTTP header for each subsequent API call.

    GET https://api.ctl.io/v2/datacenters/RLS1/WA1 HTTP/1.1
    Host: api.ctl.io
    Content-Type: application/json
    Content-Length: 0
    Authorization: Bearer [LONG TOKEN VALUE]
    

    Request and response shape

    The v2 API uses JSON for the request and response format. The legacy API uses XML or JSON with either SOAP or HTTP (don’t call it REST) endpoints.

    To retrieve a single server in the v2 API, the developer sends a request to:

    GET https://api.ctl.io/v2/servers/{accountAlias}/{serverId}

    The responding JSON for most any service is verbose, and includes a number of links to related resources. For instance, in the example response payload below, notice that the caller can follow links to the specific alert policies attached to a server, billing estimates, and more.

    {
      "id": "WA1ALIASWB01",
      "name": "WA1ALIASWB01",
      "description": "My web server",
      "groupId": "2a5c0b9662cf4fc8bf6180f139facdc0",
      "isTemplate": false,
      "locationId": "WA1",
      "osType": "Windows 2008 64-bit",
      "status": "active",
      "details": {
        "ipAddresses": [
          {
            "internal": "10.82.131.44"
          }
        ],
        "alertPolicies": [
          {
            "id": "15836e6219e84ac736d01d4e571bb950",
            "name": "Production Web Servers - RAM",
            "links": [
              {
                "rel": "self",
                "href": "/v2/alertPolicies/alias/15836e6219e84ac736d01d4e571bb950"
              },
              {
                "rel": "alertPolicyMap",
                "href": "/v2/servers/alias/WA1ALIASWB01/alertPolicies/15836e6219e84ac736d01d4e571bb950",
                "verbs": [
                  "DELETE"
                ]
              }
            ]
         ],
        "cpu": 2,
        "diskCount": 1,
        "hostName": "WA1ALIASWB01.customdomain.com",
        "inMaintenanceMode": false,
        "memoryMB": 4096,
        "powerState": "started",
        "storageGB": 60,
        "disks":[
          {
            "id":"0:0",
            "sizeGB":60,
            "partitionPaths":[]
          }
        ],
        "partitions":[
          {
            "sizeGB":59.654,
            "path":"C:\\"
          }
        ],
        "snapshots": [
          {
            "name": "2014-05-16.23:45:52",
            "links": [
              {
                "rel": "self",
                "href": "/v2/servers/alias/WA1ALIASWB01/snapshots/40"
              },
              {
                "rel": "delete",
                "href": "/v2/servers/alias/WA1ALIASWB01/snapshots/40"
              },
              {
                "rel": "restore",
                "href": "/v2/servers/alias/WA1ALIASWB01/snapshots/40/restore"
              }
            ]
          }
        ],
    },
      "type": "standard",
      "storageType": "standard",
      "changeInfo": {
        "createdDate": "2012-12-17T01:17:17Z",
        "createdBy": "user@domain.com",
        "modifiedDate": "2014-05-16T23:49:25Z",
        "modifiedBy": "user@domain.com"
      },
      "links": [
        {
          "rel": "self",
          "href": "/v2/servers/alias/WA1ALIASWB01",
          "id": "WA1ALIASWB01",
          "verbs": [
            "GET",
            "PATCH",
            "DELETE"
          ]
        },
        …{
          "rel": "group",
          "href": "/v2/groups/alias/2a5c0b9662cf4fc8bf6180f139facdc0",
          "id": "2a5c0b9662cf4fc8bf6180f139facdc0"
        },
        {
          "rel": "account",
          "href": "/v2/accounts/alias",
          "id": "alias"
        },
        {
          "rel": "billing",
          "href": "/v2/billing/alias/estimate-server/WA1ALIASWB01"
        },
        {
          "rel": "statistics",
          "href": "/v2/servers/alias/WA1ALIASWB01/statistics"
        },
        {
          "rel": "scheduledActivities",
          "href": "/v2/servers/alias/WA1ALIASWB01/scheduledActivities"
        },
        {
          "rel": "alertPolicyMappings",
          "href": "/v2/servers/alias/WA1ALIASWB01/alertPolicies",
          "verbs": [
            "POST"
          ]
        },  {
          "rel": "credentials",
          "href": "/v2/servers/alias/WA1ALIASWB01/credentials"
        },
    
      ]
    }

    Breadth of services

    CenturyLink provides APIs for a majority of the capabilities exposed in the management UI. Developers can create and manage servers, networks, firewall policies, load balancer pools, server policies, and more.

    2015.07.30api02

    SDKs, tools, and documentation

    CenturyLink recently launched a Developer Center to collect all the developer content in one place. It points to the Knowledge Base of articles, API documentation, and developer-centric blog. The API documentation is fairly detailed with descriptions of operations, payloads, and sample calls. Users can also watch brief video walkthroughs of major platform capabilities.

    There are open source SDKs for Java, .NET, Python, and PHP.  CenturyLink also offers an Ansible module, and integrates with multi-cloud manager tool vRealize from VMware.

    Unique attributes

    The CenturyLink API provides a few unique things. The platform has the concept of “grouping” servers together. Via the API, you can retrieve the servers in a groups, or get the projected cost of a group,  among other things. Also, collections of servers can be passed into operations, so a developer can reboot a set of boxes, or run a script against many boxes at once.

    Somewhat similar to AWS, CenturyLink offers push-based notifications via webhooks. Developers get a near real-time HTTP notification when servers, users, or accounts are created/changed/deleted, and also when monitoring alarms fire.

    DigitalOcean

    DigitalOcean heavily targets developers, so you’d expect a strong focus on their API. They have a v1 API (that’s deprecated and will shut down in November 2015), and a v2 API.

    Login mechanism

    DigitalOcean authenticates users via OAuth. In the management UI, developers create OAuth tokens that can be for read, or read/write. These token values are only shown a single time (for security reasons), so developers must make sure to save it in a secure place.

    2015.07.30api03

    Once you have this token, you can either send the bearer token in the HTTP header, or, (and it’s not recommended) use it in an HTTP basic authentication scenario. A typical curl request looks like:

    curl -X $HTTP_METHOD -H "Authorization: Bearer $TOKEN" "https://api.digitalocean.com/v2/$OBJECT"

    Request and response shape

    The DigitalOcean API is RESTful with JSON payloads. Developers throw typical HTTP verbs (GET/DELETE/PUT/POST/HEAD) against the endpoints. Let’s say that I wanted to retrieve a specific droplet –  a “droplet” in DigitalOcean is equivalent to a virtual machine – via the API. I’d send a request to:

    https://api.digitalocean.com/v2/droplets/[dropletid]

    The response from such a request comes back as verbose JSON.

    {
      "droplet": {
        "id": 3164494,
        "name": "example.com",
        "memory": 512,
        "vcpus": 1,
        "disk": 20,
        "locked": false,
        "status": "active",
        "kernel": {
          "id": 2233,
          "name": "Ubuntu 14.04 x64 vmlinuz-3.13.0-37-generic",
          "version": "3.13.0-37-generic"
        },
        "created_at": "2014-11-14T16:36:31Z",
        "features": [
          "ipv6",
          "virtio"
        ],
        "backup_ids": [
    
        ],
        "snapshot_ids": [
          7938206
        ],
        "image": {
          "id": 6918990,
          "name": "14.04 x64",
          "distribution": "Ubuntu",
          "slug": "ubuntu-14-04-x64",
          "public": true,
          "regions": [
            "nyc1",
            "ams1",
            "sfo1",
            "nyc2",
            "ams2",
            "sgp1",
            "lon1",
            "nyc3",
            "ams3",
            "nyc3"
          ],
          "created_at": "2014-10-17T20:24:33Z",
          "type": "snapshot",
          "min_disk_size": 20
        },
        "size": {
        },
        "size_slug": "512mb",
        "networks": {
          "v4": [
            {
              "ip_address": "104.131.186.241",
              "netmask": "255.255.240.0",
              "gateway": "104.131.176.1",
              "type": "public"
            }
          ],
          "v6": [
            {
              "ip_address": "2604:A880:0800:0010:0000:0000:031D:2001",
              "netmask": 64,
              "gateway": "2604:A880:0800:0010:0000:0000:0000:0001",
              "type": "public"
            }
          ]
        },
        "region": {
          "name": "New York 3",
          "slug": "nyc3",
          "sizes": [
            "32gb",
            "16gb",
            "2gb",
            "1gb",
            "4gb",
            "8gb",
            "512mb",
            "64gb",
            "48gb"
          ],
          "features": [
            "virtio",
            "private_networking",
            "backups",
            "ipv6",
            "metadata"
          ],
          "available": true
        }
      }
    }
    

    Breadth of services

    DigitalOcean says that “all of the functionality that you are familiar with in the DigitalOcean control panel is also available through the API,” and that looks to be pretty accurate. DigitalOcean is known for their no-frills user experience, and with the exception of account management features, the API gives you control over most everything. Create droplets, create snapshots, move snapshots between regions, manage SSH keys, manage DNS records, and more.

    2015.07.30api04

    SDKs, tools, and documentation

    Developers can find lots of open source projects from DigitalOcean that favor Go and Ruby. There are a couple of official SDK libraries, and a whole host of other community supported ones. You’ll find ones for Ruby, Go, Python, .NET, Java, Node, and more.

    DigitalOcean does a great job at documentation (with samples included), and also has a vibrant set of community contributions that apply to virtual any (cloud) environment. The contributed list of tutorials is fantastic.

    Being so developer-centric, DigitalOcean can be found as a supported module in many 3rd party toolkits. You’ll find friendly extensions for Vagrant, Juju, SaltStack and much more.

    Unique attributes

    What stands out for me regarding DigitalOcean is the quality of their documentation, and complete developer focus. The API itself is fairly standard, but it’s presented in a way that’s easy to grok, the the ecosystem around the service is excellent.

    Google Compute Engine

    Google has lots of API-enabled services, and GCE is no exception.

    Login mechanism

    Google uses OAuth 2.0 and access tokens. Developers register their apps, define a scope, and request a short-lived access token. There are different flows depending on if you’re working with web applications (with interactive user login) versus  service accounts (consent not required).

    If you go the service account way, then you’ve got to generate a JSON Web Token (JWT) through a series of encoding and signing steps. The payload to GCE for getting a valid access token looks like:

    POST /oauth2/v3/token HTTP/1.1
    Host: www.googleapis.com
    Content-Type: application/x-www-form-urlencoded
    
    grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&amp;assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3NjEzMjY3O…
    

    Request and response shape

    The Google API is RESTful and passes JSON messages back and forth. Operations map to HTTP verbs, and URIs reflect logical resources paths (as much as the term “methods” made me shudder). If you want a list of virtual machine instances, you’d send a request to:

    https://www.googleapis.com/compute/v1/projects/<var>project</var>/global/images

    The response comes back as JSON:

    {
      "kind": "compute#imageList",
      "selfLink": <var>string</var>,
      "id": <var>string</var>,
      "items": [</pre>
    
     {
      "kind": "compute#image",
      "selfLink": <var>string</var>,
      "id": <var>unsigned long</var>,
      "creationTimestamp": <var>string</var>,
      "name": <var>string</var>,
      "description": <var>string</var>,
      "sourceType": <var>string</var>,
      "rawDisk": {
        "source": <var>string</var>,
        "sha1Checksum": <var>string</var>,
        "containerType": <var>string</var>
      },
      "deprecated": {
        "state": <var>string</var>,
        "replacement": <var>string</var>,
        "deprecated": <var>string</var>,
        "obsolete": <var>string</var>,
        "deleted": <var>string</var>
      },
      "status": <var>string</var>,
      "archiveSizeBytes": <var>long</var>,
      "diskSizeGb": <var>long</var>,
      "sourceDisk": <var>string</var>,
      "sourceDiskId": <var>string</var>,
      "licenses": [
        <var>string</var>
      ]
    }],
      "nextPageToken": <var>string</var>
    }
    

    Breadth of services

    The GCE API spans a lot of different capabilities that closely match what they offer in their management UI. There’s the base Compute API – this includes operations against servers, images, snapshots, disks, network, VPNs, and more – as well as beta APIs for Autoscalers and instance groups. There’s also an alpha API for user and account management.

    2015.07.30api05

    SDKs, tools, and documentation

    Google offers a serious set of client libraries. You’ll find libraries and dedicated documentation for Java, .NET, Go, Ruby, Objective C, Python and more.

    The documentation for GCE is solid. Not only will you find detailed API specifications, but also a set of useful tutorials for setting up platforms (e.g. LAMP stack) or workflows (e.g. Jenkins + Packer + Kubernetes) on GCE.

    Google lists out a lot of tools that natively integrate with the cloud service. The primary focus here is configuration management tools, with specific callouts for Chef, Puppet, Ansible, and SaltStack.

    Unique attributes

    GCE has a good user management API. They also have a useful batching capability where you can bundle together multiple related or unrelated calls into a single HTTP request. I’m also impressed by Google’s tools for trying out API calls ahead of time. There’s the Google-wide OAuth 2.0 playground where you can authorize and try out calls. Even better, for any API operation in the documentation, there’s a “try it” section at the bottom where you can call the endpoint and see it in action.

    2015.07.30api06

    Microsoft Azure

    Microsoft added virtual machines to its cloud portfolio a couple years ago, and has API-enabled most of their cloud services.

    Login mechanism

    One option for managing Azure components programmatically is via the Azure Resource Manager. Any action you perform on a resource requires the call to be authenticated with Azure Active Directory. To do this, you have to add your app to an Azure Active Directory tenant, set permissions for the app, and get a token used for authenticating requests.

    The documentation says that you can set up this the Azure CLI or PowerShell commands (or the management UI). The same docs show a C# example of getting the JWT token back from the management endpoint.

    public static string GetAToken()
    {
      var authenticationContext = new AuthenticationContext("https://login.windows.net/{tenantId or tenant name}");
      var credential = new ClientCredential(clientId: "{application id}", clientSecret: {application password}");
      var result = authenticationContext.AcquireToken(resource: "https://management.core.windows.net/", clientCredential:credential);
    
      if (result == null) {
        throw new InvalidOperationException("Failed to obtain the JWT token");
      }
    
      string token = result.AccessToken;
    
      return token;
    }
    

    Microsoft also offers a direct Service Management API for interacting with most Azure items. Here you can authenticate using Azure Active Directory or X.509 certificates.

    Request and response shape

    The Resource Manager API appears RESTful and works with JSON messages. In order to retrieve the details about a specific virtual machine, you send a request to:

    http://maagement.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Compute/virtualMachines/{vm-name}?api-version={api-version

    The response JSON is fairly basic, and doesn’t tell you much about related services (e.g. networks or load balancers).

    {
       "id":"/subscriptions/########-####-####-####-############/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}",
       "name":"virtualMachineName”,
      "   type":"Microsoft.Compute/virtualMachines",
       "location":"westus",
       "tags":{
          "department":"finance"
       },
       "properties":{
          "availabilitySet":{
             "id":"/subscriptions/########-####-####-####-############/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}"
          },
          "hardwareProfile":{
             "vmSize":"Standard_A0"
          },
          "storageProfile":{
             "imageReference":{
                "publisher":"MicrosoftWindowsServerEssentials",
                "offer":"WindowsServerEssentials",
                "sku":"WindowsServerEssentials",
                "version":"1.0.131018"
             },
             "osDisk":{
                "osType":"Windows",
                "name":"osName-osDisk",
                "vhd":{
                   "uri":"http://storageAccount.blob.core.windows.net/vhds/osDisk.vhd"
                },
                "caching":"ReadWrite",
                "createOption":"FromImage"
             },
             "dataDisks":[
    
             ]
          },
          "osProfile":{
             "computerName":"virtualMachineName",
             "adminUsername":"username",
             "adminPassword":"password",
             "customData":"",
             "windowsConfiguration":{
                "provisionVMAgent":true,
                "winRM": {
                   "listeners":[{
                   "protocol": "https",
                   "certificateUrl": "[parameters('certificateUrl')]"
                   }]
                },
                “additionalUnattendContent”:[
                   {
                      “pass”:“oobesystem”,
                      “component”:“Microsoft-Windows-Shell-Setup”,
                      “settingName”:“FirstLogonCommands|AutoLogon”,
                      “content”:“<XML unattend content>”
                   }               "enableAutomaticUpdates":true
                },
                "secrets":[
    
                ]
             },
             "networkProfile":{
                "networkInterfaces":[
                   {
                      "id":"/subscriptions/########-####-####-####-############/resourceGroups/CloudDep/providers/Microsoft.Network/networkInterfaces/myNic"
                   }
                ]
             },
             "provisioningState":"succeeded"
          }
       }
    

    The Service Management API is a bit different. It’s also RESTful, but works with XML messages (although some of the other services like Autoscale seem to work with JSON). If you wanted to create a VM deployment, you’d send an HTTP POST request to:

    https://management.core.windows.net/<subscription-id>/services/hostedservices/<cloudservice-name>/deployments

    The result is an extremely verbose XML payload.

    Breadth of services

    In addition to an API for virtual machine management, Microsoft has REST APIs for virtual networks, load balancers, Traffic Manager, DNS, and more. The Service Management API appears to have a lot more functionality than the Resource Manager API.

    Microsoft is stuck with a two portal user environment where the officially supported one (at https://manage.windowsazure.com) has different features and functions than the beta one (https://portal.azure.com). It’s been like this for quite a while, and hopefully they cut over to the new one soon.

    2015.07.30api07

    2015.07.30api08

    SDKs, tools, and documentation

    Microsoft provides lots of options on their SDK page. Developers can interact with the Azure API using .NET, Java, Node.js, PHP, Python, Ruby, and Mobile (iOS, Android, Windows Phone), and it appears that each one uses the Service Management APIs to interact with virtual machines. Frankly, the documentation around this is a bit confusing. The documentation about the virtual machines service is ok, and provides a handful of walkthroughs to get you started.

    The core API documentation exists for both the Service Management API, and the Azure Resource Manager API. For each set of documentation, you can view details of each API call. I’m not a fan of the the navigation in Microsoft API docs. It’s not easy to see the breadth of API operations as the focus is on a single service at a time.

    Microsoft has a lot of support for virtual machines in the ecosystem, and touts integration with Chef, Ansible, and Docker,

    Unique attributes

    Besides being a little confusing (which APIs to use), the Azure API is pretty comprehensive (on the Service Management side). Somewhat uniquely, the Resource Manager API has a (beta) billing API with data about consumption and pricing.  While I’ve complained a bit here about Resource Manager and conflicting APIs, it’s actually a pretty useful thing. Developers can use the resource manager concept (and APIs) to group related resources and deliver access control and templating.

    Also, Microsoft bakes in support for Azure virtual machines in products like Azure Site Recovery.

    Summary

    The common thing you see across most cloud APIs is that they provide solid coverage of the features the user can do in the vendor’s graphical UI. We also saw that more and more attention is being paid to SDKs and documentation to help developers get up and running. AWS has been in the market the longest, so you see maturity and breadth in their API, but also a heavier interface (authentication, XML payloads). CenturyLink and Google have good account management APIs, and Azure’s billing API is a welcome addition to their portfolio. Amazon, CenturyLink, and Google have fairly verbose API responses, and CenturyLink is the only one with a hypermedia approach of linking to related resources. Microsoft has a messier API story than I would have expected, and developers will be better off using SDKs!

    What do you think? Do you use the native APIs of cloud providers, or prefer to go through SDKs or brokers?

  • 6 Reasons Why Working at the Office Is Much Better Than Working Remote

    Conventional wisdom says that remote work is awesome and we should pity the poor slobs who drag themselves to an office every day. However, I’ve now switched from remote work to office work, and couldn’t be happier about it.

    I’ve worked from home for the past three years while working for Tier 3, and now CenturyLink. I’ve explained some tips for success with that model, and also have a course on personal productivity that was influenced by things that I’ve learned over that time. A month ago, I picked up and moved my family to WA, bought a house, and now drive to the office every day. And I love it. Because of …

    1. Contextual conversations.

    We use Slack a LOT around here. And WebEx, and Skype and all other types of communication tools. But, it’s still asynchronous most of the time, and dependent on the other person engaging. In the past month, I can’t tell you how many times I stood up, walked to a team room, asked a question, had a brief conversation, and resolved an issue. That same interaction could take up to an hour to transpire on Slack. Those conversations are better than simple “yes/no” answers in chat, and lets everyone get on with their day.

    Also, there’s the value of non-verbal communication (and I’m not counting “pug bombs” in our channel – see picture). 2015.07.28remote01 On the phone, you can’t gauge reactions in the room. Since we have very few (none?) dumb meetings, there’s value in being there in person to see how everyone is reacting and if people are engaged. I’ve already changed my approach in a few conversations because I noticed that the original direction wasn’t “landing.”

    2. The commute.

    The commute? Isn’t that the primary reason that most people say that working from home is BETTER? I have a 25 minute commute, and it’s great. I like it because it gives me time in the morning to start thinking about my day, and gives me time on the way home to switch from “work Richard” to “home Richard.” When working from home, I found it extremely difficult to stop my workday, walk out of my home office, and immediately engage my family. I was still thinking about the last email I sent, last blog post I read, or schedule for the next day. Now, I make a few phone calls on my drive home, decompress, and come into my house ready to beat my son at checkers.

    3. Spontaneous engagement.

    Two weeks ago we had a fire drill at our building in Bellevue. Instead of standing around outside, ten of us walked to a coffee shop. It was awesome. Talked about life, work, and microservices. If I were at home, I’d just be on radio silence for an hour while everyone was unavailable. Instead, I got to know my colleagues better and even brainstormed some ideas for new services.

    I’ve also noticed that I’m dragged into more working sessions than before. Instead of setting up dial in numbers, finding a conference room, and starting a meeting, the developers come by office and grab me and we chat in the hallway.

    4. Productive interruptions.

    To be sure, I loved when my 18 month old daughter would stumble into my home office to say hi. However, it was disruptive to work from an active home. I learned to get used to packages being delivered, gardeners buzzing my office window, visitors in the house, and dogs barking. However, it was taxing.

    Now, a typical interruption is someone walking into my office and asking a question. Or my boss stopping by and grabbing me for lunch. While these interruptions may stop me from whatever I’m working on, it drives our product forward in some way.

    5. Less travel.

    I’m not a fan of business travel. I’ve done enough of it, and only do it when I need to. Working remotely meant that I came up to WA at least once a month. That wasn’t bad, but it was tricky to pick the best weeks, and often conditions would change (e.g. customer visit, conducting interviews) that forced me to change trips, extend trips, or make secondary trips in a given month. While I am still traveling to our other CenturyLink offices and visiting customers, it’s not the every-month-grind I had before. Plus, any fewer interactions with our expense tracking system, the better.

    6. Better health.

    I’ve somehow lost 2 pounds since I got here. It’s probably because I walk around this office all day, and have gotten more physically active since coming up to WA. I don’t sit still for more than thirty minutes during the workday, and rarely snack. I know some folks take advantage of working at home to exercise more, but that wasn’t my routine (besides walking the dogs a few times a day!). I like trekking around the office and walking to lunch each day. Free exercise!

     

    Without a doubt, your enjoyment level for remote work is related to what your role is. If you’re heads down in a job 90% of the time, then working remote is probably fantastic. If your job is primarily collaborative, it just seems more effective to be physically with your colleagues. It’s great that so many people have the choice nowadays, and I wouldn’t have traded my remote work time for anything. But now, I’m amped to be sitting with the smartest group of people I’ve ever worked with. Want to work with me? We’re hiring!

  • New Pluralsight Course – Amazon Web Services Databases in Depth – Now Live!

    Today, Pluralsight released my 12th course. I’ve spent the last few months putting together a fun deep dive into three major database technologies from AWS: Amazon RDS (relational database), DynamoDB (NoSQL database), and Redshift (data warehouse). This 5+ hour course — Amazon Web Services Databases in Depth — explains when to use each, how to provision, how to configure for resilience and performance, and how to interact with each from applications and client tools. The modules include:

    • Getting Started. Here, we talk about the AWS database universe, how databases are priced, and what our (Node.js) sample application looks like.
    • Amazon RDS – Creating Instances, Loading Data. RDS supports SQL Server, PostgreSQL, Oracle, and MySQL, and this module explains the native capabilities and how to set up the service. We dig through the various storage options, how to secure access to the database, and how to create and load tables.
    • Amazon RDS – Lifecycle Activities. What do you do once your database is up and running? In this module we look at doing backup and restore, scaling databases up, setting up read-only database replicas, and setting up synchronous nodes in alternate availability zones.
    • Amazon DynamoDB – Creating and Querying. In this module, we talk about the various types of NoSQL databases, DynamoDB’s native capabilities, and how to set up a table. I dig into DynamoDB’s data model, automatic partitioning scheme, and critical considerations for designing tables (and primary keys). Then, we add and query some data.
    • Amazon DynamoDB – Tuning and Scaling. While DynamoDB takes care of a lot of things automatically, there are still operational items. In this module we talk about securing tables, the role of indexes, how to create and query global secondary indexes, and how to scale and monitor tables.
    • Amazon Redshift – Creating Clusters and Databases. Here we discuss the role of data warehouses, how Redshift is architected, how to create new clusters, how encryption works, and more. We go hands on with creating clusters and adding new database tables.
    • Amazon Redshift – Data Loading and Managing. A data warehouse is only useful if it has data in it! This module takes a look at the process for data loading, querying data, working with snapshots, resizing clusters, and using monitoring data.

    Of course, you may ask why someone who works for CenturyLink – a competitor of AWS – would prepare a course on their product set. I’ve always enjoyed playing with a wide range of technologies from a diverse set of vendors. While satisfying my own technology curiosity, teaching courses like this also helps me position CenturyLink’s own products and have deep, meaningful conversations with our customers. Everybody wins.

    I’m not sure what course will be next, but I welcome your feedback on this one, and hope you enjoy it!

  • Recent Presentations (With Video!): Transitioning to PaaS and DevOps

    I just finished up speaking at a  run of conferences (Cloud Foundry Summit, ALM Forum, and the OpenStack Summit) and the recorded presentations are all online.

    The Cloud Foundry Summit was excellent and you can find all the conference videos on the Cloud Foundry Youtube channel. I encourage you to watch some of the (brief) presentations by customers to hear now real people use application platforms to solve problems. My presentation (slides here) was about the enterprise transition to PaaS, and what large companies need to think about when introducing PaaS to their environment.

    At the ALM Forum and OpenStack Summit, I talked about the journey to a DevOps organization and used CenturyLink as a case study. I went through our core values, logistics (org chart, office layout, tool set), and then a week-in-the-life that highlighted the various meetings and activities we do.

    Companies making either journey will realize significant benefits, but not without proper planning. PaaS can be supremely disruptive to how applications are being delivered today, and DevOps may represent a fundamental shift in how technology services are positioned and prioritized at your company. While not directly related, PaaS and DevOps both address the emerging desire to treat I.T. as a competitive advantage.

    Enjoy!

  • Using Multiple NoSQL Database Models with Orchestrate and Node.js

    Databases aren’t a solved problem. Dozens of new options have sprouted up over the past five years as developers look for ways to effectively handle emerging application patterns. But how do you choose which one to use, especially when your data demands might span the competencies of an individual database engine?

    NoSQL choices abound. Do you need something that stores key-value information for quick access? How about stashing JSON documents that represent fluid data structures? What should you do for Internet-of-Things scenarios or fast moving log data where “time” is a first class citizen? How should you handle dynamic relationships that require a social graph approach? Where should you store and use geo-spatial data? And don’t forget about the need to search all that data! If you need all of the aforementioned characteristics, then you typically need to stand up and independently manage multiple database technologies and weave them together at the app layer. Orchestrate.io does it differently, and yesterday, CenturyLink acquired them.

    What does Orchestrate do? It’s a fast, hosted, managed, multi-model database fabric that is accessible through a single REST API. Developers only pay for API calls, and have access to a flexible key-value store that works with time-ordered events, geospatial data, and graph relationships. It runs an impressive tech stack under the covers, but all that the developers have to deal with is the web interface and API layer. In this blog post, I’ll walk through a simple sample app that I built in Node.js.

    First off, go sign up for an Orchestrate account that comes with a nice free tier. Do it, now, I’ll wait.

    Once in the Orchestrate management dashboard, I created an application. This is really just a container for data collections for a given deployment region. In my case, I chose one of the four brand new CenturyLink regions that we lit up last night. Psst, it’s faster on CenturyLink Cloud than on AWS.

    2015.04.21orchestrate01

    For a given app, I get an API key used to authenticate myself in code.  Let’s get to work (note that you can find my full project in this GitHub repo). I built a Node.js app, but you can use any one of their SDKs (Node, Ruby, Python, Java and Go with community-built options for .NET and PHP) or, their native API. To use the Node SDK, I added the package via npm.

    2015.04.21orchestrate02

    In this app, I’ll store basketball player profiles, relationships between players, and a time-ordered game log. I spun up a Node Express project (using Visual Studio, which I’m getting used to), and added some code to “warm up” my collection by adding some records, some event data, and some relationships. You can also query/add/update/delete via the Orchestrate management dashboard, but this was a more repeatable choice.

    var express = require('express');
    var router = express.Router();
    
    //Orchestrate API token
    var token = "<key>";
    var orchestrate = require('orchestrate');
    //location reference
    orchestrate.ApiEndPoint = "<endpoint>";
    var db = orchestrate(token);
    
    /* Warmup the collection. */
    router.get('/', function (req, res) {
    
        //create key/value records
        db.put('Players', "10001", {
            "name": "Blake Griffin",
            "team": "Los Angeles Clippers",
            "position": "power forward",
            "birthdate": "03/16/89",
            "college": "Oklahoma",
            "careerppg": "21.5",
            "careerrpg": "9.7"
        })
        .then(function (result1) {
            console.log("record added");
        });
    
        //create key/value records
        db.put('Players', "10002", {
            "name": "DeAndre Jordan",
            "team": "Los Angeles Clippers",
            "position": "center",
            "birthdate": "07/21/88",
            "college": "Texas A&M",
            "careerppg": "8.0",
            "careerrpg": "9.0"
        })
        .then(function (result2) {
            console.log("record added");
        });
    
        //create key/value records
        db.put('Players', "10003", {
            "name": "Matt Barnes",
            "team": "Los Angeles Clippers",
            "position": "strong forward",
            "birthdate": "03/09/80",
            "college": "UCLA",
            "careerppg": "8.1",
            "careerrpg": "4.5",
            "teams": [
                "Los Angeles Clippers",
                "Sacramento Kings",
                "Golden State Warriors"
            ]
        })
        .then(function (result3) {
            console.log("record added");
        });
    
        //create event
        db.newEventBuilder()
        .from('Players', '10001')
        .type('gamelog')
        .time(1429531200)
        .data({ "opponent": "San Antonio Spurs", "minutes": "43", "points": "26", "rebounds": "12" })
        .create()
        .then(function (result4) {
            console.log("event added");
        });
    
        //create event
        db.newEventBuilder()
        .from('Players', '10001')
        .type('gamelog')
        .time(1429012800)
        .data({ "opponent": "Phoenix Suns", "minutes": "29", "points": "20", "rebounds": "8" })
        .create()
        .then(function (result5) {
            console.log("event added");
        });
    
        //create graph relationship
        db.newGraphBuilder()
        .create()
        .from('Players', '10001')
        .related('currentteammate')
        .to('Players', '10002')
        .then(function (result6) {
            console.log("graph item added");
        });
    
        //create graph relationship
        db.newGraphBuilder()
        .create()
        .from('Players', '10001')
        .related('currentteammate')
        .to('Players', '10003')
        .then(function (result7) {
            console.log("graph item added");
        });
    
        res.send('warmed up');
    });
    
    module.exports = router;
    

    After running the app and hitting the endpoint, I saw a new collection (“Players”) created in Orchestrate.

    2015.04.21orchestrate03

    It’s always nice to confirm that things worked, so I switched to the Orchestrate UI where I queried my key/value store for one of the keys I added above. Sure enough, the item for Los Angeles Clippers superstar Blake Griffin comes back. Success.

    2015.04.21orchestrate04

    Querying data items from code is super easy. Retrieve all the players in the collection? Couple lines of code.

    /* GET all player listing. */
    router.get('/', function (req, res) {
    
        db.list("Players")
        .then(function (result) {
            playerlist = result.body.results;
            //console.log(playerlist);
    
            res.render('players', { title: 'Players List', plist: playerlist });
        })
        .fail(function (err) {
            console.log(err);
        });
    });
    

    When the app runs, I get a list of players. Thanks to my Jade template, I’ve also got a hyperlink to the “details” page.

    2015.04.21orchestrate05

    The player details include their full record info, any relationships to other players, and a log of games played. As you can see in the code below, it’s extremely straightforward to pull each of these entity types.

    /* GET one player profile. */
    router.get('/:playerid', function (req, res) {
    
        console.log(req.params.playerid);
    
        //get player object
        db.get("Players", req.params.playerid)
        .then(function (result) {
            player = result.body;
            //console.log(player);
    
            //get graph of relationships
            db.newGraphReader()
            .get()
            .from('Players', req.params.playerid)
            .related('currentteammate')
            .then(function (relres) {
                playerlist = relres.body;
                //console.log(playerlist);
    
                //get time-series events
                db.newEventReader()
                .from('Players', req.params.playerid)
                .type('gamelog')
                .list()
                .then(function (evtres) {
                    gamelog = evtres.body;
                    //console.log(gamelog);
    
                    res.render('player', { title: 'Player Profile', profile: player, plist: playerlist, elist: gamelog });
                });
            });
        })
        .fail(function (err) {
            console.log(err);
        });
    });
    

    2015.04.21orchestrate06

    I didn’t bake in any true “search” capability into my app, but it’s one of the most powerful parts of the database service. Devs search through collections with a Lucene-powered engine with a robust set of operators. Do fuzzy search, deep full-text search of nested objects, grouping, proximity search, geo queries, aggregations, complex sorting, and more. Which player ever played for the Sacramento Kings? It’s easy to search nested objects.

    2015.04.21orchestrate07

    Summary

    I don’t usually flog my own company’s technology on this blog, but this is fun, important stuff. Developers are faced with a growing set of technologies they need to know in order to build efficient mobile experiences, data-intensive systems, and scalable cloud apps. Something like Orchestrate flips the script by giving developers a quick on-ramp to a suite of database engines that solve multiple problems.

    Take it for a spin, and give me feedback for where we should go with it next!

  • Node.js and Visual Studio: From Zero to a Cloud Foundry Deployment in 2 Minutes

    Node.js and Visual Studio: From Zero to a Cloud Foundry Deployment in 2 Minutes

    Microsoft just released the 1.0 version of their Node.js Tools for Visual Studio. This gives Windows developers a pretty great environment for building clean, feature rich Node.js applications. It’s easy to take an application built in Visual Studio and deploy to Microsoft’s own cloud, so how about pushing apps elsewhere? In this post, I’ll show you how quick and easy it is to set up a Node.js application in Visual Studio, and push to a Cloud Foundry endpoint.

    As a prerequisite, take 30 seconds to download and install the Cloud Foundry CLI, and sign up for a friendly Cloud Foundry provider. And, install the new Node.js Tools for Visual Studio.

    Creating and Deploying an Express Application

    Let’s start with the lightning round, and then I’ll go back and show off some of the features of this toolkit.

    Step 1 – Open Visual Studio and create the Node.js Express project (25 seconds)

    The Node.js Tools for Visual Studio add a few things to the Visual Studio experience. One of those is the option to select Node project types. This makes it super easy to spin up an example Express application.

    2015.03.27node01

    The sample project selected above includes a package.json file with all the dependencies. Visual Studio goes out and reconciles them all by downloading the packages via npm.

    2015.03.27node02

    The project loads up quickly, and you can see a standard Express skeleton project. Note that Visual Studio doesn’t throw any useless cruft into the solution. It’s all just basic Node stuff. That’s nice.

    2015.03.27node03

     

    Step 2 – Open Command Prompt and target the AppFog v2 environment (30 seconds)

    This Express app is boring, but technically a complete, deployable project. Let’s do that. I didn’t see an obvious way to get my Cloud Foundry-aware command line within the Visual Studio shell itself, but it’s crazy easy to open one that’s pointed at our project directory. Right-clicking the Visual Studio project gives the option to open a command prompt at the root of the project.

    2015.03.27node04

    Before deploying, I made sure I had the credentials and target API for my Cloud Foundry endpoint. In this case, I’m using the not-yet-released AppFog v2 from CenturyLink. “Sneak peek alert!”

    2015.03.27node05

    After logging into my endpoint via the Cloud Foundry CLI, I was ready to push the app.

     

    Step 3 – Push application (81 seconds)

    With a simple “cf push” command, I was off and running. App deployment times vary based on project size and complexity. If I had deleted (or excluded) all the local packages, then Cloud Foundry would have simply downloaded them all server-side, thus accelerating the upload. I was lazy, and just sent all my files up to the platform fabric directly.

    2015.03.27node11

    After a short time, my app is staged, deployed, and started.

     

    Step 4 – Verify!

    The best part of any demo: seeing the results!

    2015.03.27node06

    You don’t really need to know anything about Node (or Cloud Foundry!) to test this out. It’s never been easier to sample new technology.

    Exploring Additional Node Capabilities in Visual Studio

    Let’s retrace our steps a bit and see what else these Node tools put into Visual Studio. First, you’ll see a host of options when creating a new Visual Studio project. There are empty Node.js projects (that pretty much just include a package.json and app.js file), Express applications, and even Azure-flavored ones.

    2015.03.27node13

    The toolkit includes some Intellisense for Node.js developers which is nice. In the case below, it knows what methods are available on common object types.

    2015.03.27node10

    For installing packages, there are two main options. First, you can use the Node.js Interactive Window to issue commands. One such command is .npm and I can install anything from the global directory. Such as the awesome socket.io package.

    2015.03.27node11

    One downside of using this mechanism is that the package.json file isn’t automatically updated. However, Visual Studio helpfully reminds you of that.

    2015.03.27node12

    The “preferred” way to install packages seems to be the GUI where you can easily browse and select your chosen package. There’s options here to choose a version, pick a dependency type, and add to the package.json file. Pretty handy.

    2015.03.27node08

    The Toolkit also makes it easy to quickly spin up and debug an app. Press F5 starts up the Node server and opens a browser window that points at that server and relevant port.

    2015.03.27node09

    Summary

    I’ve used a few different Node.js development environments on Windows, and Visual Studio is quickly becoming a top-tier choice. If you’re just starting out with Node, or a seasoned developer, Visual Studio seems to have the nice mix of helpful capabilities while not getting in the way too much.

  • Containers, Microservices, and the Impact on IT

    Last September, I did a series of presentations on “The Future of Integration” and highlighted the popularity of containers and the growing momentum around microservices. Since then, interest in microservices has exploded within the technology industry and containers are seen as a major vehicle for delivering them.

    While I love new technology as much as the next person, my first thought is typically “how do established companies take advantage of it?” I’ve been consuming a lot (and creating a little) content around this over the past few months, and these are just a few pieces that discuss the practical aspects of containers and microservices:

    • The Microservice Revolution: Containerized Applications, Data and All. I just posted this piece by the ClusterHQ folks to InfoQ. It’s a nice the value proposition of containers and discusses some challenges around state management.
    • Virtual Roundtable: The Role of Containers in Modern Applications. I conducted this roundtable last month with five very smart, practical folks. We covered the impact of microservices and containers on existing organizations, and how developers should approach containers.
    • Integration and Microservices. The incomparable Charles Young has written a great three part series about microservices from an integration perspective. Part one discussed the intersection of integration/EAI and microservices. Part two looks at microservices and mediation services. Part three looks at iPaaS and microservices. All told, these three articles represent a thoughtful exploration of these new concepts.
    • Discussing All Things Distributed from The New Stack WarmUp. I recently participated in a fun session for The New Stack where we talked about distributed systems, containers, and microservices. I ended up pointing out some implications of these technologies on existing companies, and we had an engaging discussion that you can listen to here.

    If you’re in the Microsoft world, you also might enjoy attending the upcoming BizTalk Summit in London where Microsoft will talk more about their upcoming microservices cloud platform. In addition, many of the speakers are pragmatic integration-oriented individuals who give real-life advice for modernizing your stack.

    It’s a fun time to be in the technology domain, and I hope you keep an eye on all these new developments!

  • Docker Q&A for Windows Users

    I’m a Windows guy. I’ve spent the better part of the past fifteen years on Windows laptops and servers. That fact probably hurts my geek cred, but hey, gotta be honest. Either way, it really seems that the coolest emerging technologies are happening in an open-source world on Linux. So how does someone from a Windows world make sense of something like Docker, for example? When I first dug into it a year ago, I had a bunch of questions. As I learned more – and started using it a bit – a number of things became clearer. Below is my take on what someone new to Docker might want to know. If for some reason you think one of my answers below is wrong, tell me!

    Q: Is Docker just another means of virtualization?

    A: Somewhat. It’s primarily a way to run lightweight containers that isolate processes. That process may be a web app, database, load balancer, or pretty much anything. Containers don’t do as much as a virtual machine, but that also makes them a lot easier to use (and destroy!). You may hear containers referred to as “operating system virtualization” which is fair since each container gets its own user space in the host OS.

     

    Q: How do Docker containers differ from a virtual machine?

    A: A virtual machine in Hyper-V or VMware virtualizes an entire guest operating system. Take a physical server, and share its resources among a bunch of virtualized servers running any operating system. With Docker, you’re isolating a process and its dependencies. A container shares the Linux kernel with other containers on the host machine. Instead of running a full copy of an OS like virtual machines do, containers pretty much consist of a directory! The container has everything you need for the application to run.

     

    Q: Does Docker == container?

    A: No, Docker refers to the daemon which builds, runs, and distributes the containers.

     

    Q: Can I make something like Docker work natively on Windows?

    A: Not really. While Microsoft is promising some sort of Docker support in the next version of Windows Server (due in 2016), they’ll have to introduce some significant changes to have truly native Docker support. Docker is written in Go and relies on a few core Linux technologies:

    • Namespaces provide process isolation. Windows doesn’t really have something that maps directly to this.
    • Control Groups are used to set up resource limits and constraints to help containers responsibly use host resources. Windows doesn’t have a way to limit resource consumption by a particular service.
    • Union File Systems are file systems created by establishing layers. Docker uses these layers for container changes, and to establish a read/write file system. Not something you see in a Windows environment.
    • Container Format that combines the previous components. Default format is libcontainer, but LXC is also supported.

     

    Q: What’s in a Docker image?

    A: Images are read-only templates that are used to create Docker containers. You can create your own images, update existing ones, or download from a registry like the Docker Hub. Downloaded images are stored by Docker on the host and can be easily used to create new containers. When you change an image, a new layer is built and added. This makes it simpler to distribute changes without distributing the whole image.

     

    Q: How big are Docker images?

    A: Base images could be as small as a few hundreds megabytes, to a few gigabytes. Image updates may be much smaller, but also include any (new) dependencies, that can cause the overall container size to grow more than expected.

     

    Q: What’s the portability story with Docker?

    A: Unlike virtual machines that require a particular hypervisor and are often quite large, containers run anywhere that Linux runs, and can be quickly built from small images.

     

    Q: Does Docker run on Windows?

    A: Somewhat. Developers who want to run Docker on Windows have to install a simple VM to get the necessary Linux-features. The Boot2Docker app gets this VM installed.

     

    Q: Can I run more than one process in a Docker container?

    A: While possible, yes (via a supervisor), the Docker team really believes that you should have a single process per container.

     

    Q: Is a Dockerized app portable to any Linux host?

    A: Ideally, yes. For example, a developer can start up an Ubuntu Docker image on a Red Hat host machine. However, issues can still arise if tools are dependent on kernel features that don’t exist on the host.

     

    Q: How is data managed in a Dockerized app?

    A: When you exit a container, the read-write file layer goes away. If you save the container as a new image, then the data is retained. Docker encourages developers to use data volumes and data volume containers to persist information. There’s a good StackOverflow question on this topic. Other solutions like Flocker have popped up as well.

     

    Q: Is there one flavor of Linux that runs Docker better than others?

    A: I don’t believe so. There are Docker-centric Linux distributions like CoreOS, but you can also easily run Docker on distros like SUSE and Ubuntu. Note that you should definitely be running a recent version of whatever distro you choose.

     

    Q: What type of software can run in a Docker container?

    A: Really, anything that runs on Linux should be able to fit in a container.

     

    Q: Do I need the cloud to run Docker?

    A: Definitely not. You can run Docker on virtual machines (locally or in the cloud), physical machines (locally or in the cloud), or in Docker-centric services like the Amazon EC2 Container Service. Even Microsoft’s own Azure has declared itself to be “Docker friendly.”

     

    Q: What related technologies should I care about?

    A: This whole “microservices with containers” revolution means that developers should learn a host of new things. Windows developers may not be as familiar with container deployment tools (e.g. fleet) container orchestration tools (e.g. Kubernetes, or Docker’s own services) or service discovery tools (like Zookeeper or Consul), but now’s a good time to start reading up!

     

    Q: Where it it still immature?

    A: This is a fast moving technology, and I’d bet that Docker will be “enterprise-ready” long before enterprises are ready to commit to it. Security is a emerging area, and architectural best practices are still forming.

     

    Q: Ok, you’ve convinced me to try it out. What’s an easy way to get started on Windows?

    A: Download Vagrant, stand up an Ubuntu image, and get Docker installed. Pull an app from the growing Docker Hub and walk through the tutorials provided by Docker. Or, start watching this great new Pluralsight course. Also consider trying out something like Panamax to easily create multi-container apps.

     

    Hope this helps demystify Docker a bit. I’m far from an expert with it, but it’s really one of these technologies that might be critical to know in the years ahead!

  • New Pluralsight Course – Cloud Foundry for Developers – is Live!

    Cloud Foundry is a fast-growing open source Platform-as-a-Service (PaaS). It has an impressive array of Foundation members/contributors including Pivotal, Intel, SAP, IBM, Hortonworks, Docker, and many more. I’ve spent the past few months building a new Pluralsight course that explores this powerful service and gives developers all the information they need to start building, deploying, and managing web applications in public or private Cloud Foundry environments. I started playing with Cloud Foundry almost 4 years ago, and have continued to watch with interest as the product matured. I thought it’d be fun to craft a training course around it, and Pluralsight eagerly accepted a proposal for my 11th (!!) overall course.

    Cloud Foundry for Developers is a 3 hour course where we discuss PaaS, deploy a Ruby/Node/Mongo app, and run through management operations. While we primarily use the general purpose command line interface (CLI) that works across ANY Cloud Foundry environment, I also spend a little time in the Pivotal Web Services administration portal.

    Module 1 – PaaS and Cloud Foundry Introduction

    What is PaaS and why does it matter? In this module, I discuss PaaS in general, the details of twelve factor apps, how Cloud Foundry works, and the web application we’ll be working with. I wanted course viewers to get an immediate taste for Cloud Foundry, so within the first ten minutes of the course, we deploy our first app. INSTANT GRATIFICATION.

    2015.01.09pluralsight01

    Module 2 – Deploying and Managing Applications (Part 1)

    Developers love PaaS because it simplifies the assembly, deployment, and management of modern web apps. No more hunting for available web servers, configuring network settings, or begging an Ops person for more capacity. In this module, we set up the local (testing) environment and remote PaaS environment. We explore user roles, see how to create and attach 3rd party services to our apps, and define application manifests.

    2015.01.09pluralsight02

    Module 3 – Deploying and Managing Applications (Part II)

    Here we get to the meat of deployment and runtime management in Cloud Foundry. After deploying all the components of our system, we scale both horizontally and vertically, and update a running app. While you may write perfect code, it’s inevitable that you experience an exception at SOME point. When working with a layer of abstraction like PaaS, it’s critical to understand the troubleshooting tools. We spend a bit of time talking about common types of errors, and how to use the Cloud Foundry logging system to narrow down the problem.

    Module 4 – Cloud Foundry Advanced Topics

    There are a LOT of topics to cover with Cloud Foundry! In this module I look at a few advanced capabilities of the platform that every developer should be familiar with. Here I show you how to use environment variables correctly, how to build, deploy, and run background (worker) applications, and doing no-downtime (blue/green) deployments. The final exercise is my favorite. Cloud Foundry has an amazing capability to bring application instances back online after a crash. Here I got to do what I do best in code: cause unexpected crashes! It’s compelling to see an application quickly “self heal” without the user even knowing it.

    2015.01.09pluralsight03

    I have lots of ideas for follow up Cloud Foundry topics (e.g. continuous integration/deployment, BOSH, microservices), but I hope you enjoy THIS course about using Cloud Foundry to deliver modern applications faster and more consistently.

  • 2014 in Review: Reading and Writing Highlights

    I enjoyed 2014 and spent much of the year learning new things and building up an exceptional Product team at CenturyLink. Additionally, I spoke at events in Seattle, London, Houston, Ghent, Utrecht, and Oslo, delivered Pluralsight courses about Personal Productivity and DevOps, and tech-reviewed a book about SIgnalR. Below are some of the writing projects I enjoyed most this year, and a list of the best books I read this year.

    Favorite Blogs and Articles

    After seven years, I still look forward to adding pieces to this blog, in addition to writing for InfoQ, my company’s blog, and a few other available outlets.

    • [My Blog] 8 Characteristics of our DevOps Organization. This was by far the most popular blog post that I wrote this year. Apparently it struck a chord.
    • [Forbes] Get Ready For Hybrid Cloud. This Forbes piece kicked off a series of posts about Hybrid Cloud and practical advice for those planning these deployments.
    • [CTL Blog] Recognizing the Challenges of Hybrid Cloud: Part I, Part II, Part III, Part IV. In this four-part series, I looked at all sorts of hybrid cloud challenges (e.g. security, data integration, system management, skillset) and proven solutions for each.
    • [InfoQ] I ran a program about cloud management at scale, and really enjoyed conducting this interview with three very smart folks.
    • [My Blog] Richard’s Top 10 Rules for Meeting Organizers. The free-wheeling startup days are over for me, but I’ve kept that mindset even as I work for a much larger company now. Meetings are a big part of most company cultures, but your APPROACH to them is what determines whether meetings are soul-sucking endeavors, or super-useful exercises.
    • [My Blog] Integrating Microsoft Azure BizTalk Services with Salesforce.com. I don’t know the real future of BizTalk Services, but that didn’t prevent me from taking it for a spin. Here, I show how to call a Salesforce.com endpoint from a BizTalk Services process.
    • [My Blog] Using SnapLogic to Link (Cloud) Apps. Cloud-based integration continues to gain attention, and SnapLogic is doing some pretty cool stuff. I played around with their toolset a bit, and wrote up this summary.
    • [My Blog] Call your CRM Platform! Using an ASP.NET Web API to Link Twilio and Salesforce.com. Twilio is pretty awesome, so I take any chance I can to bake it into a demo. For a Salesforce-sponsored webinar, I built up a demo that injected voice interactions into a business flow.
    • [My Blog] DevOps, Cloud, and the Lean “Wheel of Waste.” I’ve admittedly spent more time this year thinking about organizational structures and business success, so this post (and others) reflect that a bit. Here, I look at all the various “wastes” that exist in a process, and how cloud computing can help address them.
    • [My Blog] Comparing Cloud Provisioning, Scaling, Management. I love hands-on demos. In these three posts, I created resources in five leading clouds and tried out all sorts of things.
    • [My Blog] Data Stream Processing with Amazon Kinesis and .NET Applications. There are so many cool stream-processing technologies out today! Microsoft shipped the Event Hubs over the summer, and AWS launched Kinesis a half-year before that. In this post, I took a look at Kinesis and got a sample app up and running.
    • [CTL Blog] Our First 140 Days as CenturyLink Cloud. This was my opportunity to reflect on our company progress six months after being acquired by CenturyLink.

    Favorite Books

    Of the couple dozen books that I read this year, these stood out the most.

    • Competing Against Time: How Time-Based Competition is Shaping Global Markets. This book may be twenty five years old, but it’s still pretty awesome. The author’s thesis is that “providing the most value for the lowest cost in the least amount of time is the new pattern for corporate success.” The book focuses on how time is a competitive advantage that improves productivity and responsiveness. Feels as true today as it was in 1990.
    • How to Fail at Almost Everything and Still Win Big. Love him or hate him (I happen to love him), Dilbert-creator Scott Adams is someone who challenges convention. In this enjoyable read, Adams delightfully recounts his many failures and his idea that “one should have a system instead of a goal.” Lots of interesting advice that will make you think, even if you disagree.
    • Start With Why: How Great Leaders Inspire Everyone to Take Action. The author states that “people don’t buy WHAT you do, they buy WHY you do it.” He then proceeds to explain how companies fail to motivate staff and engage customers by focusing on the wrong things. The best leaders, in Sinek’s view, have a clear sense of “why,” and motivate customers and employees alike. Good read and useful insight for existing and aspiring leaders.
    • The Practice of Cloud System Administration: Designing and Operation Large Distributed Systems, Volume 2. If you are doing ANYTHING related to distributed systems today, you really need to read this book. I reviewed it for InfoQ (and interviewed the authors), and found it to be an extremely easy to follow, practical book that covers a wide range of best practices for building and maintaining complex systems.
    • Creativity, Inc: Overcoming the Unseen Forces that Stand in the Way of True Inspiration. Probably the best “DevOps” book that I read all year, even though it has nothing to do with technology. This story from the founder of Pixar is fantastic. His thesis is that “there are many blocks to creativity, but there are active steps we can take to protect the creative process.” There’s some great insight into Pixar’s founding, and some excellent lessons about cross-functional teams, eliminating waste, and empowering employees.
    • The Art of War. A classic strategy book that I hadn’t read before. It’s a straightforward – but thoughtful – guide to military strategy that relates directly to modern business strategy.
    • Service Innovation: How to Go from Customer Needs to Breakthrough Services. What does it actually mean to bring innovation to a service? This book looks at customer-centric ways to identify unmet needs and deliver outcomes that the customer would consider a success. Very helpful perspective for those delivering any type of service to a (internal or external) customer base.
    • The Assist: Hoops, Hope, and the Game of Their Lives. Phenomenal story about a basketball coach who was all-consumed with ensuring that his underprivileged student-athletes found success on and off the court.
    • The Box: How Shipping Containers Made the World Smaller and the World Economy Bigger. I can’t tell you how many times my wife asked me “why are you reading a book about shipping containers?” I loved this book. It looks at how a “simple” innovation like a shipping container fundamentally changed the world’s economy. It’s a well-written historical account with lessons on disruption that apply today.
    • Mark Twain: A Life. This was a long, detailed book for someone with a long, adventurous life. A fascinating account of this period, the book recounts Twain’s colorful rise to global renown as a leading literary voice of America.
    • The Goal: A Process of Ongoing Improvement. The excellent DevOps book “The Phoenix Project” owes a lot to this book. The Goal tells a fictitious tale of a manufacturing plant manager who faces higher expenses and long cycle times. The hero discovers new ways to optimize an entire system by digging into bottlenecks, capacity management, batch sizing, quality, and much more. It’s a fun read with tons of lessons for software practitioners who face similar challenges, and can apply similar solutions.
    • Scaling Up Excellence: Getting to More Without Settling for Less. Spreading a culture of excellence to more people in more places requires hard work, relentless focus, a shared mindset, and amazing discipline. This book is full of case studies and guidance for successful (and unsuccessful!) scaling.
    • Jim Henson: The Biography. An outstanding, meticulously-detailed biography of one of the most talented and creative individuals of the last century. Great insight into team-building, quiet leadership, and taking risks.

    A heartfelt thanks to the 125,000+ visitors (and 207,000+ page views!) this year to the blog. It’s always a pleasure to meet many of you in real life, or in other virtual forums like Twitter. Here’s to the year ahead, and more opportunities to be inspired by technology and the the people around us.