2
0
mirror of https://github.com/frappe/bench.git synced 2024-09-23 12:39:01 +00:00
bench/vm/Readme.md

26 lines
1.0 KiB
Markdown
Raw Normal View History

2015-12-24 00:50:48 +00:00
### ERPNext VM Builder
2015-12-24 00:25:55 +00:00
2015-12-24 00:50:48 +00:00
#### Steps to build a vm image
2015-12-24 00:25:55 +00:00
2015-12-24 00:50:48 +00:00
* Install VirtualBox
* Place a `base.ova` ubuntu base image in the current directory.
* `./packer build vm.json` builds a new vm.
2015-12-24 00:25:55 +00:00
2015-12-24 00:50:48 +00:00
#### How it works
2015-12-24 00:25:55 +00:00
2015-12-24 00:50:48 +00:00
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.
2015-12-24 00:25:55 +00:00
2016-01-08 05:56:52 +00:00
#### 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.
2016-01-08 06:01:34 +00:00
#### Packer binary
The binary included in this tree is compiled (for linux amd64) with a fix for https://github.com/mitchellh/packer/issues/2447. We can remove it once a new version of packer is released.