From 5a4c6477ba20681218ae55757cc9142ca688aa58 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Wed, 23 Dec 2015 16:50:48 -0800 Subject: [PATCH] Add readme for vm builder --- vm/Readme.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/vm/Readme.md b/vm/Readme.md index 48691765..66b87cce 100644 --- a/vm/Readme.md +++ b/vm/Readme.md @@ -1,10 +1,17 @@ -# ERPNext VM Builder +### ERPNext VM Builder -`./packer build vm.json` builds a new vm. +#### Steps to build a vm image -It uses packer (binary for x86_64 put here till https://github.com/mitchellh/packer/issues/2391 is resolved). +* Install VirtualBox +* Place a `base.ova` ubuntu base image in the current directory. +* `./packer build vm.json` builds a new vm. +#### How it works -Ansible -======= +Packer imports the base image in a virtual machine and boots it. It runs the following + +* `scripts/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.