Skip to content

Instantly share code, notes, and snippets.

@armaniacs
Last active December 12, 2015 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armaniacs/4752642 to your computer and use it in GitHub Desktop.
Save armaniacs/4752642 to your computer and use it in GitHub Desktop.
JAWS-UG 横浜用
$ cfn-create-stack test-0818a --template-url https://s3-ap-northeast-1.amazonaws.com/arakisa/CloudFormation/eccube-araki-classic09.json --parameters "SiteURL=test-0818a.araki.in"
"Parameters": {
"SiteURL": {
"Type": "String",
"Default": "xxxxx.example.com",
"Description" : "Name of a FQDN for ec-site."
},
"InstanceType" : {
"Description" : "WebServer EC2 instance type",
"Type" : "String",
"Default" : "m1.small",
"AllowedValues" : [ "t1.micro","m1.small","m1.medium","m1.large","m1.xlarge","m2.xlarge","m2.2xlarge","m2.4xlarge","c1.medium","c1.xlarge","cc1.4xlarge","cc2.8xlarge","cg1.4xlarge"],
"ConstraintDescription" : "must be a valid EC2 instance type."
},
"BackupWindow": {
"Type": "String",
"Default": "18:30-19:00",
"Description": "The daily time range during which automated backups"
},
"DBUser": {
"Type": "String",
"Default": "eccube_db",
"Description": "RDS user"
},
"DBPass": {
"Type": "String",
"Default": "eccube_db",
"Description": "RDS password"
}
"dnscdpshoparakiin": {
"Type": "AWS::Route53::RecordSet",
"Properties": {
"HostedZoneId": "/hostedzone/xxxxxxxxxx",
"Name": {"Ref":"SiteURL"},
"Type": "CNAME",
"TTL": "300",
"Comment": "example.com ",
"ResourceRecords": [
{ "Fn::GetAtt" : [ "elbeccube", "DNSName" ] }
]
}
},
"UserData": { "Fn::Base64" : { "Fn::Join" : ["", [
"#!/bin/bash \n",
"sed -i \"s/hogeurl.example.com/",
{"Ref":"SiteURL"},
"/g\" /home/ec2-user/cdp/eccube/data/config/config.php\n",
"sed -i \"s/eccube.fugahoge.ap-northeast-1.rds.amazonaws.com/",
{"Fn::GetAtt": ["rdseccube","Endpoint.Address"]},
"/g\" /home/ec2-user/cdp/eccube/data/config/config.php\n",
"sed -i \"s/eccube_db/",
{"Ref":"DBUser"},
"/g\" /home/ec2-user/cdp/eccube/data/config/config.php\n",
"sed -i \"s/DB_PASSWORD', 'motomoto'/DB_PASSWORD', '",
{"Ref":"DBPass"},
"'/g\" /home/ec2-user/cdp/eccube/data/config/config.php\n",
"#EOF"
]]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment