Commit 92eb9de2 by Feanil Patel

Remove EdxServerUser since we have IAM roles setup for all application instance types.

parent 32c911a3
...@@ -2328,40 +2328,6 @@ ...@@ -2328,40 +2328,6 @@
} ] } ]
} }
}, },
"EdxServerUser":{
"Type":"AWS::IAM::User",
"Properties":{
"Path":"/",
"Policies":[
{
"PolicyName":"root",
"PolicyDocument":{
"Statement":[
{
"Effect":"Allow",
"Action":[
"cloudformation:DescribeStackResource",
"s3:Put",
"ses:SendEmail",
"ses:SendRawEmail",
"ses:GetSendQuota"
],
"Resource":"*"
}
]
}
}
]
}
},
"HostKeys":{
"Type":"AWS::IAM::AccessKey",
"Properties":{
"UserName":{
"Ref":"EdxServerUser"
}
}
},
"AdminSecurityGroup":{ "AdminSecurityGroup":{
"Type":"AWS::EC2::SecurityGroup", "Type":"AWS::EC2::SecurityGroup",
"Properties":{ "Properties":{
...@@ -2383,41 +2349,6 @@ ...@@ -2383,41 +2349,6 @@
}, },
"EdxappServer":{ "EdxappServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Metadata":{
"AWS::CloudFormation::Init":{
"config":{
"files":{
"/home/ubuntu/.s3cfg":{
"content":{
"Fn::Join":[
"",
[
"[default]\n",
"access_key = ",
{
"Ref":"HostKeys"
},
"\n",
"secret_key = ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
"\n",
"use_https = True\n"
]
]
},
"mode":"000644",
"owner":"ubuntu",
"group":"ubuntu"
}
}
}
}
},
"Properties":{ "Properties":{
"IamInstanceProfile":{ "Ref":"EdxappInstanceProfile" }, "IamInstanceProfile":{ "Ref":"EdxappInstanceProfile" },
"SecurityGroups":[ "SecurityGroups":[
...@@ -2447,7 +2378,7 @@ ...@@ -2447,7 +2378,7 @@
"Fn::Join":[ "Fn::Join":[
"", "",
[ [
"#!/bin/bash\n", "#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n", "exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n", "exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n", "function error_exit\n",
...@@ -2465,31 +2396,9 @@ ...@@ -2465,31 +2396,9 @@
"sudo mount /dev/xvdd /opt\n", "sudo mount /dev/xvdd /opt\n",
"apt-get -y update\n", "apt-get -y update\n",
"apt-get -y install python-setuptools\n", "apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Python Tools installed\" - `date`\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n", "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Cloudformation Boostrap installed \" - `date`\n",
"cfn-init --region ",
{
"Ref":"AWS::Region"
},
" -s ",
{
"Ref":"AWS::StackName"
},
" -r EdxappServer ",
" --access-key ",
{
"Ref":"HostKeys"
},
" --secret-key ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
" || error_exit 'Failed to run cfn-init'\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n", "# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '", "cfn-signal -e $? -r 'Edx Server configuration' '",
{ {
...@@ -2789,41 +2698,6 @@ ...@@ -2789,41 +2698,6 @@
}, },
"XqueueServer":{ "XqueueServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Metadata":{
"AWS::CloudFormation::Init":{
"config":{
"files":{
"/home/ubuntu/.s3cfg":{
"content":{
"Fn::Join":[
"",
[
"[default]\n",
"access_key = ",
{
"Ref":"HostKeys"
},
"\n",
"secret_key = ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
"\n",
"use_https = True\n"
]
]
},
"mode":"000644",
"owner":"ubuntu",
"group":"ubuntu"
}
}
}
}
},
"Properties":{ "Properties":{
"IamInstanceProfile":{ "Ref":"XqueueInstanceProfile" }, "IamInstanceProfile":{ "Ref":"XqueueInstanceProfile" },
"SecurityGroups":[ "SecurityGroups":[
...@@ -2853,7 +2727,7 @@ ...@@ -2853,7 +2727,7 @@
"Fn::Join":[ "Fn::Join":[
"", "",
[ [
"#!/bin/bash\n", "#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n", "exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n", "exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n", "function error_exit\n",
...@@ -2867,31 +2741,9 @@ ...@@ -2867,31 +2741,9 @@
"}\n", "}\n",
"apt-get -y update\n", "apt-get -y update\n",
"apt-get -y install python-setuptools\n", "apt-get -y install python-setuptools\n",
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Python Tools installed\" - `date`\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n", "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Cloudformation Boostrap installed \" - `date`\n",
"cfn-init --region ",
{
"Ref":"AWS::Region"
},
" -s ",
{
"Ref":"AWS::StackName"
},
" -r EdxappServer ",
" --access-key ",
{
"Ref":"HostKeys"
},
" --secret-key ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
" || error_exit 'Failed to run cfn-init'\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n", "# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '", "cfn-signal -e $? -r 'Edx Server configuration' '",
{ {
...@@ -3179,41 +3031,6 @@ ...@@ -3179,41 +3031,6 @@
}, },
"RabbitMQServer":{ "RabbitMQServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Metadata":{
"AWS::CloudFormation::Init":{
"config":{
"files":{
"/home/ubuntu/.s3cfg":{
"content":{
"Fn::Join":[
"",
[
"[default]\n",
"access_key = ",
{
"Ref":"HostKeys"
},
"\n",
"secret_key = ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
"\n",
"use_https = True\n"
]
]
},
"mode":"000644",
"owner":"ubuntu",
"group":"ubuntu"
}
}
}
}
},
"Properties":{ "Properties":{
"SecurityGroups":[ "SecurityGroups":[
{ {
...@@ -3242,7 +3059,7 @@ ...@@ -3242,7 +3059,7 @@
"Fn::Join":[ "Fn::Join":[
"", "",
[ [
"#!/bin/bash\n", "#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n", "exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n", "exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n", "function error_exit\n",
...@@ -3259,28 +3076,6 @@ ...@@ -3259,28 +3076,6 @@
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n", "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"cfn-init --region ",
{
"Ref":"AWS::Region"
},
" -s ",
{
"Ref":"AWS::StackName"
},
" -r RabbitMQServer ",
" --access-key ",
{
"Ref":"HostKeys"
},
" --secret-key ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
" || error_exit 'Failed to run cfn-init'\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n", "# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '", "cfn-signal -e $? -r 'Edx Server configuration' '",
{ {
...@@ -3601,41 +3396,6 @@ ...@@ -3601,41 +3396,6 @@
}, },
"XServer":{ "XServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Metadata":{
"AWS::CloudFormation::Init":{
"config":{
"files":{
"/home/ubuntu/.s3cfg":{
"content":{
"Fn::Join":[
"",
[
"[default]\n",
"access_key = ",
{
"Ref":"HostKeys"
},
"\n",
"secret_key = ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
"\n",
"use_https = True\n"
]
]
},
"mode":"000644",
"owner":"ubuntu",
"group":"ubuntu"
}
}
}
}
},
"Properties":{ "Properties":{
"IamInstanceProfile":{ "Ref":"XServerInstanceProfile" }, "IamInstanceProfile":{ "Ref":"XServerInstanceProfile" },
"SecurityGroups":[ "SecurityGroups":[
...@@ -3665,7 +3425,7 @@ ...@@ -3665,7 +3425,7 @@
"Fn::Join":[ "Fn::Join":[
"", "",
[ [
"#!/bin/bash\n", "#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n", "exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n", "exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n", "function error_exit\n",
...@@ -3682,28 +3442,6 @@ ...@@ -3682,28 +3442,6 @@
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n", "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"cfn-init --region ",
{
"Ref":"AWS::Region"
},
" -s ",
{
"Ref":"AWS::StackName"
},
" -r XServer ",
" --access-key ",
{
"Ref":"HostKeys"
},
" --secret-key ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
" || error_exit 'Failed to run cfn-init'\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n", "# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '", "cfn-signal -e $? -r 'Edx Server configuration' '",
{ {
...@@ -4086,41 +3824,6 @@ ...@@ -4086,41 +3824,6 @@
}, },
"WorkerServer":{ "WorkerServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Metadata":{
"AWS::CloudFormation::Init":{
"config":{
"files":{
"/home/ubuntu/.s3cfg":{
"content":{
"Fn::Join":[
"",
[
"[default]\n",
"access_key = ",
{
"Ref":"HostKeys"
},
"\n",
"secret_key = ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
"\n",
"use_https = True\n"
]
]
},
"mode":"000644",
"owner":"ubuntu",
"group":"ubuntu"
}
}
}
}
},
"Properties":{ "Properties":{
"SecurityGroups":[ "SecurityGroups":[
{ {
...@@ -4149,7 +3852,7 @@ ...@@ -4149,7 +3852,7 @@
"Fn::Join":[ "Fn::Join":[
"", "",
[ [
"#!/bin/bash\n", "#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n", "exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n", "exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n", "function error_exit\n",
...@@ -4170,28 +3873,6 @@ ...@@ -4170,28 +3873,6 @@
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n", "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"cfn-init --region ",
{
"Ref":"AWS::Region"
},
" -s ",
{
"Ref":"AWS::StackName"
},
" -r WorkerServer ",
" --access-key ",
{
"Ref":"HostKeys"
},
" --secret-key ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
" || error_exit 'Failed to run cfn-init'\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n", "# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '", "cfn-signal -e $? -r 'Edx Server configuration' '",
{ {
...@@ -4487,41 +4168,6 @@ ...@@ -4487,41 +4168,6 @@
}, },
"ForumServer":{ "ForumServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Metadata":{
"AWS::CloudFormation::Init":{
"config":{
"files":{
"/home/ubuntu/.s3cfg":{
"content":{
"Fn::Join":[
"",
[
"[default]\n",
"access_key = ",
{
"Ref":"HostKeys"
},
"\n",
"secret_key = ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
"\n",
"use_https = True\n"
]
]
},
"mode":"000644",
"owner":"ubuntu",
"group":"ubuntu"
}
}
}
}
},
"Properties":{ "Properties":{
"SecurityGroups":[ "SecurityGroups":[
{ {
...@@ -4550,7 +4196,7 @@ ...@@ -4550,7 +4196,7 @@
"Fn::Join":[ "Fn::Join":[
"", "",
[ [
"#!/bin/bash\n", "#!/bin/bash -x\n",
"exec >> /home/ubuntu/cflog.log\n", "exec >> /home/ubuntu/cflog.log\n",
"exec 2>> /home/ubuntu/cflog.log\n", "exec 2>> /home/ubuntu/cflog.log\n",
"function error_exit\n", "function error_exit\n",
...@@ -4571,28 +4217,6 @@ ...@@ -4571,28 +4217,6 @@
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n", "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"cfn-init --region ",
{
"Ref":"AWS::Region"
},
" -s ",
{
"Ref":"AWS::StackName"
},
" -r ForumServer ",
" --access-key ",
{
"Ref":"HostKeys"
},
" --secret-key ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
" || error_exit 'Failed to run cfn-init'\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n", "# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Server configuration' '", "cfn-signal -e $? -r 'Edx Server configuration' '",
{ {
...@@ -4888,41 +4512,6 @@ ...@@ -4888,41 +4512,6 @@
}, },
"MongoServer":{ "MongoServer":{
"Type":"AWS::AutoScaling::LaunchConfiguration", "Type":"AWS::AutoScaling::LaunchConfiguration",
"Metadata":{
"AWS::CloudFormation::Init":{
"config":{
"files":{
"/home/ubuntu/.s3cfg":{
"content":{
"Fn::Join":[
"",
[
"[default]\n",
"access_key = ",
{
"Ref":"HostKeys"
},
"\n",
"secret_key = ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
"\n",
"use_https = True\n"
]
]
},
"mode":"000644",
"owner":"ubuntu",
"group":"ubuntu"
}
}
}
}
},
"Properties":{ "Properties":{
"SecurityGroups":[ "SecurityGroups":[
{ {
...@@ -4968,28 +4557,6 @@ ...@@ -4968,28 +4557,6 @@
"echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Python Tools installed\" - `date` >> /home/ubuntu/cflog.txt\n",
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n", "easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz\n",
"echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n", "echo \"Cloudformation Boostrap installed \" - `date` >> /home/ubuntu/cflog.txt\n",
"cfn-init --region ",
{
"Ref":"AWS::Region"
},
" -s ",
{
"Ref":"AWS::StackName"
},
" -r MongoServer ",
" --access-key ",
{
"Ref":"HostKeys"
},
" --secret-key ",
{
"Fn::GetAtt":[
"HostKeys",
"SecretAccessKey"
]
},
" || error_exit 'Failed to run cfn-init'\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"#Install lvm2 so we can create logical volumes.\n", "#Install lvm2 so we can create logical volumes.\n",
"apt-get -y install lvm2 mdadm\n", "apt-get -y install lvm2 mdadm\n",
...@@ -5033,7 +4600,6 @@ ...@@ -5033,7 +4600,6 @@
"ln -s /edx/var/mongo/journal /edx/var/mongo/data/journal\n", "ln -s /edx/var/mongo/journal /edx/var/mongo/data/journal\n",
"echo \"cfn-init run \" - `date` >> /home/ubuntu/cflog.txt\n",
"# If all went well, signal success\n", "# If all went well, signal success\n",
"cfn-signal -e $? -r 'Edx Mongo configuration' '", "cfn-signal -e $? -r 'Edx Mongo configuration' '",
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment