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
4667db44
Commit
4667db44
authored
May 21, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setting the dev security group for rds instances not in the vpc
parent
c0f09129
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
util/vpc-tools/db-clone.py
+6
-5
No files found.
util/vpc-tools/db-clone.py
View file @
4667db44
...
...
@@ -47,7 +47,8 @@ SG_GROUPS = {
# This group must already be created
# and allows for full access to port
# 3306. this group is assigned temporarily
# 3306 from within the vpc.
# This group is assigned temporarily
# for cleaning the db
SG_GROUPS_FULL
=
{
...
...
@@ -135,7 +136,10 @@ if __name__ == '__main__':
if
args
.
stack_name
:
modify_args
[
'vpc_security_group_ids'
]
=
[
SG_GROUPS
[
args
.
stack_name
],
SG_GROUPS_FULL
[
args
.
stack_name
]]
else
:
modify_args
[
'db_security_groups'
]
=
[
'open'
]
# dev-edx is the default security group for dbs that
# are not in the vpc, it allows connections from the various
# NAT boxes and from sandboxes
modify_args
[
'db_security_groups'
]
=
[
'dev-edx'
]
# Update the db immediately
rds
.
modify_db_instance
(
restore_dbid
,
**
modify_args
)
...
...
@@ -178,8 +182,5 @@ if __name__ == '__main__':
print
(
"Running {}"
.
format
(
dns_cmd
))
os
.
system
(
dns_cmd
)
# remove full mysql access from within the vpc
if
args
.
stack_name
:
rds
.
modify_db_instance
(
restore_dbid
,
vpc_security_group_ids
=
[
SG_GROUPS
[
args
.
stack_name
]])
else
:
rds
.
modify_db_instance
(
restore_dbid
,
db_security_groups
=
[])
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