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
# Create Q | |
ENV=dev1 | |
Qname=tom-test1 | |
Q1=$(aws sqs create-queue --queue-name "$ENV-$Qname" --output text) | |
echo $Q1 | |
aws sqs send-message --queue-url $Q1 --message-body "Test message 1 from Tom" |
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 | |
# based on AWS Cloud9 | |
# shutdown ec2 if no ssh connections after 1/2 hour | |
# Add to cron to run every minute | |
# User needs sudo permission to run 'shutdown' | |
# | |
set -euo pipefail |
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
# | |
# sample property file | |
# illustrates more flexible way to define variables based on Environemnt | |
# | |
# Assume external variable $RNT_ENV | |
# | |
# current system | |
# only works for 3 environments |
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 | |
set -eo pipefail | |
## Allows for creation of "Basic" DNS records in a Route53 hosted zone | |
# Make sure all output is in json | |
export AWS_DEFAULT_OUTPUT=json | |
function main() { |
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 | |
### BEGIN INIT INFO | |
# Provides: Wishtrip-boot | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts wishtrip services | |
# Description: starts wishtrip services |
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
# | |
# all wishtrip services (controller, jobexec, gate) should have the following near the top of the service starup script | |
# | |
RNT_CONFIG_FILE=/etc/rnt.conf | |
# read in wishtrip config file for value of RNT_ENV etc | |
if [ -s $RNT_CONFIG_FILE ]; then | |
. $RNT_CONFIG_FILE |
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 | |
# May 2018 | |
# removed iptables and just run directly on port 443 | |
# added RNT_ENV | |
# | |
# | |
# read in wishtrip config file for value of RNT_ENV etc | |
# |
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
# | |
# resize an ec2 from and GPU g4dn.xlarge to t3.medium | |
# | |
AWS_INSTANCE_ID=i-0d286d48c371f57b1 | |
TYPE=t3.medium | |
echo This will stop your instance $AWS_INSTANCE_ID to type $TYPE | |
# find name | |
echo Name tag is: |
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
# | |
# resize an ec2 between t3.medium and GPU g4dn.xlarge | |
# | |
AWS_INSTANCE_ID=i-0d286d48c371f57b1 | |
TYPE=g4dn.xlarge | |
echo This will stop your instance $AWS_INSTANCE_ID to type $TYPE | |
# find name | |
echo Name tag is: |
OlderNewer