Difference between revisions of "Moving your Dreamwidth installation to use Github"

From Dreamwidth Notes
Jump to: navigation, search
(On github, fork dreamwidth's dw-free and dw-nonfree repositories: better wording)
(set up dw-free: add explanation about url)
Line 29: Line 29:
  
 
= set up dw-free =
 
= set up dw-free =
 +
 +
Replace the USERNAME sections of the URL with your Github username.  This  will make your repository an authenticated version that can push changes back to Github, as opposed to only being able to pull them.
  
 
  # clone a copy of the repository onto your machine
 
  # clone a copy of the repository onto your machine

Revision as of 18:34, 23 August 2012

These instructions are for dreamhacks; those running your own instances I trust that you can modify to fit. This also assumes that you've gone through the "Set up git" instructions on https://help.github.com/articles/set-up-git

On github, fork dreamwidth's dw-free and dw-nonfree repositories

These are the two Dreamwidth repositories you'll need:

Go to each of them, and click the "Fork" button. This sets up your own copy of Dreamwidth's code which you'll be working on.

Here's a quick overview of how the repositories will work together:

  • dw-free is the main repository and goes into $LJHOME
  • other repositories will go into $LJHOME/ext
  • personal config files go into $LJHOME/ext/local
  • All code from dw-free ($LJHOME) and the additional repos under $LJHOME/ext are automatically live when you start your server. There's no need to run any additional syncing steps

Now it's time to set things up:

stop all workers and the server

killall worker-manager     # note: it's okay if it says "no process found". That just means there was nothing to stop
stop-apache

move your old $LJHOME aside (don't delete it though)

mv $LJHOME $LJHOME-xx

set up dw-free

Replace the USERNAME sections of the URL with your Github username. This will make your repository an authenticated version that can push changes back to Github, as opposed to only being able to pull them.

# clone a copy of the repository onto your machine
git clone https://USERNAME@github.com/USERNAME/dw-free.git $LJHOME
cd $LJHOME

# and let's make it aware of the dreamwidth repository so we can grab updates later
git remote add dreamwidth https://github.com/dreamwidth/dw-free
git fetch dreamwidth
git branch --set-upstream develop dreamwidth/develop 
git branch --set-upstream master dreamwidth/master

# now set up the folder for external repositories / modules
mkdir $LJHOME/ext
cd $LJHOME/ext

for dev servers (not clone sites) set up dw-nonfree

git clone https://USERNAME@github.com/USERNAME/dw-nonfree.git
cd dw-nonfree
git remote add dreamwidth https://github.com/dreamwidth/dw-nonfree
git fetch dreamwidth
git branch --set-upstream develop dreamwidth/develop 
git branch --set-upstream master dreamwidth/master
cd ..
## copy over your config files, and tell them to take priority
## over config files in any of the repos
mkdir --parents local/etc
echo "highest"  > local/.dir_scope
cp $LJHOME-xx/etc/config* local/etc/

run checkconfig

cd $LJHOME
bin/checkconfig.pl

non-dreamhack users:

  • install .deb packages if given
  • install any modules without .deb packages via cpan (theSchwartz)
  • check any personal scripts you have to make sure they aren't affected by the directory config change
  • note: you won't need to run "dw sync" / "bin/cvsreport.pl --sync --cvs/--live" or anything of the sort anymore

start server again

start-apache

some settings

You may be interested in git settings and git autocomplete to make your life easier.