Cloud, DevOps, System-Engineering | 3 min read

Using AWS bare metal instead of buying a server

Remi Locherer
July 2019
written by Remi Locherer

Recently I received instructions and some cool scripts from Juniper to install Contrail Multicloud Enterprise on a single server for demo purposes.

The requirements specification were impressive: The server for this installation needs to have 256 GB of RAM and 32 vCPUs, since it will run a full OpenStack installation along with the Contrail software. Such a server costs typically in excess of CHF 10’000, is loud, power-hungry and needs to be racked and stacked.

Instead of buying a server for this setup we tried an Amazon bare metal EC2 instance. Amazon announced bare metal servers at AWS re:Invent 2017. Since May 2018 they are generally available. It’s fascinating that bare metal servers can now be consumed the same way as virtual machines. You can spin up a new instance within a few minutes and pay only for the time it is on. A virtual machine is not good enough for this setup, since we are spinning up KVM based VMs on this server. I opted for the z1d.metal instance type which comes with 48 vCPUs, 384 GiB of memory and two 900 GiB NVMes. It currently costs less than $5 per hour.

The bare metal instances from Amazon are based on their Nitro system. A part of this system is a Smart NIC that implements the network overlay functions, security groups and other functionality. Another Nitro card represents remote block storage as local NVMe devices similar to a traditional Fiber Channel HBA. With this and the other components of the Nitro system, an AWS bare metal instance offers the same functions and flexibility as the virtual instances.

To benefit from the pricing model in the cloud I fully automated the installation process, so that we are able to quickly spin up instances. For this, I created an S3 bucket and uploaded all the VM images to it. Then I created a simple script that executes all the required installation steps, including downloading the VM images from the S3 bucket. This script is then used as “user-data” in a launch template. It gets executed on the first boot of an instance created from this template. The template is also assigned an IAM role with a policy that allows read only access without a password on the S3 bucket, which contains the VM images. Now one only needs to instantiate the launch template and about 30 minutes later the demo setup with several VMs is ready to go. In contrast to buying a server we can now also spin up multiple setups in parallel if necessary.

The availability of bare metal servers in the cloud allowed us to build a cost effective solution that can be provisioned rapidly.

14+
Remi Locherer
July 2019
written by Remi Locherer

Like this article? | Share it with a colleague