Skip to content

tool_reqs

Pedro Ielpi edited this page Sep 19, 2024 · 11 revisions

Requirements

Build system

Any Linux distribution can be used to build the contextualization packages and appliances. However, it is probably easier to meet the dependencies below either with a deb-based system (e.g. Debian or Ubuntu) or with Fedora.

Hardware Requirements

The host where the build will take place should have decent hardware, considering that it will launch several VMs, possibly in parallel if you decide so, and it will also generate lots of qcow2 images created from multiple ISOs. In general:

  • RAM: 8GB+
  • CPU: 2+
  • Disk: 40GB+

Having little memory or low disk space can result in OOM during the build process or a full disk scenario which requires its own set of troubleshooting.

KVM acceleration is required to build the appliances.

Software Dependencies

Linux Context Packages

  • Ruby
  • fpm Ruby gem. Use gem install
  • dpkg
  • rpm

Windows Context Packages

Image Building

  • make
  • Packer >= 1.9.4
  • cloud-utils
  • qemu-utils (includes qemu-img)
  • guestfs-tools (includes virt-sysprep)

It is recommended to install the latest version of Packer from Hashicorp official repositories. As a dependency, the Qemu Packer plugin will be installed as part of the build process.

Installing Dependencies Through Ansible

To automate the installation of the one-apps repo dependencies, you can include the following Ansible tasks in your playbooks:

- name: Install OS packages
  ansible.builtin.package:
    name: "{{ _packages[ansible_os_family] }}"
    update_cache: true
  vars:
    _packages:
      Debian: [bash, cloud-utils, genisoimage, libguestfs0, libguestfs-tools, make, nginx, qemu-utils, rpm, rsync, ruby, qemu, qemu-system-x86]
  register: package
  until: package is success
  retries: 3
  delay: 10

- name: Install packer binary
  ansible.builtin.unarchive:
    src: "https://releases.hashicorp.com/packer/{{ _version }}/packer_{{ _version }}_linux_amd64.zip"
    dest: /usr/local/bin/
    remote_src: true
    creates: /usr/local/bin/packer
  vars:
    _version: 1.10.0

- name: Install ruby gems
  ansible.builtin.shell:
    cmd: gem install --no-document backports fpm
    executable: /bin/bash
    creates: /usr/local/bin/fpm

It is recommended that you use a recent Ansible version. Ansible < 2.10 will not successfully execute the last step. These Ansible tasks do not include the build requirements for generating the Windows context packages.

Clone this wiki locally