summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-08-22 00:28:29 -0400
committerScott Moser <smoser@ubuntu.com>2012-08-22 00:28:29 -0400
commitd713d7bc5e2b308d11364ccc8701fc2968f9f151 (patch)
tree77a4825d5f945264a1304a0626b463b400fcf43f /config
parent49242c2a2e7e0ab6812de741b4ac2e8d1888ad08 (diff)
downloadvyos-cloud-init-d713d7bc5e2b308d11364ccc8701fc2968f9f151.tar.gz
vyos-cloud-init-d713d7bc5e2b308d11364ccc8701fc2968f9f151.zip
rework package mirror selection
There are several changes here. * Datasource now has a 'availability_zone' getter. * get_package_mirror_info * Datasource convenience 'get_package_mirror_info' that calls the configured distro, and passes it the availability-zone * distro has a get_package_mirror_info method * get_package_mirror_info returns a dict that of name:mirror this is to facilitate use of 'security' and 'primary' archive. * this supports searching based on templates. Any template that references undefined values is skipped. These templates can contain 'availability_zone' (LP: #1037727) * distro's mirrors can be arch specific (LP: #1028501) * rename_apt_lists supports the "mirror_info" rather than single mirror * generate_sources_list supports mirror_info, and as a result, the ubuntu mirrors reference '$security' rather than security (LP: #1006963) * remove the DataSourceEc2 specific mirror selection, but instead rely on the above filtering, and the fact that 'ec2_region' is only defined if the availability_zone looks like a ec2 az.
Diffstat (limited to 'config')
-rw-r--r--config/cloud.cfg16
1 files changed, 14 insertions, 2 deletions
diff --git a/config/cloud.cfg b/config/cloud.cfg
index 700f3d7a..106ab01a 100644
--- a/config/cloud.cfg
+++ b/config/cloud.cfg
@@ -74,6 +74,18 @@ system_info:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/
- package_mirror: http://archive.ubuntu.com/ubuntu
- package_mirror_ec2_template: http://%(region)s.ec2.archive.ubuntu.com/ubuntu/
+ package_mirrors:
+ - arches: [i386, amd64]
+ failsafe:
+ primary: http://archive.ubuntu.com/ubuntu
+ security: http://security.ubuntu.com/ubuntu
+ search:
+ primary:
+ - http://%(ec2_region)s.ec2.archive.ubuntu.com/ubuntu/
+ - http://%(availability_zone)s.clouds.archive.ubuntu.com/ubuntu/
+ security: []
+ - arches: [armhf, armel, default]
+ failsafe:
+ primary: http://ports.ubuntu.com/ubuntu
+ security: http://ports.ubuntu.com/ubuntu
ssh_svcname: ssh