lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
39 stars 12 forks source link

edi image create command #16

Closed lueschem closed 6 years ago

lueschem commented 6 years ago

Issue Type

Desired Behaviour

edi shall be able to build "images". Images can target various environments such as bare metal, lxd, Docker, ... .

Design Ideas

Implement a command edi image create CONFIG.

The create command shall just expose access to plugins, enable introspection and provide the clean functionality.

The configuration section of the create command might look as follows:

postprocessing_commands:
  10_create_iso:
    path: path to iso plugin/script
    output: {{ edi_project_name }}.iso
    require_root: True
    parameters:
        bingo: bongo
    skip: False
  20_create_vmdk:
    path: path to packer plugin/script
    output: {{ edi_project_name }}.vmdk

Hints:

Plugin:

A plugin might look as follows:

#!/bin/bash
{{ edi_current_plugin_directory }}/some_command --input {{ edi_input_artifact }} --output {{ edi_output_artifact }}

The plugins will be loaded using the jinja2 template engine and then executed. Attention: It will not get executed within its original folder!

lueschem commented 6 years ago

A sample configuration that shows the edi image create functionality will follow.