Diff for "Getting"

Not logged in - Log In / Register

Differences between revisions 9 and 48 (spanning 39 versions)
Revision 9 as of 2009-07-21 12:19:39
Size: 6598
Comment:
Revision 48 as of 2011-06-22 20:00:16
Size: 7182
Editor: lifeless
Comment: no-workspace
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Getting the Launchpad source code is fairly simple, but it's not the usual process of "download a package, unpack, build, and install". Since we do new rollouts of Launchpad directly from Bazaar branches anyway, that's how we distribute the source code to developers. There are no plans to package Launchpad, its deployment is quite complex. ||<tablestyle="width: 100%;" colspan=3 style="background: #2a2929; font-weight: bold; color: #f6bc05;">This page tells you how to obtain the Launchpad source code and its dependencies. [[Help|Ask us]] right away if you have questions. ||
Line 3: Line 3:
Note that right now, Launchpad can only be built and run on Ubuntu (9.04 "Jaunty"). That's not a design decision, it's just a consequence of the fact that, until now, all its developers have been running Ubuntu. We'd be happy to see Launchpad work on other platforms too; perhaps starting with [[http://debian.org/|Debian GNU/Linux]] would be easiest, since Debian and Ubuntu are similar and many Debian developers use Launchpad anyway. Getting the Launchpad source code is fairly simple, but it's not the usual process of "download a package, unpack, build, and install". Since we do new rollouts of Launchpad directly from Bazaar branches anyway, that's how we distribute the source code to developers. There are no plans to package Launchpad; its deployment is quite complex.
Line 5: Line 5:
The images/icons are still copyrighted traditionally, to protect Launchpad's visual identity. But they're shipped with the code and are fine to use for development and testing purposes. Just if you launch a production server, it needs to look different -- and have a different name, of course, as "Launchpad" is a trademark. From our point of view, we're doing this to improve our hosted service, so if you feel the need to run it on your own servers, that might mean we're doing something wrong, in which case we hope you'll tell us what. Note that right now, Launchpad can only be built and run on Ubuntu Lucid or Maverick. That's not a design decision, it's just a consequence of the fact that, until now, all its developers have been running Ubuntu. We'd be happy to see Launchpad work on other platforms too; perhaps starting with [[http://debian.org/|Debian GNU/Linux]] would be easiest, since Debian and Ubuntu are similar and many Debian developers use Launchpad anyway.
Line 7: Line 7:
'''''Note:''' the changes introduced by the install script may break your current web development setup so it is advisable to try Launchpad on a separate virtual or physical machine.'' The images/icons are still copyrighted traditionally, to protect Launchpad's visual identity. But they're shipped with the code and are fine to use for development and testing purposes. Just if you launch a production server, it needs to look different -- and have a different name, of course, as "Launchpad" is a trademark. From our point of view, we have open-sourced Launchpad to improve our hosted service.
Line 9: Line 9:
'''''Also note:''' Launchpad does not work on karmic yet! Developers are currently using Jaunty.'' '''''Note:''' the changes introduced by the install script may break your current web development setup, so it is advisable to try Launchpad on a separate virtual or physical machine.'' See [[Running|running]] for a chroot/VM/LXC setups.
Line 17: Line 17:
Launchpad's branches are hosted in [[http://bazaar-vcs.org/|Bazaar]], using the most up-to-date repository format available. That means you'll need to use at least [[http://bazaar-vcs.org/Download|Bazaar 1.16.1]] to get Launchpad -- and please consider using [[https://lists.ubuntu.com/archives/bazaar/2009q3/060691.html|1.17]], which has just been released. Packages are also available in the [[https://launchpad.net/~bzr/+archive/ppa|Bazaar PPA]] Launchpad's branches are hosted in [[http://bazaar-vcs.org/|Bazaar]], using the 2a repository format -- currently the best available. That means you'll need to use at least [[http://bazaar-vcs.org/Download|Bazaar 1.18.1]] or preferably 2.0 to get Launchpad. Recent Ubuntu releases contain a sufficient new version of Bazaar.
Line 19: Line 19:
The total size of the repository is about 150Mb. The source tree is about 150Mb, although the total size of the repository you'll download is about 280Mb, as you're getting the full history with it.
Line 23: Line 23:
So, assuming you have a high enough version of Bazaar installed, and you're running Ubuntu 9.04, here is how to get Launchpad: So, assuming you have a high enough version of Bazaar installed, and you're running Ubuntu 10.04, here is how to get Launchpad:
Line 47: Line 47:
    ##
    ## If you are running rocketfuel-setup to bring up a new machine
    ## you can pass --no-workspace to only perform the system-wide setup.
Line 48: Line 51:

  $ sudo apt-get dist-upgrade

   ## This is just to make doubly-sure everything from the launchpad PPA
   ## gets installed.
Line 58: Line 66:
  $ ls
devel/
  $ ls devel/
Line 61: Line 68:
    ## That's it! That's your Launchpad trunk.  Go to town.     ## That's it! That's your Launchpad trunk.
}}}
Line 63: Line 71:
  $ cd devel
  $ make schema && make run

    ## If you run into problems here, go join the #launchpad-dev
    ## IRC channel at irc.freenode.net and ask for help. Subsequent
    ## builds can just do "make run"; you want to use "make schema"
    ## sparingly, because it's expensive and because it will clean out
    ## any data you might have put into your test instance through the
    ## web UI or by running other scripts.
}}}
To build and run Launchpad, see [[Running]]. To learn about alternative "trunk" branches, see [[Trunk]].
Line 84: Line 83:
== Do-it-yourself installation ==

