2012-07-06 13:46:23 |
Scott Moser |
description |
currently, in EC2, there is logic to select a mirror based on existence of a dns name that matches the region. Ie
* cloud-init checks ec2 metadata for availability zone (like us-east-1a)
* take off the 'a',
* check for dns name of us-east-1.ec2.archive.ubuntu.com
* use that as mirror if available or fall back to default.
This is good enough for EC2, but not so good for private clouds.
A private cloud may have either a proxy or a full mirror, and want to use that without requiring custom user data on every launch or modifications to the stock images.
To support this, I propose:
* if user-data specifies 'apt_mirror' or 'apt_proxy' use that.
* if a dnsname exists for $availability-zone.archive in the default domain, use that.
* if a dnsname exists in default domain for 'apt-proxy' then configure apt to use that as the proxy
* if a dnsname exists in default domain for 'ubuntu-mirror' then configure apt to use that mirror
This allows the owner of a private cloud to set up dns entries so that cloud guest images "just work", but also allow for user configuration via cloud-config data like:
apt_proxy: http://192.168.1.1:3128/ |
currently, in EC2, there is logic to select a mirror based on existence of a dns name that matches the region. Ie
* cloud-init checks ec2 metadata for availability zone (like us-east-1a)
* take off the 'a',
* check for dns name of us-east-1.ec2.archive.ubuntu.com
* use that as mirror if available or fall back to default.
This is good enough for EC2, but not so good for private clouds.
A private cloud may have either a proxy or a full mirror, and want to use that without requiring custom user data on every launch or modifications to the stock images.
To support this, I propose:
* if user-data specifies 'apt_mirror' or 'apt_proxy' use that.
* if a dnsname exists for $availability-zone.archive in the default domain, use that.
* if a dnsname exists in default domain for 'apt-proxy' then configure apt to use that as the proxy
* if a dnsname exists in default domain for 'ubuntu-mirror' then configure apt to use that mirror
This allows the owner of a private cloud to set up dns entries so that cloud guest images "just work", but also allow for user configuration via cloud-config data like:
apt_proxy: http://192.168.1.1:3128/
Related bugs:
* bug 974509: cloud-init selects wrong mirror with dns server redirection |
|