From 064fb662804fbdbdf41d1d768acaec211669eabd Mon Sep 17 00:00:00 2001 From: Saurabh Date: Thu, 7 Mar 2019 19:04:23 +0530 Subject: [PATCH] fix: ubuntu iso version and packer path --- vm/build.py | 10 +++++----- vm/vm-develop.json | 4 ++-- vm/vm-production.json | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vm/build.py b/vm/build.py index 30cf7da6..e5434013 100644 --- a/vm/build.py +++ b/vm/build.py @@ -33,14 +33,14 @@ def install_virtualbox(): check_output(['bench', 'install', 'virtualbox']) def install_packer(): - if not os.path.exists(os.path.join('/', 'opt', 'packer')): + if not spawn.find_executable("packer") or not os.path.exists(os.path.join('/', 'opt', 'packer')): check_output(['bench', 'install', 'packer']) def silent_remove(name, is_dir=False): ''' Method to safely remove a file or directory, without throwing error if file doesn't exist - + By default takes in file as input, for directory: is_dir = True ''' @@ -59,8 +59,8 @@ def cleanup(): silent_remove("packer_virtualbox-iso_virtualbox-iso_md5.checksum") def build_vm(): - check_output(["/opt/packer", "build", "vm-production.json"]) - check_output(["/opt/packer", "build", "vm-develop.json"]) + check_output(["packer", "build", "vm-production.json"]) + check_output(["packer", "build", "vm-develop.json"]) def md5(build, file): return check_output("md5sum '{} Builds/{}'".format(build, file), shell=True).split()[0] @@ -116,7 +116,7 @@ def delete_old_vms(): silent_remove(os.path.join(PUBLIC_DIR, 'BACKUPS'), is_dir=True) def move_current_vms(): - os.mkdir(os.path.join(PUBLIC_DIR, 'BACKUPS')) + os.mkdir(os.path.join(PUBLIC_DIR, 'BACKUPS')) for file in os.listdir(PUBLIC_DIR): if file in NEW_FILES or file in SYMLINKS or file == 'BACKUPS': continue diff --git a/vm/vm-develop.json b/vm/vm-develop.json index d5173b93..0e8ca8aa 100644 --- a/vm/vm-develop.json +++ b/vm/vm-develop.json @@ -33,8 +33,8 @@ "format": "ova", "guest_os_type": "Ubuntu_64", "headless": true, - "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.4-server-amd64.iso", - "iso_checksum": "6a7f31eb125a0b2908cf2333d7777c82", + "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.6-server-amd64.iso", + "iso_checksum": "ac8a79a86a905ebdc3ef3f5dd16b7360", "iso_checksum_type": "md5", "ssh_username": "frappe", "ssh_password": "frappe", diff --git a/vm/vm-production.json b/vm/vm-production.json index 76d2c3be..2d584950 100644 --- a/vm/vm-production.json +++ b/vm/vm-production.json @@ -33,8 +33,8 @@ "format": "ova", "guest_os_type": "Ubuntu_64", "headless": true, - "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.4-server-amd64.iso", - "iso_checksum": "6a7f31eb125a0b2908cf2333d7777c82", + "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.6-server-amd64.iso", + "iso_checksum": "ac8a79a86a905ebdc3ef3f5dd16b7360", "iso_checksum_type": "md5", "ssh_username": "frappe", "ssh_password": "frappe",