apt proxy configuration, local provider and general cloud-init hacking

Sidnei da Silva sidnei.da.silva at canonical.com
Wed Jul 31 21:22:52 UTC 2013


I'm taking a look at https://bugs.launchpad.net/juju-core/+bug/1203816 and
did a minimal attempt at implementing a solution for the local provider,
which sets apt_mirror in the cloud-init config exactly like the
ubuntu-cloud lxc template does.

Then I took a look at how pyjuju did this, and it basically hardcoded the
apt_proxy setting (note: different from apt_mirror) in the cloud-init
config to the the first zookeeper node, port 3142.

A third alternative would be, in the local provider, to sniff out the
host's apt proxy config via 'apt-config dump Acquire::http::Proxy'.

A fourth alternative that Adam G. brought up would be to just generally
expose the cloud-init template as something that could be generally set in
any environment. For example:

environments:
  local:
    type: local
    cloud-init-template: ~/.juju/cloud-init-local.cfg
  hp:
    type: openstack
    cloud-init-template: ~/.juju/cloud-init-hp.cfg

...

cat ~/.juju/cloud-init-local.cfg:
apt_proxy: http://10.0.3.1:3142

...

cat ~/.juju/cloud-init-hp.cfg:
apt_mirror_search_dns: True

Juju would take this base template and amend it with it's own cloud-config
settings. It's unclear which one should take precedence in the case of
conflicting settings. Maybe Juju's setting should always override the
template.

Being able to specify the cloud-init config would open the port for other
pre-juju setup steps to be performed during the machine boot, including
things like the 'basenode' charm-pre-install hacks that we do for IS.

Is this a generally desirable feature for juju-core? Should we restrict
configurability to only piecemeal items like the apt_proxy setting instead?

-- 
Sidnei

Make the most of Ubuntu with Ubuntu One
http://one.ubuntu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130731/00691ee4/attachment-0001.html>


More information about the Juju mailing list