Last active
April 9, 2020 16:12
-
-
Save frimik/24aac829476b2b7cb72c3cc4436697aa to your computer and use it in GitHub Desktop.
Install CloudStor plugin on Amazon ECS Optimized AMI Instance
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 EFS_ID_REGULAR EFS_ID_MAXIO" | |
exit 1 | |
fi | |
EFS_ID_REGULAR=$1 | |
EFS_ID_MAXIO=$2 | |
AWS_REGION="$(cat /etc/yum/vars/awsregion)" | |
DOCKER_VERSION=$(docker version | awk '/^Server/{f=1} $1 ~ /Version:/ {if(f) {print $2}}') | |
CLOUDSTOR_REPO="docker4x/cloudstor" | |
CLOUDSTOR_TAG="${DOCKER_VERSION}-aws1" | |
docker plugin install \ | |
--alias cloudstor:aws \ | |
--grant-all-permissions\ | |
${CLOUDSTOR_REPO}:${CLOUDSTOR_TAG} \ | |
CLOUD_PLATFORM=AWS EFS_ID_REGULAR=${EFS_ID_REGULAR} EFS_ID_MAXIO=${EFS_ID_MAXIO} AWS_REGION=${AWS_REGION} EFS_SUPPORTED=1 DEBUG=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://spot.io/blog/ecs-persistent-storage-docker-plugins/