'''We only support using `rocketfuel-setup` to set up Launchpad.''' It adjusts a lot of things to get the development process running smoothly, as summarized above. However, sometimes you might want to just get a build of Launchpad to run its tests, or to run a script packaged with Launchpad, or to do your own manual changes of the files that '''`rocketfuel-setup`''' would normally touch. These are the basics of what needs to be done for that route -- '''unsupported hints'''.

=== Install launchpad-developer-dependencies ===

Add the following, using whatever mechanism you prefer, to your apt sources:
{{{
deb http://ppa.launchpad.net/launchpad/ppa/ubuntu lucid main
deb http://ppa.launchpad.net/bzr/ppa/ubuntu lucid main
}}}

Then install the launchpad-developer-dependencies package.

=== Get the code ===
{{{
bzr branch http://bazaar.launchpad.net/~launchpad-pqm/launchpad/devel launchpad
cd launchpad
utilities/update-sourcecode
bzr co --lightweight http://bazaar.launchpad.net/~launchpad/lp-source-dependencies/trunk download-cache
mkdir eggs
make
}}}
Line 86: Line 109:
Please ask questions sooner rather than later. The IRC channel '''`#launchpad-dev`''' at irc.freenode.net is where the experienced Launchpad developers will be hanging out; they can probably save you a lot of time. You can also [[http://launchpad.net/~launchpad-dev|join the mailing list]]. Finally, please point out problems in this wiki whenever you find wrong information (we'll probably open up editing to most or all Launchpad-authenticated users soon, but for the first few days after open sourcing Launchpad, we're keeping the wiki more tightly controlled to avoid spam). We're standing by to help; see the [[Help|help page]].

This page tells you how to obtain the Launchpad source code and its dependencies. Ask us right away if you have questions.

Getting the Launchpad source code is fairly simple, but it's not the usual process of "download a package, unpack, build, and install". Since we do new rollouts of Launchpad directly from Bazaar branches anyway, that's how we distribute the source code to developers. There are no plans to package Launchpad; its deployment is quite complex.

Note that right now, Launchpad can only be built and run on Ubuntu Lucid or Maverick. That's not a design decision, it's just a consequence of the fact that, until now, all its developers have been running Ubuntu. We'd be happy to see Launchpad work on other platforms too; perhaps starting with Debian GNU/Linux would be easiest, since Debian and Ubuntu are similar and many Debian developers use Launchpad anyway.

The images/icons are still copyrighted traditionally, to protect Launchpad's visual identity. But they're shipped with the code and are fine to use for development and testing purposes. Just if you launch a production server, it needs to look different -- and have a different name, of course, as "Launchpad" is a trademark. From our point of view, we have open-sourced Launchpad to improve our hosted service.

Note: the changes introduced by the install script may break your current web development setup, so it is advisable to try Launchpad on a separate virtual or physical machine. See running for a chroot/VM/LXC setups.

Overview

Launchpad is a core of service-specific code surrounding various third-party libraries, some of which are installed. So the process of fetching Launchpad to build it looks something like this: grab the core code, grab all the libraries, unpack them into the right places in the tree, and then build the whole thing.

Fortunately, we've written scripts to take care of most of that, and instructions on using those scripts are below.

Launchpad's branches are hosted in Bazaar, using the 2a repository format -- currently the best available. That means you'll need to use at least Bazaar 1.18.1 or preferably 2.0 to get Launchpad. Recent Ubuntu releases contain a sufficient new version of Bazaar.

The source tree is about 150Mb, although the total size of the repository you'll download is about 280Mb, as you're getting the full history with it.

Getting It

So, assuming you have a high enough version of Bazaar installed, and you're running Ubuntu 10.04, here is how to get Launchpad:

  $ mkdir ~/launchpad
  $ cd ~/launchpad
  $ bzr --no-plugins cat http://bazaar.launchpad.net/~launchpad-pqm/launchpad/devel/utilities/rocketfuel-setup > rocketfuel-setup
  $ chmod a+x rocketfuel-setup
  $ ./rocketfuel-setup

    ## This will take a while -- maybe a few hours to get everything,
    ## depending on your Net connection.
    ##
    ## Note that you will be prompted for your 'sudo' password, and for
    ## a Launchpad login ID.  The sudo access is necessary to get
    ## Launchpad running on your box; the Launchpad.net login is not
    ## strictly necessary, and you can just hit Return there if you
    ## want; see below for an explanation.
    ##
    ## Note that this will make changes to your Apache configuration if
    ## you already have an Apache server on your box. It will also add
    ## entries to /etc/hosts and it will setup a postgresql server on
    ## you box.
    ## If you want to play safe with regards to your existing Apache,
    ## try this out in a virtual environment first.
    ## 
    ## If you are running rocketfuel-setup to bring up a new machine 
    ## you can pass --no-workspace to only perform the system-wide setup.
    ## TODO: Make sure this list is complete!

  $ sudo apt-get dist-upgrade

   ## This is just to make doubly-sure everything from the launchpad PPA
   ## gets installed.

  $ ls
  lp-branches/    lp-sourcedeps/
  $ cd lp-branches

    ## You are now in a newly-created Bazaar repository, with one
    ## branch ('devel'), into whose working tree the other
    ## source dependencies have been symlinked.  The sourcedeps
    ## actually live in ../lp-sourcedeps, though.

  $ ls  devel/
  
    ## That's it!  That's your Launchpad trunk.

To build and run Launchpad, see Running. To learn about alternative "trunk" branches, see Trunk.

What the Installation Process Does

The rocketfuel-setup script first determines what release of Ubuntu you're running, then installs various lines into files under /etc, to enable you to run Launchpad services locally. For example, it adds entries for "launchpad.dev", "bazaar.launchpad.dev", "lists.launchpad.dev", and others to your /etc/hosts file, so that after you build launchpad you can browse to launchpad.dev and see a locally-running instance. It also installs some packages, dependencies that Launchpad needs in order to run. This is why the sudo access is necessary; consult the script for details of what it's doing.

Once it's got the system preparation out of the way, the script initializes a Bazaar repository (that's the lp-branches directory above), and pulls down a development trunk (lp-branches/devel). That will take a while.

After it gets that, it fetches the other dependencies, the third-party libraries, by invoking a separate script, lp-branches/devel/utilities/rocketfuel-get. That will take a while too, as there are almost thirty such libraries.

Once it has all the dependencies, it links them into the trunk working tree, using the script lp-branches/devel/utilities/link-external-sourcecode.

Do-it-yourself installation

We only support using rocketfuel-setup to set up Launchpad. It adjusts a lot of things to get the development process running smoothly, as summarized above. However, sometimes you might want to just get a build of Launchpad to run its tests, or to run a script packaged with Launchpad, or to do your own manual changes of the files that rocketfuel-setup would normally touch. These are the basics of what needs to be done for that route -- unsupported hints.

Install launchpad-developer-dependencies

Add the following, using whatever mechanism you prefer, to your apt sources:

deb http://ppa.launchpad.net/launchpad/ppa/ubuntu lucid main
deb http://ppa.launchpad.net/bzr/ppa/ubuntu lucid main

Then install the launchpad-developer-dependencies package.

Get the code

bzr branch http://bazaar.launchpad.net/~launchpad-pqm/launchpad/devel launchpad
cd launchpad
utilities/update-sourcecode
bzr co --lightweight http://bazaar.launchpad.net/~launchpad/lp-source-dependencies/trunk download-cache
mkdir eggs
make

Where to Get Help

We're standing by to help; see the help page.

Getting (last edited 2020-03-05 16:46:55 by wgrant)