File: components.rst

package info (click to toggle)
python-diskimage-builder 3.37.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,572 kB
  • sloc: sh: 7,380; python: 6,444; makefile: 37
file content (90 lines) | stat: -rw-r--r-- 3,026 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Components
==========

`disk-image-create [-a amd64|armhf|arm64] -o filename {element} [{element} ...]`

    Create an image of element {element}, optionally mixing in other elements.
    Element dependencies are automatically included. Support for other
    architectures depends on your environment being able to run binaries of
    that platform and/or packages being available for the architecture. For
    instance, to enable armhf on Ubuntu install the qemu-user-static package,
    or to enable arm64 on CentOS setup the RDO aarch64 package repositories.
    The default output format from disk-image-create is qcow2. To instead
    output a tarball pass in "-t tar". This tarball could then be used as an
    image for a linux container(see docs/docker.md).

`ramdisk-image-create -o filename {element} [{element} ...]`

    Create a kernel+ ramdisk pair for running maintenance on bare metal
    machines (deployment, inventory, burnin etc).

    To generate kernel+ramdisk pair for use with nova-baremetal, use::

        ramdisk-image-create -o deploy.ramdisk deploy-baremetal

    Ironic no longer supports images created like this.

`diskimage-builder [--dry-run] [--stop-on-failure] [--help] filename.yaml [filename2.yaml...]`

    A YAML defined wrapper over `disk-image-create` and `ramdisk-image-create`.

    To generate kernel+ramdisk pair for use with nova-baremetal, specify the YAML:

    .. code-block:: yaml

        - imagename: deploy.ramdisk
          ramdisk: true
          elements:
          - deploy-baremetal

    Duplicate `imagename` entries are merged into a single entry, allowing customizations over
    a base image definition. If an `imagename` is missing, the `imagename` from the previous
    entry is implied:

    .. code-block:: yaml

        # base image definition
        - imagename: output.qcow
          elements:
          - vm
          - block-device-gpt
          - ubuntu-minimal
          debug-trace: 1
          environment:
            DIB_IMAGE_SIZE: '10'

        # debug logging customization
        - imagename: output.qcow
          debug-trace: 2

        # adding element customization
        - elements:
          - devuser
          environment:
            DIB_DEV_USER_USERNAME: 'myuser'
            DIB_DEV_USER_PWDLESS_SUDO: 'Yes'
            DIB_DEV_USER_AUTHORIZED_KEYS: '/home/myuser/.ssh/id_rsa.pub'

        # resulting image entry which will be built
        - imagename: output.qcow
          elements:
          - vm
          - block-device-gpt
          - ubuntu-minimal
          - devuser
          debug-trace: 2
          environment:
            DIB_DEV_USER_USERNAME: 'myuser'
            DIB_DEV_USER_PWDLESS_SUDO: 'Yes'
            DIB_DEV_USER_AUTHORIZED_KEYS: '/home/myuser/.ssh/id_rsa.pub'
            DIB_IMAGE_SIZE: '10'

`element-info`

    Extract information about elements.

`tests/run_functests.sh`

    This runs a set of functional tests for diskimage-builder.

elements can be found in the top level elements directory.