Closed
Bug 737674
Opened 12 years ago
Closed 12 years ago
Populate mozillians stage server with production data
Categories
(Infrastructure & Operations Graveyard :: WebOps: Other, task, P1)
Infrastructure & Operations Graveyard
WebOps: Other
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: tofumatt, Assigned: scabral)
References
Details
(Whiteboard: [rel:04/04/2012])
I know this is probably a PITA request, but would it be possible to copy over the production data (uploads + DB) to the stage server for Mozillians? We need to test a migration from a production state to verify it works 100%. This has to do with photos changing, which required certain permissions changes to work if I recall correctly. I think we did something like this recently (prod > stage copy) but I can't find the relevant bug. After copying the data, you should do a redeploy of mozillians stage from the prod branch to make sure code is up-to-date and the migrations run OK. CC'ing timw in case I'm wrong about anything, missing things, or he has anything to add.
Reporter | ||
Updated•12 years ago
|
Severity: normal → major
Reporter | ||
Updated•12 years ago
|
Whiteboard: [rel:03/21/2012]
Updated•12 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Comment 1•12 years ago
|
||
Need infrasec ack on this. @infrasec, please let us know what you want to see to let this happen. This can be a temporary copy of the data (less than 1 week), if that helps any.
Updated•12 years ago
|
Assignee: server-ops → nobody
Component: Server Operations: Web Operations → Security Assurance: Operations
QA Contact: cshields → security-assurance
Reporter | ||
Comment 2•12 years ago
|
||
This might not be needed after all, so hold off on it for a bit. Sorry :=/
Comment 3•12 years ago
|
||
Won't happen because of privacy. Generating fake data is out best option.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Comment 5•12 years ago
|
||
Ok we still need sanitized production data. We are writing a program to clean the fields if you can tell us which ones need it. I'm assuming users email and the hashed pasword field, as far as I can tell, all other things are public already.
Status: VERIFIED → REOPENED
Resolution: WONTFIX → ---
Updated•12 years ago
|
Whiteboard: [rel:03/21/2012] → [rel:04/04/2012]
Reporter | ||
Comment 6•12 years ago
|
||
https://github.com/tofumatt/mysql-anonymous If I can have a shot at sanitizing the production data with the above script that'd be useful. But it's based on stuff that worked for at least Zamboni and I believe Input, so running it on a mozillians-prod dump should work OK.
Updated•12 years ago
|
Severity: major → blocker
Priority: -- → P1
Comment 7•12 years ago
|
||
Hey all, we're blocking a release because of this bug. I apologize for the notice on a Friday. Can we get someone on it today?
Updated•12 years ago
|
Component: Security Assurance: Operations → mozillians.org
Product: mozilla.org → Websites
QA Contact: security-assurance → mozillians-org
Comment 9•12 years ago
|
||
Ok I can see how it's confusing so here are the steps we need: 1) copy the mozillians.org database to staging. 2) run the following sql statements on staging. === SANITIZING SQL === SET FOREIGN_KEY_CHECKS=0; TRUNCATE django_admin_log; TRUNCATE django_session; UPDATE auth_user SET email = CONCAT(id, '@mozilla.com'), username = CONCAT('_user_', id); UPDATE invite SET recipient = CONCAT(id, '@mozilla.com'); SET FOREIGN_KEY_CHECKS=1; === END SQL ===
Updated•12 years ago
|
Assignee: nobody → server-ops
Component: mozillians.org → Server Operations: Web Operations
Product: Websites → mozilla.org
QA Contact: mozillians-org → cshields
Updated•12 years ago
|
Assignee: server-ops → scabral
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 11•12 years ago
|
||
Done! mysql> use mozillians_stage; Database changed mysql> SET FOREIGN_KEY_CHECKS=0; Query OK, 0 rows affected (0.00 sec) mysql> TRUNCATE django_admin_log; Query OK, 0 rows affected (0.05 sec) mysql> TRUNCATE django_session; Query OK, 0 rows affected (0.04 sec) mysql> UPDATE auth_user SET email = CONCAT(id, '@mozilla.com'), username = CONCAT('_user_', id); Query OK, 2250 rows affected (0.19 sec) Rows matched: 2250 Changed: 2250 Warnings: 0 mysql> UPDATE invite SET recipient = CONCAT(id, '@mozilla.com'); Query OK, 1171 rows affected (0.10 sec) Rows matched: 1171 Changed: 1171 Warnings: 0 mysql> SET FOREIGN_KEY_CHECKS=1; Query OK, 0 rows affected (0.00 sec)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Comment 13•12 years ago
|
||
+1 the thank you - thanks everyone that worked to get stage into it's happy place again.
Updated•11 years ago
|
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Updated•5 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•