BBahmni 한국어 매뉴얼검색
한국어 번역 완료
한국어English

Build Bahmni Vagrant Box using Packer

This document describes how to build Bahmni Vagrant Box using packer. Packer is used to build images. Packer installs and configures all the software for a machine at the time the image is built. Packer also has the ability to take the results of a image and turn it into a vagrant box. For more information on packer check https://www.packer.io/intro/index.html

Steps to build the Bahmni vagrant box

  1. Install Packerpacker : https://www.packer.io/intro/getting-started/setup.html
  2. Clone bahmni-vagrant repo from GitHub
    git clone https://github.com/Bahmni/bahmni-vagrant.git
  3. From with in bahmni-vagrant directory run the below command  e.g: python render_template.py 0.88 2.2.0.0]]>This will create a template.json file inside the packer directory. If the template.json is already there in the packer folder it will create template_rendered.json file.
    cd bahmni-vagrant
    python render_template.py <bahmni_version>  <ansible_version>
    e.g: python render_template.py 0.88 2.2.0.0
  4. From with in the packer directory run the below command.&nbsp;Before running the below command need to delete&nbsp;one and two set of lines&nbsp;from template_rendered.json file as it will try to push the box to Atlas and expects the credentials.As an alternative to manually deleting the Atlas credentials from the JSON template, you can use jq to dynamically remove them before passing this through to the packer build step.Once the Atlas credentials are removed you can run this:Once we run the above command, packer will start building the Bahmni Vagrant Box by downloading the CentOS image from remote repository. The entire process will take at least one hour.
    jq '.["post-processors"][0] |= map(select(.type != "atlas"))' template_rendered.json | packer build -
    cd packer
    packer build template_rendered.json
원문 정보

Bahmni Wiki · CC BY-SA 4.0

원문 보기 ↗