Autoscaling Distributed Split-Merge

Red Koopa shell hitting 4 green Koopa Troopas

In a previous post, we discussed distributed split merge using ClusterODM an API proxy for NodeODM and NodeMICMAC. This was an exciting development, but we’ve taken it further with autoscaling. Autoscaling will allow you to deploy as many instances as you need to get the processing done on the provider of your choice. This currently works for n=1 providers (DigitalOcean). Want to help with others? We have issues open for AWS and Scaleway, or open an issue for another provider you want to see.

This means, no more parallel shells to get your data processed, just configure, send a job, and watch the data process.

Diagram of ClusterODM as proxy for NodeODM services.

How does this work? We need to configure a few pieces, I’ll give you the overview:

We need 3 elements: ClusterODM, a local NodeODM instance, and a configuration file so that ClusterODM can orchestrate deployment of the secondary servers.

Grab a decent size Digital Ocean machine to install this on, say something with 16 or 32 GB RAM. ClusterODM setup is easy, just follow these directions for dependencies. I’ll give you the crib notes: it’s just docker, docker-machine and NodeJS.

We’ll need to deploy a NodeODM instance locally. This does the local processing and also allows ClusterODM to know what API it is proxying. We need to run it on something other than the default port 3000

docker run -d -p 3001:3001 opendronemap/nodeodm:smimprov --port 3001

Now that we have a NodeODM instance, let’s proxy it with ClusterODM. Let’s create a configuration file for our ClusterODM:

{
    "provider": "digitalocean",
    "accessToken": "***",
    "s3":{
        "accessKey": "***",
        "secretKey": "***",
        "endpoint": "region.digitaloceanspaces.com",
        "bucket": "bucketname"
    },
    "createRetries": 5,
    "maxRuntime": -1,
    "maxUploadTime": -1,
    "region": "region",
    "monitoring": true,
    "tags": ["clusterodm"],

    "image": "ubuntu-16-04-x64",
    "snapshot": false,
    "imageSizeMapping": [
        {"maxImages": 1200, "slug": "c-16"}
    ],
    "addSwap": 2,
    "dockerImage": "opendronemap/nodeodm:smimprov"
}

Ok. Now we are ready for fun. We could connect WebODM to this, but I find it more convenient to do this on the command line. I’ll change directory into one level up from my images directory and then:

docker run -ti -v "$(pwd)/images:/code/images" opendronemap/odm --split 2500 --sm-cluster http://youriphere:3000

We’re off to the races.

Animated gif of Koopa spinning while sitting in cart from Mario Cart.

As usual: hat tip Piero Toffanin.

34