Create an Amazon Elastic File System (EFS) from the DuploCloud Portal
Amazon Elastic File System (Amazon EFS) is a scalable, fully managed file storage service. It offers a simple and scalable file storage solution for use with AWS cloud services and on-premises resources. It is designed to provide shared file storage for multiple instances, enabling concurrent access, as well.
See the AWS Documentation for more information.
Before you create an EFS, you must configure the EFS Volume Controller for your Infrastructure.
In the DuploCloud portal, navigate to Administrator -> Infrastructure. The Infrastructure page displays.
Select your Infrastructure from the Name column.
Click the Settings tab.
Click Add. The Infra - Set Custom Data pane displays.
From the Settings Name list box, select Enable EFS Volume Controller.
Select Enable.
Click Set.
In the Settings tab, your configuration Enable EFS Volume Controller is set to true.
In the DuploClod Portal, navigate to Cloud Services -> Storage.
Click the EFS tab.
Click Add. The Add Elastic File System page displays.
In the Name field, enter a name for the EFS you want to create.
In the Creation Token field, enter a string of up to 64 ASCII characters.
From the Performance Mode list box, select General or Max I/O. Select General for most file systems. Selecting Max I/O allows scaling to higher levels of aggregate throughput and operations per second with a tradeoff of slightly higher latencies for most file operations. You can not change this setting after the file system has been created.
From the Throughput Mode list box, select Bursting or Provisioned. If you select Provisioned, you must also set a value from 1 to 1024 for Provisioned Throughput (in MiB). After you create the file system, you can decrease the file system's throughput in Provisioned mode or change between the throughput modes, as long as more than 24 hours have passed since the last decrease in throughput or throughput mode change.
Change other defaults as needed as click Create. The EFS is created and displayed in the EFS tab. Select the EFS from the Name column and view the configuration in the Details tab.
Max I/O mode is not supported on file systems using One Zone storage classes.
Information about EFS Mount Targets and Access Points is available in their respective tabs.
You can update the policies for EFS Lifecycle management in the DuploCloud Portal. See the AWS Documentation for more information.
If you want to disable an EFS Lifecycle Management Policy that you previously created, you must do so in the AWS Portal. You can not disable a Lifecycle Management Policy by using the DuploCloud portal.
In the DuploClod Portal, navigate to Cloud Services -> Storage.
Click the EFS tab.
Select the EFS from the Name column. The EFS page displays.
From the Actions menu, select Update Lifecycle Policies. The Update EFS Lifecycle Policies pane displays.
From the Transition to IA list box, select the time duration (in days) to elapse before transitioning files to the IA storage class.
Optionally, select Transition to Primary Storage Class, if appropriate.
Click Submit. The EFS Lifecycle Policies are updated and can be viewed in the Lifecycle Policies tab.
Mount an EFS in an EC2 instance using a script
If you want to connect an EFS to a Native Docker Service, for example, you can mount it in an EC2 instance.
Create a bash
script, as in the example above, and replace nfs4
with your EFS endpoint. You can run the script below on an existing EC2 instance or run an EC2 user data script to configure the instance at first launch (bootstrapping).
In the DuploCloud Portal, edit the DuploCloud Service.
On the Edit Service page, click Next. The Advanced Options page displays.
On the Advanced Options page, in the Volumes field, enter the configuration YAML to mount the EFS endpoint as a volume.