Created
September 3, 2013 22:37
-
-
Save dstrctrng/6430551 to your computer and use it in GitHub Desktop.
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
"Ec2Instance" : { | |
"Type" : "AWS::EC2::Instance", | |
"Properties" : { | |
"KeyName" : { "Ref" : "KeyName" }, | |
"SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], | |
"ImageId" : { "Fn::FindInMap" : [ "RegionMap", { "Ref" : "AWS::Region" }, "AMI" ]}, | |
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["",[ | |
"#!/bin/bash -ex","\n", | |
"yum -y install gcc-c++ make","\n", | |
"yum -y install mysql-devel sqlite-devel","\n", | |
"yum -y install ruby-rdoc rubygems ruby-mysql ruby-devel","\n", | |
"gem install --no-ri --no-rdoc rails","\n", | |
"gem install --no-ri --no-rdoc mysql","\n", | |
"gem install --no-ri --no-rdoc sqlite3","\n", | |
"rails new myapp","\n", | |
"cd myapp","\n", | |
"rails server -d","\n", | |
"curl -X PUT -H 'Content-Type:' --data-binary '{\"Status\" : \"SUCCESS\",", | |
"\"Reason\" : \"The application myapp is ready\",", | |
"\"UniqueId\" : \"myapp\",", | |
"\"Data\" : \"Done\"}' ", | |
"\"", {"Ref" : "WaitForInstanceWaitHandle"},"\"\n" ]]}} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment