Closed Bug 573468 Opened 14 years ago Closed 14 years ago

Deploy production instance of Firefox Input

Categories

(mozilla.org Graveyard :: Server Operations, task)

All
Other
task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: wenzel, Assigned: fox2mike)

References

Details

This week, probably Tuesday night Pacific time, Wednesday morning European time, we would like to deploy Firefox Input to production.

The deployment instructions are similar to bug 572502, but we've added a vendor repository, so I'll post up-to-date instructions to this bug before then.

I volunteered Shyam ;) to do the deployment, as he's been doing it for staging already.

I expect generic traffic of a few hundred visitors a day for now. This can change over time, but we can always relocate then.

We need Python 2.6, a memcached instance to connect to, and a MySQL DB.
Depends on: 572502
How sweet :) Don't think you guys have a "go-live" time on this? If you do, by when do you want it up? 

Also, is it too much work to change the single memcache instance to an array? if so we can probably leave it at one for now and scale up if needed. But it's a SPOF that we'd like to try and avoid.

You also need SSL right?
Assignee: server-ops → shyam
No problem, Django can handle memcached arrays out of the box: http://docs.djangoproject.com/en/dev/topics/cache/#memcached

I don't have a specific go-live time, I think as long as we get it up and running before America wakes up we are golden (all right, Aakash?)

Finally yes, we do need SSL, thanks for bringing that up. We should set up SSL for the site, and enforce it (via apache redirect) for everything under /admin/ .
Yeah, that's fine. I'd like to be up as it goes live (i.e. 11pm or midnight PST) to verify everything. If that's not possible, then anytime while I'm asleep is fine with me.
I might not be able to get it up by then, depends on the workload that day, which is why I don't want you to wait. If you really need it up by then, I'll try and prioritize, but if it's okay to have it up by Wednesday morning, I'd prefer that.
No problemo, I'll happily take a night's rest.
Here are the updated deployment instructions:

* git clone git://github.com/fwenzel/reporter.git
* cd reporter; git clone git://github.com/fwenzel/reporter-lib.git
* (no need for a virtualenv)
* pip install -r requirements/compiled.txt   # (or install the compiled dependencies from your package manager)
* set up settings_local.py -- you can use the one from staging, but make sure to NOT set ENFORCE_USER_AGENT or DEBUG at all in there (the defaults from settings.py are fine)
* create a MySQL DB with UTF-8 (!)
* ./manage.py syncdb
* ./manage.py update_product_details
* ./manage.py rebuild_index

Let me know what admin user credentials you set up. Also, set up the cron jobs like on staging: update_product_details perhaps every hour or half-hour, and update_index (sic) every 10 minutes.

Finally, hook up wsgi, and make sure to let Apache serve /media/ and /admin-media/ just like on staging.
Oh, and once again I forgot SSL. We need to set up SSL, then put a redirect for http -> https into place for everything underneath /admin/.
aaand the domain will be: input.mozilla.com
Alright, so :

[root@mradm02 reporter]# /usr/bin/python26 manage.py syncdb
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table feedback_opinion_terms
Creating table feedback_opinion
Creating table feedback_term

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'root'): **********
E-mail address: fwenzel@mozilla.com
Password: 
Password (again): 
Superuser created successfully.
Installing index for auth.Permission model
Installing index for auth.Group_permissions model
Installing index for auth.User_user_permissions model
Installing index for auth.User_groups model
Installing index for auth.Message model
Installing index for admin.LogEntry model
Installing index for feedback.Opinion_terms model
No fixtures found.
And

[root@mradm02 reporter]# /usr/bin/python26 manage.py update_product_details
Grabbing list of JSON files from the server.
No last update timestamp found.
Updating firefox_primary_builds.json from server
Writing new copy of firefox_primary_builds.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating firefox_history_major_releases.json from server
Writing new copy of firefox_history_major_releases.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating thunderbird_history_development_releases.json from server
Writing new copy of thunderbird_history_development_releases.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating firefox_history_stability_releases.json from server
Writing new copy of firefox_history_stability_releases.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating thunderbird_history_major_releases.json from server
Writing new copy of thunderbird_history_major_releases.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating thunderbird_primary_builds.json from server
Writing new copy of thunderbird_primary_builds.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating thunderbird_beta_builds.json from server
Writing new copy of thunderbird_beta_builds.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating firefox_history_development_releases.json from server
Writing new copy of firefox_history_development_releases.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating mobile_details.json from server
Writing new copy of mobile_details.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating languages.json from server
Writing new copy of languages.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating thunderbird_versions.json from server
Writing new copy of thunderbird_versions.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating firefox_versions.json from server
Writing new copy of firefox_versions.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating firefox_beta_builds.json from server
Writing new copy of firefox_beta_builds.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Updating thunderbird_history_stability_releases.json from server
Writing new copy of thunderbird_history_stability_releases.json to /mnt/netapp/input.mozilla.com/reporter/lib/product_details_json.
Writing last-updated timestamp (Mon, 21 Jun 2010 21:15:08 GMT).
Product Details update run complete.
And

[root@mradm02 reporter]# /usr/bin/python26 manage.py rebuild_index

WARNING: This will irreparably remove EVERYTHING from your search index.
Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
Are you sure you wish to continue? [y/N] y

Removing all documents from your index because you said so.
All documents removed.
Indexing 0 opinions.
(In reply to comment #7)
> Oh, and once again I forgot SSL. We need to set up SSL, then put a redirect for
> http -> https into place for everything underneath /admin/.

Site is up, http://input.mozilla.com and anything admin gets redirected.

Working on the crons.
Crons are now in place.

I'd call this done at this point, poke on IRC or reopen in case of major issues.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
I checked the admin site + SSL, and feedback submission. It shows up on the front page after the cache expires.

Search takes a little longer (mostly since the index update is a cron job, and the search results are also cached and must therefore expire first), but nonetheless it all shows up after a few minutes.

Marking this verified, good job, and thanks, Shyam!
Status: RESOLVED → VERIFIED
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.