In honor of the transnational strike on Amazon this week, here are instructions for moving your AWS unikernels to a cloud that used to claim it wasn’t evil. You might also be interested in establishing a picket line for your packets.
This blog originally ran on Amazon EC2. Since early 2017, it’s been running on a different tech behemoth’s massive public cloud. The deployment process is considerably easier and faster on this alternative public cloud – I first saw it as a live demo given by Michael Bright and immediately knew I wanted to replace my AWS pipeline with it. My AWS unikernel deployments required a secondary Linux host for building AMIs from a kernel image and usually took around 20 minutes from start to finish; GCP deployments can be done from my development host and take around 90 seconds.
One-time GCP Preparation
- get the tech behemoth public cloud tools.
- register an account at the tech behemoth’s public cloud console and start a project.
- configure your public cloud tools to use the project you’ve started by default.
- register a storage location for the project in the tech behemoth’s public cloud console.
- enable billing (yikes), but be comforted in the knowledge that your use will be free for the first year
- get a non-ephemeral public IPv4 address in the tech behemoth’s public cloud console, and point the relevant DNS records at it
Deploying a MirageOS Unikernel to GCP
- configure your unikernel. You’ll want to use
dhcpnetwork configuration, and build for the
virtiobackend. Currently, that invocation looks like
mirage configure -t virtio --dhcp true.
- build your unikernel:
make depend && make.
- package your unikernel for booting:
solo5-mkimage -f tar unikernel.tar.gz unikernel.virtio, replacing “unikernel” with some sensible name.
- ship your unikernel off to tech behemoth storage:
gsutil cp unikernel.tar.gz gs://my_storage_location
- make a “compute image” based on the unikernel:
gcloud compute images create this-particular-unikernel-version --source-uri gs://my_storage_location/unikernel.tar.gz(you’ll have to also pick a deployment zone)
- start a low-resource cheap instance based on that image:
gcloud compute instances create --image this-particular-unikernel-version --machine-type=f1-micro this-particular-instance
- watch it boot with
gcloud compute instances tail-serial-port-output this-particular-instance
- in the tech behemoth’s public cloud console, associate your public IPv4 address to this instance
- notice formatting errors and typos and repeat as necessary
One-time AWS Shutdown
- shut down and remove your AWS EC2 build host
- delete your unikernel instances, snapshots, IPs, DNS records, and storage blocks from AWS
- remove your billing information from AWS’s billing console
- find a good reliable solar-powered place to host computers run by friendly people who don’t sell you out, nor your information
- put a computer in there
- install a good hypervisor and albatross
- deploy unikernels all the live-long day
- fully automated luxury gay solarpunk communism