Diff for "Code/HowToUseCodehostingLocally"

Not logged in - Log In / Register

Differences between revisions 5 and 6
Revision 5 as of 2011-02-14 15:52:16
Size: 1897
Editor: jcsackett
Comment:
Revision 6 as of 2011-02-14 15:52:37
Size: 1897
Editor: jcsackett
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
Getting all the servers that need to be running started is as simple as running {{{make run_all}}{ or {{{make run_codehosting}}} in the root of your Launchpad tree. Getting all the servers that need to be running started is as simple as running {{{make run_all}}} or {{{make run_codehosting}}} in the root of your Launchpad tree.

How To Use Codehosting Locally

Just as it's possible to run the launchpad web application locally, it is also possible to run the complete codehosting stack on your development machine. The main awkwardness is that you have to manually kick off some of the things that are usually done by cronjobs.

Make sure Apache is set up

Various parts of the codehosting system require that Apache is configured appropriately. If launchpad.dev works at all for you, you've probably already done this, but if it doesn't work, running sudo make install from the root of your launchpad tree should configure things appropriately.

Get things running

Getting all the servers that need to be running started is as simple as running make run_all or make run_codehosting in the root of your Launchpad tree.

Set up a user

If you run ./utilities/make-lp-user <your real launchpad id>, you can use lp://dev/ shortcuts.

You can also use the 'mark' launchpad user, the only user in the sample date with an ssh key set up, but it's probably best not to these days.

Push up a branch

If you ran make-lp-user, this is just a few more keystrokes than pushing a branch to launchpad:

bzr push -d <some branch> lp://dev/~<you>/+junk/branchname

Pull and scan the branch

At this point the branch is just in the 'hosted area', and needs to be pulled (copied to the mirrored area, where anonymous and read only access to the branch is served from) and scanned (data about the branch copied into the Launchpad database).

On production, this happens via the magic of cron. Locally you can make it happen by running make sync_branches.

Now you have a fully working and up-to-date branch -- you should be able to look at the branch page in Launchpad, view the source in codebrowse, and so on.

Code/HowToUseCodehostingLocally (last edited 2021-12-09 10:57:23 by jugmac00)