mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Change location of GCE apt repo's (this is an interim change).
hange gcutil command to gcloud as gcutil is deprecated.
This commit is contained in:
parent
e45cd497da
commit
977b1c23a3
2 changed files with 5 additions and 5 deletions
|
@ -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'])
|
||||
|
|
|
@ -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])
|
||||
|
|
Loading…
Add table
Reference in a new issue