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
357d3a10
Commit
357d3a10
authored
May 21, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script and play to connect sandboxes to prod
parent
5ef9da4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
playbooks/edx-east/connect_sandbox.yml
+36
-0
util/jenkins/connect-sandbox-to-prod-clone.sh
+41
-0
No files found.
playbooks/edx-east/connect_sandbox.yml
0 → 100644
View file @
357d3a10
-
name
:
connect a sandbox to production data
hosts
:
all
gather_facts
:
False
sudo
:
True
tasks
:
-
name
:
Dump mongo data using the cloned dbs for forums
shell
:
>
mongodump -d comments-prod-clone -u {{ CLONE_FORUM_USER }} -p {{ CLONE_FORUM_PASS }} -h {{ CLONE_FORUM_HOST }} --port {{ CLONE_FORUM_PORT }} -o /mnt/forum-dump -c {{ item }}
with_items
:
-
activities
-
blocked_hash
-
contents
-
contents_tag_aggregation
-
delayed_backend_mongoid_jobs
-
results
-
subscriptions
-
users
-
name
:
Restore the mongo data for the forums
shell
:
>
mongorestore --drop -d cs_comments_service -u cs_comments_service -p 'password' /mnt/forum-dump
-
name
:
Dump mongo data using the cloned dbs for the modulestore
shell
:
>
mongodump -d prod-edx-clone -u {{ CLONE_MODULESTORE_USER }} -p {{ CLONE_MODULESTORE_PASS }} -h {{ CLONE_MODULESTORE_HOST }} --port {{ CLONE_MODULESTORE_PORT }} -o /mnt/modulestore-dump -c modulestore
-
name
:
Restore the mongo data for the modulestore
shell
:
>
mongorestore --drop -d edxapp -u edxapp -p 'password' /mnt/modulestore-dump
-
name
:
Remove dump files
shell
:
>
rm -rf {{ item }}
with_items
:
-
/mnt/forum-dump
-
/mnt/modulestore-dump
util/jenkins/connect-sandbox-to-prod-clone.sh
0 → 100644
View file @
357d3a10
#!/usr/bin/env bash
# Ansible provisioning wrapper script that
# assumes the following parameters set
# as environment variables
#
# - github_username
# - server_type
# - instance_type
# - region
# - aws_account
# - keypair
# - ami
# - root_ebs_size
# - security_group
# - dns_zone
# - dns_name
# - environment
# - name_tag
export
PYTHONUNBUFFERED
=
1
export
BOTO_CONFIG
=
/var/lib/jenkins/
${
aws_account
}
.boto
if
[[
-z
$WORKSPACE
]]
;
then
dir
=
$(
dirname
$0
)
source
"
$dir
/ascii-convert.sh"
else
source
"
$WORKSPACE
/configuration/util/jenkins/ascii-convert.sh"
fi
if
[[
!
-f
$BOTO_CONFIG
]]
;
then
echo
"AWS credentials not found for
$aws_account
"
exit
1
fi
if
[[
-z
$sandbox_to_update
]]
;
then
sandbox_to_update
=
"
${
BUILD_USER
}
.m.sandbox.edx.org"
fi
cd
$WORKSPACE
/configuration/playbooks/edx-east
ansible-playbook connect_sandbox.yml
-i
$sandbox_to_update
,
-e
@
${
WORKSPACE
}
/configuration-secure/ansible/vars/clone-db.yml
--user
ubuntu
-v
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