Skip to content

Instantly share code, notes, and snippets.

@muresan
Created September 14, 2017 14:38
Show Gist options
  • Select an option

  • Save muresan/5c86702cce5e35f71280b08fe0b26ef5 to your computer and use it in GitHub Desktop.

Select an option

Save muresan/5c86702cce5e35f71280b08fe0b26ef5 to your computer and use it in GitHub Desktop.
# ENSURE:
# - 2x EFS are created, one regular one maxio (maximum flexibility)
# - Ensure the security groups attached to the EFSs are allowing NFS access
# - Ensure that nfs-utils / nfs-common is installed on the machines
# - Test prior that you can mount the filesystems using the commands from the EFS UI
# grab docker version for plugin install reasons
DOCKER_VERSION=`docker version -f "{{ .Server.Version }}"`
# create an EFS General Purpose
EFS_ID_REGULAR=fs-00000001
# create an EFS MaxIO
EFS_ID_MAXIO=fs-00000002
# AWS region
AWS_REGION=`curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region`
docker plugin install --alias cloudstor:aws --grant-all-permissions docker4x/cloudstor:${DOCKER_VERSION}-aws1 \
CLOUD_PLATFORM=AWS EFS_ID_REGULAR=$EFS_ID_REGULAR EFS_ID_MAXIO=$EFS_ID_MAXIO \
AWS_REGION=$AWS_REGION EFS_SUPPORTED=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment