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 | |
aws ec2 create-image --instance-id $(curl -s http://169.254.169.254/latest/meta-data/instance-id) --name image-$(date +'%s') |
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 | |
# The TAG_KEY and TAG_VALUE environment variables | |
# can be set before running the script otherwise the | |
# default are used. | |
IDS`aws ec2 describe-instances \ | |
--filter "Name=tag:${TAG_KEY:-ScheduledUptime},Values=${TAG_VALUE:-True}" \ | |
--query 'Reservations[*].Instances[*].[InstanceId]' \ | |
--output text` |
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 | |
if [ $# -eq 0 ]; then | |
echo "Usage: $@ upload|download" | |
if [ "$BUCKET_NAME" == "" ]; then | |
echo "variable \$BUCKET_NAME name must be set." | |
fi | |
else | |
DIR=`basename ${PWD}` | |
aws configure --profile cloud-backup |
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 | |
# The TAG_KEY and TAG_VALUE environment variables | |
# can be set before running the script otherwise the | |
# default are used. | |
IDS`aws ec2 describe-instances \ | |
--filter "Name=tag:${TAG_KEY:-ScheduledUptime},Values=${TAG_VALUE:-True}" \ | |
--query 'Reservations[*].Instances[*].[InstanceId]' \ | |
--output text` |
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 | |
# Stop all containers | |
docker kill $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
DATE = $(shell date) | |
NAME = dcrbsltd/image | |
VERSION = 1 | |
all: build | |
build: | |
docker build -t $(NAME):$(VERSION) --rm . | |
tag_latest: |
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/sh | |
### BEGIN INIT INFO | |
# Provides: dockercompose | |
# Required-Start: $docker | |
# Required-Stop: $docker | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Docker Services | |
### END INIT INFO |
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 | |
# Abort with exit and message | |
# Used for testing | |
function abort() | |
{ | |
echo " *** ERROR $@" | |
exit 1 | |
} |
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 | |
DNS_DOMAIN=${DNS_DOMAIN:-example.com} | |
HOST=${HOST:-www} | |
HOSTNAME=$HOST.$DNS_DOMAIN | |
PROTOCOL=${PROTOCOL:-https} | |
URL=$PROTOCOL://$HOSTNAME | |
echo " --> Testing for $URL" | |
# Number of requests | |
TIMEOUT=30 | |
# Time to wait between requests |
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 | |
sudo yum install -y gcc libxml2 libxml2-devel libxslt libxslt-devel |