2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-23 04:29:02 +00:00
bench/vm
2018-03-09 14:55:23 +05:30
..
http Fixes for VM build issue 2018-03-08 13:41:09 +05:30
scripts Vagrant box addition 2018-03-09 14:55:23 +05:30
build.py Fixes for VM build issue 2018-03-08 13:41:09 +05:30
Readme.md Fixes for VM build issue 2018-03-08 13:41:09 +05:30
Vagrantfile Vagrant box addition 2018-03-09 14:55:23 +05:30
vm-develop.json Vagrant box addition 2018-03-09 14:55:23 +05:30
vm-production.json Vagrant box addition 2018-03-09 14:55:23 +05:30

ERPNext VM Builder

Steps to build a VM Image

  • /opt/packer build vm.json builds a new VM

How it works

Packer imports the base image in a virtual machine and boots it. It runs the following

  • scripts/debian_family/install_ansible.sh sets up ansible on the vm.
  • The ansible/vm.yml playbook sets up the dependencies, installs a bench and sets up a site. It also puts it into production.
  • scripts/set_message.sh sets welcome message (with update instructions) in the vm.
  • scripts/zerofree.sh writes zero to all the free space in the disk, it shrinks the disk image.

For a build server

Running the build.py script builds a vm and puts it in ~/public. It also writes a latest.json file in ~/public with filename of the latest build and its md5sum.