<commit_before>Kubernetes elements
===================

This directory contains `[diskimage-builder](https://github.com/openstack/diskimage-builder)`
elements to build an image which contains kubernetes required to use kubecluster-fedora-ironic.yaml.

An example fedora based image and uploaded to glance with the following:

    git clone https://git.openstack.org/openstack/magnum
    git clone https://git.openstack.org/openstack/diskimage-builder.git
    git clone https://git.openstack.org/openstack/dib-utils.git
    export PATH="${PWD}/dib-utils/bin:$PATH"
    export ELEMENTS_PATH=diskimage-builder/elements
    export ELEMENTS_PATH=${ELEMENTS_PATH}:magnum/magnum/drivers/k8s_fedora_atomic_v1/image/ironic
    export DIB_RELEASE=23
    diskimage-builder/bin/disk-image-create baremetal \
      fedora selinux-permissive \
      kubernetes \
      -o fedora-23-kubernetes.qcow2

    KERNEL_ID=`glance image-create --name fedora-k8s-kernel \
                                   --visibility public \
                                   --disk-format=aki \
                                   --container-format=aki \
                                   --file=fedora-23-kubernetes.vmlinuz \
                                   | grep id | tr -d '| ' | cut --bytes=3-57`
    RAMDISK_ID=`glance image-create --name fedora-k8s-ramdisk \
                                    --visibility public \
                                    --disk-format=ari \
                                    --container-format=ari \
                                    --file=fedora-23-kubernetes.initrd \
                                    | grep id |  tr -d '| ' | cut --bytes=3-57`
    BASE_ID=`glance image-create --name fedora-k8s \
                                    --os-distro fedora \
                                    --visibility public \
                                    --disk-format=qcow2 \
                                    --container-format=bare \
                                    --property kernel_id=$KERNEL_ID \
                                    --property ramdisk_id=$RAMDISK_ID \
                                    --file=fedora-23-kubernetes.qcow2 \
                                    | grep -v kernel | grep -v ramdisk \
                                    | grep id | tr -d '| ' | cut --bytes=3-57`<commit_msg>[ironic][doc] Updated ironic image build doc<commit_after>Kubernetes elements
===================

This directory contains `[diskimage-builder](https://github.com/openstack/diskimage-builder)`
elements to build an image which contains kubernetes required to use kubecluster-fedora-ironic.yaml.

An example fedora based image and uploaded to glance with the following:

    git clone https://git.openstack.org/openstack/magnum
    git clone https://git.openstack.org/openstack/diskimage-builder.git
    git clone https://git.openstack.org/openstack/dib-utils.git
    export PATH="${PWD}/dib-utils/bin:$PATH"
    export ELEMENTS_PATH=diskimage-builder/elements
    export ELEMENTS_PATH=${ELEMENTS_PATH}:magnum/magnum/drivers/k8s_fedora_ironic_v1/image
    export DIB_RELEASE=24
    diskimage-builder/bin/disk-image-create baremetal \
      fedora selinux-permissive \
      kubernetes \
      -o fedora-24-kubernetes.qcow2

    KERNEL_ID=`glance image-create --name fedora-k8s-kernel \
                                   --visibility public \
                                   --disk-format=aki \
                                   --container-format=aki \
                                   --file=fedora-24-kubernetes.vmlinuz \
                                   | grep id | tr -d '| ' | cut --bytes=3-57`
    RAMDISK_ID=`glance image-create --name fedora-k8s-ramdisk \
                                    --visibility public \
                                    --disk-format=ari \
                                    --container-format=ari \
                                    --file=fedora-24-kubernetes.initrd \
                                    | grep id |  tr -d '| ' | cut --bytes=3-57`
    BASE_ID=`glance image-create --name fedora-k8s \
                                    --os-distro fedora \
                                    --visibility public \
                                    --disk-format=qcow2 \
                                    --container-format=bare \
                                    --property kernel_id=$KERNEL_ID \
                                    --property ramdisk_id=$RAMDISK_ID \
                                    --file=fedora-24-kubernetes.qcow2 \
                                    | grep -v kernel | grep -v ramdisk \
                                    | grep id | tr -d '| ' | cut --bytes=3-57`
{'fraction_non_alphanumeric': 0.10405982905982906, 'fraction_numerical': 0.011538461538461539, 'mean_word_length': 1.2343675417661097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 46, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3434785', 'n_tokens_mistral': 1312, 'n_tokens_neox': 1187, 'n_words': 226}