Difference between revisions of "Moving your Dreamwidth installation to use Github"
Foxfirefey (Talk | contribs) (→set up dw-free: add explanation about url) |
Foxfirefey (Talk | contribs) (better organization, stop linking to the awkward git page saying to install git clients, link to github clients at the bottom) |
||
Line 1: | Line 1: | ||
− | These instructions are for dreamhacks; those running your own instances I trust that you can modify to fit. | + | {{Note|text=These instructions are for dreamhacks; those running your own instances I trust that you can modify to fit.}} |
= On github, fork dreamwidth's dw-free and dw-nonfree repositories = | = On github, fork dreamwidth's dw-free and dw-nonfree repositories = | ||
− | + | First, create an account on Github. Then, you will need to fork these two repositories: | |
* https://github.com/dreamwidth/dw-free | * https://github.com/dreamwidth/dw-free | ||
* https://github.com/dreamwidth/dw-nonfree | * https://github.com/dreamwidth/dw-nonfree | ||
− | Go to each of | + | Go to each of their pages, and click the "Fork" button. This sets up your own copy of Dreamwidth's code which use to make and submit your changes. |
Here's a quick overview of how the repositories will work together: | Here's a quick overview of how the repositories will work together: | ||
Line 15: | Line 15: | ||
* other repositories will go into $LJHOME/ext | * other repositories will go into $LJHOME/ext | ||
* personal config files go into $LJHOME/ext/local | * 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 | + | * 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 anymore. |
Now it's time to set things up: | Now it's time to set things up: | ||
− | = | + | = Stop the server and all workers = |
− | + | # note: it's okay if it says "no process found". | |
+ | # That just means there was nothing to stop | ||
stop-apache | stop-apache | ||
+ | killall worker-manager | ||
− | = | + | = Move your old $LJHOME aside = |
− | + | Don't delete it! Just move it out of the way like this: | |
− | + | mv $LJHOME $LJHOME-old | |
− | Replace the USERNAME sections of the URL with your Github username. This | + | This will let you access any changes you still have on the old repositories. |
+ | |||
+ | = 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 | ||
Line 39: | Line 45: | ||
git remote add dreamwidth https://github.com/dreamwidth/dw-free | git remote add dreamwidth https://github.com/dreamwidth/dw-free | ||
git fetch dreamwidth | git fetch dreamwidth | ||
+ | # we also want to sync up with the main branches | ||
git branch --set-upstream develop dreamwidth/develop | git branch --set-upstream develop dreamwidth/develop | ||
git branch --set-upstream master dreamwidth/master | git branch --set-upstream master dreamwidth/master | ||
Line 46: | Line 53: | ||
cd $LJHOME/ext | cd $LJHOME/ext | ||
− | = | + | ## copy over your config files, and tell them to take priority |
+ | ## over config files in any of the repos | ||
+ | mkdir -p local/etc | ||
+ | echo "highest" > local/.dir_scope | ||
+ | cp $LJHOME-old/etc/config* local/etc/ | ||
+ | |||
+ | = For dev servers (not clone sites) set up dw-nonfree = | ||
git clone https://USERNAME@github.com/USERNAME/dw-nonfree.git | git clone https://USERNAME@github.com/USERNAME/dw-nonfree.git | ||
Line 56: | Line 69: | ||
cd .. | cd .. | ||
− | + | = Run checkconfig = | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | = | + | |
cd $LJHOME | cd $LJHOME | ||
bin/checkconfig.pl | bin/checkconfig.pl | ||
− | = | + | = Non-dreamhack users: = |
− | * install .deb packages if given | + | * install .deb packages if given by bin/checkconfig.pl |
− | * install any modules without .deb packages via cpan (theSchwartz) | + | * install any modules without .deb packages via cpan (like theSchwartz) |
* check any personal scripts you have to make sure they aren't affected by the directory config change | * check any personal scripts you have to make sure they aren't affected by the directory config change | ||
− | |||
− | = | + | = Start the server again = |
start-apache | start-apache | ||
− | = | + | = Extras = |
You may be interested in [[git settings]] and [[git autocomplete]] to make your life easier. | You may be interested in [[git settings]] and [[git autocomplete]] to make your life easier. | ||
+ | |||
+ | If you also want to view your repositories on your computer, GitHub has versions for Windows and OSX: | ||
+ | |||
+ | * http://mac.github.com/ | ||
+ | * http://windows.github.com/ | ||
[[Category: Development]] | [[Category: Development]] | ||
[[Category: Git]] | [[Category: Git]] |
Revision as of 18:46, 24 August 2012
Contents
On github, fork dreamwidth's dw-free and dw-nonfree repositories
First, create an account on Github. Then, you will need to fork these two repositories:
Go to each of their pages, and click the "Fork" button. This sets up your own copy of Dreamwidth's code which use to make and submit your changes.
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 anymore.
Now it's time to set things up:
Stop the server and all workers
# note: it's okay if it says "no process found". # That just means there was nothing to stop stop-apache killall worker-manager
Move your old $LJHOME aside
Don't delete it! Just move it out of the way like this:
mv $LJHOME $LJHOME-old
This will let you access any changes you still have on the old repositories.
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 # we also want to sync up with the main branches 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
## copy over your config files, and tell them to take priority ## over config files in any of the repos mkdir -p local/etc echo "highest" > local/.dir_scope cp $LJHOME-old/etc/config* local/etc/
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 ..
Run checkconfig
cd $LJHOME bin/checkconfig.pl
Non-dreamhack users:
- install .deb packages if given by bin/checkconfig.pl
- install any modules without .deb packages via cpan (like theSchwartz)
- check any personal scripts you have to make sure they aren't affected by the directory config change
Start the server again
start-apache
Extras
You may be interested in git settings and git autocomplete to make your life easier.
If you also want to view your repositories on your computer, GitHub has versions for Windows and OSX: