diff options
| -rw-r--r-- | README.md | 64 | 
1 files changed, 40 insertions, 24 deletions
| @@ -15,13 +15,11 @@ To run from a clone of the git repo, see "Development", below.  Usage  ================================= -This tool is incomplete, so most commands don't yet work. -  Run `leap help` for a usage instructions.  Here is an example usage: -    leap init provider +    leap new-provider provider      cd provider      edit configuration files (see below)      leap compile @@ -31,14 +29,12 @@ Directories and Files  The general structure of leap project looks like this: -    my_leap_project/                 # the 'root' directory +    my_leap_project/                 # your project directory        leap_platform/                 # a clone of the leap_platform puppet recipes        provider/                      # your provider-specific configurations  The "leap" command should be run from within the "provider" directory. -You can name these directories whatever you like. The leap command will walk up the directory tree until it finds a directory that looks like a 'root' directory. -  Within the "provider" directory:      nodes/               # one configuration file per node (i.e. server) @@ -130,29 +126,49 @@ This node will have hostname "dns-europe" and it will inherit from the following  Development  ================================= -prerequisites: +How to set up your environment for developing the ``leap`` command. -* rubygems (``apt-get install rubygems``) -* bundler  (``gem install bundler``) +Prerequisites +--------------------------------- -Install command line ``leap``: +Debian Squeeze -    git clone git://leap.se/leap_cli   # clone leap cli code -    cd leap_cli -    bundle                             # install required gems -    ln -s `pwd`/bin/leap ~/bin         # link executable somewhere in your bin path +    sudo apt-get install git ruby ruby-dev rubygems +    sudo gem install bundler rake +    export PATH=$PATH:/var/lib/gems/1.8/bin -You can experiment using the example provider in the test directory +Debian Wheezy -    cd test/provider -    leap +    sudo apt-get install git ruby ruby-dev +    sudo gem install bundler -Alternately, you can create your own provider for testing: +Ubuntu Quantal -    mkdir ~/dev/example.org -    cd ~/dev/example.org -    git clone git://leap.se/leap_platform -    leap init provider -    cd provider -    leap +    sudo apt-get install git ruby ruby-dev +    sudo gem install bundler + +Install from git +--------------------------------- +Install requirements + +    git clone git://leap.se/leap_cli      # clone leap_cli code +    cd leap_cli +    bundle                                # install required gems + +Symlink bin/leap into your path: + +    cd leap_cli +    ln -s `pwd`/bin/leap /usr/local/bin   # link executable somewhere in your bin path +    which leap                            # make sure you will run leap_cli/bin/leap, +                                          # and not /var/lib/gems/1.x/bin/leap +    leap help + +If you get an error, make sure to check ``which leap``. Some versions of ``bundle`` will +incorrectly install a broken ``leap`` command in the gem bin directory when you do ``bundle``. + +Why not use ``bundle exec leap`` to run the command? This works, so long as your current +working directory is under leap_cli. Because the point is to be able to run ``leap`` in +other places, it is easier to create the symlink. If you run ``leap`` directly, and not via +the command launcher that rubygems installs, leap will run in a mode that simulates +``bundle exec leap`` (i.e. only gems included in Gemfile are allow to be loaded). | 
