Local/LXC provider

Michael Nelson michael.nelson at canonical.com
Mon Oct 31 22:30:51 UTC 2011

On Wed, Oct 5, 2011 at 10:01 AM, Kapil Thangavelu
<kapil.thangavelu at canonical.com> wrote:
> Late breaking updates to local provider.
> zookeeperd isn't required anymore, libzookeeper-java suffices and saves an extra
> java process.
> ppa version needed is revno 388
> working config example snippet for a local provider
>  laptop:
>    type: local
>    data-dir: /tmp/local-dev
>    admin-secret: b3a5dee4fb8c4fc9a4db04751e5936f4
>    juju-origin: ppa
>    default-series: oneiric
> please note, that using /tmp for a data-dir won't survive reboots. the
> environment will need to be destroyed and bootstrap unless a more permanent
> location is chosen.

Wow - that really rocks. I just setup a mysql instance and two
wordpress app servers on my netbook (!) with 5 juju commands
(including bootstrapping).

Just notes for things that went unexpectedly:

1) I wasn't able to bootstrap at first, but then read from an irc log
that I needed to reboot my machine after installing lxc [1]
2) I tried *not* installing zookeeper initially (just
libzookeeper-java) as above, but bootstrap still exited telling me to
install zookeeper
3) After deploying, I'd thought something was wrong because the units
were all state==null for 20mins or so until the lxc was setup (first
time on my netbook). Is it possible to show in the state that it is
being setup rather than state==null?

Thanks for the great work!

[1] http://irclogs.ubuntu.com/2011/10/05/%23juju.html#t02:56

> we're looking into issue for some where plymouth --ping hangs at boot in the
> container.
> hth,
> Kapil
> Excerpts from Kapil Thangavelu's message of Tue Oct 04 21:14:32 -0400 2011:
>> Hi Folks,
>> If your interested in trying out the new local/lxc provider for juju, its in the
>> latest daily ppa (and trunk) (revno 385) and could benefit from some further
>> testing. We'd love to hear about any feedback people might have with this new
>> feature.
>> You'll need to setup an environment.yaml with the following provider config
>>    name:
>>      provider: local
>>      data-dir: path-to-some-directory
>>      default-series: oneiric
>> You'll need some additional package dependencies (the cli will warn you at
>> bootstrap if anything is missing), specifically libvirt-bin, lxc, apt-cacher-ng,
>> and zookeeperd.
>> After that you can bootstrap juju (it will do a sudo prompt), this will launch
>> zookeeper and a machine agent (the latter running as root) on the host. All
>> log files and data are kept in the user specific data-dir.
>>  juju bootstrap
>>  juju deploy --repository=examples local:wordpress
>>  juju deploy --repository=examples local:mysql
>>  juju add-relation wordpress mysql
>>  ./bin/juju status
>> If you have any problems getting things running please ping us on the #juju irc
>> channel, or post a bug, please include $data-dir/units/master-customize.log and
>> $data-dir/machine-agent.log in bug reports.
>> The initial container creation will take a few minutes depending on if you've
>> used lxc before as it does a debootstrap (cached subsequently), but additional
>> containers should be quite fast. Ben did some nice work to make this as fast
>> possible using lxc-clone and package caching (apt-cacher-ng) under the hood.
>> The containers created are namespaced in a such way that you can create multiple
>> environments on a machine. The containers also namespaced by user for multi-user
>> machines. Hopefully the need for a sudo/root machine agent. users will disappear
>> with user namespaces next cycle.
>> cheers,
>> Kapil
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju

Michael Nelson
Canonical Ltd.
+49 176 491 53481 (mob)
michael.nelson at canonical.com
IRC nick: noodles (noodles775 on Freenode)
Ubuntu - Linux for human beings | www.ubuntu.com | www.canonical.com

More information about the Juju mailing list