lxc apt configuration

Stuart Bishop stuart.bishop at canonical.com
Mon Jul 29 10:50:26 UTC 2013


On Fri, Jul 26, 2013 at 6:37 PM, Sidnei da Silva
<sidnei.da.silva at canonical.com> wrote:
> On Fri, Jul 26, 2013 at 6:20 AM, Stuart Bishop <stuart.bishop at canonical.com>
> wrote:
>>
>> Hi.
>>
>> Can anyone help me get my juju spawned lxc containers using a mirror
>> or better yet my local apt-cacher-ng proxy?
>>
>> The containers I spawn manually get setup correctly via the MIRROR
>> environment variable, so I've opened Bug #1204092. I'm interested in
>> alternative approaches or workarounds that work with juju, as the
>> update/upgrade step is taking several minutes with the default UK
>> servers.
>
>
> I was looking at the same, and came up with this as a workaround:
>
> http://paste.ubuntu.com/5914532/
>
> If you have a charm that supports basenode already, just drop this into
> exec.d/<something>/charm-pre-install with chmod +x.
>
> Of course, a proper fix would be more than welcome.

This will work after the charm has been pushed out, but I'm trying to
get the provisioning stage sped up. lxc-create is quite fast, but juju
add-machine takes several minutes. After running add-machine, I can
manually ssh in to lxc container and watch /var/log/cloud-init.output
slowly pull stuff down.

Jul 29 10:27:44 stub-local-machine-1 [CLOUDINIT]
cc_apt_update_upgrade.py[DEBUG]: mirror info: {'security':
'http://security.ubuntu.com/ubuntu', 'primary':
'http://archive.ubuntu.com/ubuntu', 'mirror':
'http://archive.ubuntu.com/ubuntu'}

-- 
Stuart Bishop <stuart.bishop at canonical.com>



More information about the Juju mailing list