View add-dns-record.sh
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() { |
View wishtrip-service-skel
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 |
View property.sh
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 |
View stop-if-inactive.sh
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 |
View live-server
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 | |
# |
View resize-eli-down.sh
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: |
View resize-eli-up.sh
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: |
View wishtrip-boot
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 |
View credentials.sh
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
# | |
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
# You must use 'source' to run this file, otherwise it has no effect | |
# Alternately, you can put it in .bashrc | |
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
# e.g. | |
# $ source credentials.sh | |
# | |
# |
OlderNewer