Skip to content

tool_reqs

Ruben S. Montero edited this page Jan 26, 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.

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.

Ansible Dependencies Installation

The following ansible tasks can be included in your playbooks to automate the installation of the one-apps repo dependencies:

- name: Install OS packages
  ansible.builtin.package:
    name: "{{ _packages[ansible_os_family] }}"
  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

Clone this wiki locally