set mirror in bootstrapper instead of image

This commit is contained in:
Olivier Sallou 2013-08-13 09:52:03 +02:00
parent df9ac2c0fb
commit afa9352d85
3 changed files with 13 additions and 9 deletions

View file

@ -13,7 +13,8 @@
"image_file": { "type": "string" },
"tarball": { "type": "boolean" },
"tarball_dir": { "type": "string" },
"device" : { "type" : "string" }
"device" : { "type" : "string" },
"mirror": { "type": "string" }
},
"required": ["mount_dir"]
},
@ -30,8 +31,7 @@
},
"timezone": { "type": "string" },
"locale": { "type": "string" },
"charmap": { "type": "string" },
"mirror": { "type": "string" }
"charmap": { "type": "string" }
},
"required": ["release", "architecture", "timezone", "locale", "charmap"]
},

View file

@ -13,8 +13,8 @@ def get_bootstrap_args(info):
options.append('--include=' + ','.join(include))
if len(exclude) > 0:
options.append('--exclude=' + ','.join(exclude))
if info.manifest.system['mirror']:
mirror = info.manifest.system['mirror']
if info.manifest.bootstrapper['mirror']:
mirror = info.manifest.bootstrapper['mirror']
else:
mirror = 'http://http.debian.net/debian'
arguments = [info.manifest.system['release'], info.root, mirror]

View file

@ -3,7 +3,8 @@
"virtualization": "ide",
"bootstrapper": {
"mount_dir": "/mnt/target"
"mount_dir": "/mnt/target",
"mirror" : "http://ftp.fr.debian.org/debian/"
},
"image": {
"name" : "debian-{release}-{architecture}-{virtualization}-{%y}{%m}{%d}",
@ -14,8 +15,7 @@
"architecture": "amd64",
"timezone" : "UTC",
"locale" : "en_US",
"charmap" : "UTF-8",
"mirror" : "http://ftp.fr.debian.org/debian/"
"charmap" : "UTF-8"
},
"volume": {
"backing" : "raw",
@ -32,6 +32,10 @@
"root_password": {
"enabled": true,
"password": "test"
}
},
"convert_image": {
"enabled": true,
"format": "vdi"
}
}
}