Difference between revisions of "Dev Getting Started"

From Dreamwidth Notes
Jump to: navigation, search
m (Welcome to Development: added wikilink to dreamhacks)
Line 1: Line 1:
== Welcome to Development ==
+
== How do I get started doing Dreamwidth development? ==
  
This document is designed to outline our resources on setting up the DW code on your server. There is, currently, a high expectation of "tech savvy."  If you do not know what sudo is or how to get a root console, then you probably are going to get pretty lost in this. Instead, you may want to request a [[Dreamhacks]] account.
+
The best place for anybody to start out for Dreamwidth development is [irc://irc.dreamwidth.org/dw_kindergarten #dw_kindergarten], where there people willing to mentor who can figure out where your abilities are at and how to best apply them.
  
Doesn't mean you shouldn't try, but forewarned is forearmed!
+
People wanting to work on a provided development environment should look into requesting a [[Dreamhacks|Dreamhack]].
  
Help can be found on IRC (#dw on irc.zhzh.org) or on the mailing lists.  You might also like [[Setting up Dreamwidth on Linode]] for a quick and easy way to get your own Dreamhack set up on a hosting service.  There is also [[Dreamwidth Scratch Installation]] and [[Running Dreamwidth on a Mac OS X system]].
+
If you have the means and desire to install your own development environment, there are resources in the [[:Category:Dreamwidth Installation|Dreamwidth Installation category]].  The original LJ Server documentation is [http://www.livejournal.com/doc/server/ here].  You might also find the [http://wiki.ljcode.org/ LJCode wiki] useful.
  
If you just want to jump into development quickly, without having to worry about setting up your server environment, you can also ask for a DreamHack account. A DreamHack is a working environment, currently hosted by volunteers, with everything you need to get started already set up for you. If you want one, send an email with your email address and desired username (max. 13 characters) to dreamhack (afunamatata.com).
+
== Basic guides ==
  
The original LJ Server documentation is [http://www.livejournal.com/doc/server/ here].  You might also find the [http://wiki.ljcode.org/ LJCode wiki] useful.
+
To browse the Dreamwidth code, you can look at the [http://hg.dwscoalition.org/ Mercurial repository]; the main parts of the code you will be interested in are in <tt>dw-free</tt>. To see the changes being made to the Dreamwidth code, look at <dwcomm>changelog</dwcomm>, which automatically posts commits.
  
 
You can find information on how to keep your code updated on [[Dev Maintenance]], information on programming style on [[Dev Programming Guidelines]], information on finding things in [[Dev Finding Things]], and information on submitting patches on [[Dev Patches]].  There is a [http://bugs.dwscoalition.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailqa_contact2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&chfie comprehensive bug list] as well as other useful info on [[Bugzilla]].  See [[Development]] for a more complete reading list, or look through the pages in [[:Category:Development]].
 
You can find information on how to keep your code updated on [[Dev Maintenance]], information on programming style on [[Dev Programming Guidelines]], information on finding things in [[Dev Finding Things]], and information on submitting patches on [[Dev Patches]].  There is a [http://bugs.dwscoalition.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&long_desc_type=substring&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailqa_contact2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&chfie comprehensive bug list] as well as other useful info on [[Bugzilla]].  See [[Development]] for a more complete reading list, or look through the pages in [[:Category:Development]].
 
Niggling difficulties and problems in the installation should be reported to [http://www.dwscoalition.org/show_bug.cgi?id=61 Bug 61].
 
 
If you want to look at ljcom code, you can check it out like this:
 
 
svn co http://code.livejournal.org/svn/ljcom/trunk/ ljcom
 
 
BUT ONLY USE IT AS AN EXAMPLE.  We can't use code from that repository; it belongs to LiveJournal and is not open source.  And only look at it if you have a specific reason--we want people who are able to sign affadavits that they have <i>not</i> seem the <tt>ljcom</tt> code and are thus able to do [[clean room]] implementations.
 
  
 
Developers should check out the documentation on [[Design]] as well.
 
Developers should check out the documentation on [[Design]] as well.
 
== Requirements ==
 
 
Here is what you'll want for a development environment.  Sure, you can probably get away with less or different, but that's not what we're going to support.  The DW code is known to work with the following.  But we'd love to hear of your results using something else.
 
 
=== Linux based server ===
 
 
We are presently using Ubuntu.  This may stay or become Debian or Centos at some point, that's undecided.  But for now, Ubuntu is the supported distro.  If you use anything else, you will need to be familiar enough with the differences to work out any different steps on your own.  (But we'd love to hear success stories and get documentation for other ones!)
 
 
Notes for other OSes:
 
*[[Running Dreamwidth on a Mac OS X system]]
 
 
=== 64-bit (x86_64 typically, NOT i686/i386) ===
 
 
This is something you can probably get away without doing, but you'll be unable to test some things and others might be a bit wonky.  Notably, you need the 64 bit version of Perl in order for the pack/unpack operations to work for memcache.
 
 
But if you absolutely do not have a 64 bit system, then you might still be okay.  Don't use memcache and don't try to use more than 30 friend groups and you shouldn't run into any big issues.  You will also have to change the pack functions in Entry.pm from using NNNQN to NNNLN to avoid a "Invalid type 'Q' in pack" error when posting to a journal.
 
 
If you're not sure whether you have a 64 bit system or not, check out the collection of tips on this page: http://www.stata.com/products/64bit.html
 
 
=== 512mb RAM ===
 
 
I have gotten away with less.  Depends on how much traffic you expect and what else you are running on the box.  Also, if you intend on running TheSchwartz workers or not.  If you do not, and you only run the web site code, then it will probably work on 256.
 
 
=== Dedicated! ===
 
 
The LJ/DW code is pretty heavy, and doesn't like other things running.  You should expect that if you are not that technical, you will need a fairly blank server to run it on.  But if you are technical you can do some pretty convoluted setups...  (This one is more of a recommendation and not a hard requirement.)
 
 
=== root ===
 
 
If you do not have root on the box, you are in for a rough road.  Sure, the code doesn't need root privileges to run.  But there are a lot of libraries that need to be installed on the system.  If you are using a shared development environment where the owner has installed the modules for you, then you should be fine, but keep in mind that you will not be able to run the code on the standard HTTP port (80) as a non-root user.
 
 
=== MySQL ===
 
 
You will need a MySQL database.  It can be local or remote, it doesn't matter really.  As long as you have the ability to create/drop/alter tables in a directory, that's what matters.
 
 
== Suitable hosting ==
 
 
These hosts are reported to have suitable plans for running Dreamwidth code:
 
 
* [http://www.linode.com/ Linode] -- 64-bit available by request, not the default; used by <ljuser>afuna</ljuser> and <ljuser>exor674</ljuser>.  Instructions for setting up on this host from a pre-built image (from <ljuser>exor674</ljuser>) are on [[Setting up Dreamwidth on Linode]].
 
* [http://www.slicehost.com/ Slicehost] -- used by <ljuser>xb95</ljuser>
 
 
They are both VPS hosting plans that will give you full root access at a decent price--about $20 a month.
 
  
 
[[Category: Development]]
 
[[Category: Development]]

Revision as of 22:53, 25 March 2009

How do I get started doing Dreamwidth development?

The best place for anybody to start out for Dreamwidth development is #dw_kindergarten, where there people willing to mentor who can figure out where your abilities are at and how to best apply them.

People wanting to work on a provided development environment should look into requesting a Dreamhack.

If you have the means and desire to install your own development environment, there are resources in the Dreamwidth Installation category. The original LJ Server documentation is here. You might also find the LJCode wiki useful.

Basic guides

To browse the Dreamwidth code, you can look at the Mercurial repository; the main parts of the code you will be interested in are in dw-free. To see the changes being made to the Dreamwidth code, look at [info]changelog, which automatically posts commits.

You can find information on how to keep your code updated on Dev Maintenance, information on programming style on Dev Programming Guidelines, information on finding things in Dev Finding Things, and information on submitting patches on Dev Patches. There is a comprehensive bug list as well as other useful info on Bugzilla. See Development for a more complete reading list, or look through the pages in Category:Development.

Developers should check out the documentation on Design as well.