Code Monkey home page Code Monkey logo

docker-volume-efs's Introduction

Docker Volume Plugin: AWS EFS

Docker plugin for AWS EFS (Elastic File System)

This plugin performs the following actions:

  • Detect the VPC Subnet which the AWS host is placed (uses the DescribeInstance API endpoint)
  • Automatically detect the region which the AWS host is placed
  • Create an EFS Filesystem if it does not exist
  • Create an EFS Mount Point if it does not exist
  • Mount to the local filesystem and into the container environment

Acknowledgements

Roadmap

  • Check if the system has NFS utils installed (at boot)

Requirements

Usage

Start the plugin

$ sudo ./docker-volume-efs

Start a container with this plugin as the file storage backend

$ docker run --rm -it --volume-driver=efs -v foo:/no busybox

This results in:

  • A new EFS Filesystem called "foo" being created
  • The EFS Filesystem mounted onto the host and into the container

IAM Role

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:CreateNetworkInterface",
        "ec2:DeleteNetworkInterface",
        "ec2:Describe*",
        "ec2:ModifyNetworkInterfaceAttribute",
        "elasticfilesystem:*"
      ],
      "Resource": "*"
    }
  ]
}

Credentials

Before using the tool, ensure that you've configured credentials. The best way to configure credentials on a development machine is to use the ~/.aws/credentials file, which might look like:

[default]
aws_access_key_id = AKID1234567890
aws_secret_access_key = MY-SECRET-KEY

You can learn more about the credentials file from this blog post.

Alternatively, you can set the following environment variables:

AWS_ACCESS_KEY_ID=AKID1234567890
AWS_SECRET_ACCESS_KEY=MY-SECRET-KEY

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.