Merge pull request #262 from zmarano/master

Change location of GCE apt repo's (this is an interim change).
This commit is contained in:
Anders Ingemann 2015-12-15 20:25:41 +01:00
commit 9a838dea15
2 changed files with 5 additions and 5 deletions

View file

@ -20,7 +20,7 @@ class SetPackageRepositories(Task):
info.source_lists.add('main', 'deb-src http://http.debian.net/debian {system.release} ' + components)
info.source_lists.add('backports', 'deb http://http.debian.net/debian {system.release}-backports ' + components)
info.source_lists.add('backports', 'deb-src http://http.debian.net/debian {system.release}-backports ' + components)
info.source_lists.add('goog', 'deb http://goog-repo.appspot.com/debian pigeon main')
info.source_lists.add('google', 'deb http://packages.cloud.google.com/apt google-cloud-compute-legacy-{system.release} main')
class ImportGoogleKey(Task):
@ -32,7 +32,7 @@ class ImportGoogleKey(Task):
@classmethod
def run(cls, info):
key_file = os.path.join(info.root, 'google.gpg.key')
log_check_call(['wget', 'https://goog-repo.appspot.com/debian/key/public.gpg.key', '-O', key_file])
log_check_call(['wget', 'https://packages.cloud.google.com/apt/doc/apt-key.gpg', '-O', key_file])
log_check_call(['chroot', info.root, 'apt-key', 'add', 'google.gpg.key'])
os.remove(key_file)
@ -53,6 +53,6 @@ class CleanGoogleRepositoriesAndKeys(Task):
if len(key.split(':')) == 13 and
key.split(':')[9].find('@google.com') > 0]
log_check_call(['chroot', info.root, 'apt-key', 'del', key_id[0]])
apt_file = os.path.join(info.root, 'etc/apt/sources.list.d/goog.list')
apt_file = os.path.join(info.root, 'etc/apt/sources.list.d/google.list')
os.remove(apt_file)
log_check_call(['chroot', info.root, 'apt-get', 'update'])

View file

@ -55,7 +55,7 @@ class RegisterImage(Task):
image_description = info._gce['lsb_description']
if 'description' in info.manifest.provider:
image_description = info.manifest.provider['description']
log_check_call(['gcutil', '--project=' + info.manifest.provider['gce_project'],
'addimage', info._gce['image_name'],
log_check_call(['gcloud', 'compute', '--project=' + info.manifest.provider['gce_project'],
'image', 'create', info._gce['image_name'], '--source-uri=',
info.manifest.provider['gcs_destination'] + info._gce['tarball_name'],
'--description=' + image_description])