diff --git a/playbooks/install.yaml b/playbooks/install.yaml index 0fbc3c87d..1c76512f2 100644 --- a/playbooks/install.yaml +++ b/playbooks/install.yaml @@ -8,7 +8,7 @@ - { role: bifrost-prep-for-install, when: skip_install is not defined } - bifrost-ironic-install - { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_elements: "ironic-agent {{ ipa_extra_dib_elements | default('') }}", when: create_ipa_image | bool == true } - - { role: bifrost-create-dib-image, dib_imagename: "{{ deploy_image }}", dib_imagetype: "qcow2", dib_elements: "vm serial-console simple-init {{ extra_dib_elements|default('') }}", when: create_image_via_dib == true and transform_boot_image == false } + - { role: bifrost-create-dib-image, dib_imagename: "{{ deploy_image }}", dib_imagetype: "qcow2", dib_elements: "vm serial-console {{ dib_init_element|default('simple-init') }} {{ extra_dib_elements|default('') }}", when: create_image_via_dib == true and transform_boot_image == false } environment: http_proxy: "{{ lookup('env','http_proxy') }}" https_proxy: "{{ lookup('env','https_proxy') }}" diff --git a/playbooks/roles/bifrost-create-dib-image/README.md b/playbooks/roles/bifrost-create-dib-image/README.md index 72d6a588e..33a549fb7 100644 --- a/playbooks/roles/bifrost-create-dib-image/README.md +++ b/playbooks/roles/bifrost-create-dib-image/README.md @@ -39,7 +39,16 @@ dib_os_element: "ubuntu" dib_elements is a space-separated list of elements that will be added to the resulting disk image. -dib_elements: "vm serial-console simple-init" +dib_elements: "vm serial-console" + +dib_init_element is used to set the init tool that will be used to provision +the installed OS. This is an argument that is passed to +[diskimage-builder](http://docs.openstack.org/developer/diskimage-builder/) +which generates a deployable image of the OS defined in 'dib_os_element'. By +default we use 'simple-init'. You can modify this to use other init tools, for +example: cloud-init (see below) + +dib_init_element: simple-init dib_packages is a comma-separated list of packages to be installed on the resulting disk image. @@ -81,6 +90,14 @@ for further information. | --ramdisk-element | dib_rdelement | element name | | -t | dib_installtype | source or package | +Using cloud-init +---------------- + +By default, bifrost uses the 'simple-init' dib element, which will disable +cloud-init. If you have cloud-init enabled in your image(Ubuntu/Fedora) and you +wish to allow configdrive to work with it, you set 'dib_init_element' to +['cloud-init-datasources'](http://docs.openstack.org/developer/diskimage-builder/elements/cloud-init-datasources/README.html). + Dependencies ------------ diff --git a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml index 83ec8ad79..108402afd 100644 --- a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml @@ -1,5 +1,6 @@ --- dib_os_element: "debian" +dib_init_element: "simple-init" dib_env_vars: http_proxy: "{{ lookup('env','http_proxy') }}" https_proxy: "{{ lookup('env','https_proxy') }}"