1 Star 0 Fork 0

odooer/bench

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

ERPNext VM Builder

Steps to build a VM Image

  • python build.py builds a new Production VM, a Dev VM and a Dev Vagrant Box

Requirements

  • Bench should be installed
  • Ansible should be installed

How it works

Apart from the above the rest is handled by bench:

  • Install prerequisites if not already installed
    • virtualbox
    • packer
  • Cleanup
    • Clean the required directories
  • Build the VM using packer
    • Packer downloads the mentioned Ubuntu iso, boots a virtual machine and preceeds the preseed.cfg file into it in order to setup a clean Ubuntu OS
    • Then packer uses ssh to enter the virtual machine to execute the required commands
    • scripts/debian_family/install_ansible.sh sets up ansible on the vm.
    • Depending on the VM being built, the vm-develop.json or the vm-production.json is used
    • scripts/set_message.sh sets welcome message (with update instructions) in the vm.
    • scripts/cleanup.sh writes zeros to all the free space in the disk, it shrinks the disk image
  • Set the correct permissions for the built Vagrant and Virtual Appliance Images
  • Cleanup
    • Delete the generated files from the required directories
  • Restart nginx

Running the build.py script builds the VMs and puts them in ~/Public. It also creates the md5 hashes for the same, and puts them in the same folder.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/odooer/bench.git
git@gitee.com:odooer/bench.git
odooer
bench
bench
develop

搜索帮助