daily pastebin goal
60%
SHARE
TWEET

Reddit Open Source - Admin Guide

a guest Mar 24th, 2018 30 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## reddit jobs
  2.  
  3. reddit cron file: `sudo nano /etc/cron.d/reddit`
  4.  
  5. Run paster/cron jobs:
  6.  
  7.     cd /home/reddit/src/reddit/r2
  8.     paster run run.ini -c 'import r2.lib.providers.search.solr as cs; cs.rebuild_subreddit_index()'
  9.  
  10. Scripts:
  11.  
  12.   the installation guide has an example of running the test data importer in `reddit/scripts`, but there are other scripts that can be run / documented
  13.  
  14. ## Make commands
  15.  
  16. Available make commands, to be run from /home/reddit/src/reddit/r2 only
  17.  
  18. * make
  19. * make all
  20. * make build/static-buildstamp
  21. * make build/mangle-buildstamp (and more)
  22. * make clean_css
  23. * make clean_js
  24. * make clean_static
  25. * make clean_i18n
  26. * make clean_names
  27. * make clean
  28. * make clean_ini
  29. * make clean_pyx
  30. * make css
  31. * make development.ini  
  32. * make i18n
  33. * make Makefile.defs
  34. * make pyx
  35. * make ini              
  36. * make names            
  37. * make r2/lib/generated_strings.py
  38. * make js
  39. * make plugin_static
  40. * make static
  41.  
  42. ### Update css
  43.  
  44.     make build/mangle-buildstamp
  45.     make clean_css
  46.     make css
  47.     sudo reddit-restart
  48.  
  49. ### Force rebuild everything
  50.  
  51. If something just wont update, not ideal and requires 5m downtime (.html.py files are fully ported and removed from our codebase, don't have to worry about those anymore):
  52.  
  53.     /home/reddit/src/reddit/r2
  54.     sudo reddit-stop
  55.     sudo reddit-flush
  56.     python setup.py build
  57.     sudo python setup.py develop
  58.     make clean
  59.     make
  60.     sudo reddit-start
  61.  
  62. ## Official documentation
  63.  
  64. https://github.com/reddit-archive/reddit/wiki
  65.  
  66. ## Installer guide
  67.  
  68. Congratulations! reddit is now installed.
  69.  
  70. The reddit application code is managed with upstart, to see what's currently
  71. running, run
  72.  
  73.     sudo initctl list | grep reddit
  74.  
  75. Cron jobs start with "reddit-job-" and queue processors start with
  76. "reddit-consumer-". The crons are managed by /etc/cron.d/reddit. You can
  77. initiate a restart of all the consumers by running:
  78.  
  79.     sudo reddit-restart
  80.  
  81. or target specific ones:
  82.  
  83.     sudo reddit-restart scraper_q
  84.  
  85. See the GitHub wiki for more information on these jobs:
  86.  
  87. * https://github.com/reddit/reddit/wiki/Cron-jobs
  88. * https://github.com/reddit/reddit/wiki/Services
  89.  
  90. The reddit code can be shut down or started up with
  91.  
  92.     sudo reddit-stop
  93.     sudo reddit-start
  94.  
  95. And if you think caching might be hurting you, you can flush memcache with
  96.  
  97.     reddit-flush
  98.  
  99. Now that the core of reddit is installed, you may want to do some additional
  100. steps:
  101.  
  102. * Ensure that reddit.local resolves to this machine.
  103.  
  104. * To populate the database with test data, run:
  105.  
  106.     cd /home/der/src/reddit
  107.     reddit-run scripts/inject_test_data.py -c 'inject_test_data()'
  108.  
  109. * Manually run reddit-job-update_reddits immediately after populating the db
  110.   or adding your own subreddits.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top