- a
- b
- な
- 5
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 | |
tunnel_host=$(aws ec2 describe-instances | jq -r '[.Reservations[].Instances[] | select(.Tags[].Key == "Name" and .Tags[].Value == "tunnel" and .State.Name == "running")] | .[0] | .PublicDnsName') | |
if [ -z $tunnel_host ]; then | |
echo "tunnel host is not running" | |
exit 1 | |
fi | |
COMMAND="ssh -f -N -L 3028:localhost:3128 ec2-user@$tunnel_host" |
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 | |
# ------------------------------------------------------------------ | |
# Deploy chef-repo.tar.gz of kirishima to S3 bucket | |
# ------------------------------------------------------------------ | |
VERSION=1.0 | |
SUBJECT=kiri-deploy-to-s3 | |
USAGE="Usage: deploy env" | |
# --- Options processing ------------------------------------------- |
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
# | |
# ------------------------------------------ | |
# CLOUDWATCH LOGS AGENT CONFIGURATION FILE | |
# ------------------------------------------ | |
# | |
# --- DESCRIPTION --- | |
# This file is used by the CloudWatch Logs Agent to specify what log data to send to the service and how. | |
# You can modify this file at any time to add, remove or change configuration. | |
# | |
# NOTE: A running agent must be stopped and restarted for configuration changes to take effect. |
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 | |
# | |
# Startup script for the Apache Web Server | |
# | |
# chkconfig: - 85 15 | |
# description: Apache2 is a World Wide Web server. It is used to serve \ | |
# HTML files and CGI. | |
# processname: httpd | |
# pidfile: /var/run/httpd.pid | |
# config: /usr/local/apache2/conf/access.conf |
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/sh | |
yum -y install httpd php mysql php-mysql | |
chkconfig httpd on | |
service httpd start | |
cd /tmp | |
wget http://us-east-1-aws-training.s3.amazonaws.com/self-paced-lab-4/examplefiles-as.zip | |
unzip examplefiles-as.zip | |
mv examplefiles-as/* /var/www/html |
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/sh | |
selfId=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
allocIds=$(aws ec2 describe-addresses | jq '[.Addresses[] | select(.AssociationId == null) | .AllocationId]') | |
allocLen=$(echo ${allocIds} | jq length) | |
if [ "${allocLen}" -eq 0 ]; then | |
echo 'Allocation address not found' 1>&2 | |
exit 2 |
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/sh | |
# | |
# chkconfig: - 89 11 | |
# description: serf daemon | |
# processname: serf | |
# config: /etc/serf/serf.conf | |
# Default-Start: | |
# Default-Stop: 0 1 2 3 4 5 6 | |
# Description: serf agent daemon |
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
http://www.selfsignedcertificate.com/ |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# change default provider to digital_ocean | |
ENV['VAGRANT_DEFAULT_PROVIDER'] = "aws" | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |