librelist archives

« back to archive

clapp proof-of-concept

clapp proof-of-concept

From:
Solomon Hykes
Date:
2009-12-14 @ 08:42
(Creating a mailing list for clapp. Please cc clapp@librelist.com and
follow confirm instructions)

On Tue 2009-12-08 11:38 , Jérôme Petazzoni wrote:

> Let us know as soon as you have something usable for clapp - we are very
> eager to test it !

We have a functional POC. You can try it out at
http://bitbucket.org/dotcloud/clapp

The code lets you do one thing only: configure an image in-place. For
now it's your job to copy it beforehand (rsync or aufs).

Below is a step-by-step install and usage guide.

Install
--------

# hg clone http://bitbucket.org/dotcloud/clapp
# cd clapp
# python build.py
# . ./env/bin/activate

Create an image
----------------------

# debootstrap lenny lenny.clapp
# mkdir lenny.clapp/.clapp
# cp clapp.js.sample lenny.clapp/.clapp/clapp.js
# echo '<%= config.hostname %>' > lenny.clapp/etc/hostname

Copy and configure your image
------------------------------------------

# cp -R lenny.clapp host1.clapp
# clapp.py host1.clapp '{"hostname": "host1"}'
# chroot host1.clapp sh -c "cat /etc/hostname"

Re: clapp proof-of-concept

From:
Solomon Hykes
Date:
2009-12-14 @ 14:54
On Mon 2009-12-14 09:42 , Solomon Hykes wrote:
 > We have a functional POC. You can try it out at
 > http://bitbucket.org/dotcloud/clapp

I pushed a few improvements which make it simpler to use (rev 
d5b7bc13ea29). Follow the new steps below:

System-wide install
-------------------

pip install http://bitbucket.org/dotcloud/clapp/get/d5b7bc13ea29.gz


Developer install (probably what you want if you're reading this)
-----------------------------------------------------------------

hg clone http://bitbucket.org/dotcloud/clapp
cd clapp
curl -O http://bitbucket.org/ianb/virtualenv/raw/1.4.3/virtualenv.py
python virtualenv.py --distribute --no-site-packages env
./env/bin/python setup.py install
. ./env/bin/activate

Copy and configure the sample image
-----------------------------------

cp -R sample.clapp host1.clapp
clapp.py host1.clapp '{"hostname": "host1"}'
cat sample.clapp/etc/hostname


Ta-da!

Re: [clapp] clapp proof-of-concept

From:
Solomon Hykes
Date:
2009-12-14 @ 08:44
On Mon 2009-12-14 09:42 , Solomon Hykes wrote:

> # echo '<%= config.hostname %>'>  lenny.clapp/etc/hostname

Correction: use "args.hostname", not "config.hostname". The 
configuration format is defined in the code as a json-schema.