Created
August 10, 2018 16:03
-
-
Save nyetwurk/9c1323f27fd8fd7b72382b3af17cd070 to your computer and use it in GitHub Desktop.
This file contains 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 | |
HERE=$(dirname $0) | |
SED="sed -r s/[[:blank:]]+/,/g" | |
function lxd-images() | |
{ | |
# snap install lxd | |
lxc image list -c fl --format csv | |
} | |
function goc-images() | |
{ | |
# https://cloud.google.com/sdk/docs/#install_the_latest_cloud_tools_version_cloudsdk_current_version | |
gcloud compute images list --project=blockdaemon-development --filter=local-dev | $SED | |
} | |
# Amazon | |
function aws-images() | |
{ | |
# sudo aptitude install awscli | |
for region in `aws ec2 describe-regions --output text | cut -f3`; do | |
OUT=$(aws ec2 describe-images --owners=self --filters Name=name,Values="*-local-dev-*" --output text --region $region | grep IMAGES | cut -f6,9,10 | $SED) | |
if [ ! -z "$OUT" ]; then | |
echo "$OUT,$region" | |
fi | |
done | |
} | |
# Digital ocean | |
function doc-images() | |
{ | |
# snap install doctl | |
doctl compute image list --format ID,Name | grep -- -local-dev- | $SED | |
} | |
function arts-images() | |
{ | |
pushd $HERE/.. > /dev/null | |
./task-run.sh cloudarts list vmimage 2>/dev/null | $SED | |
popd > /dev/null | |
} |
Author
nyetwurk
commented
Aug 10, 2018
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment