Leanpub Header

Skip to main content

Apache CloudStack — IAC 101

Run your cloud as code: GitLab, OpenBao, OpenTofu, EVE-NG, n8n and SONiC — the whole open-source GitOps toolchain, end to end, on one laptop

Every click in a cloud console is a decision that leaves no record. This book runs Apache CloudStack the way platform teams run everything else: as code in GitLab, secrets in OpenBao, provisioning in OpenTofu, alerting you own with n8n and local AI agents, the fabric automated with Ansible — the whole open-source GitOps toolchain, working end to end, on one laptop.

Interested in this book? Show your support by saying what you'd like to pay for it!

$
PDF
EPUB
WEB
APP
About

About

About the Book

The CloudStack web interface is a comfortable place to work and a dangerous place to live. Every click does something useful — and leaves no record of itself. Six months later, the only account of why the production network looks the way it does lives in one administrator's memory, and possibly a wiki page that stopped being true in March. The estate that can only be rebuilt by the person who built it is not an estate you own; it is one you are renting from your own staff, and the lease ends the day they hand in their notice.

This book takes a different position: run an Apache CloudStack estate the way a modern platform team runs everything else — as code, in version control, with secrets in a vault, and every change shipped through a pipeline that anyone can read and no one can bypass. Then it builds the entire toolchain, open source end to end, on a single reproducible reference lab: one laptop running Ubuntu Server 24.04, KVM, and CloudStack 4.22 LTS. A whole cloud you can carry to a coffee shop.

The toolchain, in the order it arrives:

  • GitLab CE as the single source of truth — repositories, Git Flow, and the CI/CD pipelines that turn a merged change into a real one
  • OpenBao for secrets — every CloudStack credential fetched on demand and expired on a timer, never committed to Git
  • OpenTofu with the CloudStack provider — the estate declared in HCL, planned before it is applied, with state, modules, remote state and drift detection
  • EVE-NG — a place to break the network before it is real
  • n8n with the Guardian and Phoenix agents — sovereign alerting, with local AI classifying incidents and attempting fixes, the whole incident path inside your own stack
  • SONiC and Ansible — the switching fabric configured from version control like everything else

Along the way it makes the honest cost case (a canonical worked scenario showing an illustrative 94% saving over a licensed stack, every line flagged for verification against current pricing) and closes with the production practices and deployment checklist that turn the reading into a working discipline. The through-line is the Mars heuristic: if this system were running unattended and the link home were cut, would it still work? Codify the step, or it does not count.

Every tool in these pages is one you host, control, and can inspect to the bottom. 

Author

About the Author

Michael Hinsley

Mike Hinsley has spent more than three decades with his hands on real infrastructure — from electronics and engineering through operations, security, cloud and SaaS — and has never lost the habit of wanting to understand the machine all the way down. He is the founder of a UK infrastructure consultancy that helps organisations escape per‑core licensing lock‑in by migrating from VMware/Broadcom to sovereign, self‑owned platforms built on Apache CloudStack, with documented client savings of up to 94%. His guiding principle is one he calls GYOCYO — Grow Your Own, Cook Your Own: own the means of a capability rather than rent it as a finished product. He lives it literally. From a smallholding in rural Cheshire he runs large‑scale aquaponics, IoT‑monitored beehives, and a 28.8 kW solar array backed by 90 kWh of battery storage — the same instrument‑everything, owe‑nothing‑to‑anyone thinking he brings to enterprise clients, proven first on his own land. His HIVE‑DC concept — a data centre in a beehive — grew directly out of that overlap. Mike previously presented "Aquaponics, Apiculture, and Advanced Networking with Apache CloudStack" at the CloudStack European User Group in London. He publishes under the Leaf Spine Books imprint, and is preparing to establish a sustainable‑technology education centre uniting aquaponics, beekeeping and cloud infrastructure under one roof.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub