Using Block Storage#
In this lab you’ll create a VM with additional attached block storage. Unlike previous labs you will have to research how to do this using Terraform and Ansible. This lab is important preparation for the project, which requires that you add a persistent disk for data.
In the class lecture we created a VM and added additional block storage. Once present we formatted and mounted the additional disk. This is the basic procedure that you will implement using code.
Add the following storage to your VM:
Zonal persistent disk:
Class: Any storage class
(Extra Credit) Local attached SSD
In your git repository, create copy the
base directory to create a new directory for this lab.
$ cp -R base lab10 $ cd lab10
Your Terraform configuration should build on the base configuration by adding the persistent disks. Research the necessary resources on Terraform’s documentation:
It’s sometimes helpful to reverse-engineer a system created through the GUI.
Ansible is required to format and mount the disks. Your ansible playbook should have tasks that do this. You can search for the plugins you need on Ansible’s documentation page:
It’s also helpful to Google things like “format a disk with Ansible” to find the right plugins and examples.
Turn in your configuration and playbook files: