Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
bfe10e9d
Commit
bfe10e9d
authored
Jan 28, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #714 from edx/feanil/admin_jenkins
Feanil/admin jenkins
parents
f5586f40
5d3cc308
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
28 deletions
+101
-28
cloudformation_templates/edx-admin-reference-architecture.json
+81
-28
playbooks/ansible.cfg
+1
-0
playbooks/edx-east/deployer.yml
+19
-0
No files found.
cloudformation_templates/edx-admin-reference-architecture.json
View file @
bfe10e9d
...
@@ -88,6 +88,16 @@
...
@@ -88,6 +88,16 @@
"cg1.4xlarge"
"cg1.4xlarge"
],
],
"ConstraintDescription"
:
"must be a valid EC2 instance type."
"ConstraintDescription"
:
"must be a valid EC2 instance type."
},
"JenkinsServerPort"
:{
"Description"
:
"The TCP port for the Jenkins server"
,
"Type"
:
"Number"
,
"Default"
:
"8080"
},
"AsgardServerPort"
:{
"Description"
:
"The TCP port for the Asgard server"
,
"Type"
:
"Number"
,
"Default"
:
"8090"
}
}
},
},
"Mappings"
:{
"Mappings"
:{
...
@@ -684,14 +694,14 @@
...
@@ -684,14 +694,14 @@
},
},
{
{
"IpProtocol"
:
"tcp"
,
"IpProtocol"
:
"tcp"
,
"FromPort"
:
"80"
,
"FromPort"
:
{
"Ref"
:
"JenkinsServerPort"
}
,
"ToPort"
:
"80"
,
"ToPort"
:
{
"Ref"
:
"JenkinsServerPort"
}
,
"CidrIp"
:
"0.0.0.0/0"
"CidrIp"
:
"0.0.0.0/0"
},
},
{
{
"IpProtocol"
:
"tcp"
,
"IpProtocol"
:
"tcp"
,
"FromPort"
:
"443"
,
"FromPort"
:
{
"Ref"
:
"AsgardServerPort"
}
,
"ToPort"
:
"443"
,
"ToPort"
:
{
"Ref"
:
"AsgardServerPort"
}
,
"CidrIp"
:
"0.0.0.0/0"
"CidrIp"
:
"0.0.0.0/0"
}
}
]
]
...
@@ -709,7 +719,25 @@
...
@@ -709,7 +719,25 @@
"Action"
:
[
"sts:AssumeRole"
]
"Action"
:
[
"sts:AssumeRole"
]
}
]
}
]
},
},
"Path"
:
"/"
"Path"
:
"/"
,
"Policies"
:
[
{
"PolicyName"
:
"AdminBasePolicy"
,
"PolicyDocument"
:
{
"Statement"
:[
{
"Effect"
:
"Allow"
,
"Action"
:[
"s3:Get*"
,
"s3:List*"
,
"ses:SendEmail"
,
"ses:SendRawEmail"
,
"ses:GetSendQuota"
],
"Resource"
:
"*"
}
]
}
}
]
}
}
},
},
"AdminInstanceProfile"
:
{
"AdminInstanceProfile"
:
{
...
@@ -770,8 +798,40 @@
...
@@ -770,8 +798,40 @@
},
},
"PropagateAtLaunch"
:
true
"PropagateAtLaunch"
:
true
}
}
],
"UserData"
:{
"Fn::Base64"
:{
"Fn::Join"
:[
""
,
[
"#!/bin/bash -x
\n
"
,
"exec >> /home/ubuntu/cflog.log
\n
"
,
"exec 2>> /home/ubuntu/cflog.log
\n
"
,
"function error_exit
\n
"
,
"{
\n
"
,
" cfn-signal -e 1 -r
\"
$1
\"
'"
,
{
"Ref"
:
"AdminServerWaitHandle"
},
"'
\n
"
,
" exit 1
\n
"
,
"}
\n
"
,
"apt-get -y update
\n
"
,
"apt-get -y install python-setuptools
\n
"
,
"echo
\"
Python Tools installed
\"
- `date`
\n
"
,
"easy_install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-latest.tar.gz
\n
"
,
"echo
\"
Cloudformation Boostrap installed
\"
- `date`
\n
"
,
"# If all went well, signal success
\n
"
,
"cfn-signal -e $? -r 'Edx Server configuration' '"
,
{
"Ref"
:
"AdminServerWaitHandle"
},
"'
\n
"
]
]
]
}
}
}
}
},
},
"AdminSecurityGroup"
:{
"AdminSecurityGroup"
:{
"Type"
:
"AWS::EC2::SecurityGroup"
,
"Type"
:
"AWS::EC2::SecurityGroup"
,
...
@@ -791,37 +851,30 @@
...
@@ -791,37 +851,30 @@
},
},
{
{
"IpProtocol"
:
"tcp"
,
"IpProtocol"
:
"tcp"
,
"FromPort"
:
"80"
,
"FromPort"
:
{
"Ref"
:
"JenkinsServerPort"
}
,
"ToPort"
:
"80"
,
"ToPort"
:
{
"Ref"
:
"JenkinsServerPort"
}
,
"CidrIp"
:
"0.0.0.0/0"
"CidrIp"
:
"0.0.0.0/0"
},
},
{
{
"IpProtocol"
:
"tcp"
,
"IpProtocol"
:
"tcp"
,
"FromPort"
:
"443"
,
"FromPort"
:
{
"Ref"
:
"AsgardServerPort"
}
,
"ToPort"
:
"443"
,
"ToPort"
:
{
"Ref"
:
"AsgardServerPort"
}
,
"CidrIp"
:
"0.0.0.0/0"
"CidrIp"
:
"0.0.0.0/0"
}
}
],
]
"SecurityGroupEgress"
:[
}
{
"IpProtocol"
:
"tcp"
,
"FromPort"
:
"22"
,
"ToPort"
:
"22"
,
"CidrIp"
:
"10.0.0.0/16"
},
},
{
"AdminServerWaitHandle"
:{
"IpProtocol"
:
"tcp"
,
"Type"
:
"AWS::CloudFormation::WaitConditionHandle"
"FromPort"
:
"80"
,
"ToPort"
:
"80"
,
"CidrIp"
:
"0.0.0.0/0"
},
},
{
"AdminServerWaitCondition"
:{
"IpProtocol"
:
"tcp"
,
"Type"
:
"AWS::CloudFormation::WaitCondition"
,
"FromPort"
:
"443"
,
"DependsOn"
:
"AdminHost"
,
"ToPort"
:
"443"
,
"Properties"
:{
"CidrIp"
:
"0.0.0.0/0"
"Handle"
:{
}
"Ref"
:
"AdminServerWaitHandle"
]
},
"Timeout"
:
"1200"
}
}
}
}
}
}
...
...
playbooks/ansible.cfg
View file @
bfe10e9d
...
@@ -7,3 +7,4 @@
...
@@ -7,3 +7,4 @@
jinja2_extensions=jinja2.ext.do
jinja2_extensions=jinja2.ext.do
hash_behaviour=merge
hash_behaviour=merge
host_key_checking = False
host_key_checking = False
roles_path=../../../ansible-roles
playbooks/edx-east/deployer.yml
0 → 100644
View file @
bfe10e9d
# ansible-playbook -c ssh -vvvv --user=ubuntu -i ec2.py deployer.yml -e "@gh_users.yml" -e "@/path/to/secure/ansible/vars/hotg.yml" -e "@/path/to/configuration-secure/ansible/vars/common/common.yml" --limit="tag_aws_cloudformation_stack-name_<admin_stack_name>"
# You will need to create a gh_users.yml that contains the github names of users that should have login access to the machines.
# Setup user login on the bastion
-
name
:
Configure Bastion
hosts
:
tag_role_bastion
sudo
:
True
gather_facts
:
False
roles
:
-
gh_users
# Configure an admin instance with jenkins and asgard.
-
name
:
Configure instance(s)
hosts
:
tag_role_admin
sudo
:
True
gather_facts
:
True
roles
:
-
common
-
gh_users
-
jenkins_master
-
hotg
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment