Juju architecture questions - nonprovider
Thomas Leonard
tal at it-innovation.soton.ac.uk
Thu Sep 20 09:41:11 UTC 2012
On 2012-09-17 17:57, Clint Byrum wrote:
> Excerpts from Thomas Leonard's message of 2012-09-17 02:06:03 -0700:
[...]
>> It's also usually uncertain where we will be deploying, so being able to
>> handle several different cloud types is useful. Often there is no cloud at
>> all, so having something which could deploy LXC containers over a fixed set
>> of existing machines would be very useful (like an extended "local"
>> deployment method).
>>
>
> I've often thought about a more static "nonprovider" environment type
> where the addresses of machines are just listed somewhere and SSH is
> used to install the juju agents. It comes up often enough, I think its
> time we put this on our "experiments to try soon" list.
>
> https://bugs.launchpad.net/juju/+bug/1052065
OK, I had a look into this. How should the cloud init stuff work? For EC2,
EC2LaunchMachine creates a CloudInit and passes that to the new machine,
which causes everything to be installed and the machine agents started.
For LXC, there's a juju-create script which seems to do much the same
things. e.g.
(juju-create)
if [ $JUJU_ORIGIN = "ppa" ]; then
# The echo forces an enter to get around the interactive
# prompt in apt-add-repository
echo y | apt-add-repository ppa:juju/pkgs
apt-get update
apt-get install $APT_OPTIONS juju python-txzookeeper
elif [ $JUJU_ORIGIN = "proposed" ]; then
# Enabled testing of proposed updates
echo "deb http://archive.ubuntu.com/ubuntu/ $JUJU_SERIES-proposed
main universe" >> /etc/apt/sources.list
apt-get update
apt-get install $APT_OPTIONS juju python-txzookeeper
elif [[ $JUJU_ORIGIN = lp:* ]]; then
apt-get install $APT_OPTIONS python-txzookeeper python-setuptools
python-twisted python-txaws python-yaml openssh-client tmux python-oauth
mkdir /usr/lib/juju
# light weight checkout is significantly faster, no history though
bzr co --lightweight $JUJU_ORIGIN /usr/lib/juju/juju
bash -c "cd /usr/lib/juju/juju && sudo python setup.py develop"
chmod -R a+r /usr/lib/juju
elif [ $JUJU_ORIGIN = "distro" ]; then
apt-get install --force-yes -y juju python-txzookeeper
fi
vs
(_create_cloud_init):
origin = config.get("juju-origin")
if origin:
if origin.startswith("lp:"):
cloud_init.set_juju_source(branch=origin)
elif origin == "ppa":
cloud_init.set_juju_source(ppa=True)
elif origin == "proposed":
cloud_init.set_juju_source(proposed=True)
else:
# Ignore other values, just use the distro for sanity
cloud_init.set_juju_source(distro=True)
Can one of these be reused, or is a third setup system needed?
--
Dr Thomas Leonard
IT Innovation Centre
Gamma House, Enterprise Road,
Southampton SO16 7NS, UK
tel: +44 23 8059 8866
mailto:tal at it-innovation.soton.ac.uk
http://www.it-innovation.soton.ac.uk/
More information about the Juju
mailing list