System Configuration: Disregarded Options
This page provides details about deprecated system configuration options. While we no longer use them, this information might come in handy in the future.
Here’s the guide on creating a multi-attach compatible EBS volume: link. Select the io2 type. For size I chose 500 Gb, for IOPS - 1000. Size can be scaled up in the future (not down) and IOPS can be increased or decreased. Based on pricing calculator this should cost about $160 per month.
For availability zone, make sure to select the one where the ec-2 is located. For snapshot - “Don’t create volume from a snapshot”. Multi-attach can be enabled in the future. I’ve also clicked the “Encryption” option.
To attach the volume to the instance, just follow this guide.
Once we had a Workbench error of unknown source which I (for lack of a better guess) attributed to EBS problems. To try to solve it I turned on the “Auto-Enabled IO” EBS attribute. The problem was solved after some time, but it’s still not clear whether it was the cause. Here’s documentation on this attribute. Makes sense to revisit this decision in the future.
What happens if we mess up some critically important server system files or accidentally delete all user directories? If we do not do any backups it would be a horrible pain in the neck, if we do, it’ll be less of a pain. In the essence, there are two entities we want to be backing up:
-
Server system EBS - the main volume of the system instance, the one where Ubuntu and RStudio Workbench installations are located.
-
Shared EBS - the one we’ve created for hosting user home directories.
If you go to the EC-2 main page on AWS, select instances, find our RStudio Workbench instance in the list and open “Store” tab for this instance, you’ll see these two EBS drives. The smaller one would be the first one, the larger - the second one. It makes sense to give these volumes meaningful names to be able to easily find them from the backup service. To assign a name to a volume, you’ll need to navigate to its own page by clicking on its id. I gave the following names:
-
System EBS of RStudio Workbench ec-2 server -
EBS io2 for RS Workbench
With regards to Backup options - there are multiple available, but there are two most obvious ones:
From what I understand, DLM (first one) is an older service, more like ec-2 subservice for backups. AWS Backup is newer, with wider range of possibilities, not tailored for ec-2 only. And it’s a service on its own, with a nice dashboard, job statuses and all that stuff. People seem to be recommending AWS Backup more for production, so I went with this option.
Here’s a guide. You need to open the AWS Backup console and go right to “Step 3: Configure an automatic AWS Backup job of an Amazon EBS volume”.
In terms of schedule, I’ve set up a daily backup plan with 1 week retention period. This may be revised in the future.
When you will be assigning resources to the Backup plan, i.e. pointing the Backup plan to the volumes that need to be backed up regularly, select “specific resource types”, choose “EBS” and uncheck “All volumes”. You need to select only those two volumes mentioned above.
Use this guide selecting all the options as they advice. Use one availability zone storage. Make sure to select the same zone where your ec-2 instance is located. Availability zone of an instance can be found on the instance page under the “Networking” tab.
To mount the EFS to the instance, follow
this guide using the amazon-efs-utils system package.
You’ll need to connect to the instance using ssh, install the amazon-efs-utils
package along with some other packages and run a simple command.
It is important not to mess up the network security settings of both EFS and ec-2.
For EFS, use
this one. For inbound traffic it allows
only the NFS type connection.
For the ec-2, use
this one (may be reconsidered).