[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vmdebootstrap plans



Hi Lars,

I'm really wondering why you want to use YAML for this? Your examples
look like things you could easily implement in shell, if you provide
some functions, subroutines or external programs that implement your
steps. Then your DSL would just be a shell script that the user has to
write.


create_raw_file $size $image
create_partition_table msdos
create_partition $bootsize ext2 /boot bootable
create_partition rest ext4 /
mount_all

and so on.

    >   The "step:" key specifies the step to execute. The other keys are
    >   parameters for the step. The {{...}} parts are where Jinja2 is used
    >   to expand variable values.
These things are very similar to calling commands with parameters in a
shell script without the need of YAML and Jinja2. Much easier and more
common for sysadmins IMO.

Just my two cents.
Thomas

>>>>> On Fri, 11 Nov 2016 14:09:39 +0000, Lars Wirzenius <liw@liw.fi> said:

    > * The YAML might look somethin like this:

    >         - step: create_raw_file
    >           size: {{ size }}
    >           filename: {{ image }}
    >         - step: create_partition_table
    >           partition_table_type: msdos
    >         - step: create_partition
    >           size: {{ bootsize }}
    >           partition_type: ext2
    >           bootable: yes
    >           mount_point: /boot
    >         - step: create_partition
    >           size: rest
    >           partition_type: ext4
    >           mount_point: /
    >         - step: mount_all
    >         - step: debootstrap
    >         - step: install_grub
    >         - step: run_customization_script
    >           script: {{ customize }}
    >         - step: cleanup
    >         - step: convert_image_to_output_format
    >           output_format: qcow2


Reply to: