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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation Sample Template Redmine_Simple: Redmine is a flexible project management web application which includes a gantt chart, calendar, wiki, forums, multiple roles, and email notification. You can sign-in with the default account 'admin' and the default password 'admin'. This template installs a Redmine stack using a single EC2 instance with a local MySQL database for storage. It demonstrates using the AWS CloudFormation bootstrap scripts to install the packages and files necessary to deploy the Redmine, Rails, MySQL and all dependent packages at instance launch time. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters" : { | |
"KeyName" : { | |
"Description" : "Name of and existing EC2 KeyPair to enable SSH access to the instance", | |
"Type" : "String" |
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
source 'http://rubygems.org' | |
gem 'rails', '3.2.5' | |
gem 'prototype-rails', '3.2.1' | |
gem "i18n", "~> 0.6.0" | |
gem "coderay", "~> 1.0.6" | |
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] | |
gem "builder" | |
# Optional gem for LDAP authentication |
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
import json | |
import time | |
import boto | |
import boto.sqs | |
import boto.sns | |
sns_cn = boto.sns.connect_to_region('ap-northeast-1') | |
sqs_cn = boto.sqs.connect_to_region('ap-northeast-1') | |
q = sqs_cn.get_queue('QUEUE_NAME') |
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 | |
# | |
# httpd Startup script for the Apache HTTP Server | |
# | |
# chkconfig: - 85 15 | |
# description: The Apache HTTP Server is an efficient and extensible \ | |
# server implementing the current HTTP standards. | |
# processname: httpd | |
# config: /etc/httpd/conf/httpd.conf | |
# config: /etc/sysconfig/httpd |
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 | |
cd /var/www/html | |
mkdir shared | |
mkdir releases | |
cd releases | |
git clone https://github.com/imaifactory/howtodeploy.git | |
mv -f howtodeploy initial | |
cd .. | |
ln -s releases/initial current |
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
set :application, "YOUR_APP_NAME" | |
set :repository, "https://github.com/YOUR_ACCOUNT/YOUR_APP.git" | |
set :scm, "git" | |
set :user, "ec2-user" | |
set :branch, "master" | |
set :deploy_via, :remote_cache | |
set :deploy_to, "YOUR_DOCUMENT_ROOT" | |
role :web, "YOUR_HOST_1", "YOUR_HOST_2", ... |
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 | |
cd /home/ec2-user | |
wget http://ec2-downloads.s3.amazonaws.com/cloudwatch-samples/CloudWatchMonitoringScripts-v1.1.0.zip | |
unzip CloudWatchMonitoringScripts-v1.1.0.zip | |
rm CloudWatchMonitoringScripts-v1.1.0.zip | |
chown ec2-user:ec2-user aws-scripts-mon | |
echo "*/5 * * * * ec2-user /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --disk-space-util --disk-path=/ --from-cron" >> /etc/crontab |
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
<?php | |
$client = DynamoDbClient::factory(array( | |
'region' => 'us-west-2', | |
'scheme' => 'http', #httpかhttpsを選ぶ デフォルトはhttp | |
"client.backoff" => false, #falseにするとエラーハンドリングしない | |
'client.backoff.logger' => 'debug' #debug指定するとエラーをdebugする | |
)); |
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
<?php | |
require 'vendor/autoload.php'; | |
use Aws\DynamoDb\DynamoDbClient; | |
$client = DynamoDbClient::factory(array( | |
'region' => 'us-west-2', | |
'scheme' => 'http', | |
#"client.backoff" => false, | |
'client.backoff.logger' => 'debug', |
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
require "aws-sdk" | |
AWS.config( | |
:access_key_id => 'YOUR_ACCESS_KEY', | |
:secret_access_key => 'YOUR_SECRET_KEY' | |
) | |
s3 = AWS::S3.new | |
bucket = s3.buckets['bucket'] |
OlderNewer