How to update software in customer clouds
Alon Gubkin
You fix a bug and merge it. In SaaS, every customer has the fix ten minutes later.
Now your product also runs in 40 customer cloud accounts. Some are a version behind. Some are a year behind.
The first install was a project. Every update after it is a smaller project, times 40. One vendor told us that versioning, updates and management are the biggest operational challenge of their self-hosted deployments.
Why customers fall behind
In SaaS, you own the servers, so an update is your decision. In a customer's account, it isn't only yours.
Someone has to apply it. If the customer installs each version, it waits for their team. A security fix waits behind their sprint.
You can't reach in. The account is theirs. Without access you can't apply anything, and they won't give you a broad role to do it.
Every account is different. Different clouds, different regions, different versions of the things your product depends on. A release that works in 39 of them breaks the 40th.
A bad release hits everyone at once. In SaaS, you roll back in minutes. Across 40 accounts, a broken release becomes 40 incidents.
Whether updates work comes down to who starts them, and how far a bad one can spread.
Who starts the update
The customer. You publish a new Helm chart or image, and they upgrade when they get to it. It costs you nothing to build. It's also how customers end up a year behind, each one a different support case.
You, by push. Your control plane calls the cloud's APIs through a role the customer created at install. It's direct, and it works on AWS, Google Cloud and Azure. The role must be narrow, or their security team won't approve it.
An agent, by pull. A small service in their environment connects out to your control plane and applies each release. No inbound port opens. The customer can cut it off with one firewall rule. This fits Kubernetes and Linux servers.
A bundle. Some sites have no network path at all. An admin carries a folder of signed releases in, and a status report out.
You'll likely need more than one, because your customers differ. Build one release process with several ways to deliver it, not one process per customer type.
Architecture diagram. Alien manager manages 3 remote environments: AWS account (customer-1), push · IAM role; Kubernetes (customer-2), pull · https 443; Isolated site (customer-4), folder, carried in.
Releases and channels
A release is one immutable build of your stack. A channel is a name that points at one release. Each customer's deployment follows a channel.
To update everyone on a channel, you move the channel. You don't touch 40 accounts one by one.
alien release # build, then move production
alien release --no-promote --title "Fix export retries"
alien releases promote rel_7x2kq9 --channel productionPublishing a release doesn't deploy it. A deployment updates only when its channel points at the new release.
Roll out in stages
Don't send a new release to all 40 at once. Make a canary channel and put a few deployments on it:
alien releases create-channel canary
alien deployments set-channel dep_1q7v3h canary
alien release --channel canary --jsonWait until they run the new release and stay healthy. Then promote the same release to production. Nothing is rebuilt, so production gets exactly what the canary ran:
alien deployments wait dep_1q7v3h --for ready --timeout 15m
alien releases promote rel_7x2kq9 --channel productionalien deployments wait exits with an error if the deployment fails, so CI can stop the rollout there.
Roll back and pin
To roll back, promote the earlier release to the channel again.
To keep one customer on a known release while you debug a regression, pin them:
alien deployments pin dep_4f8n2c rel_6w1pz3 # hold this deployment here
alien deployments pin dep_4f8n2c # unpinA pinned deployment ignores its channel until you unpin it.
Don't take the product down
An update replaces running containers, and that's when outages happen.
On AWS, Google Cloud, Azure and on-prem machines, Alien replaces a container's replicas one at a time. It moves to the next one only after the replacement is healthy. A health check decides what healthy means. Without one, a replica counts as healthy as soon as it starts, so a release that starts but can't serve rolls through every replica.
If you build your own update path, build this part too.
When an update needs the customer
Most releases change only what your role may manage, so they roll out on their own.
Some don't. A release can change a resource the customer's admin created, or need a permission the role doesn't have. Alien holds that release for the deployment, and it keeps running the previous one. The admin applies the change with the same method they used to install: update the CloudFormation stack, bump the Terraform module, or rerun the setup CLI.
Keep these rare. Tell the customer before you ship one.
Where Alien fits
With a few customers on one cloud, a CI pipeline and a role per customer may be enough.
It gets hard when customers are on different clouds, install different ways, and fall behind at different speeds.
Alien keeps your control plane in your cloud and deploys only the data plane into each customer's account, on AWS, Google Cloud, Azure or on-prem. Push, pull and air-gapped updates all come from one alien release. See releases, rollouts and the Infrastructure product page.
Related reading: what BYOC is, when your customer won't run your Terraform and debugging customer deployments without SSH.